:root {
  color-scheme: light;
  --ink: #101412;
  --ink-2: #1a211e;
  --muted: #6c746f;
  --line: #e3e7e4;
  --paper: #f6f7f5;
  --white: #fff;
  --lime: #c8ff54;
  --lime-2: #a8eb22;
  --violet: #7357ff;
  --danger: #d34d4d;
  --shadow: 0 18px 50px rgba(16, 20, 18, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font: 400 15px/1.5 "DM Sans", sans-serif; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; font: 800 1.02rem "Manrope", sans-serif; letter-spacing: -.04em; }
.brand-mark { position: relative; width: 34px; height: 34px; display: grid; place-items: center; overflow: hidden; border-radius: 11px; background: linear-gradient(135deg, #8a67ff, #5634d7); color: #fff; box-shadow: 0 8px 22px rgba(115,87,255,.28); }
.brand-mark::before { content: "MM"; position: relative; z-index: 1; font: 800 .7rem/1 "Manrope", sans-serif; letter-spacing: -.12em; transform: translateX(-1px); }
.brand-mark::after { content: ""; position: absolute; width: 9px; height: 9px; right: -2px; top: -2px; border-radius: 50%; background: var(--lime); }
.brand small { display: block; margin-top: -2px; color: var(--muted); font: 500 .58rem "DM Sans", sans-serif; letter-spacing: .04em; }

.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #ebe7ff; color: var(--violet); font-weight: 800; }
.pill { display: inline-flex; align-items: center; gap: 7px; width: max-content; padding: 6px 10px; border-radius: 999px; background: #eef5ea; color: #3c6930; font-size: .76rem; font-weight: 700; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.waiting { background: #fff4d9; color: #8b6610; }
.pill.draft { background: #eceeed; color: #66706a; }

.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 245px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 18px; background: var(--ink); color: #fff; }
.sidebar .brand { padding: 0 8px 28px; }
.sidebar .brand-mark { box-shadow: 0 8px 24px rgba(115,87,255,.35); }
.sidebar .brand small { color: #909994; }
.nav-label { margin: 12px 10px 8px; color: #717b75; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.nav-list { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 13px; border: 0; border-radius: 12px; background: transparent; color: #aeb6b1; text-align: left; font-weight: 600; transition: .2s ease; }
.nav-item { text-decoration: none; }
.nav-item:hover, .nav-item.active { background: #242c28; color: #fff; }
.nav-item.active::after { content: ""; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(200,255,84,.12); }
.sidebar-foot { margin-top: auto; padding: 18px 12px 4px; border-top: 1px solid #2c3530; color: #8b948f; font-size: .75rem; line-height: 1.5; }

.admin-main { min-width: 0; padding: 0 38px 48px; }
.admin-topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.menu-button, .mobile-brand, .mobile-nav-backdrop { display: none; }
.breadcrumbs { color: var(--muted); font-size: .84rem; }
.breadcrumbs strong { color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.search { position: relative; }
.search input { width: 230px; height: 42px; padding: 0 16px 0 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); outline: none; }
.search .icon { position: absolute; left: 13px; top: 12px; color: var(--muted); }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }

.page-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding: 35px 0 25px; }
.eyebrow { margin: 0 0 8px; color: var(--violet); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; font: 800 clamp(1.9rem, 3vw, 2.8rem)/1.04 "Manrope", sans-serif; letter-spacing: -.06em; }
.page-head p:not(.eyebrow) { margin: 0; color: var(--muted); }
.primary-button, .secondary-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 16px; border-radius: 12px; font-weight: 700; }
.primary-button { border: 1px solid var(--ink); background: var(--ink); color: #fff; box-shadow: 0 7px 18px rgba(16,20,18,.13); }
.primary-button .button-icon { width: 30px; height: 30px; display: grid; place-items: center; margin-right: -8px; border-radius: 8px; background: var(--lime); color: var(--ink); font-size: 1.15rem; }
.secondary-button { border: 1px solid var(--line); background: #fff; color: var(--ink); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { min-height: 145px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .78rem; font-weight: 700; }
.stat-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #f1f3f1; color: var(--ink); }
.stat-value { margin-top: 20px; font: 800 2rem "Manrope", sans-serif; letter-spacing: -.06em; }
.stat-note { color: var(--muted); font-size: .75rem; }

.content-card { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 12px 32px rgba(16,20,18,.035); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; font: 750 1.02rem "Manrope", sans-serif; letter-spacing: -.03em; }
.filters { display: flex; gap: 6px; }
.filter-button { padding: 7px 11px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: .78rem; font-weight: 700; }
.filter-button.active { background: #eef0ee; color: var(--ink); }
.gallery-table { width: 100%; border-collapse: collapse; }
.gallery-table th { padding: 12px 20px; background: #fafbfa; color: #8a928d; font-size: .67rem; letter-spacing: .1em; text-align: left; text-transform: uppercase; }
.gallery-table td { padding: 15px 20px; border-top: 1px solid #edf0ee; vertical-align: middle; font-size: .84rem; }
.gallery-table tbody tr { transition: background .15s ease; }
.gallery-table tbody tr:hover { background: #fbfcfb; }
.gallery-name { display: flex; align-items: center; gap: 12px; }
.gallery-name > span:last-child { min-width: 0; }
.gallery-thumb { display: block; width: 60px; height: 80px; flex: none; border-radius: 10px; background: linear-gradient(135deg, var(--thumb-a), var(--thumb-b)); }
.dashboard-grid .gallery-thumb { width: 90px; height: 120px; grid-row: span 2; }
.gallery-name strong { display: block; margin-bottom: 3px; }
.gallery-name small, .muted { color: var(--muted); }
.gallery-name small, .gallery-table code { overflow-wrap: anywhere; }
.progress { width: 90px; height: 6px; overflow: hidden; border-radius: 99px; background: #edf0ee; }
.progress span { display: block; width: var(--progress); height: 100%; border-radius: inherit; background: var(--violet); }
.row-menu { border: 0; background: transparent; color: var(--muted); font-size: 1.2rem; }
.empty { padding: 48px 20px; color: var(--muted); text-align: center; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(10,13,11,.42); backdrop-filter: blur(3px); }
.drawer { position: fixed; top: 0; right: 0; z-index: 21; width: min(100%, 500px); height: 100vh; overflow-y: auto; padding: 28px; background: #fff; box-shadow: -20px 0 70px rgba(10,13,11,.2); }
.drawer-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.drawer-head h2 { margin: 0; font: 800 1.65rem "Manrope", sans-serif; letter-spacing: -.05em; }
.close-button { width: 38px; height: 38px; border: 0; border-radius: 10px; background: #f0f2f0; font-size: 1.25rem; }
.form-grid { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .78rem; font-weight: 700; }
.field input, .field textarea, .field select { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; outline: none; }
.field textarea { min-height: 90px; padding-top: 12px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(115,87,255,.12); }
.field-help { color: var(--muted); font-size: .72rem; line-height: 1.5; }
.drive-field { position: relative; }
.drive-badge { position: absolute; right: 9px; top: 9px; display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px; border-radius: 8px; background: #eef5ff; color: #3071d7; font-size: .7rem; font-weight: 800; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; }
.switch-row strong { display: block; font-size: .82rem; }
.switch-row small { color: var(--muted); }
.switch { width: 42px; height: 24px; padding: 3px; border: 0; border-radius: 99px; background: var(--ink); }
.switch::after { content: ""; display: block; width: 18px; height: 18px; margin-left: 18px; border-radius: 50%; background: var(--lime); }
.drawer-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }

.customer-shell { min-height: 100vh; background: #f2f1ed; }
.customer-topbar { width: min(1320px, calc(100% - 40px)); height: 82px; display: flex; align-items: center; justify-content: space-between; margin: auto; border-bottom: 1px solid rgba(16,20,18,.12); }
.customer-actions { display: flex; align-items: center; gap: 10px; }
.customer-main { width: min(1320px, calc(100% - 40px)); margin: auto; padding: 50px 0 150px; }
.customer-intro { margin-bottom: 28px; }
.customer-intro h1 { max-width: 790px; }
.customer-intro p:last-child { color: var(--muted); line-height: 1.65; }
.selection-toolbar { position: fixed; left: 50%; bottom: 18px; z-index: 50; width: min(1320px, calc(100% - 40px)); display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0; padding: 9px 12px 9px 14px; border-radius: 15px; background: rgba(16,20,18,.94); color: #fff; box-shadow: var(--shadow); backdrop-filter: blur(10px); transform: translateX(-50%); }
.selection-summary { display: flex; align-items: center; gap: 12px; }
.selection-actions { display: flex; align-items: center; gap: 9px; }
.toolbar-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; border: 1px solid rgba(255,255,255,.25); border-radius: 11px; background: transparent; color: #fff; font-weight: 700; text-decoration: none; }
.toolbar-button:disabled { opacity: .45; }
.gallery-download-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; color: var(--muted); font-size: .8rem; }
.selection-bubble { min-width: 64px; height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 2px; padding: 0 8px; box-sizing: border-box; white-space: nowrap; border-radius: 9px; background: var(--lime); color: var(--ink); font-weight: 800; }
.selection-summary small { color: #aab2ad; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.photo { position: relative; min-height: 335px; overflow: hidden; padding: 0; border: 0; border-radius: 18px; background: linear-gradient(145deg, var(--photo-a), var(--photo-b)); background-size: cover; background-position: center; color: #fff; text-align: left; }
.photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.55)); }
.photo::after { content: ""; position: absolute; inset: 0; border: 4px solid transparent; border-radius: inherit; transition: .18s ease; }
.photo.selected::after { border-color: var(--lime); }
.photo-index, .photo-check, .photo-caption { position: absolute; z-index: 2; }
.photo-index { top: 16px; left: 17px; font-size: .7rem; font-weight: 800; letter-spacing: .12em; }
.photo-check { top: 14px; right: 14px; width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.8); border-radius: 50%; background: rgba(0,0,0,.18); font-weight: 800; }
.photo.selected .photo-check { border-color: var(--lime); background: var(--lime); color: var(--ink); }
.photo-caption { left: 18px; bottom: 17px; font-weight: 700; }
.photo.selected .photo-caption { color: var(--lime); }
.back-admin { color: var(--ink); font-size: .8rem; font-weight: 700; text-decoration: none; }

.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: grid; gap: 8px; }
.toast { max-width: 360px; padding: 13px 16px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: .82rem; animation: toast-in .25s ease both; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1.08fr) minmax(420px,.92fr); background: #fff; }
.login-visual { min-height: 100vh; display: flex; align-items: flex-end; padding: clamp(34px,7vw,90px); background: radial-gradient(circle at 85% 10%,rgba(200,255,84,.2),transparent 32%),linear-gradient(145deg,#101412,#26342d); color:#fff; }
.login-visual .brand { position:absolute; top:36px; color:#fff; }
.login-visual .brand small { color:#8f9b94; }
.login-visual h1 { font-size:clamp(3.2rem,7vw,7rem); }
.login-visual > div > p:last-child { max-width:590px; color:#aeb8b2; line-height:1.7; }
.login-panel { display:grid; place-items:center; padding:28px; }
.login-card { width:min(100%,420px); display:grid; gap:17px; }
.login-card h2 { margin:0; font:800 2rem "Manrope",sans-serif; letter-spacing:-.05em; }
.login-card > .primary-button { margin-top:4px; }
.form-error { min-height:20px; margin:0; color:var(--danger); font-size:.78rem; }
.text-link { color: var(--violet); font-size: .8rem; font-weight: 700; text-decoration: none; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 18px; }
.compact-list { display: grid; }
.compact-item { width: 100%; min-height: 74px; display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 12px; padding: 12px 20px; border: 0; border-top: 1px solid var(--line); background: #fff; color: var(--ink); text-align: left; }
.dashboard-grid .compact-item { min-height: 144px; grid-template-columns: 90px minmax(0,1fr) auto; }
.dashboard-grid .gallery-thumb { grid-row: auto; }
.dashboard-grid .compact-item > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
.dashboard-grid .compact-item .pill { grid-column: 3; justify-self: end; }
.compact-item:first-child { border-top: 0; }
.compact-item:hover { background: #fafbfa; }
.compact-item strong, .compact-item small { display: block; }
.compact-item small { margin-top: 3px; color: var(--muted); }
.activity-list { padding: 8px 20px 18px; }
.activity-item { display: grid; grid-template-columns: 12px 1fr; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.activity-item:last-child { border-bottom: 0; }
.activity-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--lime-2); box-shadow: 0 0 0 4px rgba(168,235,34,.15); }
.activity-item p { margin: 0; font-size: .8rem; line-height: 1.45; }
.activity-item small { display: block; margin-top: 4px; color: var(--muted); }
.customer-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.customer-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.customer-card-top { display: flex; justify-content: space-between; margin-bottom: 18px; }
.customer-card h3 { margin-bottom: 7px; font: 750 1.05rem "Manrope",sans-serif; }
.customer-card > a, .customer-card > span { display: block; margin-top: 4px; color: var(--muted); font-size: .8rem; text-decoration: none; }
.customer-meta { display: flex; justify-content: space-between; gap: 10px; margin: 18px 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; }
.customer-card > button { width: 100%; }
.info-banner { display: flex; gap: 14px; margin-bottom: 18px; padding: 17px 19px; border: 1px solid #dce8d3; border-radius: 16px; background: #f2f8ed; }
.info-icon { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--lime); font-weight: 800; }
.info-banner p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.drive-logo { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #edf5ff; color: #4285f4; font-size: 1.3rem; }
code { color: var(--muted); font-size: .74rem; }
.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.settings-section { overflow: visible; }
.settings-body { display: grid; gap: 16px; padding: 20px; }
.logo-preview { padding: 17px; border-radius: 14px; background: var(--paper); }
.check-row { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; }
.check-row input { width: 18px; height: 18px; accent-color: var(--ink); }
.settings-actions { grid-column: 1/-1; display: flex; justify-content: flex-end; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 18px; }
.detail-actions .primary-button { margin-left: auto; }
.detail-stats { margin-top: 0; }
.detail-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(280px,.75fr); gap: 18px; }
.form-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.proof-controls { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.proof-controls .search input { background: #fff; }
.proof-grid { align-items: start; }
.photo-wrap { min-width: 0; overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 8px 22px rgba(16,20,18,.06); }
.photo-wrap .photo { width: 100%; min-height: 0; aspect-ratio: 4 / 5; border-radius: 18px 18px 0 0; }
.photo-select { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px 0 7px; border: 1px solid var(--ink); border-radius: 9px; background: var(--ink); color: #fff; font-size: .72rem; font-weight: 800; }
.select-check { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.85); border-radius: 5px; color: transparent; font-size: .75rem; }
.photo-select.selected { border-color: var(--lime); background: var(--lime); color: var(--ink); }
.photo-select.selected .select-check { border-color: var(--ink); color: var(--ink); }
.lightbox-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(5,7,6,.82); backdrop-filter: blur(7px); }
.lightbox { position: fixed; inset: 24px; z-index: 61; display: grid; place-items: center; margin: 0; pointer-events: none; }
.lightbox img { max-width: min(100%, 1500px); max-height: calc(100vh - 90px); border-radius: 12px; box-shadow: 0 24px 80px rgba(0,0,0,.45); pointer-events: auto; object-fit: contain; }
.lightbox p { position: absolute; bottom: 0; margin: 0; color: #fff; font-size: .82rem; pointer-events: auto; }
.lightbox-close { position: fixed; top: 18px; right: 20px; z-index: 62; width: 42px; height: 42px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); font-size: 1.7rem; line-height: 1; pointer-events: auto; }
.photo-tools { height: 52px; display: flex; align-items: center; gap: 6px; padding: 0 10px 0 13px; }
.photo-download { width: 34px; height: 34px; display: grid; place-items: center; margin-left: auto; border-radius: 9px; background: #f1f3f1; color: var(--muted); }
.lightbox-nav { position: fixed; top: 50%; z-index: 62; width: 48px; height: 56px; border: 0; border-radius: 12px; background: rgba(255,255,255,.94); color: var(--ink); font-size: 2.5rem; line-height: 1; transform: translateY(-50%); pointer-events: auto; }
.lightbox-nav.previous { left: 20px; }
.lightbox-nav.next { right: 20px; }
.lightbox-download { position: fixed; right: 76px; top: 18px; z-index: 62; display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 13px; border-radius: 11px; background: #fff; color: var(--ink); font-weight: 800; font-size: .8rem; pointer-events: auto; }
.rating { display: flex; gap: 1px; }
.rating button { padding: 2px; border: 0; background: transparent; color: #d8dcd9; font-size: 1rem; }
.rating button.rated { color: #f0ad24; }
.comment-button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 9px; background: #f1f3f1; color: var(--muted); }
.comment-button.has-comment { background: #ece8ff; color: var(--violet); }
.dialog { position: fixed; left: 50%; top: 50%; z-index: 21; width: min(440px,calc(100% - 28px)); padding: 24px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); transform: translate(-50%,-50%); }
.dialog .drawer-head { margin-bottom: 18px; }
.dialog .drawer-actions { margin-top: 18px; }
.success-mark { width: 58px; height: 58px; display: grid; place-items: center; margin: 10px auto 20px; border-radius: 50%; background: var(--lime); font-size: 1.5rem; font-weight: 800; }
.dialog > p { color: var(--muted); line-height: 1.6; text-align: center; }
.dialog > p strong { color: var(--ink); }
.share-link-row { display:flex; gap:8px; }
.share-link-row input { min-width:0; }
.share-access { display:grid; min-height:100vh; place-items:center; padding:24px; background:linear-gradient(135deg,#101412 0%,#18221d 52%,#3a3526 100%); }
.share-access-card { width:min(440px,100%); padding:34px; border-radius:22px; background:#fff; box-shadow:0 24px 80px rgba(0,0,0,.28); }
.share-access-card .brand-mark { margin-bottom:24px; }
.share-access-card h1 { margin:6px 0 12px; font-size:clamp(1.8rem,6vw,2.5rem); }
.share-access-card p:not(.eyebrow):not(.form-error) { margin:0 0 24px; color:var(--muted); line-height:1.6; }
.share-access-card .primary-button { width:100%; margin-top:8px; }
.back-to-top { position:fixed; right:22px; bottom:24px; z-index:40; width:48px; height:48px; border:0; border-radius:50%; background:var(--ink); color:#fff; font-size:1.45rem; line-height:1; cursor:pointer; opacity:0; transform:translateY(12px); pointer-events:none; box-shadow:0 10px 26px rgba(16,20,18,.22); transition:opacity .2s ease,transform .2s ease; }
.back-to-top.visible { opacity:1; transform:translateY(0); pointer-events:auto; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1050px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .gallery-table th:nth-child(4), .gallery-table td:nth-child(4) { display: none; }
  .customer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 820px) {
  .login-shell { grid-template-columns:1fr; }
  .login-visual { min-height:38vh; padding:100px 30px 35px; }
  .login-visual h1 { font-size:clamp(2.7rem,12vw,4.5rem); }
  .login-panel { min-height:62vh; }
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 41; width: min(82vw, 300px); height: 100dvh; padding: 24px 18px; transform: translateX(-105%); transition: transform .24s ease; box-shadow: 22px 0 60px rgba(0,0,0,.25); }
  .sidebar .brand { padding: 0 8px 28px; }
  .sidebar .brand small, .nav-label, .sidebar-foot { display: block; }
  .nav-list { display: grid; }
  .nav-item { min-height: 46px; white-space: normal; }
  .nav-item.active::after { display: block; }
  .mobile-menu-open .sidebar { transform: translateX(0); }
  .mobile-nav-backdrop { position: fixed; inset: 0; z-index: 40; border: 0; background: rgba(5,8,6,.48); backdrop-filter: blur(2px); }
  .mobile-menu-open .mobile-nav-backdrop { display: block; }
  .menu-button { width: 42px; height: 42px; display: grid; place-content: center; gap: 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
  .menu-button span { width: 18px; height: 2px; border-radius: 2px; background: var(--ink); }
  .mobile-brand { display: block; margin-right: auto; }
  .mobile-brand .brand small { display: none; }
  .mobile-brand .brand-mark { width: 28px; height: 28px; }
  .admin-main { padding: 0 20px 38px; }
  .admin-topbar { position: sticky; top: 0; z-index: 30; height: 70px; gap: 10px; background: rgba(246,247,245,.94); backdrop-filter: blur(12px); }
  .search { display: none; }
  .customer-intro { grid-template-columns: 1fr; gap: 14px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid, .detail-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .admin-main { padding-inline: 14px; }
  .breadcrumbs { display: none; }
  .admin-topbar { justify-content: flex-start; }
  .admin-topbar .avatar { width: 34px; height: 34px; border-radius: 10px; }
  .admin-topbar .icon-button { width: 38px; height: 38px; }
  .page-head { align-items: stretch; flex-direction: column; padding-top: 28px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { min-height: 124px; padding: 15px; }
  .stat-value { font-size: 1.55rem; }
  .card-head { align-items: flex-start; flex-direction: column; padding: 16px; }
  .dashboard-grid .compact-item { grid-template-columns: 78px minmax(0,1fr); gap: 8px 12px; padding: 12px 14px; }
  .dashboard-grid .gallery-thumb { width: 78px; height: 104px; grid-row: span 2; }
  .dashboard-grid .compact-item .pill { grid-column: 2; justify-self: start; }
  .gallery-table thead { display: none; }
  .gallery-table, .gallery-table tbody, .gallery-table tr, .gallery-table td { display: block; }
  .gallery-table tr { position: relative; padding: 14px; border-top: 1px solid var(--line); }
  .gallery-table td { padding: 5px 0; border: 0; }
  .gallery-table td:nth-child(3), .gallery-table td:nth-child(4), .gallery-table td:nth-child(5) { display: inline-flex; margin: 8px 12px 0 0; }
  .gallery-table td:last-child { position: absolute; right: 10px; top: 12px; }
  .drive-table td:last-child { position: static; display: block; margin: 12px 0 0; }
  .drive-table .sync-one { width: 100%; }
  .drawer { padding: 22px 18px; }
  .customer-topbar, .customer-main { width: min(100% - 26px, 1320px); }
  .customer-topbar { height: 70px; }
  .customer-topbar .brand { min-width: 0; flex: 0 1 auto; }
  .customer-topbar .brand > span:last-child { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .customer-actions { min-width: 0; margin-left: auto; }
  .customer-actions .muted { display: none; }
  .back-admin { max-width: 74px; text-align: right; line-height: 1.3; }
  .customer-main { padding-top: 35px; padding-bottom: 132px; }
  .customer-actions .secondary-button { display: none; }
  .selection-toolbar { bottom: 10px; width: calc(100% - 20px); align-items: stretch; gap: 7px; padding: 8px 9px; border-radius: 13px; flex-direction: column; }
  .selection-summary { gap: 8px; }
  .selection-summary > span:last-child strong { display: none; }
  .selection-summary small { font-size: .69rem; white-space: nowrap; }
  .selection-bubble { min-width: 42px; height: 30px; padding-inline: 7px; }
  .selection-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1.18fr); gap: 5px; width: 100%; }
  .selection-actions > * { min-width: 0; min-height: 38px; padding-inline: 5px; font-size: .67rem; line-height: 1.05; text-align: center; }
  .selection-toolbar .primary-button { width: auto; }
  .back-to-top { right: 16px; width: 46px; height: 46px; background: var(--lime); color: var(--ink); box-shadow: 0 8px 24px rgba(16,20,18,.25); }
  .gallery-grid { grid-template-columns: 1fr; }
  .photo { min-height: 430px; }
  .customer-grid { grid-template-columns: 1fr; }
  .proof-controls { align-items: stretch; flex-direction: column; }
  .proof-controls .search input { width: 100%; }
  .proof-controls .filters { overflow-x: auto; }
  .detail-actions .primary-button { margin-left: 0; }
  .detail-actions button { flex: 1 1 auto; }
  .form-row { grid-template-columns: 1fr; }
}

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

.drive-sync-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
#drive-sync-status{margin:8px 0 0}
@media(max-width:720px){.drive-sync-actions{width:100%;justify-content:stretch}.drive-sync-actions button{flex:1 1 180px}}
