:root {
  --navy: #0d2a61;
  --blue: #133c8b;
  --blue-2: #2468d8;
  --blue-soft: #eaf1ff;
  --green: #72bf44;
  --ink: #172033;
  --muted: #6d778d;
  --line: #e4e9f2;
  --surface: #ffffff;
  --page: #f5f7fb;
  --danger: #c73b4b;
  --warning: #d88918;
  --shadow: 0 12px 35px rgba(25, 46, 89, .10);
  --shadow-sm: 0 5px 16px rgba(25, 46, 89, .08);
  --radius: 18px;
  --radius-sm: 11px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--page); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 7px; text-transform: uppercase; letter-spacing: .13em; font-size: 11px; font-weight: 800; color: var(--blue-2); }

.center-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; color: var(--muted); }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(145deg, #2f7df0, #133c8b); display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; padding: 8px; gap: 3px; box-shadow: 0 7px 18px rgba(18, 64, 145, .3); }
.brand-mark span { display: block; background: white; border-radius: 3px; }
.brand-mark span:nth-child(1) { height: 48%; }.brand-mark span:nth-child(2) { height: 78%; }.brand-mark span:nth-child(3) { height: 100%; }
.brand-mark.large { width: 54px; height: 54px; border-radius: 16px; padding: 11px; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.06); box-shadow: 0 13px 25px rgba(18, 64, 145, .28); } }
.brand-lockup { display: flex; align-items: center; gap: 11px; color: var(--navy); }
.brand-lockup strong { font-size: 18px; letter-spacing: -.02em; }
.brand-lockup small { display: block; opacity: .7; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; margin-top: 1px; }
.brand-lockup.light { color: white; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(460px, 1.2fr) minmax(390px, .8fr); background: white; }
.auth-visual { position: relative; overflow: hidden; padding: 56px; color: white; background:
  radial-gradient(circle at 15% 15%, rgba(105, 173, 255, .32), transparent 32%),
  radial-gradient(circle at 85% 85%, rgba(114, 191, 68, .18), transparent 30%),
  linear-gradient(140deg, #091c42 0%, #123e89 58%, #1f65bf 100%); }
.auth-copy { position: relative; z-index: 2; max-width: 630px; }
.auth-copy h1 { margin: 90px 0 22px; font-size: clamp(38px, 5vw, 68px); line-height: 1.04; letter-spacing: -.045em; }
.auth-copy > p { max-width: 570px; font-size: 18px; line-height: 1.7; color: rgba(255,255,255,.78); }
.feature-pills { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 31px; }
.feature-pills span { padding: 9px 13px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); backdrop-filter: blur(8px); border-radius: 999px; font-size: 12px; font-weight: 650; }
.auth-mosaic { position: absolute; inset: auto -60px -100px auto; width: 650px; height: 460px; transform: rotate(-8deg); opacity: .9; }
.mosaic-card { position: absolute; border-radius: 22px; border: 1px solid rgba(255,255,255,.24); box-shadow: 0 22px 50px rgba(0,0,0,.22); background-size: cover; }
.mosaic-card.one { width: 220px; height: 290px; left: 0; top: 90px; background: linear-gradient(145deg, #d9b78a, #615b50); }
.mosaic-card.two { width: 210px; height: 165px; left: 238px; top: 20px; background: radial-gradient(circle at 35% 40%, #80c752 0 10%, transparent 11%), radial-gradient(circle at 60% 45%, #f8b542 0 9%, transparent 10%), linear-gradient(145deg, #153f48, #091e35); }
.mosaic-card.three { width: 210px; height: 225px; left: 240px; top: 205px; background: radial-gradient(circle at 50% 55%, #d75c82 0 15%, transparent 16%), radial-gradient(circle at 30% 30%, #6ec7db 0 9%, transparent 10%), linear-gradient(160deg, #f2d8c8, #8c5b82); }
.mosaic-card.four { width: 175px; height: 240px; left: 468px; top: 75px; background: linear-gradient(160deg, #81c4e9, #2a547f 45%, #101b34); }
.mosaic-card.five { width: 180px; height: 115px; left: 468px; top: 330px; background: linear-gradient(135deg, #79bf43 0 35%, #f4c44b 35% 68%, #e56d53 68%); }
.auth-panel { display: grid; place-items: center; padding: 42px; }
.auth-form-wrap { width: min(420px, 100%); }
.auth-form { display: grid; gap: 21px; }
.auth-form h2 { margin: 0; font-size: 34px; letter-spacing: -.035em; }
.auth-form p { margin: 7px 0 0; }
.mobile-brand { display: none; margin-bottom: 45px; }

label { display: grid; gap: 7px; color: #39445b; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 44px; border: 1px solid #dce2ec; border-radius: 10px; background: white; padding: 10px 12px; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: #6b9fe9; box-shadow: 0 0 0 4px rgba(45,127,249,.11); }
input::placeholder, textarea::placeholder { color: #a3adbc; }
.form-error { color: var(--danger); min-height: 18px; font-size: 13px; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 10px; padding: 9px 15px; font-weight: 750; font-size: 13px; transition: transform .12s, box-shadow .12s, background .12s; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.primary { color: white; background: linear-gradient(135deg, #2168cf, #133c8b); box-shadow: 0 7px 17px rgba(19,60,139,.22); }
.button.primary:hover { box-shadow: 0 10px 21px rgba(19,60,139,.28); }
.button.subtle { color: var(--blue); background: #eef3fb; border: 1px solid #dbe5f4; box-shadow: none; }
.button.danger { color: white; background: var(--danger); }
.button.wide { width: 100%; }
.button.compact { min-height: 36px; padding: 7px 12px; }
.button[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.text-button { color: var(--blue-2); background: transparent; border: 0; font-weight: 750; font-size: 13px; padding: 4px; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 9px; color: inherit; font-size: 19px; }
.icon-button:hover { background: rgba(118,139,177,.12); }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: 250px; display: flex; flex-direction: column; padding: 23px 16px 16px; color: #dbe7fb; background: linear-gradient(180deg, #0a214d 0%, #0e2d65 58%, #0a224e 100%); box-shadow: 6px 0 24px rgba(18,38,76,.10); }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 7px 23px; }
.sidebar-close { display: none; }
.main-nav { display: grid; gap: 5px; }
.nav-item { width: 100%; min-height: 43px; display: flex; align-items: center; gap: 12px; padding: 9px 12px; color: #cbd9ef; background: transparent; border: 0; border-radius: 10px; font-weight: 650; text-align: left; }
.nav-item:hover { color: white; background: rgba(255,255,255,.07); }
.nav-item.active { color: white; background: linear-gradient(90deg, rgba(75,139,236,.28), rgba(93,144,222,.12)); box-shadow: inset 3px 0 #70a7ff; }
.nav-icon { width: 20px; text-align: center; font-size: 18px; opacity: .95; }
.sidebar-section { margin-top: 26px; padding: 0 10px; min-height: 0; overflow: auto; }
.sidebar-section > p { margin: 0 0 9px; color: #8199bf; font-size: 10px; text-transform: uppercase; letter-spacing: .13em; font-weight: 800; }
.sidebar-links { display: grid; gap: 1px; }
.sidebar-link { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 8px 2px; border: 0; color: #b9c9df; background: transparent; font-size: 12px; text-align: left; }
.sidebar-link:hover { color: white; }
.sidebar-link span:last-child { min-width: 27px; text-align: center; padding: 2px 5px; border-radius: 99px; background: rgba(255,255,255,.08); font-size: 10px; }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); padding-top: 10px; }
.user-chip { display: grid; grid-template-columns: 34px minmax(0, 1fr) 32px; align-items: center; gap: 9px; margin-top: 8px; padding: 10px 8px 0; }
.user-chip strong, .user-chip small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.user-chip strong { color: white; font-size: 12px; }.user-chip small { color: #89a3c9; font-size: 10px; margin-top: 2px; text-transform: capitalize; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: white; font-size: 11px; font-weight: 800; background: linear-gradient(145deg, #6c9eea, #365c9a); }

.app-main { min-height: 100vh; padding-left: 250px; }
.topbar { position: sticky; top: 0; z-index: 35; height: 68px; display: flex; align-items: center; gap: 18px; padding: 0 28px; background: rgba(255,255,255,.92); backdrop-filter: blur(15px); border-bottom: 1px solid rgba(222,228,239,.9); }
.global-search { flex: 1; max-width: 760px; display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border: 1px solid #dfe5ef; border-radius: 11px; background: #f8faff; }
.global-search input { min-height: 38px; border: 0; padding: 0; background: transparent; box-shadow: none; }
.global-search kbd { padding: 3px 6px; border: 1px solid #d8deea; border-bottom-width: 2px; border-radius: 5px; color: #818ca0; background: white; font-size: 10px; }
.menu-button { display: none; }
.content-wrap { width: min(1600px, 100%); margin: 0 auto; padding: 32px 32px 70px; }
.view { display: none; }.view.active { display: block; animation: viewIn .22s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } }
.page-heading { margin-bottom: 25px; }
.page-heading.split { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.page-heading h1 { margin: 0; color: #162038; font-size: clamp(27px, 3vw, 39px); letter-spacing: -.04em; }
.page-heading > p:last-child, .page-heading > div > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.section-heading, .panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.section-heading { margin: 34px 0 15px; }
.section-heading h2, .panel-head h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.section-heading p, .panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.stat-card { position: relative; overflow: hidden; min-height: 132px; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); }
.stat-card::after { content: ""; position: absolute; width: 90px; height: 90px; right: -30px; bottom: -35px; border-radius: 50%; background: var(--stat-soft, #eaf1ff); }
.stat-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--stat, var(--blue)); background: var(--stat-soft, #eaf1ff); font-weight: 900; font-size: 17px; }
.stat-card strong { display: block; margin-top: 13px; font-size: 25px; letter-spacing: -.03em; }.stat-card span { color: var(--muted); font-size: 12px; }

.category-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; }
.category-card { position: relative; overflow: hidden; min-height: 135px; display: flex; flex-direction: column; justify-content: end; padding: 16px; border: 0; border-radius: 15px; color: white; text-align: left; box-shadow: var(--shadow-sm); isolation: isolate; }
.category-card::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--cat-gradient); }
.category-card::after { content: ""; position: absolute; width: 130px; height: 130px; top: -55px; right: -50px; z-index: -1; border-radius: 35px; transform: rotate(25deg); background: rgba(255,255,255,.15); }
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.category-card strong { font-size: 14px; }.category-card span { margin-top: 4px; color: rgba(255,255,255,.78); font-size: 11px; }
.category-symbol { position: absolute; top: 17px; left: 17px; width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; background: rgba(255,255,255,.16); font-size: 20px; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(290px, .7fr); gap: 16px; margin-top: 31px; }
.dashboard-columns > .panel { padding: 20px; }
.mini-asset-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 17px; }
.mini-asset { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #f3f5f9; cursor: pointer; }
.mini-asset img { width: 100%; aspect-ratio: 1.2; object-fit: cover; }.mini-asset span { display: block; overflow: hidden; padding: 8px; white-space: nowrap; text-overflow: ellipsis; background: white; font-size: 10px; font-weight: 700; }
.tag-cloud { display: flex; flex-wrap: wrap; align-content: start; gap: 8px; margin-top: 17px; }
.tag-chip { border: 1px solid #dce5f3; border-radius: 999px; padding: 7px 10px; color: #46618d; background: #f5f8fd; font-size: 11px; }
.tag-chip:hover { color: white; border-color: var(--blue-2); background: var(--blue-2); }

.library-toolbar { padding: 13px; margin-bottom: 17px; }
.filter-row { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)) minmax(130px, .8fr) auto; gap: 9px; }
.filter-row select { min-height: 39px; padding-top: 7px; padding-bottom: 7px; font-size: 12px; }
.active-search { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: #49617f; font-size: 12px; }
.active-search strong { color: var(--ink); }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 15px; }
.asset-card { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 3px 10px rgba(24,47,88,.055); transition: transform .14s, box-shadow .14s; }
.asset-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.asset-preview { position: relative; overflow: hidden; aspect-ratio: 1.25; background: linear-gradient(135deg, #e8edf5, #f6f8fb); cursor: zoom-in; }
.asset-preview::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(45deg, #e4e7ed 25%, transparent 25%), linear-gradient(-45deg, #e4e7ed 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e4e7ed 75%), linear-gradient(-45deg, transparent 75%, #e4e7ed 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; opacity: .45; }
.asset-preview img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.asset-preview img.contain { object-fit: contain; padding: 12px; }
.asset-fallback { position: relative; z-index: 1; width: 100%; height: 100%; display: grid; place-items: center; color: #74829a; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.asset-badges { position: absolute; z-index: 3; top: 9px; left: 9px; display: flex; gap: 5px; }
.asset-badge { padding: 5px 7px; border-radius: 7px; color: white; background: rgba(13,27,54,.72); backdrop-filter: blur(5px); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.favorite-button { position: absolute; z-index: 4; top: 8px; right: 8px; width: 30px; height: 30px; border: 0; border-radius: 9px; color: white; background: rgba(13,27,54,.58); backdrop-filter: blur(5px); font-size: 16px; }
.favorite-button.active { color: #ffd15c; }
.asset-card-body { padding: 12px; }
.asset-title { overflow: hidden; margin: 0; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; letter-spacing: -.01em; }
.asset-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; color: var(--muted); font-size: 10px; }
.asset-tags { display: flex; overflow: hidden; gap: 5px; margin-top: 9px; height: 23px; }
.asset-tags span { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; color: #57709a; background: #f0f4fa; font-size: 9px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 28px; }
.page-button { min-width: 36px; height: 36px; border: 1px solid #dbe2ed; border-radius: 9px; color: #5a6780; background: white; }
.page-button.active { color: white; border-color: var(--blue); background: var(--blue); }
.page-button:disabled { opacity: .45; cursor: not-allowed; }
.empty-state { display: grid; place-items: center; padding: 80px 20px; text-align: center; color: var(--muted); }
.empty-state h2 { margin: 15px 0 3px; color: var(--ink); }.empty-state p { margin: 0 0 17px; }
.empty-icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; color: var(--blue); background: var(--blue-soft); font-size: 27px; }

.upload-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.upload-main, .batch-panel { padding: 19px; }
.drop-zone { display: grid; place-items: center; min-height: 350px; padding: 35px; border: 2px dashed #b9c9e0; border-radius: 15px; text-align: center; background: linear-gradient(145deg, #f8fbff, #f1f5fb); transition: border-color .15s, background .15s, transform .15s; }
.drop-zone.dragover { border-color: var(--blue-2); background: #eaf2ff; transform: scale(1.005); }
.upload-symbol { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 13px; border-radius: 17px; color: white; background: linear-gradient(145deg, #3983ed, #133c8b); box-shadow: 0 12px 24px rgba(34,96,190,.24); font-size: 27px; }
.drop-zone h2 { margin: 0; font-size: 21px; }.drop-zone p { max-width: 570px; margin: 9px 0 20px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.drop-actions { display: flex; gap: 9px; }
.batch-panel { display: grid; gap: 14px; }
.check-row { display: grid; grid-template-columns: 17px 1fr; align-items: start; gap: 8px; font-weight: 600; line-height: 1.4; }
.check-row input { width: 16px; min-height: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--blue); }
.tip-box { display: grid; gap: 5px; padding: 12px; border-radius: 11px; color: #385272; background: #eef5ff; font-size: 11px; line-height: 1.5; }
.upload-queue-wrap { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.upload-queue { max-height: 460px; overflow: auto; display: grid; gap: 8px; margin-top: 14px; padding-right: 4px; }
.queue-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px; border: 1px solid var(--line); border-radius: 11px; background: #fafbfe; }
.queue-thumb { width: 48px; height: 42px; overflow: hidden; display: grid; place-items: center; border-radius: 8px; color: #70819a; background: #edf1f7; font-size: 9px; text-transform: uppercase; }
.queue-thumb img { width: 100%; height: 100%; object-fit: cover; }
.queue-info { min-width: 0; }.queue-info strong, .queue-info span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.queue-info strong { font-size: 11px; }.queue-info span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.queue-status { min-width: 75px; text-align: right; color: #687792; font-size: 10px; font-weight: 750; }
.queue-status.success { color: #2c8c50; }.queue-status.error { color: var(--danger); }.queue-status.uploading { color: var(--blue-2); }
.queue-footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 15px; color: var(--muted); font-size: 11px; }

.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 15px; }
.collection-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow-sm); cursor: pointer; }
.collection-cover { height: 118px; display: grid; place-items: center; color: white; background: var(--cover); font-size: 30px; }
.collection-body { padding: 15px; }.collection-body h3 { margin: 0; font-size: 14px; }.collection-body p { min-height: 32px; margin: 6px 0 12px; color: var(--muted); font-size: 11px; line-height: 1.45; }.collection-body span { color: var(--blue-2); font-size: 10px; font-weight: 800; }
.table-panel { overflow: hidden; }.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; }
th { color: #68768d; background: #fafbfe; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
tbody tr:last-child td { border-bottom: 0; }
.user-cell { display: flex; align-items: center; gap: 9px; }.user-cell .avatar { color: var(--blue); background: var(--blue-soft); box-shadow: none; }
.role-badge, .status-badge { display: inline-block; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; text-transform: capitalize; }
.role-badge { color: #365f9e; background: #edf3fc; }.status-badge.active { color: #287a48; background: #eaf8ef; }.status-badge.inactive { color: #8c5960; background: #faecee; }
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.settings-card { padding: 20px; display: grid; gap: 14px; }.settings-card h2 { margin: 0; font-size: 17px; }.settings-card > p { margin: -6px 0 3px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.status-line { display: flex; align-items: center; gap: 8px; color: #46617e; font-size: 11px; }.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #42af6f; box-shadow: 0 0 0 4px #e6f7ed; }

 dialog { padding: 0; border: 0; color: var(--ink); background: white; box-shadow: 0 30px 80px rgba(13,30,65,.28); }
dialog::backdrop { background: rgba(7,18,40,.62); backdrop-filter: blur(4px); }
.asset-dialog { width: min(1160px, calc(100vw - 36px)); max-height: calc(100vh - 36px); border-radius: 20px; overflow: auto; }
.small-dialog { width: min(500px, calc(100vw - 30px)); border-radius: 18px; }
.dialog-close { position: absolute; z-index: 20; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 11px; color: #506079; background: rgba(255,255,255,.9); box-shadow: 0 3px 12px rgba(20,39,72,.12); font-size: 21px; }
.dialog-form { display: grid; gap: 15px; padding: 28px; }.dialog-form h2 { margin: -3px 0 4px; font-size: 25px; }
.asset-detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(350px, .9fr); min-height: 620px; }
.asset-detail-preview { min-height: 620px; display: grid; place-items: center; padding: 30px; background: #eef1f6; }
.asset-detail-preview img { max-width: 100%; max-height: 76vh; object-fit: contain; border-radius: 7px; box-shadow: 0 15px 38px rgba(22,39,68,.14); }
.asset-detail-fallback { display: grid; place-items: center; width: 210px; height: 210px; border-radius: 25px; color: #64738c; background: white; font-size: 22px; font-weight: 850; text-transform: uppercase; }
.asset-detail-panel { padding: 30px; overflow: auto; }
.asset-detail-panel h2 { margin: 4px 40px 5px 0; font-size: 25px; letter-spacing: -.035em; }
.detail-subline { color: var(--muted); font-size: 11px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.asset-edit-form { display: grid; gap: 13px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.detail-readonly { display: grid; gap: 12px; margin-top: 18px; }
.detail-row { display: grid; grid-template-columns: 105px 1fr; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 11px; }.detail-row span:first-child { color: var(--muted); }.detail-row span:last-child { overflow-wrap: anywhere; font-weight: 650; }
.danger-zone { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }

.toast-region { position: fixed; z-index: 1000; right: 20px; bottom: 20px; display: grid; gap: 8px; width: min(360px, calc(100vw - 40px)); }
.toast { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 12px; color: white; background: #16294d; box-shadow: var(--shadow); font-size: 12px; animation: toastIn .2s ease; }.toast.error { background: #8e2736; }.toast.success { background: #216941; }
.toast button { color: white; border: 0; background: transparent; font-size: 17px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
.sidebar-backdrop { display: none; }

.skeleton { position: relative; overflow: hidden; background: #e9edf4; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

@media (max-width: 1180px) {
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-row { grid-template-columns: repeat(3, 1fr); }
  .settings-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }.auth-visual { display: none; }.auth-panel { min-height: 100vh; }.mobile-brand { display: flex; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }.sidebar.open { transform: translateX(0); }.sidebar-close { display: grid; }
  .app-main { padding-left: 0; }.menu-button { display: grid; }.sidebar-backdrop { position: fixed; inset: 0; z-index: 45; background: rgba(6,15,34,.45); }.sidebar-backdrop.open { display: block; }
  .upload-layout { grid-template-columns: 1fr; }.batch-panel { order: -1; }
  .dashboard-columns { grid-template-columns: 1fr; }.settings-grid { grid-template-columns: 1fr; }
  .asset-detail { grid-template-columns: 1fr; }.asset-detail-preview { min-height: 330px; }.asset-detail-panel { padding: 22px; }
}
@media (max-width: 680px) {
  .topbar { padding: 0 13px; gap: 8px; }.topbar > .button { display: none !important; }.global-search kbd { display: none; }
  .content-wrap { padding: 24px 14px 55px; }.page-heading.split { align-items: start; }.page-heading.split > .button { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }.stat-card { min-height: 118px; padding: 15px; }
  .category-grid { grid-template-columns: 1fr 1fr; gap: 10px; }.category-card { min-height: 125px; }
  .mini-asset-grid { grid-template-columns: 1fr 1fr; }
  .filter-row { grid-template-columns: 1fr 1fr; }.filter-row .button { grid-column: span 2; }
  .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }.asset-card-body { padding: 9px; }
  .drop-zone { min-height: 290px; padding: 25px 12px; }.drop-actions { flex-direction: column; width: 100%; max-width: 240px; }
  .queue-item { grid-template-columns: 42px minmax(0, 1fr); }.queue-status { grid-column: 2; text-align: left; }
  .form-grid-2 { grid-template-columns: 1fr; }.dialog-form { padding: 23px; }
}
@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr; }.category-grid { grid-template-columns: 1fr; }
  .asset-grid { grid-template-columns: 1fr 1fr; }.asset-meta span:last-child { display: none; }
}
