@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
    --gt-forest: #17331F; --gt-forest-2: #24472D; --gt-forest-3: #2E5537;
    --gt-green: #1F5130; --gt-gold: #F2C25B; --gt-sage: #F3F6EC; --gt-line: #DCE5D2;
    --gt-ink: #17331F; --gt-body: #2E3B32; --gt-muted: #5E6E62; --gt-white: #FFFFFF;
    --gt-chart-live: #2E8B57; --gt-chart-other: #D9A036;
    --gt-danger: #B3261E; --gt-warn-bg: #FBF0D6; --gt-warn-ink: #7A5200;
    --gt-ok-bg: #DFF0E3; --gt-ok-ink: #1F5130;
    --gt-radius: 12px; --gt-shadow: 0 1px 2px rgba(23, 51, 31, .05), 0 6px 20px rgba(23, 51, 31, .05);
    --sidebar-w: 256px; --sidebar-w-min: 76px;
    --bs-body-font-family: "DM Sans", system-ui, sans-serif;
    --bs-body-color: var(--gt-body); --bs-body-bg: var(--gt-sage);
    --bs-link-color: var(--gt-green); --bs-link-color-rgb: 31, 81, 48; --bs-link-hover-color: var(--gt-forest); --bs-link-hover-color-rgb: 23, 51, 31;
    --bs-border-color: var(--gt-line); --bs-border-radius: 10px; --bs-primary: var(--gt-forest); --bs-primary-rgb: 23, 51, 31;
}
body { font-size: 15px; -webkit-font-smoothing: antialiased; }
svg.lucide { width: 18px; height: 18px; flex: none; }
a { text-underline-offset: 2px; }
[hidden] { display: none !important; }

.btn { --bs-btn-border-radius: 999px; --bs-btn-font-weight: 600; --bs-btn-padding-x: 1.1rem; --bs-btn-padding-y: .5rem; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 40px; transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease; }
.btn-sm { --bs-btn-padding-x: .8rem; --bs-btn-padding-y: .3rem; min-height: 34px; font-size: 14px; }
.btn svg.lucide { width: 16px; height: 16px; }
.btn-primary { --bs-btn-bg: var(--gt-forest); --bs-btn-border-color: var(--gt-forest); --bs-btn-hover-bg: var(--gt-forest-2); --bs-btn-hover-border-color: var(--gt-forest-2); --bs-btn-active-bg: var(--gt-forest-3); --bs-btn-active-border-color: var(--gt-forest-3); --bs-btn-disabled-bg: var(--gt-forest-3); --bs-btn-disabled-border-color: var(--gt-forest-3); --bs-btn-focus-shadow-rgb: 23, 51, 31; }
.btn-light { --bs-btn-bg: var(--gt-white); --bs-btn-border-color: var(--gt-line); --bs-btn-color: var(--gt-ink); --bs-btn-hover-bg: var(--gt-sage); --bs-btn-hover-border-color: #C7D4BB; --bs-btn-active-bg: var(--gt-line); }
.btn-danger { --bs-btn-bg: var(--gt-danger); --bs-btn-border-color: var(--gt-danger); --bs-btn-hover-bg: #8F1E18; --bs-btn-hover-border-color: #8F1E18; }
.btn-link { --bs-btn-color: var(--gt-green); }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--gt-ink); transition: background-color .15s ease; }
.btn-icon:hover { background: var(--gt-sage); }
.btn-icon-sm { width: 34px; height: 34px; }

