@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --rose:     #07376A;   /* deep navy blue — primary */
    --rose-dk:  #052A52;
    --gold:     #B8960C;   /* gold accent */
    --ink:      #1A1A1A;
    --ink-mid:  #555;
    --ink-light:#888;
    --paper:    #FDFAF7;
    --rule:     #E8E0D8;
    --white:    #FFFFFF;
    --green:    #1E7B3E;
    --green-bg: #E8F5ED;
    --red:      #B00020;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 15px;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
}

h1, h2, h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
}
h1 { font-size: 2rem; margin-bottom: 1rem; }
h2 { font-size: 1.3rem; margin-bottom: 0.75rem; }

a { color: var(--rose); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ── */
header {
    background: var(--white);
    border-bottom: 3px solid var(--rose);
    padding: 0 2rem;
}
.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.site-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--rose);
    text-decoration: none;
}
.site-title:hover { text-decoration: none; color: var(--rose-dk); }

nav a {
    color: var(--ink-mid);
    font-size: 0.83rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 1.5rem;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
nav a:hover { color: var(--rose); border-bottom-color: var(--rose); text-decoration: none; }

/* ── Main ── */
main {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 2rem;
}

/* ── Footer ── */
footer {
    border-top: 1px solid var(--rule);
    padding: 1.5rem 2rem;
    margin-top: 4rem;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    font-size: 0.83rem;
    color: var(--ink-light);
}
.footer-inner a { color: var(--ink-light); }

/* ── Flash ── */
.flash-wrap { margin-bottom: 1.5rem; }
.flash {
    background: #EEF2F7;
    border-left: 3px solid var(--rose);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

/* ── Buttons ── */
.btn {
    display: inline-block;
    background: var(--rose);
    color: var(--white);
    padding: 0.55rem 1.25rem;
    border: none;
    border-radius: 3px;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.btn:hover { background: var(--rose-dk); color: var(--white); text-decoration: none; }
.btn-full { width: 100%; text-align: center; padding: 0.7rem; }
.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--ink-mid);
    padding: 0.55rem 1.25rem;
    border: 1px solid var(--rule);
    border-radius: 3px;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-secondary:hover { background: var(--rule); text-decoration: none; color: var(--ink); }
.btn-danger {
    background: transparent;
    color: var(--red);
    border: 1px solid var(--red);
}
.btn-danger:hover { background: var(--red); color: var(--white); }
.btn-sm {
    display: inline-block;
    background: var(--rose);
    color: var(--white);
    padding: 0.28rem 0.7rem;
    border: none;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-sm:hover { background: var(--rose-dk); text-decoration: none; color: var(--white); }

/* ── Hero ── */
.hero {
    max-width: 640px;
    margin: 4rem auto 3.5rem;
    text-align: center;
}
.hero-eyebrow {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--rose);
    margin-bottom: 0.75rem;
}
.hero h1 {
    font-size: 3.5rem;
    color: var(--ink);
    margin-bottom: 1rem;
    line-height: 1.1;
}
.hero-body {
    color: var(--ink-mid);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}
.btn-hero {
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
}
.hero-intro {
    color: var(--ink-mid);
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 1rem;
    text-align: left;
}

/* ── Categories ── */
.categories-section {
    max-width: 960px;
    margin: 0 auto 4rem;
}
.categories-heading {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 2rem;
    color: var(--ink);
}
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: 3px;
    overflow: hidden;
}
.category-card {
    background: var(--white);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: background 0.15s;
}
.category-card:hover { background: var(--paper); }
.category-card-feather { border-top: 3px solid var(--gold); }
.category-symbol {
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
}
.category-symbol img {
    height: 72px;
    width: 72px;
    object-fit: contain;
}
.category-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.75rem;
}
.category-desc {
    font-size: 0.87rem;
    color: var(--ink-mid);
    line-height: 1.6;
}

/* ── Auth forms ── */
.auth-wrap {
    max-width: 460px;
    margin: 3rem auto;
}
.auth-form {
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: 3px;
    padding: 2rem;
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}
.auth-note {
    font-size: 0.85rem;
    color: var(--ink-light);
    margin-top: 1rem;
    line-height: 1.5;
}
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

