:root {
    --ink: #191917;
    --ink-soft: #2a2a26;
    --paper: #f3f0e9;
    --card: #fffefa;
    --line: #ddd8cd;
    --muted: #746f65;
    --brand: #006532;
    --brand-dark: #004a25;
    --green: #28a16b;
    --red: #c33f36;
    --sidebar: 248px;
    --radius: 18px;
    --shadow: 0 18px 50px rgba(42, 37, 27, .08);
    color: var(--ink);
    background: var(--paper);
    font-family: Bahnschrift, "DIN Alternate", "Arial Narrow", sans-serif;
    font-synthesis: none;
    line-height: 1.5;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
button, input, textarea { font: inherit; }
button, summary, input[type="file"] { cursor: pointer; }
button { border: 0; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    width: var(--sidebar);
    display: flex;
    flex-direction: column;
    padding: 28px 20px 22px;
    color: #f8f5ed;
    background:
        linear-gradient(145deg, rgba(255,255,255,.045), transparent 32%),
        var(--ink);
}

.sidebar::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .15;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
}

.brand, .login-brand, .mobile-brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; position: relative; z-index: 1; }
.brand-logo { display: block; width: 158px; height: auto; padding: 7px 10px; border-radius: 8px; background: #f8f7f2; box-shadow: 0 5px 18px rgba(0,0,0,.16); }

.primary-nav { display: grid; gap: 7px; margin-top: 64px; position: relative; z-index: 1; }
.nav-item { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 10px; color: #aaa9a2; text-decoration: none; font-size: .85rem; letter-spacing: .03em; transition: .2s ease; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: #30302c; box-shadow: inset 3px 0 var(--brand); }
.nav-item.active svg { color: #59c889; }

.sidebar-foot { margin-top: auto; position: relative; z-index: 1; }
.admin-identity { display: flex; align-items: center; gap: 9px; padding: 0 10px 14px; color: #c9c8c0; }
.admin-identity > span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; color: white; background: var(--brand); font-family: Georgia, serif; font-size: .72rem; }
.admin-identity small { overflow: hidden; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.status-pill { display: flex; align-items: center; gap: 8px; padding: 14px 12px; border-top: 1px solid #383833; border-bottom: 1px solid #383833; color: #96958e; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.status-pill span, .pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(40,161,107,.13); }
.logout-button { width: 100%; display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 11px 12px; color: #aaa9a2; background: transparent; border-radius: 9px; text-align: left; transition: .2s ease; }
.logout-button:hover { color: white; background: rgba(255,255,255,.06); }
.logout-button svg { width: 19px; height: 19px; }

.dashboard-main { margin-left: var(--sidebar); padding: 46px clamp(28px, 4vw, 68px) 24px; min-height: 100vh; overflow: hidden; }
.dashboard-main::before { content: ""; position: fixed; top: -240px; right: -160px; width: 600px; height: 600px; border: 1px solid rgba(71,65,52,.08); border-radius: 50%; box-shadow: 0 0 0 85px rgba(71,65,52,.025), 0 0 0 170px rgba(71,65,52,.018); pointer-events: none; }
.dashboard-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; position: relative; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.kicker { margin: 0 0 7px; color: var(--brand); font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.035em; }
h1 { margin-bottom: 6px; font-size: clamp(2.35rem, 4vw, 4.1rem); line-height: .98; }
h2 { margin-bottom: 8px; font-size: clamp(1.75rem, 2.3vw, 2.5rem); line-height: 1.06; }
.header-copy { margin-bottom: 0; color: var(--muted); font-size: .92rem; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 17px; border-radius: 9px; color: white; background: var(--ink); box-shadow: 0 8px 20px rgba(25,25,23,.14); font-size: .78rem; font-weight: 700; letter-spacing: .04em; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.primary-button:hover { transform: translateY(-2px); background: #33332f; box-shadow: 0 12px 24px rgba(25,25,23,.2); }
.primary-button:active { transform: translateY(0); }
.primary-button svg { width: 18px; height: 18px; }
.header-action { background: var(--brand); box-shadow: 0 10px 22px rgba(0,101,50,.22); }
.header-action:hover { background: var(--brand-dark); }
.admin-button { display: inline-flex; align-items: center; gap: 9px; padding: 11px 15px; border: 1px solid #cfc8bc; border-radius: 9px; color: #47443d; background: rgba(255,254,250,.72); font-size: .76rem; font-weight: 700; letter-spacing: .035em; transition: transform .18s ease, border-color .18s ease, color .18s ease, background .18s ease; }
.admin-button svg { width: 18px; height: 18px; color: var(--brand); }
.admin-button:hover { color: var(--brand-dark); border-color: #8aa996; background: white; transform: translateY(-2px); }

.notice { display: flex; align-items: center; gap: 10px; margin-top: 26px; padding: 13px 15px; border: 1px solid; border-radius: 11px; font-size: .82rem; animation: slideDown .35s ease both; }
.notice svg { width: 20px; height: 20px; }
.notice span { flex: 1; }
.notice button { padding: 0 3px; color: inherit; background: transparent; font-size: 1.4rem; line-height: 1; }
.notice.success { color: #176242; border-color: #b9dfcc; background: #e9f7ef; }
.notice.error { color: #8b2e28; border-color: #e8c4bf; background: #fbefed; }

.metrics { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 14px; margin-top: 34px; }
.metric-card { min-height: 132px; display: flex; flex-direction: column; justify-content: center; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,254,250,.68); backdrop-filter: blur(8px); animation: rise .55s ease both; }
.metric-card:nth-child(2) { animation-delay: 60ms; }
.metric-card:nth-child(3) { animation-delay: 120ms; }
.metric-card small { margin-top: auto; color: #999287; font-size: .68rem; letter-spacing: .04em; }
.primary-metric { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; background: var(--card); box-shadow: var(--shadow); }
.metric-icon { grid-row: 1 / 3; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 12px; color: var(--brand); background: #e3f1e9; }
.metric-icon svg { width: 25px; height: 25px; }
.primary-metric div:nth-child(2) { display: flex; align-items: baseline; justify-content: space-between; }
.primary-metric span, .metric-label { color: var(--muted); font-size: .74rem; letter-spacing: .04em; }
.primary-metric strong { font-family: Georgia, serif; font-size: 2.3rem; line-height: 1; }
.primary-metric small { grid-column: 2; }
.metric-label { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.metric-word, .metric-date { font-family: Georgia, serif; font-size: 1.65rem; font-weight: 500; }
.metric-word { color: #1d7c52; }

.create-card { position: relative; margin-top: 48px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); scroll-margin-top: 28px; }
.create-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; border-radius: var(--radius) 0 0 var(--radius); background: var(--brand); }
.create-intro, .inventory-heading > div { display: flex; align-items: flex-start; gap: 17px; }
.create-intro > div p:last-child { max-width: 580px; margin-bottom: 0; color: var(--muted); font-size: .85rem; }
.section-number { flex: 0 0 auto; padding-top: 7px; color: #aaa397; font-family: Georgia, serif; font-size: .8rem; font-style: italic; }
.create-form { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(240px, .65fr); gap: 30px; margin-top: 28px; padding-top: 26px; border-top: 1px solid #e6e1d8; }
.form-fields { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; color: #393832; font-size: .75rem; font-weight: 700; letter-spacing: .025em; }
.field > span { display: flex; align-items: center; justify-content: space-between; }
.field b { color: #a29b90; font-size: .57rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; }
.field input, .field textarea, .search-box input { width: 100%; border: 1px solid #d7d1c6; border-radius: 9px; color: var(--ink); background: #fcfbf7; outline: none; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.field input { height: 46px; padding: 0 13px; }
.field textarea { padding: 12px 13px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder, .search-box input::placeholder { color: #aaa59c; }
.field input:focus, .field textarea:focus, .search-box input:focus { border-color: #9c9385; background: white; box-shadow: 0 0 0 3px rgba(66,61,50,.08); }
.field > small { color: #a19b90; font-weight: 400; text-align: right; }
.upload-column { display: grid; grid-template-rows: 1fr auto; gap: 12px; }
.upload-zone { min-height: 210px; position: relative; display: block; margin: 0; }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-preview { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 22px; border: 1px dashed #bbb3a7; border-radius: 12px; color: var(--muted); background: #f8f5ef; background-size: cover; background-position: center; text-align: center; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.upload-zone:hover .upload-preview { border-color: var(--brand); background-color: #edf7f1; transform: translateY(-2px); }
.upload-preview svg { width: 30px; height: 30px; margin-bottom: 12px; color: var(--brand); }
.upload-preview strong { color: var(--ink); font-size: .82rem; }
.upload-preview small { margin: 4px 0 14px; font-size: .7rem; }
.upload-preview em { color: #a39c91; font-size: .59rem; font-style: normal; letter-spacing: .07em; text-transform: uppercase; }
.upload-preview.has-image { color: white; border-style: solid; }
.upload-preview.has-image svg { color: white; }
.upload-preview.has-image strong { color: white; text-shadow: 0 1px 10px #000; }
.upload-preview.has-image em { display: none; }
.submit-product { width: 100%; background: var(--brand); box-shadow: 0 9px 20px rgba(0,101,50,.18); }
.submit-product:hover { background: var(--brand-dark); }

.inventory-section { margin-top: 58px; }
.inventory-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.inventory-heading h2 { margin-bottom: 0; }
.inventory-heading .kicker { margin-bottom: 3px; }
.search-box { width: min(280px, 100%); position: relative; }
.search-box svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; color: #8d877c; transform: translateY(-50%); }
.search-box input { height: 42px; padding: 0 13px 0 40px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--card); box-shadow: 0 8px 28px rgba(46,41,31,.055); animation: rise .5s ease both; animation-delay: var(--delay); transition: transform .25s ease, box-shadow .25s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 18px 35px rgba(46,41,31,.1); }
.product-card[hidden] { display: none; }
.product-image-wrap { height: 210px; position: relative; overflow: hidden; background: #dedbd3; }
.product-image-wrap::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(transparent, rgba(15,15,14,.4)); }
.product-image-wrap img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .55s cubic-bezier(.2,.75,.25,1); }
.product-card:hover .product-image-wrap img { transform: scale(1.045); }
.product-id { position: absolute; z-index: 1; right: 11px; bottom: 10px; padding: 5px 8px; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; color: white; background: rgba(15,15,14,.45); backdrop-filter: blur(8px); font-size: .6rem; letter-spacing: .1em; }
.product-body { min-height: 154px; padding: 19px 19px 15px; }
.product-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; color: #999287; font-size: .6rem; letter-spacing: .09em; text-transform: uppercase; }
.product-meta span { display: flex; align-items: center; gap: 6px; color: #267d57; }
.product-meta span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.product-body h3 { overflow: hidden; margin-bottom: 7px; font-family: Georgia, serif; font-size: 1.2rem; font-weight: 500; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.product-body p { display: -webkit-box; overflow: hidden; margin-bottom: 0; color: var(--muted); font-size: .75rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.edit-drawer { border-top: 1px solid #e8e3da; }
.edit-drawer summary { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; color: #58544b; font-size: .69rem; font-weight: 700; letter-spacing: .05em; list-style: none; transition: background .18s ease, color .18s ease; }
.edit-drawer summary::-webkit-details-marker { display: none; }
.edit-drawer summary:hover { color: var(--brand-dark); background: #f1f7f3; }
.edit-drawer summary span { display: flex; align-items: center; gap: 8px; }
.edit-drawer summary svg { width: 16px; height: 16px; }
.edit-drawer summary .chevron { transition: transform .2s ease; }
.edit-drawer[open] .chevron { transform: rotate(180deg); }
.drawer-body { padding: 17px 18px 18px; border-top: 1px solid #eee9e1; background: #faf8f3; }
.edit-form { display: grid; gap: 13px; }
.compact-upload { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px dashed #c9c1b5; border-radius: 8px; color: #635e55; background: white; font-size: .68rem; }
.compact-upload input { position: absolute; inset: 0; width: 100%; opacity: 0; }
.compact-upload svg { width: 21px; height: 21px; color: var(--brand); }
.compact-upload span { min-width: 0; display: grid; }
.compact-upload small { overflow: hidden; color: #a29b90; text-overflow: ellipsis; white-space: nowrap; }
.delete-form { margin-top: 14px; padding-top: 13px; border-top: 1px solid #e2ddd4; }
.delete-button { display: flex; align-items: center; gap: 7px; padding: 6px 0; color: #a43d35; background: transparent; font-size: .68rem; }
.delete-button:hover { color: #d22c21; }
.delete-button svg { width: 16px; height: 16px; }
.empty-state, .search-empty { padding: 62px 25px; border: 1px dashed #cbc4b8; border-radius: var(--radius); background: rgba(255,254,250,.52); text-align: center; }
.empty-graphic { width: 80px; height: 80px; display: grid; place-items: center; margin: 0 auto 20px; border-radius: 50%; color: var(--brand); background: #e1f0e7; }
.empty-graphic svg { width: 42px; height: 42px; }
.empty-state h3 { margin-bottom: 8px; font-family: Georgia, serif; font-size: 1.45rem; font-weight: 500; }
.empty-state p { max-width: 470px; margin: 0 auto 16px; color: var(--muted); font-size: .82rem; }
.text-button { color: var(--brand-dark); background: transparent; font-size: .76rem; font-weight: 700; }
.text-button span { margin-left: 4px; transition: margin .2s ease; }
.text-button:hover span { margin-left: 8px; }
.search-empty { color: var(--muted); }
.dashboard-footer { display: flex; justify-content: space-between; margin-top: 54px; padding-top: 18px; border-top: 1px solid var(--line); color: #9a9388; font-size: .6rem; letter-spacing: .09em; text-transform: uppercase; }

.submissions-back { text-decoration: none; }
.delivery-metric .status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(0,101,50,.09); }
.delivery-metric.sent .metric-label, .delivery-metric.sent .metric-word { color: #1d7c52; }
.delivery-metric.failed .metric-label, .delivery-metric.failed .metric-word { color: #a33d35; }
.delivery-metric.failed .status-dot { box-shadow: 0 0 0 4px rgba(195,63,54,.09); }
.submissions-section { margin-top: 52px; }
.submission-list { display: grid; gap: 15px; }
.submission-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--card); box-shadow: 0 8px 28px rgba(46,41,31,.05); animation: rise .4s ease both; }
.submission-card[hidden] { display: none; }
.submission-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 22px; border-bottom: 1px solid #e7e2d9; background: linear-gradient(105deg, #fffefa, #f7f4ed); }
.submission-number { display: block; margin-bottom: 3px; color: var(--brand); font-size: .6rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.submission-card-head h3 { margin-bottom: 2px; font-family: Georgia, serif; font-size: 1.35rem; font-weight: 500; }
.submission-card-head time { color: #918a7f; font-size: .66rem; letter-spacing: .04em; }
.smtp-badge { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; font-size: .61rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.smtp-badge span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.smtp-badge.sent { color: #176242; background: #e5f4eb; }
.smtp-badge.failed { color: #9c352f; background: #f9e8e5; }
.smtp-badge.pending { color: #8a6814; background: #f7efd7; }
.submission-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid #ebe6dd; }
.submission-details > div { min-width: 0; display: grid; gap: 3px; padding: 15px 21px; border-right: 1px solid #ebe6dd; border-bottom: 1px solid #ebe6dd; }
.submission-details > div:nth-child(3n) { border-right: 0; }
.submission-details > div:nth-last-child(-n+3) { border-bottom: 0; }
.submission-details span, .submission-message > span { color: #9a9387; font-size: .57rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.submission-details strong, .submission-details a { overflow: hidden; color: #393730; font-size: .76rem; font-weight: 600; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.submission-details a { color: var(--brand-dark); }
.submission-details a:hover { text-decoration: underline; }
.submission-message { padding: 17px 21px 19px; }
.submission-message p { margin: 7px 0 0; color: #5f5a51; font-size: .78rem; line-height: 1.65; }
.smtp-error { border-top: 1px solid #efd5d1; background: #fff7f5; }
.smtp-error summary { padding: 11px 21px; color: #9c352f; font-size: .67rem; font-weight: 700; list-style-position: inside; }
.smtp-error p { margin: 0; padding: 0 21px 16px; color: #7e4c47; font: .68rem/1.55 Consolas, monospace; overflow-wrap: anywhere; }
.submission-delete-form { display: flex; justify-content: flex-end; padding: 11px 21px; border-top: 1px solid #ebe6dd; background: #faf8f3; }
.submission-delete-form .delete-button { padding: 7px 0; }
.submission-empty { margin-top: 3px; }

.admin-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; padding: 0; border: 1px solid #d7d1c6; border-radius: 18px; color: var(--ink); background: var(--card); box-shadow: 0 32px 90px rgba(15,24,18,.28); }
.admin-dialog::backdrop { background: rgba(18,21,18,.68); backdrop-filter: blur(5px); }
.admin-dialog[open] { animation: dialogIn .25s ease both; }
.dialog-heading { position: relative; display: flex; align-items: center; gap: 14px; padding: 25px 26px 18px; }
.dialog-heading h2 { margin: 0; font-size: 2rem; }
.dialog-heading .kicker { margin-bottom: 3px; }
.dialog-icon { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 48px; border-radius: 12px; color: var(--brand); background: #e3f1e9; }
.dialog-icon svg { width: 24px; height: 24px; }
.dialog-close { position: absolute; top: 17px; right: 18px; width: 34px; height: 34px; border-radius: 50%; color: #777168; background: #f2eee7; font-family: Georgia, serif; font-size: 1.45rem; line-height: 1; transition: background .18s ease, color .18s ease; }
.dialog-close:hover { color: var(--ink); background: #e6e0d6; }
.dialog-copy { margin: 0; padding: 0 26px 21px; border-bottom: 1px solid #e7e1d7; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.admin-form { display: grid; gap: 17px; padding: 23px 26px 26px; }
.admin-form .field > small { text-align: left; }
.dialog-security-note { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border-radius: 8px; color: #5f6e64; background: #edf5f0; font-size: .65rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 3px; padding-top: 18px; border-top: 1px solid #e7e1d7; }
.cancel-button { padding: 11px 16px; border-radius: 9px; color: #5e5950; background: #eeeae2; font-size: .75rem; font-weight: 700; }
.cancel-button:hover { color: var(--ink); background: #e2ddd4; }

.login-page { min-height: 100vh; color: var(--ink); background: var(--ink); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 1.08fr) minmax(420px, .92fr); }
.login-visual { min-height: 100vh; position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 46px clamp(36px, 5vw, 76px); color: white; background: var(--ink); }
.login-visual::before { content: ""; position: absolute; width: 620px; height: 620px; top: 50%; left: 55%; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; transform: translate(-50%,-50%); box-shadow: 0 0 0 90px rgba(255,255,255,.018), 0 0 0 180px rgba(255,255,255,.012); }
.login-visual::after { content: ""; position: absolute; inset: 0; opacity: .15; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E"); }
.login-brand { position: relative; z-index: 2; font-family: Georgia, serif; font-size: 1.2rem; }
.login-brand .brand-logo { width: 190px; }
.mobile-brand .brand-logo { width: 160px; box-shadow: 0 4px 14px rgba(23,23,20,.1); }
.visual-copy { max-width: 620px; position: relative; z-index: 2; }
.visual-index { display: block; margin-bottom: 18px; color: #96958e; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; }
.visual-copy h1 { margin-bottom: 22px; font-size: clamp(3.5rem, 6.5vw, 7.2rem); line-height: .89; letter-spacing: -.065em; }
.visual-copy h1 em { color: #28a966; font-weight: 400; }
.visual-copy p { max-width: 450px; margin-bottom: 0; color: #a8a79f; font-size: .88rem; }
.visual-foot { position: relative; z-index: 2; margin: 0; color: #6f6e68; font-size: .59rem; letter-spacing: .14em; text-transform: uppercase; }
.visual-orbit { position: absolute; top: 50%; right: -80px; width: 250px; height: 250px; border: 1px solid rgba(0,101,50,.5); border-radius: 50%; transform: translateY(-50%); }
.visual-orbit::before, .visual-orbit::after { content: ""; position: absolute; border: 1px solid rgba(0,101,50,.3); border-radius: 50%; }
.visual-orbit::before { inset: 30px; }
.visual-orbit::after { inset: 65px; }
.visual-orbit span { position: absolute; z-index: 1; width: 8px; height: 8px; border-radius: 50%; background: #28a966; box-shadow: 0 0 20px #28a966; }
.visual-orbit span:nth-child(1) { top: 18px; left: 58px; }
.visual-orbit span:nth-child(2) { right: 8px; bottom: 84px; }
.visual-orbit span:nth-child(3) { left: 51px; bottom: 20px; }
.login-panel { display: grid; place-items: center; padding: 42px; background: var(--paper); }
.mobile-brand { display: none; }
.login-card { width: min(420px, 100%); animation: rise .65s ease both; }
.login-card h2 { margin-bottom: 8px; font-size: clamp(2.5rem, 4vw, 3.6rem); }
.login-subtitle { margin-bottom: 34px; color: var(--muted); font-size: .88rem; }
.login-card .notice { margin: -12px 0 20px; }
.login-field { gap: 9px; }
.password-wrap { position: relative; display: block !important; }
.password-wrap input { padding-right: 44px; background: white; }
.password-wrap svg { position: absolute; top: 50%; right: 14px; width: 18px; height: 18px; color: #928c82; transform: translateY(-50%); }
.login-submit { width: 100%; justify-content: space-between; margin-top: 13px; padding: 14px 17px; background: var(--brand); box-shadow: 0 10px 25px rgba(0,101,50,.2); }
.login-submit:hover { background: var(--brand-dark); }
.security-note { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 25px; color: #999287; font-size: .61rem; letter-spacing: .04em; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 1160px) {
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .create-form { grid-template-columns: 1fr 300px; }
}

@media (max-width: 900px) {
    :root { --sidebar: 76px; }
    .sidebar { align-items: center; padding-inline: 12px; }
    .sidebar .brand-logo { width: 48px; padding: 6px; }
    .nav-item { font-size: 0; }
    .brand { justify-content: center; }
    .nav-item { justify-content: center; padding: 13px; }
    .nav-item svg { width: 21px; height: 21px; }
    .status-pill { font-size: 0; justify-content: center; }
    .admin-identity { justify-content: center; padding-inline: 0; }
    .admin-identity small { display: none; }
    .logout-button { justify-content: center; font-size: 0; }
    .metrics { grid-template-columns: repeat(3, 1fr); }
    .primary-metric { display: flex; }
    .metric-icon { display: none; }
    .primary-metric small { grid-column: auto; }
    .create-form { grid-template-columns: 1fr; }
    .submission-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .submission-details > div:nth-child(3n) { border-right: 1px solid #ebe6dd; }
    .submission-details > div:nth-child(2n) { border-right: 0; }
    .submission-details > div:nth-last-child(-n+3) { border-bottom: 1px solid #ebe6dd; }
    .submission-details > div:nth-last-child(-n+2) { border-bottom: 0; }
    .login-shell { grid-template-columns: 1fr; }
    .login-visual { display: none; }
    .login-panel { min-height: 100vh; position: relative; padding: 90px 28px 40px; }
    .mobile-brand { display: flex; position: absolute; top: 28px; left: 28px; font-family: Georgia, serif; }
}

@media (max-width: 680px) {
    :root { --sidebar: 0px; }
    .sidebar { inset: auto 0 0; width: 100%; height: 68px; flex-direction: row; justify-content: center; padding: 8px 18px; border-top: 1px solid #353531; }
    .sidebar .brand, .sidebar-foot .status-pill, .sidebar-foot .admin-identity { display: none; }
    .primary-nav { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
    .nav-item { height: 50px; font-size: .65rem; }
    .nav-item svg { width: 17px; height: 17px; }
    .sidebar-foot { margin: 0 0 0 7px; }
    .sidebar-foot form { height: 50px; }
    .logout-button { width: 45px; height: 50px; margin: 0; }
    .dashboard-main { margin-left: 0; padding: 30px 18px 100px; }
    .dashboard-header { align-items: flex-start; }
    .header-actions { gap: 7px; }
    .header-action, .admin-button { width: 43px; height: 43px; justify-content: center; padding: 0; font-size: 0; }
    .metrics { grid-template-columns: 1fr 1fr; }
    .primary-metric { grid-column: 1 / -1; min-height: 110px; }
    .metric-card { min-height: 118px; padding: 17px; }
    .metric-date { font-size: 1.25rem; }
    .create-card { margin-top: 32px; padding: 23px 19px; }
    .create-intro { gap: 10px; }
    .upload-zone { min-height: 185px; }
    .inventory-heading { align-items: flex-start; flex-direction: column; }
    .search-box { width: 100%; }
    .product-grid { grid-template-columns: 1fr; }
    .product-image-wrap { height: 250px; }
    .dashboard-footer { margin-bottom: 10px; }
    .submission-card-head { padding: 17px; }
    .submission-details { grid-template-columns: 1fr; }
    .submission-details > div, .submission-details > div:nth-child(2n), .submission-details > div:nth-child(3n) { padding: 13px 17px; border-right: 0; border-bottom: 1px solid #ebe6dd; }
    .submission-details > div:nth-last-child(-n+2) { border-bottom: 1px solid #ebe6dd; }
    .submission-details > div:last-child { border-bottom: 0; }
    .submission-message { padding: 15px 17px 17px; }
    .dialog-heading, .admin-form { padding-left: 20px; padding-right: 20px; }
    .dialog-copy { padding-left: 20px; padding-right: 20px; }
    .dialog-actions { display: grid; grid-template-columns: 1fr 1.5fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