.form-control, .form-select { border-color: #CFDAC4; border-radius: 10px; min-height: 42px; color: var(--gt-ink); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--gt-forest); box-shadow: 0 0 0 3px rgba(23, 51, 31, .12); }
.form-control, .form-control:focus, .form-select, .form-select:focus, .form-check-input:not(:checked) { background-color: var(--gt-white); }
.form-check-input { border-color: #8FA393; }
.form-control::placeholder { color: var(--gt-muted); opacity: 1; }
.form-label { font-weight: 600; font-size: 14px; color: var(--gt-ink); margin-bottom: .3rem; display: block; }
.form-text { color: var(--gt-muted); font-size: 13px; }
.form-check-input:checked { background-color: var(--gt-forest); border-color: var(--gt-forest); }
.opt { font-weight: 400; color: var(--gt-muted); font-size: 13px; }
.text-muted-strong { color: var(--gt-muted); }
.invalid-feedback { display: block; color: var(--gt-danger); }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--gt-danger); background-image: none; padding-right: .75rem; }
.alert { border-radius: 10px; font-size: 14px; }

/* Shell */
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--gt-white); padding: 8px 12px; border-radius: 8px; z-index: 2000; }
.skip-link:focus { top: 8px; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { background: var(--gt-forest) !important; color: #DCE5D2; }
@media (min-width: 992px) {
    .sidebar { position: sticky; top: 0; height: 100vh; width: var(--sidebar-w); flex: none; overflow-y: auto; transition: width .2s ease; visibility: visible; transform: none; }
    .is-collapsed .sidebar { width: var(--sidebar-w-min); }
    .is-collapsed .nav-item span, .is-collapsed .nav-group { display: none; }
    .is-collapsed .nav-item { justify-content: center; padding-inline: 0; }
    .is-collapsed .sidebar-logo img { width: 52px; }
    .is-collapsed .sidebar-brand { padding-inline: 12px; justify-content: center; }
}
.offcanvas-lg.sidebar { --bs-offcanvas-width: 280px; --bs-offcanvas-bg: var(--gt-forest); --bs-offcanvas-color: #DCE5D2; }
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; }
.sidebar-logo { display: block; background: var(--gt-white); border-radius: 12px; padding: 6px 10px; }
.sidebar-logo img { display: block; width: 104px; height: auto; transition: width .2s ease; }
.sidebar-close { color: var(--gt-white); }
.sidebar-close:hover { background: var(--gt-forest-2); }
.sidebar-nav { padding: 0 12px 24px; }
.nav-group { margin: 18px 12px 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #B8C7AC; }
.nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: #DCE5D2; text-decoration: none; font-weight: 500; position: relative; }
a.nav-item:hover { background: var(--gt-forest-2); color: var(--gt-white); }
a.nav-item.is-active { background: var(--gt-forest-2); color: var(--gt-white); font-weight: 600; }
a.nav-item.is-active::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--gt-gold); }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px 20px; background: var(--gt-white); border-bottom: 1px solid var(--gt-line); }
.topbar-crumbs { min-width: 0; overflow: hidden; white-space: nowrap; }
.breadcrumb { font-size: 14px; flex-wrap: nowrap; --bs-breadcrumb-item-active-color: var(--gt-muted); }
.breadcrumb-item { overflow: hidden; text-overflow: ellipsis; }
.profile-btn { display: flex; align-items: center; gap: 10px; padding: 4px 8px; border: 0; background: transparent; border-radius: 10px; color: var(--gt-ink); }
.profile-btn:hover { background: var(--gt-sage); }
.profile-text { flex-direction: column; align-items: flex-start; line-height: 1.2; font-size: 14px; }
.profile-text small { color: var(--gt-muted); }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 999px; background: var(--gt-forest); color: var(--gt-white); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.dropdown-menu { --bs-dropdown-border-color: var(--gt-line); --bs-dropdown-border-radius: 12px; --bs-dropdown-link-active-bg: var(--gt-forest); box-shadow: var(--gt-shadow); font-size: 14px; }
.dropdown-item { display: flex; align-items: center; gap: 10px; padding: 8px 14px; }
.dropdown-item.text-danger:active { color: #fff !important; }
.content { padding: 24px; max-width: 1400px; width: 100%; margin: 0 auto; outline: 0; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-title { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: 34px; line-height: 1.1; color: var(--gt-ink); margin: 0; }
.page-subtitle { margin: 4px 0 0; color: var(--gt-muted); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card-panel { background: var(--gt-white); border: 1px solid var(--gt-line); border-radius: var(--gt-radius); box-shadow: var(--gt-shadow); padding: 20px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.panel-title { font-size: 16px; font-weight: 700; color: var(--gt-ink); margin: 0; }
.panel-sub { font-size: 14px; color: var(--gt-muted); margin: 2px 0 0; }

/* Data table */
.table { --bs-table-bg: transparent; --bs-table-color: var(--gt-body); }
.table-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--gt-line); }
.search-box { position: relative; flex: 1 1 240px; max-width: 340px; }
.search-box svg { position: absolute; left: 12px; top: 12px; color: var(--gt-muted); pointer-events: none; }
.search-box .form-control { padding-left: 38px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-row .form-select, .filter-row .form-control { width: auto; max-width: 190px; min-height: 42px; font-size: 14px; }
.bulk-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 16px; background: var(--gt-sage); border-bottom: 1px solid var(--gt-line); font-size: 14px; font-weight: 600; color: var(--gt-ink); }
.dt-wrap { position: relative; min-height: 180px; }
.dt-wrap.is-loading .dt-table { opacity: .45; }
.dt-spinner { position: absolute; top: 70px; left: 50%; margin-left: -14px; color: var(--gt-forest); }
.dt-table { margin: 0; font-size: 14px; --bs-table-bg: transparent; --bs-table-color: var(--gt-body); transition: opacity .15s ease; }
.dt-table th { font-size: 13px; font-weight: 600; color: var(--gt-muted); white-space: nowrap; background: transparent; border-bottom-color: var(--gt-line); padding: 12px; }
.dt-table td { padding: 12px; vertical-align: middle; border-bottom-color: var(--gt-line); }
.dt-table tbody tr:hover { background: #F9FBF5; }
.dt-table tbody tr:last-child td { border-bottom: 0; }
.dt-check { width: 44px; }
.dt-actions { width: 52px; text-align: right; }
.sort-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; padding: 0; font: inherit; color: inherit; }
.sort-btn:hover { color: var(--gt-ink); }
.sort-btn svg.lucide { width: 14px; height: 14px; }
.sort-btn[aria-sort-state="none"] svg { opacity: .3; }
.dt-empty { text-align: center; padding: 48px 20px; color: var(--gt-muted); }
.dt-empty svg.lucide { width: 34px; height: 34px; margin-bottom: 10px; color: #B8C7AC; }
.dt-empty h2 { font-size: 16px; font-weight: 700; color: var(--gt-ink); margin: 0 0 4px; }
.dt-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--gt-line); font-size: 14px; color: var(--gt-muted); }
.dt-pages { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.dt-pages button { min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--gt-ink); font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.dt-pages button:hover:not(:disabled) { background: var(--gt-sage); }
.dt-pages button[aria-current="page"] { background: var(--gt-forest); color: var(--gt-white); }
.dt-pages button:disabled { opacity: .4; }
.dt-size { width: auto; min-height: 36px; padding-block: 4px; font-size: 14px; display: inline-block; }
.cell-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell-title { font-weight: 600; color: var(--gt-ink); display: block; }
a.cell-title { text-decoration: none; }
a.cell-title:hover { text-decoration: underline; }
.cell-sub { font-size: 13px; color: var(--gt-muted); display: block; }
.thumb { width: 44px; height: 44px; flex: none; border-radius: 10px; object-fit: contain; background: var(--gt-sage); border: 1px solid var(--gt-line); display: inline-flex; align-items: center; justify-content: center; color: #9DB08F; }
.thumb-logo { width: 72px; background: var(--gt-white); }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; border: 0; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.status-active { background: var(--gt-ok-bg); color: var(--gt-ok-ink); }
.status-inactive { background: #E9ECE4; color: #4A5A4E; }
.status-draft { background: var(--gt-warn-bg); color: var(--gt-warn-ink); }
button.status { cursor: pointer; }
button.status:hover { filter: brightness(.96); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--gt-sage); border: 1px solid var(--gt-line); font-size: 12px; color: var(--gt-ink); margin: 0 3px 3px 0; }
.tag-warn { background: var(--gt-warn-bg); border-color: #EFD9A5; color: var(--gt-warn-ink); }
.complete-ok { display: inline-flex; gap: 4px; align-items: center; color: var(--gt-ok-ink); font-size: 13px; font-weight: 600; }
.complete-ok svg.lucide { width: 15px; height: 15px; }
@media (max-width: 767.98px) {
    .dt-table thead { display: none; }
    .dt-table, .dt-table tbody, .dt-table tr, .dt-table td { display: block; width: 100%; }
    .dt-table tr { border-bottom: 1px solid var(--gt-line); padding: 10px 0; position: relative; }
    .dt-table td { border: 0; padding: 4px 16px; display: flex; justify-content: space-between; gap: 16px; text-align: right; }
    .dt-table td::before { content: attr(data-label); font-size: 13px; color: var(--gt-muted); text-align: left; flex: none; }
    .dt-table td.dt-primary { padding-right: 56px; text-align: left; }
    .dt-table td.dt-primary::before, .dt-table td.dt-check::before, .dt-table td.dt-actions::before { content: none; }
    .dt-table td.dt-check { display: none; }
    .dt-table td.dt-actions { position: absolute; top: 6px; right: 0; width: auto; padding: 0 8px; }
    .has-selection .dt-table td.dt-check { display: flex; }
    .search-box { max-width: none; flex-basis: 100%; }
    .filter-row { width: 100%; display: none; }
    .filters-open .filter-row { display: flex; }
    .filter-row .form-select, .filter-row .form-control { flex: 1 1 45%; max-width: none; }
    .content { padding: 16px; }
    .page-title { font-size: 30px; }
}

/* Modals and drawers */
.modal { --bs-modal-bg: var(--gt-white); }
.modal-content { border: 0; border-radius: 16px; }
.modal-header, .modal-footer { border-color: var(--gt-line); }
.modal-title { color: var(--gt-ink); font-weight: 700; }
.modal-backdrop { --bs-backdrop-bg: var(--gt-forest); --bs-backdrop-opacity: .4; }

/* Drawer: a Bootstrap modal that slides in from the right */
.modal-drawer { padding: 0 !important; overflow: hidden !important; }
.modal-drawer.fade:not(.show) { opacity: 1; }
.modal-drawer .modal-dialog { width: 100%; max-width: 520px; height: 100%; margin: 0 0 0 auto; }
.modal-drawer.fade .modal-dialog { transition: transform .28s cubic-bezier(.22, 1, .36, 1); }
.modal-drawer.fade:not(.show) .modal-dialog { transform: translateX(100%); }
.modal-drawer .modal-content { height: 100%; border-radius: 16px 0 0 16px; box-shadow: -12px 0 40px rgba(23, 51, 31, .16); overflow: hidden; }
.modal-drawer .modal-header { padding: 20px 24px; }
.modal-drawer .modal-body { flex: 1 1 auto; min-height: 0; padding: 24px; overflow-y: auto; }
.modal-drawer .modal-footer { padding: 16px 24px; gap: 8px; }
.modal-drawer .modal-footer > * { margin: 0; }
.modal-drawer .modal-body p.form-text { margin-bottom: 0; }
@media (max-width: 575.98px) {
    .modal-drawer .modal-content { border-radius: 0; }
    .modal-drawer .modal-header, .modal-drawer .modal-body, .modal-drawer .modal-footer { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .modal-drawer.fade .modal-dialog { transition: none; }
}
.toast { border: 1px solid var(--gt-line); border-radius: 12px; box-shadow: var(--gt-shadow); background: var(--gt-white); }
.toast-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: 14px; color: var(--gt-ink); }
.toast-ok svg { color: var(--gt-chart-live); }
.toast-err svg { color: var(--gt-danger); }
.detail-list { display: grid; grid-template-columns: 120px 1fr; gap: 10px 12px; font-size: 14px; margin: 0; }
.detail-list dt { color: var(--gt-muted); font-weight: 500; }
.detail-list dd { margin: 0; color: var(--gt-ink); word-break: break-word; }
.dropzone { position: relative; border: 1.5px dashed #BCCBAF; border-radius: 12px; background: var(--gt-sage); outline: 0; transition: border-color .15s ease, background-color .15s ease; }
.dropzone:hover { border-color: var(--gt-green); }
.dropzone.is-dragover { border-color: var(--gt-green); border-style: solid; background: #E6EFDA; }
.dropzone.is-invalid { border-color: var(--gt-danger); }
.dropzone:has(input:focus-visible) { border-color: var(--gt-forest); box-shadow: 0 0 0 3px rgba(23, 51, 31, .12); }
.dropzone-target { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0; padding: 14px 40px 14px 14px; cursor: pointer; }
.dropzone-preview { width: 72px; height: 72px; flex: none; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--gt-line); border-radius: 10px; background: var(--gt-white); color: var(--gt-muted); }
.dropzone-preview img { width: 100%; height: 100%; object-fit: contain; }
.dropzone-copy { display: grid; gap: 2px; min-width: 0; }
.dropzone-title { font-size: 14px; font-weight: 500; color: var(--gt-ink); overflow-wrap: anywhere; }
.dropzone-link { color: var(--gt-green); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.dropzone .form-text { margin: 0; }
.dropzone-remove { position: absolute; top: 6px; right: 6px; }
.dropzone-remove:hover { background: var(--gt-white); }
.dropzone-lg .dropzone-target { flex-direction: column; padding: 32px 20px; text-align: center; }
.dropzone-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--gt-white); border: 1px solid var(--gt-line); color: var(--gt-green); }
.upload-progress { margin-top: 10px; flex: 1; min-width: 0; }
.upload-progress-row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 4px; font-size: 13px; color: var(--gt-muted); }
.upload-progress-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gt-ink); }
.upload-progress-status { flex: none; font-variant-numeric: tabular-nums; }
.upload-progress .progress { --bs-progress-height: 6px; --bs-progress-bg: var(--gt-line); --bs-progress-bar-bg: var(--gt-green); --bs-progress-bar-transition: width .15s ease; }
.upload-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.upload-list:empty { display: none; }
.dropzone-lg ~ .image-grid { margin-top: 16px; }
.upload-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--gt-line); border-radius: 10px; background: var(--gt-white); }
.upload-row img { width: 40px; height: 40px; flex: none; object-fit: cover; border-radius: 8px; }
.upload-row .upload-progress { margin-top: 0; }
.upload-row > svg.lucide { width: 40px; color: var(--gt-muted); }
.upload-failed { flex: 1; min-width: 0; display: grid; font-size: 13px; color: var(--gt-danger); overflow-wrap: anywhere; }
.sort-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sort-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--gt-line); border-radius: 10px; background: var(--gt-white); font-size: 14px; color: var(--gt-ink); }
.sort-list li.is-dragging { opacity: .5; }
.sort-list .sort-grip { cursor: grab; color: var(--gt-muted); }
.sort-list .sort-label { flex: 1; min-width: 0; }

