:root {
    --blue: #155a86;
    --teal: #2b9bb6;
    --gold: #e0b04a;
    --white: #fff;
    --ink: #12334d;
    --muted: #6d7885;
    --line: #dce5ea;
    --soft: #f4f8f8;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Tahoma, Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top right, rgba(43,155,182,.18), transparent 28rem),
        linear-gradient(135deg, rgba(224,176,74,.08) 25%, transparent 25%) 0 0 / 34px 34px,
        #f7fafb;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem clamp(1rem, 4vw, 3rem);
    background: rgba(12,43,68,.97);
    color: var(--white);
    border-bottom: 3px solid var(--gold);
}
.brand { display: flex; align-items: center; gap: .75rem; font-weight: 800; }
.brand img {
    width: 66px;
    height: 66px;
    object-fit: contain;
    background: var(--white);
    border: 2px solid var(--gold);
    border-radius: 8px;
    padding: .35rem;
    box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
.topbar nav { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.topbar a, .topbar button {
    border: 0;
    color: var(--white);
    background: transparent;
    cursor: pointer;
    padding: .45rem .65rem;
    border-radius: 8px;
}
.topbar a:hover, .topbar button:hover { background: rgba(255,255,255,.1); }

.shell { width: min(1120px, calc(100% - 2rem)); margin: 1.5rem auto 3rem; }
.flash, .closed {
    background: #fff8df;
    border: 1px solid #ead28b;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.closed { color: #7a5400; font-weight: 700; }

.login-card {
    width: min(440px, 100%);
    margin: 6vh auto;
    padding: 2rem;
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 24px 70px rgba(21,90,134,.16);
    border-top: 6px solid var(--teal);
    text-align: center;
}
.crescent { color: var(--gold); font-size: 3rem; line-height: 1; }
h1, h2, p { margin-top: 0; }
.hint { color: var(--muted); font-size: .9rem; }

.hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), #1d6f97 58%, var(--teal));
    border-radius: 8px;
    padding: clamp(1.3rem, 4vw, 2.4rem);
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute;
    inset-inline-end: -80px;
    bottom: -120px;
    width: 280px;
    height: 280px;
    border: 24px solid rgba(224,176,74,.25);
    border-radius: 50%;
}
.eyebrow { color: #ffe6a3; font-weight: 700; }
.stat {
    position: relative;
    min-width: 160px;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 8px;
    text-align: center;
    background: rgba(255,255,255,.1);
}
.stat strong { display: block; font-size: 2.5rem; color: #ffe6a3; }

.quick-grid, .admin-grid, .prize-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.tile, .admin-grid a, .panel, .prize, .announcements article {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 12px 30px rgba(21,90,134,.06);
}
.tile, .admin-grid a { min-height: 92px; display: flex; align-items: center; justify-content: space-between; font-weight: 800; }
.admin-grid strong { color: var(--teal); font-size: 1.6rem; }

.page-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}
.page-head p { color: var(--muted); max-width: 560px; }

.prize { display: grid; gap: .6rem; transition: transform .18s ease, opacity .18s ease; }
.prize:hover { transform: translateY(-2px); }
.prize img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--soft); border-radius: 8px; padding: 1rem; }
.prize h2 { font-size: 1.15rem; margin: 0; }
.prize p { color: var(--muted); }
.prize.locked { filter: grayscale(1); opacity: .55; }
.meta { display: flex; justify-content: space-between; gap: .5rem; font-weight: 800; }
.meta span:last-child { color: var(--gold); }

.detail {
    display: grid;
    grid-template-columns: minmax(220px, 360px) 1fr;
    gap: 1.5rem;
    padding: 1.2rem;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--line);
}
.detail img { width: 100%; background: var(--soft); border-radius: 8px; padding: 1rem; }
.detail.locked img { filter: grayscale(1); opacity: .55; }

.announcements { display: grid; gap: .7rem; margin-bottom: 1rem; }
.announcements article { border-inline-start: 6px solid var(--gold); }
.announcements p { margin: .35rem 0 0; color: var(--muted); }

.table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 12px 30px rgba(21,90,134,.06);
}
.table th, .table td { padding: .9rem; border-bottom: 1px solid var(--line); text-align: right; }
.table th { background: var(--blue); color: var(--white); }
.thumb {
    width: 58px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--soft);
    border: 1px solid var(--line);
}

.form { display: grid; gap: .8rem; }
.form.row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
label { display: grid; gap: .35rem; text-align: right; }
input, textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: .75rem .85rem;
    background: var(--white);
}
textarea { min-height: 110px; resize: vertical; }
button, .primary {
    border: 0;
    border-radius: 8px;
    padding: .8rem 1rem;
    cursor: pointer;
    background: var(--teal);
    color: var(--white);
    font-weight: 800;
}
.primary { width: 100%; }
.danger { background: #b73333; padding: .45rem .7rem; }
.button-lite {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: .45rem .7rem;
    background: var(--soft);
    border: 1px solid var(--line);
    color: var(--ink);
    font-weight: 800;
}
.actions {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
}
.check { display: flex; align-items: center; gap: .6rem; }
.check input { width: auto; }

@media (max-width: 720px) {
    .topbar { align-items: flex-start; flex-direction: column; }
    .hero, .page-head { display: block; }
    .stat { margin-top: 1rem; }
    .detail { grid-template-columns: 1fr; }
    .table { display: block; overflow-x: auto; white-space: nowrap; }
}