/* ── Entry form ── */
.entry-form {
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: 3px;
    padding: 2rem;
    max-width: 900px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.1rem;
    margin-bottom: 1.25rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--rule);
    border-radius: 3px;
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--ink);
    background: var(--white);
    transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--rose); }
.form-group textarea { resize: vertical; }
.field-note {
    font-size: 0.78rem;
    color: var(--ink-light);
    margin-top: 0.2rem;
}
.form-actions { display: flex; gap: 0.75rem; align-items: center; }

/* ── Page header ── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--rule);
}
.page-header h1 { margin-bottom: 0; }
.page-sub { font-size: 0.9rem; color: var(--ink-light); margin-top: 0.2rem; }
.count { font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 400; color: var(--ink-light); }

/* ── Data table ── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: 3px;
    overflow: hidden;
}
.data-table th {
    text-align: left;
    padding: 0.6rem 1rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-light);
    border-bottom: 2px solid var(--ink);
    background: transparent;
}
.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--rule);
    font-size: 0.9rem;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--paper); }
.meta { color: var(--ink-light); font-size: 0.83rem; white-space: nowrap; }

/* ── Stat cards ── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 2.5rem;
}
.stat-card {
    background: var(--white);
    padding: 1.5rem;
    text-align: center;
}
.stat-number {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--rose);
    line-height: 1;
    margin-bottom: 0.4rem;
}
.stat-group-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-light);
    margin-bottom: 0.5rem;
}
.stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-light);
}

/* ── Invitation form ── */
.invite-form-wrap {
    margin-bottom: 1.75rem;
}
.invite-form {
    display: flex;
    gap: 0.75rem;
    max-width: 560px;
}
.invite-form input[type="email"] {
    flex: 1;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--rule);
    border-radius: 3px;
    font-size: 0.92rem;
    font-family: inherit;
    background: var(--white);
}
.invite-form input:focus { outline: none; border-color: var(--rose); }

/* ── Status badges ── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge-accepted { background: var(--green-bg); color: var(--green); }
.badge-sent     { background: #EEF2FF; color: #3949AB; }
.badge-expired  { background: #FFF0F0; color: var(--red); }
.badge-pending  { background: #F5F5F5; color: var(--ink-light); }
.badge-tasted   { background: #F3E8FF; color: #6B21A8; }
.badge-award    { background: #EFF6FF; color: #07376A; font-weight: 700; }
.badge-feather  { background: #FFFBEB; color: #92400E; font-weight: 700; }

.award-select {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--rule);
    border-radius: 3px;
    font-size: 0.8rem;
    font-family: inherit;
    color: var(--ink);
    background: var(--white);
    cursor: pointer;
}
.award-select:focus { outline: none; border-color: var(--rose); }

/* ── Award groups ── */
.award-group {
    margin-bottom: 2rem;
}
.award-group-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--ink);
}
.award-group-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--ink);
}

/* ── Email template editor ── */
.template-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}
.template-editor .entry-form { max-width: 100%; }
.placeholders-note {
    font-size: 0.83rem;
    color: var(--ink-light);
    margin-top: 0.5rem;
}
.placeholders-note code {
    background: var(--rule);
    padding: 0.15rem 0.4rem;
    border-radius: 2px;
    font-size: 0.8rem;
    margin-right: 0.3rem;
}
.template-preview {
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: 3px;
    padding: 1.75rem;
}
.preview-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-light);
    margin-bottom: 1.25rem;
}
.preview-body p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--ink);
    margin-bottom: 0.9rem;
}

/* ── Dashboard info panel ── */
.dashboard-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1.75rem;
}
.info-block {
    background: var(--white);
    padding: 1.25rem 1.5rem;
}
.info-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-light);
    margin-bottom: 0.4rem;
}
.info-value {
    font-size: 0.92rem;
    color: var(--ink);
    line-height: 1.6;
    font-weight: 500;
}
.info-note {
    font-size: 0.8rem;
    color: var(--ink-light);
    margin-top: 0.4rem;
    line-height: 1.5;
}