/* Dashboard */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 14px; }
.stat { background: var(--gt-white); border: 1px solid var(--gt-line); border-radius: var(--gt-radius); box-shadow: var(--gt-shadow); padding: 16px 18px; text-decoration: none; display: block; transition: border-color .15s ease, transform .15s ease; }
a.stat:hover { border-color: #B8C7AC; transform: translateY(-1px); }
.stat-label { font-size: 14px; color: var(--gt-muted); }
.stat-value { font-family: "Instrument Serif", Georgia, serif; font-size: 40px; line-height: 1.1; color: var(--gt-ink); display: block; margin: 2px 0; }
.stat-sub { font-size: 13px; color: var(--gt-muted); display: flex; gap: 10px; flex-wrap: wrap; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 14px; margin-bottom: 14px; }
.dash-grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.attention-list, .mini-list { list-style: none; margin: 0; padding: 0; }
.input-group-text { background: var(--gt-sage); border-color: #CFDAC4; color: var(--gt-muted); font-size: 14px; }
.attention-list a { display: block; padding: 10px 0; border-bottom: 1px solid var(--gt-line); text-decoration: none; color: var(--gt-ink); font-size: 14px; }
.attention-list li:last-child a { border-bottom: 0; }
.attention-row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.attention-row strong { font-weight: 700; }
.meter { height: 8px; border-radius: 4px; background: #E9ECE4; overflow: hidden; display: flex; gap: 2px; }
.meter span { background: var(--gt-chart-live); border-radius: 4px; display: block; }
.chart-legend { display: flex; gap: 16px; font-size: 13px; color: var(--gt-muted); margin-bottom: 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.swatch-live { background: var(--gt-chart-live); }
.swatch-other { background: var(--gt-chart-other); }
.chart-box { position: relative; height: 340px; }
.mini-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--gt-line); font-size: 14px; min-width: 0; }
.mini-list li:last-child { border-bottom: 0; }
.mini-body { min-width: 0; flex: 1; }
.mini-body .cell-title { font-weight: 500; }
.skeleton { background: linear-gradient(90deg, #EDF1E6, #F6F8F1, #EDF1E6); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 8px; height: 100px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (max-width: 991.98px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }

/* Product editor */
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; align-items: start; }
.editor-side { position: sticky; top: 80px; }
.editor-tabs { flex-wrap: wrap; border-bottom: 1px solid var(--gt-line); padding: 0 8px; gap: 2px; scrollbar-width: thin; }
.editor-tabs .nav-link { display: flex; align-items: center; gap: 7px; white-space: nowrap; color: var(--gt-muted); font-weight: 500; font-size: 14px; padding: 14px 12px; border-bottom: 2px solid transparent; border-radius: 0; }
.editor-tabs .nav-link svg.lucide { width: 16px; height: 16px; }
.editor-tabs .nav-link:hover { color: var(--gt-ink); }
.editor-tabs .nav-link.active { color: var(--gt-ink); font-weight: 600; border-bottom-color: var(--gt-gold); }
.tab-error { width: 8px; height: 8px; border-radius: 999px; background: var(--gt-danger); }
.pane-title { font-size: 16px; font-weight: 700; color: var(--gt-ink); margin: 0 0 4px; }
.pane-lead { color: var(--gt-muted); font-size: 14px; margin-bottom: 12px; }
.row-card { display: grid; grid-template-columns: 80px 100px 90px minmax(150px, 1fr) 90px 80px 40px; gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--gt-line); border-radius: 10px; margin-bottom: 8px; }
.row-card .form-label { font-size: 12px; font-weight: 500; color: var(--gt-muted); }
.row-card .form-check { margin-top: 30px; }
.row-card .btn-icon { margin-top: 24px; color: var(--gt-danger); }
.ingredient-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 104px; gap: 8px; margin-bottom: 6px; align-items: start; }
.ingredient-actions { display: flex; }
.check-grid { display: grid; gap: 6px; }
.allergen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-bottom: 12px; }
.allergen-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--gt-line); border-radius: 10px; font-size: 14px; color: var(--gt-ink); }
.allergen-item .form-select { width: 150px; min-height: 36px; padding-block: 4px; font-size: 14px; }
.review-box { padding: 12px 14px; border-radius: 10px; background: var(--gt-warn-bg); }
.review-box.is-reviewed { background: var(--gt-ok-bg); }
.nutrient-table th { font-size: 13px; color: var(--gt-muted); font-weight: 600; }
.nutrient-table td { padding-block: 6px; }
.nutrient-table .form-control { max-width: 140px; min-height: 36px; padding-block: 4px; }
.indent-1 { padding-left: 24px !important; }
.indent-2 { padding-left: 44px !important; }
.image-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.image-card { border: 1px solid var(--gt-line); border-radius: 12px; padding: 10px; display: grid; gap: 8px; }
.image-card img { width: 100%; height: 130px; object-fit: contain; background: var(--gt-sage); border-radius: 8px; }
.image-card .form-select, .image-card .form-control { min-height: 36px; padding-block: 4px; font-size: 14px; }
.empty-inline { padding: 28px; text-align: center; color: var(--gt-muted); background: var(--gt-sage); border-radius: 10px; }
.lookup-results { list-style: none; margin: 4px 0 0; padding: 4px; position: absolute; z-index: 20; left: 0; right: 0; background: var(--gt-white); border: 1px solid var(--gt-line); border-radius: 10px; box-shadow: var(--gt-shadow); max-height: 240px; overflow: auto; }
.lookup-results button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; font-size: 14px; color: var(--gt-ink); }
.lookup-results button:hover, .lookup-results button:focus { background: var(--gt-sage); }
.check-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: 14px; display: grid; gap: 6px; color: var(--gt-ink); }
.check-list li { display: flex; gap: 8px; align-items: center; }
.check-list svg.lucide { width: 16px; height: 16px; }
.check-list .is-done svg { color: var(--gt-chart-live); }
.check-list .is-todo svg { color: var(--gt-warn-ink); }
.check-list .is-optional { color: var(--gt-muted); }
@media (max-width: 1099.98px) {
    .editor-layout { grid-template-columns: minmax(0, 1fr); }
    .editor-side { position: static; order: -1; }
}
@media (max-width: 767.98px) {
    .editor-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
    .breadcrumb-item:not(:last-child) { display: none; }
    .breadcrumb-item + .breadcrumb-item { padding-left: 0; }
    .breadcrumb-item + .breadcrumb-item::before { display: none; }
    .row-card { grid-template-columns: 1fr 1fr; position: relative; padding-top: 34px; }
    .row-card .col-upc { grid-column: 1 / -1; }
    .row-card .btn-icon { position: absolute; top: 0; right: 0; margin: 0; }
    .row-card .form-check { margin-top: 4px; }
}

