:root {
    --ink: #111315;
    --muted: #626b73;
    --paper: #fbfaf7;
    --line: #d9d4c8;
    --gold: #b88a2d;
    --green: #0e6d5d;
    --green-dark: #064339;
    --white: #ffffff;
    --danger: #a32d2d;
    --shadow: 0 20px 60px rgba(17, 19, 21, 0.16);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--paper);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px clamp(18px, 4vw, 54px);
    color: var(--white);
    background: linear-gradient(180deg, rgba(3, 22, 19, 0.82), rgba(3, 22, 19, 0));
}

.brand,
.site-header nav,
.admin-actions,
.hero-actions,
.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: rgba(255, 255, 255, 0.72);
}

.site-header nav a {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.86);
}

.hero {
    position: relative;
    display: grid;
    align-items: center;
    min-height: 92vh;
    padding: 120px clamp(18px, 5vw, 76px) 70px;
    overflow: hidden;
    color: var(--white);
    background: radial-gradient(circle at 70% 35%, #1c8a76 0, #064339 42%, #031613 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 120px;
    background: linear-gradient(0deg, var(--paper), rgba(251, 250, 247, 0));
}

.hero-scene {
    position: absolute;
    inset: 0;
    opacity: 0.96;
}

.hero-copy {
    position: relative;
    z-index: 2;
    width: min(650px, 100%);
}

.eyebrow,
.section-title p {
    margin: 0 0 12px;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(3rem, 8vw, 7.5rem);
    line-height: 0.92;
    letter-spacing: 0;
}

.hero-copy > p:not(.eyebrow) {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.12rem;
    line-height: 1.7;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.button.primary {
    border-color: var(--gold);
    background: var(--gold);
    color: #12100b;
}

.button.ghost {
    border-color: rgba(255, 255, 255, 0.32);
    color: inherit;
}

.product-band,
.quality-band,
.contact-strip {
    padding: 76px clamp(18px, 5vw, 76px);
}

.section-title {
    max-width: 760px;
    margin-bottom: 28px;
}

.section-title h2,
.contact-strip h2,
.admin-topbar h1,
.login-panel h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 3.4rem);
    line-height: 1.08;
    letter-spacing: 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.product-grid article,
.quality-grid article,
.login-panel,
.nominee-form,
.record-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 14px 45px rgba(17, 19, 21, 0.07);
}

.product-grid article {
    position: relative;
    min-height: 420px;
    padding: 26px;
    overflow: hidden;
    transition: transform 280ms ease, box-shadow 280ms ease, border-color 280ms ease;
}

.product-grid article:hover {
    transform: translateY(-8px) rotateX(1.5deg);
    border-color: rgba(184, 138, 45, 0.48);
    box-shadow: 0 28px 70px rgba(17, 19, 21, 0.14);
}

.product-scene {
    height: 220px;
    margin: -8px -8px 18px;
    border-radius: 8px;
    background:
        radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.35) 34%, rgba(14, 109, 93, 0.18) 74%),
        linear-gradient(135deg, rgba(14, 109, 93, 0.12), rgba(184, 138, 45, 0.15));
    overflow: hidden;
}

.product-scene canvas,
.hero-scene canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.product-icon {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #e9f3f0;
    color: var(--green);
    font-weight: 900;
}

.product-grid h3,
.quality-grid h3 {
    margin: 24px 0 10px;
}

.product-grid p,
.quality-copy p,
.quality-grid span,
.muted {
    color: var(--muted);
    line-height: 1.7;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 13px 14px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
}

textarea {
    resize: vertical;
}

.quality-band {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.86), rgba(236, 244, 241, 0.9)),
        var(--paper);
}

.quality-copy {
    max-width: 680px;
}

.quality-copy h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 4.6rem);
    line-height: 0.98;
    letter-spacing: 0;
}

.quality-grid {
    display: grid;
    gap: 14px;
}

.quality-grid article {
    display: grid;
    gap: 8px;
    padding: 22px;
    transform: perspective(900px) rotateY(-4deg);
    transition: transform 260ms ease;
}

.quality-grid article:nth-child(2) {
    transform: perspective(900px) rotateY(4deg) translateX(18px);
}

.quality-grid article:hover {
    transform: perspective(900px) rotateY(0deg) translateY(-4px);
}

.quality-grid strong {
    font-size: 1.08rem;
}

.contact-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: var(--white);
    background: var(--green-dark);
}

.contact-strip .button.ghost,
.contact-strip .button.primary {
    color: #12100b;
}

footer {
    display: flex;
    justify-content: space-between;
    padding: 26px clamp(18px, 5vw, 76px);
    color: var(--muted);
}

.admin-body {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(14, 109, 93, 0.13), rgba(184, 138, 45, 0.12)),
        var(--paper);
}