/* ── Please note ── */
.please-note {
    font-size: 0.88rem;
    color: var(--ink-mid);
    background: var(--white);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--rose);
    padding: 0.65rem 1rem;
    border-radius: 3px;
    margin-bottom: 1.25rem;
}

/* ── Ship form / tracking ── */
.ship-form {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
}
.tracking-input {
    padding: 0.28rem 0.6rem;
    border: 1px solid var(--rule);
    border-radius: 3px;
    font-size: 0.8rem;
    font-family: inherit;
    width: 160px;
    color: var(--ink);
    background: var(--white);
}
.tracking-input:focus { outline: none; border-color: var(--rose); }
.tracking-ref {
    display: block;
    font-size: 0.78rem;
    color: var(--ink-light);
    margin-top: 0.25rem;
}

/* ── Terms & Conditions ── */
.terms-body h2 {
    font-size: 1rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    color: var(--rose);
}
.terms-body p {
    font-size: 0.92rem;
    color: var(--ink-mid);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}
.terms-check { margin-top: 0.25rem; }
.terms-check-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--ink-mid);
    cursor: pointer;
}
.terms-check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--rose);
    flex-shrink: 0;
    cursor: pointer;
}

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--ink-light);
    font-size: 0.95rem;
}

/* ── Actions column ── */
.actions { white-space: nowrap; }

/* ── Mobile ── */
@media (max-width: 768px) {

    /* Header & nav */
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 0.75rem 0;
        gap: 0.5rem;
    }
    nav {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem 0;
    }
    nav a {
        margin-left: 0;
        margin-right: 1rem;
        font-size: 0.78rem;
    }

    /* Main layout */
    main {
        margin: 1.5rem auto;
        padding: 0 1rem;
    }

    /* Hero */
    .hero {
        margin: 2rem auto 2rem;
    }
    .hero h1 { font-size: 2.2rem; }
    .hero-body { font-size: 0.95rem; }
    .hero-intro { font-size: 0.92rem; }

    /* Page header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    /* Categories grid */
    .categories-grid {
        grid-template-columns: 1fr;
    }

    /* Stat grids */
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Dashboard info */
    .dashboard-info {
        grid-template-columns: 1fr;
    }

    /* Data tables — horizontal scroll */
    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    /* Forms */
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .form-actions {
        flex-wrap: wrap;
    }
    .invite-form {
        flex-direction: column;
    }
    .invite-form input[type="email"] {
        width: 100%;
    }

    /* Ship form */
    .ship-form {
        flex-direction: column;
        align-items: flex-start;
    }
    .tracking-input {
        width: 100%;
    }

    /* Entry form */
    .entry-form {
        padding: 1.25rem;
    }

    /* Auth forms */
    .auth-wrap {
        margin: 1.5rem auto;
    }
    .auth-form {
        padding: 1.25rem;
    }

    /* Template editor */
    .template-layout {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        gap: 0.4rem;
    }

    /* Award groups */
    .award-group-header {
        flex-wrap: wrap;
    }

    /* Buttons */
    .btn-full { width: 100%; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    header { padding: 0 1rem; }
}

/* ── Awards page ── */
.awards-licence-status {
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.75rem;
}
.awards-edition {
    margin-bottom: 2.5rem;
}
.awards-edition-heading {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-light);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    border-bottom: 2px solid var(--rose);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}
.award-trophy-card {
    background: var(--white);
    border: 1px solid var(--rule);
    border-left: 4px solid var(--rose);
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.award-trophy-feather {
    border-left-color: #92400E;
}
.award-trophy-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--rose);
    margin-bottom: 0.3rem;
}
.award-trophy-feather .award-trophy-name {
    color: #92400E;
}
.award-trophy-wine {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.15rem;
}
.award-trophy-producer {
    font-size: 0.88rem;
    color: var(--ink-mid);
}
.award-trophy-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .award-trophy-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .award-trophy-right {
        align-items: flex-start;
    }
}