/* Import */
.import-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.preview-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin: 12px 0; }
.preview-stat { background: var(--gt-sage); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--gt-muted); }
.preview-stat strong { display: block; font-size: 22px; color: var(--gt-ink); }
.error-table { font-size: 13px; max-height: 300px; overflow: auto; border: 1px solid var(--gt-line); border-radius: 10px; }
.settings-tabs { gap: 4px; flex-wrap: wrap; }
.settings-tabs .nav-link { border: 1px solid var(--gt-line); border-radius: 999px; background: var(--gt-white); color: var(--gt-ink); padding: 7px 16px; font-size: 14px; font-weight: 500; }
.settings-tabs .nav-link.active { background: var(--gt-forest); border-color: var(--gt-forest); color: var(--gt-white); }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }

/* Auth */
.auth-body { background: var(--gt-sage); }
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 40px; background: var(--gt-white); border: 1px solid var(--gt-line); border-radius: 16px; box-shadow: var(--gt-shadow); }
.auth-logo { width: 116px; height: auto; display: block; margin: 0 auto 24px; }
.auth-title { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: 32px; line-height: 1.15; color: var(--gt-ink); text-align: center; margin: 0 0 4px; }
.auth-lead { color: var(--gt-muted); text-align: center; margin-bottom: 28px; }
.auth-card .btn-primary { min-height: 46px; }
.auth-card > p:last-child { margin-bottom: 0; }
.auth-options { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 24px; font-size: 14px; }
.auth-options .form-check { margin-bottom: 0; }
@media (max-width: 480px) { .auth-card { padding: 32px 24px; } }
.auth-simple { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.error-page { text-align: center; max-width: 440px; }
.error-logo { width: 130px; margin-bottom: 24px; }
.error-page .page-title { margin-bottom: 10px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