.admin-shell {
    width: min(1480px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0;
}

.login-panel {
    width: min(520px, 100%);
    margin: 10vh auto;
    padding: 32px;
}

.login-panel p:not(.eyebrow) {
    color: var(--muted);
}

.login-form,
.nominee-form,
.form-grid {
    display: grid;
    gap: 16px;
}

label span {
    display: block;
    margin-bottom: 7px;
    font-weight: 850;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.admin-topbar .button.ghost,
.form-actions .button.ghost,
.admin-actions .button.ghost {
    border-color: var(--line);
    color: var(--ink);
}

.admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    align-items: start;
}

.nominee-form,
.record-panel {
    padding: 22px;
}

.form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid .wide {
    grid-column: span 3;
}

.photo-upload {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.photo-upload img {
    width: 128px;
    height: 144px;
    border-radius: 8px;
    object-fit: cover;
}

.alert {
    padding: 12px 14px;
    border-radius: 6px;
    font-weight: 800;
}

.alert.success {
    color: #0d4d38;
    background: #dff4e8;
}

.alert.error {
    color: var(--danger);
    background: #f9dfdf;
}

.admin-records {
    display: grid;
    gap: 12px;
    max-height: 72vh;
    overflow: auto;
}

.admin-records article {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.admin-records span {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.admin-records article > div {
    display: flex;
    gap: 12px;
}

.admin-records a,
.admin-records button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--green);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.admin-records button {
    color: var(--danger);
}

.admin-dashboard {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.admin-sidebar,
.admin-content,
.data-table-panel,
.sms-panel,
.customer-form,
.customer-table-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 14px 45px rgba(17, 19, 21, 0.07);
}

.admin-sidebar {
    position: sticky;
    top: 22px;
    display: grid;
    gap: 22px;
    min-height: calc(100vh - 60px);
    padding: 20px;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.admin-logo .brand-mark {
    color: var(--white);
    background: var(--green);
    border-color: var(--green);
}

.admin-logo strong,
.admin-logo small {
    display: block;
}

.admin-logo small {
    color: var(--muted);
}

.admin-nav,
.sidebar-actions {
    display: grid;
    gap: 9px;
}

.admin-nav a,
.sidebar-actions a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--muted);
    font-weight: 850;
}

.admin-nav a.active,
.admin-nav a:hover,
.sidebar-actions a:hover {
    border-color: rgba(14, 109, 93, 0.18);
    background: #e9f3f0;
    color: var(--green-dark);
}

.admin-nav span {
    min-width: 28px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--white);
    color: var(--green);
    text-align: center;
    font-size: 0.78rem;
}

.sidebar-actions {
    align-self: end;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.admin-content {
    min-width: 0;
    padding: 22px;
}

.admin-content .admin-topbar {
    margin-bottom: 18px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.admin-stats.compact-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-stats article {
    display: grid;
    gap: 6px;
    min-height: 92px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--white), #edf6f3);
}

.admin-stats strong {
    color: var(--green-dark);
    font-size: 2rem;
    line-height: 1;
}

.admin-stats span {
    color: var(--muted);
    font-weight: 800;
}

.admin-layout-full {
    display: block;
}

.admin-layout-full .nominee-form {
    padding: 22px;
}

.data-table-panel,
.sms-panel {
    padding: 20px;
}

.admin-table-wrap {
    overflow: auto;
}

.admin-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
}

.admin-table td {
    font-weight: 760;
}

.table-avatar {
    display: grid;
    place-items: center;
    width: 52px;
    height: 58px;
    overflow: hidden;
    border-radius: 8px;
    background: #e9f3f0;
    color: var(--green);
    font-weight: 900;
}

.table-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.table-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.table-actions a,
.table-actions button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--green);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.table-actions button {
    color: var(--danger);
}

.sms-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 18px;
    align-items: start;
}

.sms-panel {
    display: grid;
    gap: 16px;
}

.sms-panel h2 {
    margin: 0;
}

.sms-log {
    display: grid;
    gap: 12px;
    max-height: 560px;
    overflow: auto;
}

.sms-log article {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.sms-log span {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 800;
}

.sms-log p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.customer-admin-grid {
    display: grid;
    gap: 18px;
}

.customer-form,
.customer-table-panel {
    padding: 20px;
}

.customer-form {
    display: grid;
    gap: 16px;
}

.customer-form h2 {
    margin: 0;
}

.customer-form-grid,
.customer-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.customer-filters {
    align-items: end;
    margin-bottom: 16px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-actions .button.ghost,
.customer-form .button.ghost {
    border-color: var(--line);
    color: var(--ink);
}

.table-meta {
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin-bottom: 12px;
    color: var(--muted);
    font-weight: 800;
}

.table-meta strong {
    color: var(--green-dark);
    font-size: 1.6rem;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
}

.pagination .button.ghost {
    border-color: var(--line);
    color: var(--ink);
}

.pagination .button.disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.page-status {
    color: var(--muted);
    font-weight: 850;
}

@media (max-width: 980px) {
    .product-grid,
    .quality-band,
    .admin-dashboard,
    .admin-stats,
    .sms-layout,
    .customer-form-grid,
    .customer-filters,
    .admin-layout,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid .wide {
        grid-column: auto;
    }

    .admin-topbar,
    .contact-strip,
    footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .quality-grid article,
    .quality-grid article:nth-child(2) {
        transform: none;
    }

    .admin-sidebar {
        position: static;
        min-height: auto;
    }

    .sidebar-actions {
        align-self: auto;
    }

    .admin-stats.compact-stats {
        grid-template-columns: 1fr;
    }

    .pagination {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 680px) {
    .site-header {
        position: absolute;
        align-items: flex-start;
    }

    .site-header nav {
        display: none;
    }

    .hero {
        min-height: 780px;
        padding-top: 110px;
    }

    .hero h1 {
        font-size: clamp(3.2rem, 17vw, 5.4rem);
    }

    .hero-actions,
    .admin-actions {
        flex-wrap: wrap;
    }

    .product-grid article {
        min-height: 380px;
    }

    .product-scene {
        height: 190px;
    }
}
