/* Admin workspace. Intentionally isolated from the client gallery. */
/* One typography policy overrides the weights and text effects in legacy UI styles. */
@layer admin-typography {
  body:is([data-gallery-surface="admin"],[data-gallery-surface="editor"]) {font-synthesis:style;}
  body:is([data-gallery-surface="admin"],[data-gallery-surface="editor"]),
  body:is([data-gallery-surface="admin"],[data-gallery-surface="editor"]) *,
  body:is([data-gallery-surface="admin"],[data-gallery-surface="editor"]) *::before,
  body:is([data-gallery-surface="admin"],[data-gallery-surface="editor"]) *::after {
    text-shadow:none!important;-webkit-text-stroke-width:0!important;font-weight:400!important;
  }
  body:is([data-gallery-surface="admin"],[data-gallery-surface="editor"]) :is(h1,h2,h3,h4,h5,h6,strong,b,th,legend) {font-weight:500!important;}
}
body:is([data-gallery-surface="admin"],[data-gallery-surface="editor"]) {
  --aw-canvas:#f6f7f9;
  --aw-surface:#fff;
  --aw-ink:#20252b;
  --aw-muted:#69727d;
  --aw-border:#e5e8ec;
  --aw-accent:#435f53;
  --aw-tint:#edf2ef;
  --gd-ink:var(--aw-ink);--gd-muted:var(--aw-muted);--gd-paper:var(--aw-surface);
  --gd-canvas:var(--aw-canvas);--gd-line:var(--aw-border);--gd-accent:var(--aw-accent);--gd-tint:var(--aw-tint);
  --pg-ink:var(--aw-ink);--pg-muted:var(--aw-muted);--pg-paper:var(--aw-surface);
  --pg-line:var(--aw-border);--pg-soft:var(--aw-canvas);--pg-accent:var(--aw-accent);--pg-accent-soft:var(--aw-tint);
  background:var(--aw-canvas);color:var(--aw-ink);
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:13px;line-height:1.5;
}
body:is([data-gallery-surface="admin"],[data-gallery-surface="editor"])[data-brand="astral"] {
  --aw-accent:#67564c;--aw-tint:#f2eeeb;
}
body:is([data-gallery-surface="admin"],[data-gallery-surface="editor"]) :is(button,input,select,textarea) {font-family:inherit;}
body:is([data-gallery-surface="admin"],[data-gallery-surface="editor"]) :is(.btn,.btn-primary,.btn-secondary,.btn-b,.btn-g,.btn-l,.btn-login) {
  min-height:42px;border-radius:8px!important;font-size:12px;font-weight:550;line-height:1.4;
  transition:background-color .16s ease,border-color .16s ease,color .16s ease;
}
body:is([data-gallery-surface="admin"],[data-gallery-surface="editor"]) :is(.btn-primary,.btn-b,.btn-g,.btn-login) {
  background:var(--aw-ink)!important;border-color:var(--aw-ink)!important;
}
body:is([data-gallery-surface="admin"],[data-gallery-surface="editor"]) :is(.btn-primary,.btn-b,.btn-g,.btn-login):hover {
  background:#373f47!important;border-color:#373f47!important;
}
body:is([data-gallery-surface="admin"],[data-gallery-surface="editor"]) :is(.btn-secondary,.btn-l):hover {background:var(--aw-canvas)!important;}
body:is([data-gallery-surface="admin"],[data-gallery-surface="editor"]) :is(input,select,textarea) {
  color:var(--aw-ink);caret-color:var(--aw-accent);accent-color:var(--aw-accent);
}
body:is([data-gallery-surface="admin"],[data-gallery-surface="editor"]) :is(input,textarea)::placeholder {color:var(--aw-muted);}
body:is([data-gallery-surface="admin"],[data-gallery-surface="editor"]) ::selection {background:#dce6df;color:var(--aw-ink);}

/* One calm navigation rail, with the working area given the visual priority. */
body[data-gallery-surface="admin"] .sidebar {width:232px!important;background:var(--aw-surface)!important;border-right:1px solid var(--aw-border)!important;}
body[data-gallery-surface="admin"] .main {margin-left:232px!important;background:var(--aw-canvas);min-width:0;}
body[data-gallery-surface="admin"] .sidebar-logo {display:flex!important;align-items:center;gap:11px;padding:30px 24px 34px!important;}
body[data-gallery-surface="admin"] .sidebar-logo-mark {display:grid!important;place-items:center;width:37px;height:37px;flex:none;border-radius:10px!important;background:var(--aw-ink)!important;color:white!important;font-size:19px;font-weight:550;}
body[data-gallery-surface="admin"] .sidebar-logo-text strong {font-family:inherit!important;font-size:19px!important;font-weight:650!important;line-height:1.3;letter-spacing:-.035em;}
body[data-gallery-surface="admin"] .sidebar-logo-text small {display:block;font-family:inherit;font-size:9px!important;font-weight:500;letter-spacing:.18em;color:var(--aw-muted);margin-top:3px;}
body[data-gallery-surface="admin"] .sidebar-nav {padding:0 14px!important;}
body[data-gallery-surface="admin"] .nav-item {display:flex;align-items:center;gap:12px;min-height:46px;padding:12px 14px!important;margin:4px 0!important;border-radius:8px!important;color:var(--aw-muted);font-size:13px;font-weight:500;text-decoration:none;}
body[data-gallery-surface="admin"] .nav-item svg {width:19px;height:19px;stroke-width:1.6;flex:none;}
body[data-gallery-surface="admin"] .nav-item:hover {background:var(--aw-canvas);color:var(--aw-ink);}
body[data-gallery-surface="admin"] .nav-item.active {background:#eef0f3!important;color:var(--aw-ink)!important;font-weight:600;}
body[data-gallery-surface="admin"] .sidebar-footer {padding:22px 24px;border-top:1px solid var(--aw-border);font-size:11px;color:var(--aw-muted);}
body[data-gallery-surface="admin"] #storage-status {margin-top:5px;font-variant-numeric:tabular-nums;}
body[data-gallery-surface="admin"] #storage-used {color:var(--aw-ink);font-weight:600;}
body[data-gallery-surface="admin"] .storage-bar {height:4px;margin:12px 0 17px;background:#eceff1;border-radius:3px;}
body[data-gallery-surface="admin"] .storage-bar-fill {background:var(--aw-accent)!important;border-radius:3px;}
body[data-gallery-surface="admin"] #logout-btn {min-height:36px;margin:0;padding:0;color:var(--aw-muted);font-size:11px;}
body[data-gallery-surface="admin"] #logout-btn:hover {color:var(--aw-ink);text-decoration:underline;text-underline-offset:4px;}
body[data-gallery-surface="admin"] .topbar {min-height:130px;padding:31px 40px 24px!important;gap:20px;background:var(--aw-canvas)!important;border-bottom:0!important;box-shadow:none;}
body[data-gallery-surface="admin"] .topbar h1 {margin:0;font:600 28px/1.25 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-.035em;color:var(--aw-ink);}
body[data-gallery-surface="admin"] .workspace-description {margin:7px 0 0;color:var(--aw-muted);font-size:12px;line-height:1.6;}
body[data-gallery-surface="admin"] .topbar-actions {gap:9px;flex-shrink:0;}
body[data-gallery-surface="admin"] .topbar-actions button {padding:11px 17px;}
body[data-gallery-surface="admin"] .content {padding:0 40px 48px!important;}

/* Search and filters sit above photographic collection cards. */
body[data-gallery-surface="admin"] .filters {display:grid!important;grid-template-columns:minmax(200px,1fr) 224px 176px;gap:12px!important;padding:0!important;margin:0 0 25px!important;border:0!important;align-items:stretch;}
body[data-gallery-surface="admin"] .filters .search-field {width:100%;max-width:none;min-width:0;height:44px;min-height:44px;padding:0 14px;border:1px solid var(--aw-border)!important;border-radius:8px!important;background:white!important;box-shadow:none;}
body[data-gallery-surface="admin"] .search-field:focus-within {border-color:var(--aw-accent)!important;}
body[data-gallery-surface="admin"] .search-field svg {color:var(--aw-muted);width:17px;height:17px;}
body[data-gallery-surface="admin"] .filters .search-box {border:0!important;background:transparent!important;font-size:12px;line-height:1.4;box-shadow:none;}
body[data-gallery-surface="admin"] .filters .filter-select {appearance:none;-webkit-appearance:none;box-sizing:border-box;width:100%;max-width:none;min-width:0;height:44px;min-height:44px;padding:0 38px 0 14px;border:1px solid var(--aw-border)!important;border-radius:8px!important;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2369727d' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") right 13px center/16px 16px no-repeat!important;font-size:12px;line-height:1.4;color:var(--aw-ink);cursor:pointer;}
body[data-gallery-surface="admin"] .filters .filter-select:hover {border-color:#bdc5cc!important;}
body[data-gallery-surface="admin"] .collections-grid {grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:24px!important;align-items:start;}
body[data-gallery-surface="admin"] .collection-card {position:relative;border:1px solid var(--aw-border)!important;border-radius:12px!important;background:var(--aw-surface)!important;overflow:visible!important;}
body[data-gallery-surface="admin"] .collection-card:hover {border-color:#c7ced4!important;transform:none!important;}
body[data-gallery-surface="admin"] .collection-open {display:block;min-width:0;color:inherit;text-decoration:none;border-radius:12px;}
body[data-gallery-surface="admin"] .collection-thumb {height:auto!important;aspect-ratio:1.43;border-radius:11px 11px 0 0!important;background:#e9ecef;}
body[data-gallery-surface="admin"] .collection-thumb img {width:100%;height:100%;object-fit:cover;}
body[data-gallery-surface="admin"] .collection-info {padding:16px 17px 18px!important;}
body[data-gallery-surface="admin"] .collection-info h3 {font-size:14px!important;font-weight:600!important;line-height:1.5!important;letter-spacing:-.02em;margin:0 0 4px!important;}
body[data-gallery-surface="admin"] .collection-info p {font-size:11px!important;line-height:1.6;color:var(--aw-muted)!important;}
body[data-gallery-surface="admin"] .collection-state {display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:14px;}
body[data-gallery-surface="admin"] .collection-status {display:inline-flex;align-items:center;gap:5px;font-size:10px;font-weight:500;color:var(--aw-muted);}
body[data-gallery-surface="admin"] .collection-status::before {content:"";width:5px;height:5px;border-radius:50%;background:currentColor;}
body[data-gallery-surface="admin"] .collection-status.published {color:var(--aw-accent);}
body[data-gallery-surface="admin"] .collection-group {font-size:10px;color:var(--aw-muted);}
body[data-gallery-surface="admin"] .collection-badge {top:12px!important;left:12px!important;max-width:calc(100% - 70px);padding:5px 9px!important;background:#fffffff2!important;border:0!important;border-radius:5px!important;color:var(--aw-ink)!important;font-size:10px!important;}
body[data-gallery-surface="admin"] .collection-card-actions {top:8px!important;right:8px!important;}
body[data-gallery-surface="admin"] .card-menu-toggle {width:44px!important;height:44px!important;min-width:44px;min-height:44px;padding:0!important;border:0!important;border-radius:6px!important;background:transparent!important;color:white!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
body[data-gallery-surface="admin"] .card-menu-toggle svg {width:20px;height:20px;stroke:#0008;stroke-width:.7;paint-order:stroke fill;filter:drop-shadow(0 1px 2px #0009);}
body[data-gallery-surface="admin"] .card-menu-toggle:focus-visible {outline:2px solid white!important;outline-offset:-4px;box-shadow:inset 0 0 0 3px var(--aw-ink)!important;}
body[data-gallery-surface="admin"] .card-menu {top:43px!important;width:186px!important;border:0!important;border-radius:10px!important;box-shadow:0 10px 32px #20252b24!important;}
body[data-gallery-surface="admin"] .card-menu .card-action {border-radius:6px!important;font-size:12px!important;}
@media(hover:hover) and (pointer:fine) {
  body[data-gallery-surface="admin"] .collection-card-actions {opacity:0!important;pointer-events:none;transition:opacity .15s ease;}
  body[data-gallery-surface="admin"] .collection-card:is(:hover,:focus-within,.menu-open) .collection-card-actions {opacity:1!important;pointer-events:auto;}
}
body[data-gallery-surface="admin"] .collections-pagination {margin-top:28px;color:var(--aw-muted);font-size:12px;}
body[data-gallery-surface="admin"] .empty-state {grid-column:1/-1;padding:80px 24px!important;border:1px dashed #cfd5dc;border-radius:12px;background:#fff;text-align:center;color:var(--aw-muted);}
body[data-gallery-surface="admin"] .empty-state h3 {font:600 18px/1.4 Inter,sans-serif;color:var(--aw-ink);margin-bottom:8px;}

/* Preferences, sharing and focused forms use the same control vocabulary. */
body[data-gallery-surface="admin"] .settings-wrap {max-width:820px;}
body[data-gallery-surface="admin"] .settings-card {padding:30px;border:1px solid var(--aw-border);border-radius:12px;background:white;box-shadow:none;}
body[data-gallery-surface="admin"] .settings-card h3 {font-size:18px;font-weight:600;letter-spacing:-.025em;margin-bottom:8px;}
body[data-gallery-surface="admin"] .settings-card p {font-size:12px;line-height:1.8;color:var(--aw-muted);max-width:65ch;}
body[data-gallery-surface="admin"] .settings-row {padding:20px 0;margin:20px 0;border-top:1px solid var(--aw-border);border-bottom:1px solid var(--aw-border);border-radius:0;background:transparent;}
body[data-gallery-surface="admin"] .settings-status {font-size:10px;border-radius:5px;padding:5px 9px;}
body:is([data-gallery-surface="admin"],[data-gallery-surface="editor"]) :is(.modal,.mdl,.site-dialog) {border-radius:14px!important;box-shadow:0 24px 70px #20252b2e;}
body:is([data-gallery-surface="admin"],[data-gallery-surface="editor"]) :is(.modal h3,.mdl h3,.site-dialog h3) {font-family:inherit;font-weight:600;letter-spacing:-.025em;}
body:is([data-gallery-surface="admin"],[data-gallery-surface="editor"]) :is(.modal input,.modal select,.modal textarea,.mdl input,.mdl select,.mdl textarea,.form-group input) {min-height:44px;border-color:var(--aw-border);border-radius:8px;background:white;font-size:13px;}
body[data-gallery-surface="admin"] .login-wrap {background:var(--aw-canvas);}
body[data-gallery-surface="admin"] .login-box {width:min(420px,calc(100% - 32px));padding:40px;border:1px solid var(--aw-border);border-radius:16px;box-shadow:none;}
body[data-gallery-surface="admin"] .login-logo h1 {font:600 25px/1.3 Inter,sans-serif;letter-spacing:-.035em;}
body[data-gallery-surface="admin"] .login-logo p {color:var(--aw-muted);font-size:12px;}
body[data-gallery-surface="admin"] .form-group label {font-size:12px;font-weight:500;color:var(--aw-ink);}
body[data-gallery-surface="admin"] .google-login-note {color:var(--aw-muted);}

/* Collection chrome follows the workspace; the full-photo grid is preserved. */
body[data-gallery-surface="editor"] .hdr {min-height:76px;padding:16px 28px!important;gap:14px;background:white;border-bottom:1px solid var(--aw-border)!important;}
body[data-gallery-surface="editor"] .hdr h1 {font-size:16px;font-weight:600;letter-spacing:-.02em;}
body[data-gallery-surface="editor"] .hdr .badge {border-radius:5px;font-size:10px;padding:4px 8px;}
body[data-gallery-surface="editor"] .lay {background:var(--aw-canvas);}
body[data-gallery-surface="editor"] .side {background:white;border-right:1px solid var(--aw-border)!important;}
body[data-gallery-surface="editor"] .cv {border-radius:10px!important;}
body[data-gallery-surface="editor"] .side .btn {border-radius:7px!important;font-size:12px;}
body[data-gallery-surface="editor"] .sct {color:var(--aw-muted);font-size:11px;font-weight:550;}
body[data-gallery-surface="editor"] .sr {border-radius:7px!important;font-size:12px;}
body[data-gallery-surface="editor"] .sr.active {background:var(--aw-tint)!important;color:var(--aw-accent);}
body[data-gallery-surface="editor"] .mn {background:var(--aw-canvas);}
body[data-gallery-surface="editor"] .mh h2 {font-size:24px;font-weight:600;letter-spacing:-.03em;}
body[data-gallery-surface="editor"] .bulkbar {border-radius:8px;background:white;border-color:var(--aw-border);}

@media(min-width:1700px) {body[data-gallery-surface="admin"] .collections-grid {grid-template-columns:repeat(4,minmax(0,1fr))!important;}}
@media(min-width:901px) and (max-width:1200px) {
  body[data-gallery-surface="admin"] .collections-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  body[data-gallery-surface="admin"] :is(.topbar,.content) {padding-left:28px!important;padding-right:28px!important;}
  body[data-gallery-surface="admin"] .filters {grid-template-columns:repeat(2,minmax(0,1fr));}
  body[data-gallery-surface="admin"] .filters .search-field {grid-column:1/-1;}
}
@media(max-width:900px) {
  body[data-gallery-surface="admin"] .sidebar {position:relative!important;width:100%!important;border-right:0!important;border-bottom:1px solid var(--aw-border)!important;}
  body[data-gallery-surface="admin"] .sidebar-logo {height:auto!important;min-height:72px;display:flex!important;padding:18px 20px!important;gap:9px;}
  body[data-gallery-surface="admin"] .sidebar-logo-mark {width:32px;height:32px;border-radius:8px!important;}
  body[data-gallery-surface="admin"] .sidebar-logo-text strong {font-size:17px!important;}
  body[data-gallery-surface="admin"] .sidebar-logo-text small {display:none;}
  body[data-gallery-surface="admin"] .sidebar-nav {display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important;padding:0 12px 10px!important;overflow:visible;}
  body[data-gallery-surface="admin"] .nav-item {display:flex!important;flex-direction:column;justify-content:center;gap:5px;min-width:0;min-height:57px;padding:8px 2px!important;margin:0!important;border:0!important;font-size:10px;line-height:1.4;text-align:center;}
  body[data-gallery-surface="admin"] .nav-item svg {display:block!important;width:18px;height:18px;}
  body[data-gallery-surface="admin"] .sidebar-footer {display:block!important;position:absolute;right:20px;top:19px;padding:0;border:0;}
  body[data-gallery-surface="admin"] .sidebar-footer>div {display:none;}
  body[data-gallery-surface="admin"] #logout-btn {min-height:36px;font-size:10px;}
  body[data-gallery-surface="admin"] .main {margin-left:0!important;}
  body[data-gallery-surface="admin"] .topbar {position:relative!important;top:auto!important;min-height:112px!important;align-items:center;flex-wrap:nowrap;padding:24px 20px 22px!important;gap:14px;}
  body[data-gallery-surface="admin"] .topbar h1 {font-size:24px;}
  body[data-gallery-surface="admin"] .workspace-description {font-size:11px;max-width:40ch;line-height:1.6;}
  body[data-gallery-surface="admin"] .topbar-actions {gap:6px!important;}
  body[data-gallery-surface="admin"] .topbar-actions button {min-height:42px;padding:10px 13px;font-size:11px;}
  body[data-gallery-surface="admin"] .topbar-actions #view-presets {display:none;}
  body[data-gallery-surface="admin"] .topbar-actions #new-collection {width:42px!important;height:42px!important;min-width:42px;flex-basis:42px;border-radius:9px!important;font-size:0;padding:0;}
  body[data-gallery-surface="admin"] .content {padding:0 20px 36px!important;}
  body[data-gallery-surface="admin"] .filters {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));position:static!important;visibility:visible!important;transform:none!important;gap:8px!important;margin-bottom:20px!important;background:transparent!important;border-radius:0!important;box-shadow:none!important;}
  body[data-gallery-surface="admin"] .filters .search-field {grid-column:1/-1;max-width:none;min-width:0;}
  body[data-gallery-surface="admin"] .filters .search-box {font-size:16px;}
  body[data-gallery-surface="admin"] .filters .filter-select {font-size:11px;}
  body[data-gallery-surface="admin"] .collections-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important;}
  body[data-gallery-surface="admin"] .collection-thumb {aspect-ratio:1.15!important;}
  body[data-gallery-surface="admin"] .collection-info {padding:11px 12px 13px!important;}
  body[data-gallery-surface="admin"] .collection-info h3 {font-size:12px!important;}
  body[data-gallery-surface="admin"] .collection-info p {font-size:10px!important;}
  body[data-gallery-surface="admin"] .collection-state {margin-top:9px;gap:5px;}
  body[data-gallery-surface="admin"] .collection-badge {left:8px!important;top:8px!important;font-size:9px!important;max-width:calc(100% - 54px);padding:4px 6px!important;}
  body[data-gallery-surface="admin"] .collection-card-actions {top:4px!important;right:4px!important;}
  body[data-gallery-surface="admin"] .card-menu-toggle {width:44px!important;height:44px!important;background:transparent!important;color:white!important;}
  body[data-gallery-surface="admin"] .card-menu-toggle svg {filter:drop-shadow(0 1px 2px #0008);}
  body[data-gallery-surface="admin"] .settings-card {padding:22px;}
  body[data-gallery-surface="admin"] .login-box {padding:30px;}
  body[data-gallery-surface="editor"] .hdr {padding:12px 16px!important;}
  body[data-gallery-surface="editor"] .mh h2 {font-size:22px!important;}
}
@media(max-width:420px) {
  body[data-gallery-surface="admin"] .content {padding-left:16px!important;padding-right:16px!important;}
  body[data-gallery-surface="admin"] .collections-grid {grid-template-columns:minmax(0,1fr)!important;gap:18px!important;}
  body[data-gallery-surface="admin"] .collection-thumb {aspect-ratio:1.6!important;}
  body[data-gallery-surface="admin"] .collection-info {padding:14px 16px!important;}
  body[data-gallery-surface="admin"] .collection-info h3 {font-size:14px!important;}
  body[data-gallery-surface="admin"] .collection-info p {font-size:11px!important;}
}
@media(prefers-reduced-motion:reduce) {
  body:is([data-gallery-surface="admin"],[data-gallery-surface="editor"]) * {transition:none!important;animation:none!important;}
}
@media(forced-colors:active) {
  body[data-gallery-surface="admin"] .filters .filter-select {appearance:auto;-webkit-appearance:auto;background-image:none!important;}
}
