:root {
  --navy: #0f172a;
  --navy-2: #111f3d;
  --cobalt: #1e3a8a;
  --blue: #2563eb;
  --blue-light: #dbeafe;
  --slate: #64748b;
  --slate-light: #94a3b8;
  --line: #e2e8f0;
  --surface: #ffffff;
  --canvas: #f3f4f6;
  --canvas-soft: #f8fafc;
  --success: #10b981;
  --success-dark: #047857;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-dark: #b91c1c;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 14px rgba(15, 23, 42, .04);
  --shadow: 0 12px 30px rgba(15, 23, 42, .08);
  --radius: 16px;
  --sidebar: 258px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--navy);
  background: var(--canvas-soft);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--canvas-soft); color: var(--navy); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1 { letter-spacing: -.035em; }
h2 { letter-spacing: -.02em; }
.muted { color: var(--slate); }
.eyebrow { display: block; margin-bottom: 8px; color: var(--blue); font-size: .7rem; line-height: 1; font-weight: 800; letter-spacing: .14em; }
.eyebrow.light { color: #93c5fd; }
.fade-in { animation: fade-in .38s ease both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16,185,129,.4); } 50% { opacity: .8; box-shadow: 0 0 0 8px rgba(16,185,129,0); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Buttons */
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 9px 16px; font-size: .86rem; font-weight: 750; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .62; cursor: wait; transform: none; }
.button.primary { color: #fff; background: linear-gradient(135deg, var(--blue), #1d4ed8); box-shadow: 0 8px 18px rgba(37,99,235,.22); }
.button.primary:hover { box-shadow: 0 11px 24px rgba(37,99,235,.28); }
.button.secondary { background: #fff; color: var(--cobalt); border-color: #cbd5e1; }
.button.secondary:hover { border-color: #93c5fd; background: #eff6ff; }
.button.ghost { color: var(--slate); background: transparent; border-color: transparent; }
.button.ghost:hover { background: #f1f5f9; color: var(--navy); }
.button.success { background: var(--success); color: #fff; box-shadow: 0 8px 18px rgba(16,185,129,.18); }
.button.danger { color: #fff; background: var(--danger); }
.button.danger-outline { color: var(--danger-dark); border-color: #fecaca; background: #fff; }
.button.danger-outline:hover { background: #fef2f2; }
.button.large { min-height: 50px; padding: 12px 21px; }
.button.tiny { min-height: 34px; padding: 6px 11px; border-radius: 8px; font-size: .77rem; }
.button.full { width: 100%; }
.icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--slate); cursor: pointer; transition: background .18s ease, color .18s ease, transform .18s ease; }
.icon-button:hover { background: #eef2f7; color: var(--navy); transform: translateY(-1px); }
.icon-button.subtle { background: #f8fafc; border: 1px solid var(--line); }
.icon-button.dark { color: #dbeafe; background: rgba(255,255,255,.08); }
.icon-button.dark:hover { background: rgba(255,255,255,.16); color: #fff; }
.text-button, .text-link, .strong-link { color: var(--blue); font-weight: 750; border: 0; background: none; cursor: pointer; }
.text-link { font-size: .82rem; }
.strong-link { color: var(--navy); }
.strong-link:hover { color: var(--blue); }

/* Authentication & installation */
.login-page { overflow: hidden; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(480px, 1.05fr) minmax(430px, .95fr); }
.login-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 46px clamp(42px, 6vw, 92px); color: #fff; background: radial-gradient(circle at 20% 10%, #1e40af 0, transparent 32%), linear-gradient(145deg, #111f3d 0%, #0f172a 60%, #172554 100%); }
.hero-grid { position: absolute; inset: 0; opacity: .15; background-image: linear-gradient(rgba(147,197,253,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(147,197,253,.18) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(to bottom, black, transparent 78%); }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(1px); border: 1px solid rgba(147,197,253,.18); }
.orb-one { width: 420px; height: 420px; right: -180px; top: 12%; box-shadow: inset 0 0 80px rgba(37,99,235,.12); }
.orb-two { width: 180px; height: 180px; left: 18%; bottom: -85px; }
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; font-size: .7rem; font-weight: 800; letter-spacing: .15em; color: #bfdbfe; }
.login-brand img { width: 76px; max-height: 48px; object-fit: contain; filter: brightness(0) invert(1); }
.hero-copy { position: relative; z-index: 1; margin: auto 0; max-width: 650px; }
.hero-copy h1 { margin: 14px 0 24px; font-size: clamp(3rem, 5.3vw, 5.6rem); line-height: .98; font-weight: 760; }
.hero-copy p { max-width: 560px; color: #cbd5e1; font-size: 1.12rem; line-height: 1.7; }
.hero-status { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; color: #cbd5e1; font-size: .78rem; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
.login-form-panel { display: grid; place-items: center; padding: 48px; background: #fff; }
.login-form-wrap { width: min(100%, 430px); }
.login-form-wrap h2 { margin: 8px 0 8px; font-size: 2.25rem; }
.mobile-logo { display: none; }
.login-form { display: grid; gap: 19px; margin-top: 32px; }
.login-form label, .form-grid label { display: grid; gap: 8px; color: #334155; font-size: .78rem; font-weight: 750; }
input, select, textarea { width: 100%; color: var(--navy); background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; padding: 11px 13px; outline: none; transition: border .18s ease, box-shadow .18s ease, background .18s ease; }
input, select { min-height: 44px; }
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: #60a5fa; box-shadow: 0 0 0 4px rgba(37,99,235,.1); }
input[readonly] { color: var(--slate); background: #f8fafc; }
label small { color: var(--slate-light); font-weight: 500; }
.password-field { position: relative; }
.password-field input { padding-right: 48px; }
.password-field button { position: absolute; top: 3px; right: 4px; width: 38px; height: 38px; border: 0; background: transparent; color: var(--slate); cursor: pointer; }
.login-help { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--slate); font-size: .78rem; text-align: center; }
.login-help span { font-weight: 750; color: #334155; }
.install-page { background: linear-gradient(145deg, #eef2ff, #f8fafc 48%, #eff6ff); }
.install-shell { width: min(1180px, calc(100% - 48px)); min-height: 100vh; margin: auto; padding: 48px 0; display: grid; grid-template-columns: .72fr 1.28fr; gap: 34px; align-items: center; }
.install-brand { padding: 38px; }
.install-brand img { width: 120px; max-height: 70px; object-fit: contain; margin-bottom: 42px; }
.install-brand h1 { font-size: 3.1rem; margin: 10px 0 18px; }
.install-brand p { color: var(--slate); font-size: 1.02rem; line-height: 1.75; }
.install-security { display: flex; gap: 10px; align-items: center; margin-top: 32px; color: var(--success-dark); font-weight: 700; }
.install-security span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #d1fae5; }
.install-card { padding: 32px !important; }
.success-state { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 60px 20px; }
.success-state > span { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--success); font-size: 2rem; box-shadow: 0 14px 30px rgba(16,185,129,.24); }
.success-state h2 { margin: 16px 0 0; }

/* Main shell */
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: var(--sidebar); position: fixed; z-index: 40; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 22px 14px; color: #cbd5e1; background: linear-gradient(180deg, var(--navy) 0%, #111827 100%); box-shadow: 8px 0 30px rgba(15,23,42,.08); }
.brand { min-height: 64px; display: flex; align-items: center; gap: 13px; padding: 8px 10px 22px; margin-bottom: 18px; border-bottom: 1px solid rgba(148,163,184,.14); }
.brand img { width: 43px; height: 43px; object-fit: contain; border-radius: 9px; background: #fff; padding: 4px; }
.brand-fallback { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--blue); font-weight: 900; }
.brand > span:last-child { min-width: 0; display: grid; gap: 3px; }
.brand strong { color: #fff; font-size: .86rem; white-space: nowrap; }
.brand small { color: #7f8ca3; font-size: .63rem; }
.sidebar nav { display: grid; gap: 5px; }
.nav-link { min-height: 45px; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; font-size: .82rem; font-weight: 650; transition: color .18s ease, background .18s ease, transform .18s ease; }
.nav-link:hover { color: #fff; background: rgba(148,163,184,.1); transform: translateX(2px); }
.nav-link.active { color: #fff; background: linear-gradient(90deg, rgba(37,99,235,.9), rgba(37,99,235,.58)); box-shadow: 0 8px 18px rgba(37,99,235,.16); }
.nav-icon { width: 22px; text-align: center; font-size: 1.1rem; }
.sidebar-footer { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 15px 10px 4px; border-top: 1px solid rgba(148,163,184,.12); }
.sidebar-footer div { display: grid; gap: 3px; }
.sidebar-footer strong { color: #cbd5e1; font-size: .67rem; }
.sidebar-footer small { color: #64748b; font-size: .58rem; }
.security-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(16,185,129,.1); }
.main-column { width: calc(100% - var(--sidebar)); min-height: 100vh; margin-left: var(--sidebar); }
.topbar { height: 76px; position: sticky; z-index: 30; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 3.2vw, 46px); border-bottom: 1px solid rgba(226,232,240,.85); background: rgba(255,255,255,.92); backdrop-filter: blur(16px); }
.topbar-title { display: grid; gap: 3px; }
.topbar-title > span { font-size: .88rem; font-weight: 780; }
.topbar-title small { color: var(--slate-light); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.menu-button { display: none; }
.notification-wrap, .user-menu-wrap { position: relative; }
.notification-count { position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; border-radius: 10px; color: #fff; background: var(--danger); font-size: .57rem; font-weight: 900; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; }
.user-chip:hover { background: #f1f5f9; }
.avatar { width: 35px; height: 35px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: #fff; background: linear-gradient(135deg, var(--cobalt), var(--blue)); font-size: .78rem; font-weight: 850; }
.user-chip-copy { display: grid; gap: 2px; text-align: left; }
.user-chip-copy strong { font-size: .75rem; }
.user-chip-copy small { color: var(--slate); font-size: .6rem; }
.user-menu, .notification-panel { position: absolute; z-index: 70; top: calc(100% + 10px); right: 0; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.user-menu { width: 180px; padding: 7px; }
.user-menu a { display: block; padding: 10px 12px; border-radius: 8px; color: #334155; font-size: .78rem; font-weight: 650; }
.user-menu a:hover { background: #f1f5f9; }
.notification-panel { width: min(390px, calc(100vw - 24px)); max-height: 520px; overflow-y: auto; }
.panel-heading { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--line); background: #fff; }
.panel-heading strong { font-size: .84rem; }
.panel-heading button { font-size: .68rem; }
.panel-empty { padding: 30px; color: var(--slate); text-align: center; font-size: .78rem; }
.notification-item { position: relative; display: flex; gap: 11px; padding: 14px 16px; border-bottom: 1px solid #f1f5f9; transition: background .18s ease; }
.notification-item:hover { background: #f8fafc; }
.notification-item.unread { background: #eff6ff; }
.notification-item.unread::after { content: ''; position: absolute; top: 15px; right: 13px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.notification-type { width: 9px; height: 9px; margin-top: 4px; flex: 0 0 auto; border-radius: 50%; background: var(--blue); }
.notification-type.success { background: var(--success); }.notification-type.warning { background: var(--warning); }.notification-type.danger { background: var(--danger); }
.notification-item div { min-width: 0; padding-right: 8px; }
.notification-item strong { display: block; font-size: .75rem; }.notification-item p { margin: 4px 0; color: var(--slate); font-size: .68rem; line-height: 1.45; }.notification-item small { color: var(--slate-light); font-size: .58rem; }
.content { width: min(1540px, 100%); margin: 0 auto; padding: 34px clamp(20px, 3.2vw, 46px) 60px; }
.page-heading { min-height: 82px; display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 28px; }
.page-heading h1 { margin: 5px 0 6px; font-size: clamp(1.85rem, 3vw, 2.55rem); line-height: 1.08; }
.page-heading p { margin: 0; color: var(--slate); font-size: .9rem; }
.heading-actions { display: flex; align-items: center; gap: 10px; }
.back-link { display: block; margin-bottom: 20px; color: var(--slate); font-size: .75rem; font-weight: 650; }
.back-link:hover { color: var(--blue); }
.card { border: 1px solid rgba(226,232,240,.96); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 23px; }
.section-heading h2 { margin: 0 0 5px; font-size: 1.03rem; }
.section-heading p { margin: 0; color: var(--slate); font-size: .74rem; }
.step-number { display: inline-grid; place-items: center; width: 27px; height: 27px; margin-right: 10px; border-radius: 8px; color: var(--blue); background: #eff6ff; font-size: .66rem; font-weight: 850; float: left; }

/* Alerts, badges and metrics */
.alert { margin: 14px 0; padding: 12px 14px; border: 1px solid #bfdbfe; border-radius: 10px; color: #1e40af; background: #eff6ff; font-size: .78rem; line-height: 1.5; }
.alert.success { color: #065f46; border-color: #a7f3d0; background: #ecfdf5; }.alert.warning { color: #92400e; border-color: #fde68a; background: #fffbeb; }.alert.danger { color: #991b1b; border-color: #fecaca; background: #fef2f2; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 25px; padding: 4px 9px; border-radius: 999px; font-size: .64rem; font-weight: 790; white-space: nowrap; }
.status-badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-badge.success { color: #047857; background: #d1fae5; }.status-badge.warning { color: #b45309; background: #fef3c7; }.status-badge.danger { color: #b91c1c; background: #fee2e2; }.status-badge.neutral { color: #475569; background: #e2e8f0; }
.status-badge.large { min-height: 33px; padding: 7px 12px; font-size: .71rem; }
.revision-chip { display: inline-flex; align-items: center; min-height: 27px; padding: 4px 9px; border: 1px solid #bfdbfe; border-radius: 7px; color: #1d4ed8; background: #eff6ff; font-size: .67rem; font-weight: 850; white-space: nowrap; }
.revision-chip.large { min-height: 34px; padding: 7px 12px; font-size: .76rem; }.revision-chip.muted-chip { color: #475569; border-color: #cbd5e1; background: #f1f5f9; }
.traffic-light { width: 12px; height: 12px; display: inline-block; border-radius: 50%; }.traffic-light.green { background: var(--success); box-shadow: 0 0 0 5px rgba(16,185,129,.12); }.traffic-light.yellow { background: var(--warning); box-shadow: 0 0 0 5px rgba(245,158,11,.12); }.traffic-light.red { background: var(--danger); box-shadow: 0 0 0 5px rgba(239,68,68,.1); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.metric-card { min-height: 128px; display: flex; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.metric-icon { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; font-size: 1.15rem; font-weight: 850; }.metric-icon.blue { color: #1d4ed8; background: #dbeafe; }.metric-icon.green { color: #047857; background: #d1fae5; }.metric-icon.amber { color: #b45309; background: #fef3c7; }.metric-icon.red { color: #b91c1c; background: #fee2e2; }
.metric-card > div:last-child { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; width: 100%; }.metric-card span { color: var(--slate); font-size: .72rem; font-weight: 650; }.metric-card strong { grid-row: span 2; font-size: 2rem; letter-spacing: -.04em; }.metric-card small { color: var(--slate-light); font-size: .62rem; }
.dashboard-grid { display: grid; grid-template-columns: 1.45fr 1.45fr .9fr; gap: 18px; }.dashboard-grid > .card { padding: 22px; }.span-2-card { grid-column: span 2; }
.release-card { grid-row: span 1; }.donut { --value: 0; width: 154px; aspect-ratio: 1; display: grid; place-items: center; margin: 12px auto 24px; border-radius: 50%; background: conic-gradient(var(--success) calc(var(--value) * 1%), #e2e8f0 0); position: relative; }.donut::after { content: ''; width: 112px; aspect-ratio: 1; position: absolute; border-radius: 50%; background: #fff; }.donut div { z-index: 1; display: grid; text-align: center; }.donut strong { font-size: 1.65rem; }.donut span { color: var(--slate); font-size: .65rem; }.legend-row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--slate); font-size: .7rem; }.legend-row span { display: flex; align-items: center; gap: 8px; }.legend-row i { width: 7px; height: 7px; border-radius: 50%; }.green-bg { background: var(--success); }.slate-bg { background: #cbd5e1; }
.bar-chart { display: grid; gap: 17px; padding: 10px 2px; }.bar-row { display: grid; grid-template-columns: 92px 1fr 28px; gap: 12px; align-items: center; font-size: .7rem; }.bar-row span { color: #334155; font-weight: 700; }.bar-row strong { text-align: right; }.bar-track { height: 8px; overflow: hidden; border-radius: 6px; background: #e2e8f0; }.bar-fill { height: 100%; min-width: 2px; border-radius: inherit; background: linear-gradient(90deg, var(--cobalt), #60a5fa); transition: width .5s ease; }
.policy-card { color: #fff; background: linear-gradient(145deg, #172554, var(--navy)); border: 0; }.policy-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: #bfdbfe; background: rgba(59,130,246,.15); }.policy-card h2 { margin: 26px 0 10px; }.policy-card p { color: #94a3b8; font-size: .76rem; line-height: 1.6; }.policy-card .text-link { color: #93c5fd; }

/* Forms and tables */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }.form-grid.compact { max-width: 650px; }.form-section-title { grid-column: 1/-1; margin: 10px 0 -3px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: .85rem; }.span-2 { grid-column: span 2; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(340px, .75fr); gap: 20px; align-items: start; }.form-layout > .card { padding: 26px; }.upload-side-card { position: sticky; top: 98px; }
.drop-zone { min-height: 258px; display: grid; place-items: center; align-content: center; padding: 28px; border: 1.5px dashed #93c5fd; border-radius: 14px; color: var(--slate); background: linear-gradient(145deg, #f8fbff, #eff6ff); text-align: center; cursor: pointer; transition: border .2s ease, transform .2s ease, background .2s ease; }.drop-zone:hover, .drop-zone.dragging { border-color: var(--blue); background: #eaf2ff; transform: translateY(-2px); }.drop-zone input { display: none; }.drop-zone strong { color: var(--navy); font-size: .88rem; }.drop-zone p { margin: 5px 0 10px; font-size: .72rem; }.drop-zone small { padding: 4px 8px; border-radius: 6px; color: #1d4ed8; background: #dbeafe; font-size: .6rem; font-weight: 800; }.upload-glyph { width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 14px; color: #fff; background: var(--blue); font-size: 1.5rem; box-shadow: 0 10px 22px rgba(37,99,235,.25); }
.selected-file { display: flex; align-items: center; gap: 13px; min-height: 88px; padding: 14px; border: 1px solid #bfdbfe; border-radius: 13px; background: #eff6ff; }.selected-file > div { min-width: 0; display: grid; gap: 4px; flex: 1; }.selected-file strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .74rem; }.selected-file small { color: var(--slate); font-size: .65rem; }.pdf-icon, .document-tile { width: 48px; height: 56px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; color: #fff; background: linear-gradient(145deg, #dc2626, #991b1b); font-size: .64rem; font-weight: 900; box-shadow: 0 8px 16px rgba(153,27,27,.18); }
.security-note { display: flex; gap: 11px; margin: 18px 0; padding: 13px; border-radius: 11px; color: #475569; background: #f8fafc; }.security-note > span { color: var(--blue); }.security-note p { display: grid; gap: 2px; margin: 0; font-size: .65rem; line-height: 1.5; }.security-note strong { color: var(--navy); }
.filter-card { margin-bottom: 16px; padding: 16px; }.filters { display: flex; align-items: end; gap: 10px; }.filters > * { flex: 1; min-width: 140px; }.filters .button { flex: 0 0 auto; }.filters.simple .search-field { max-width: 560px; }.filters label:not(.search-field) { display: grid; gap: 5px; color: var(--slate); font-size: .65rem; font-weight: 700; }.search-field { position: relative; display: block; }.search-field span { position: absolute; top: 11px; left: 13px; color: var(--slate); }.search-field input { padding-left: 38px; }
.table-card { overflow: hidden; }.table-summary { display: flex; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }.table-summary strong { font-size: .76rem; }.table-summary span { color: var(--slate); font-size: .66rem; }.table-wrap { overflow-x: auto; }.data-table { width: 100%; border-collapse: collapse; font-size: .73rem; }.data-table th { height: 42px; padding: 9px 13px; color: #64748b; background: #f8fafc; border-bottom: 1px solid var(--line); text-align: left; font-size: .61rem; font-weight: 820; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; }.data-table td { padding: 12px 13px; border-bottom: 1px solid #edf2f7; vertical-align: middle; }.data-table tr:last-child td { border-bottom: 0; }.data-table tbody tr { transition: background .15s ease; }.data-table tbody tr:hover { background: #fafcff; }.data-table td > small, .data-table td > strong + small { display: block; margin-top: 4px; color: var(--slate-light); font-size: .61rem; }.data-table code { padding: 3px 6px; border-radius: 5px; color: #334155; background: #f1f5f9; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .67rem; }.data-table.roomy td { padding-top: 14px; padding-bottom: 14px; }.row-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }.row-actions form { margin: 0; }.disabled-row { opacity: .58; }
.empty-state { display: grid; justify-items: center; padding: 58px 24px; color: var(--slate); text-align: center; }.empty-state > span { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 13px; border-radius: 13px; color: var(--blue); background: #eff6ff; font-size: 1.25rem; }.empty-state strong { color: var(--navy); font-size: .87rem; }.empty-state p { margin: 5px 0 0; font-size: .69rem; }.empty-state.small { padding: 26px; }.pagination { display: flex; justify-content: center; gap: 6px; padding: 17px; border-top: 1px solid var(--line); }.pagination a { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; font-size: .7rem; font-weight: 700; }.pagination a:hover, .pagination a.active { color: #fff; border-color: var(--blue); background: var(--blue); }

/* Drawing detail and workflow */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }.detail-main { display: grid; gap: 20px; }.detail-main > .card, .detail-side > .card { padding: 24px; }.detail-side { display: grid; gap: 16px; position: sticky; top: 98px; }.metadata-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }.metadata-grid > div { min-height: 82px; padding: 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }.metadata-grid > div:nth-child(4n) { border-right: 0; }.metadata-grid > div:nth-last-child(-n+4) { border-bottom: 0; }.metadata-grid dt { margin-bottom: 9px; color: var(--slate-light); font-size: .58rem; font-weight: 820; letter-spacing: .06em; text-transform: uppercase; }.metadata-grid dd { margin: 0; color: #1e293b; font-size: .77rem; font-weight: 700; word-break: break-word; }.metadata-grid code { padding: 3px 6px; background: #f1f5f9; border-radius: 5px; }.change-reason { margin-top: 18px; padding: 16px; border-left: 3px solid var(--blue); border-radius: 0 10px 10px 0; background: #f8fafc; }.change-reason > span { color: var(--blue); font-size: .58rem; font-weight: 850; letter-spacing: .09em; }.change-reason p { margin: 8px 0; color: #334155; font-size: .76rem; line-height: 1.6; }.change-reason small { color: var(--slate-light); font-size: .61rem; }
.approval-timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }.approval-step { position: relative; display: flex; gap: 11px; padding: 12px 8px; }.approval-step:not(:last-child)::after { content: ''; height: 2px; position: absolute; top: 27px; left: 38px; right: -8px; background: #e2e8f0; }.approval-marker { width: 30px; height: 30px; z-index: 1; display: grid; place-items: center; flex: 0 0 auto; border: 2px solid #cbd5e1; border-radius: 50%; color: var(--slate); background: #fff; font-weight: 900; }.approval-step.aprobado .approval-marker { color: #fff; border-color: var(--success); background: var(--success); }.approval-step.rechazado .approval-marker { color: #fff; border-color: var(--danger); background: var(--danger); }.approval-copy { display: grid; gap: 2px; min-width: 0; }.approval-copy > span { color: var(--slate); font-size: .61rem; }.approval-copy strong { font-size: .76rem; }.approval-copy small { color: var(--slate-light); font-size: .57rem; line-height: 1.4; }.approval-copy p { margin: 7px 0 0; padding: 7px; border-radius: 6px; color: var(--danger-dark); background: #fef2f2; font-size: .59rem; }.decision-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; padding: 16px; border: 1px solid #bfdbfe; border-radius: 12px; background: #f8fbff; }.decision-panel strong { font-size: .8rem; }.decision-panel p { margin: 4px 0 0; color: var(--slate); font-size: .67rem; }.decision-panel > div:last-child { display: flex; gap: 8px; }
.release-summary { text-align: center; }.release-summary .release-symbol { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 50%; font-size: 1.25rem; font-weight: 900; }.release-summary.success .release-symbol { color: #fff; background: var(--success); box-shadow: 0 10px 24px rgba(16,185,129,.2); }.release-summary.warning .release-symbol, .release-summary.neutral .release-symbol { color: #b45309; background: #fef3c7; }.release-summary.danger .release-symbol { color: #fff; background: var(--danger); }.release-summary h2 { margin: 0 0 7px; font-size: 1.05rem; }.release-summary p { margin: 0; color: var(--slate); font-size: .67rem; line-height: 1.55; }.quick-actions h3 { margin: 0 0 10px; font-size: .79rem; }.quick-actions a { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); color: #334155; font-size: .67rem; font-weight: 650; }.quick-actions a:last-child { border-bottom: 0; }.quick-actions a:hover { color: var(--blue); }.version-list { display: grid; }.version-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: 13px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }.version-row:last-child { border-bottom: 0; }.version-row > div { min-width: 0; }.version-row strong { font-size: .72rem; }.version-row p { margin: 3px 0 0; overflow: hidden; color: var(--slate); font-size: .61rem; white-space: nowrap; text-overflow: ellipsis; }.version-row > small { color: var(--slate); font-size: .59rem; white-space: nowrap; }
.queue-count { padding: 7px 11px; border-radius: 8px; color: var(--cobalt); background: #dbeafe; font-size: .68rem; font-weight: 800; }.approval-queue { display: grid; gap: 14px; }.queue-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 20px; }.queue-card-main { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }.queue-card-main > div:last-child { min-width: 0; }.queue-card h2 { margin: 5px 0 2px; font-size: 1rem; }.queue-card p { margin: 0; font-size: .68rem; }.queue-card blockquote { max-width: 760px; margin: 10px 0 7px; overflow: hidden; color: #334155; font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }.queue-card small { color: var(--slate-light); font-size: .58rem; }.queue-meta { display: flex; align-items: center; gap: 8px; color: var(--slate); font-size: .6rem; }.queue-actions { display: flex; gap: 7px; flex: 0 0 auto; }
.modal { width: min(470px, calc(100% - 30px)); padding: 27px; border: 0; border-radius: 18px; color: var(--navy); box-shadow: 0 30px 90px rgba(15,23,42,.28); animation: fade-in .24s ease; }.modal.wide { width: min(700px, calc(100% - 30px)); }.modal::backdrop { background: rgba(15,23,42,.55); backdrop-filter: blur(4px); }.modal-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 13px; color: #fff; background: var(--blue); font-size: 1.25rem; font-weight: 900; }.modal-icon.success { background: var(--success); }.modal-icon.danger { background: var(--danger); }.modal h2 { margin: 0 0 8px; font-size: 1.25rem; }.modal > form > p { color: var(--slate); font-size: .75rem; line-height: 1.6; }.modal label { display: grid; gap: 7px; margin-top: 16px; color: #334155; font-size: .72rem; font-weight: 750; }.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }.modal-heading h2 { margin-top: 4px; }.profile-card { max-width: 720px; padding: 26px; }.profile-summary { display: flex; align-items: center; gap: 15px; margin-bottom: 22px; }.large-avatar { width: 54px; height: 54px; border-radius: 15px; font-size: 1rem; }.profile-summary h2 { margin: 0 0 4px; font-size: 1.08rem; }.profile-summary p { margin: 0; color: var(--slate); font-size: .68rem; }
.role-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }.role-summary > div { display: flex; align-items: center; justify-content: space-between; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }.role-summary span { color: var(--slate); font-size: .67rem; }.role-summary strong { font-size: 1.2rem; }.user-cell { display: flex; align-items: center; gap: 10px; }.user-cell > div { min-width: 0; }.role-badge { padding: 4px 8px; border-radius: 6px; color: #334155; background: #e2e8f0; font-size: .6rem; font-weight: 850; }.role-diseno { color: #1d4ed8; background: #dbeafe; }.role-produccion { color: #6d28d9; background: #ede9fe; }.role-calidad { color: #047857; background: #d1fae5; }.role-admin { color: #9f1239; background: #ffe4e6; }
.audit-table details { max-width: 380px; }.audit-table summary { color: var(--blue); cursor: pointer; font-weight: 700; }.audit-table pre { max-width: 380px; overflow: auto; padding: 8px; border-radius: 6px; background: #0f172a; color: #dbeafe; font-size: .58rem; white-space: pre-wrap; }.audit-table details > small { display: block; max-width: 380px; word-break: break-word; }.event-code { color: var(--cobalt) !important; background: #eff6ff !important; }

/* Toasts and spinners */
.toast-stack { position: fixed; z-index: 200; top: 18px; right: 18px; width: min(380px, calc(100vw - 30px)); display: grid; gap: 10px; pointer-events: none; }.toast { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: start; padding: 14px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 12px; background: #fff; box-shadow: var(--shadow); opacity: 0; transform: translateX(20px); pointer-events: auto; transition: opacity .2s ease, transform .2s ease; }.toast.visible { opacity: 1; transform: none; }.toast.leaving { opacity: 0; transform: translateX(15px); }.toast.success { border-left-color: var(--success); }.toast.warning { border-left-color: var(--warning); }.toast.danger { border-left-color: var(--danger); }.toast-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--blue); font-size: .72rem; font-weight: 900; }.toast.success .toast-icon { background: var(--success); }.toast.warning .toast-icon { background: var(--warning); }.toast.danger .toast-icon { background: var(--danger); }.toast strong { font-size: .72rem; }.toast p { margin: 3px 0 0; color: var(--slate); font-size: .65rem; line-height: 1.45; }.toast button { border: 0; background: transparent; color: var(--slate-light); cursor: pointer; }.spinner { width: 30px; height: 30px; border: 3px solid #dbeafe; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }.spinner.small { width: 16px; height: 16px; border-width: 2px; border-top-color: currentColor; }
.sidebar-scrim { display: none; }

/* PDF viewer */
.viewer-page { height: 100vh; overflow: hidden; color: #e2e8f0; background: #29313e; }
.viewer-topbar { height: 68px; position: relative; z-index: 5; display: grid; grid-template-columns: minmax(260px, 1fr) auto minmax(160px, 1fr); align-items: center; gap: 15px; padding: 0 16px; background: #0b1220; box-shadow: 0 4px 16px rgba(0,0,0,.2); }.viewer-doc { display: flex; align-items: center; gap: 10px; min-width: 0; }.viewer-doc img { width: 34px; height: 34px; object-fit: contain; padding: 3px; border-radius: 7px; background: #fff; }.viewer-doc > div:last-child { min-width: 0; display: grid; gap: 3px; }.viewer-doc strong { overflow: hidden; font-size: .73rem; white-space: nowrap; text-overflow: ellipsis; }.viewer-doc strong span { margin-left: 5px; padding: 2px 5px; border-radius: 4px; color: #93c5fd; background: rgba(37,99,235,.2); }.viewer-doc small { overflow: hidden; color: #7f8ca3; font-size: .58rem; white-space: nowrap; text-overflow: ellipsis; }.viewer-controls { display: flex; align-items: center; gap: 8px; }.control-group { display: flex; align-items: center; height: 36px; overflow: hidden; border: 1px solid #28364a; border-radius: 9px; background: #111b2d; }.control-group button { width: 35px; height: 35px; border: 0; border-right: 1px solid #28364a; color: #cbd5e1; background: transparent; cursor: pointer; }.control-group button:last-child { border-right: 0; border-left: 1px solid #28364a; }.control-group button:hover { color: #fff; background: #1e293b; }.control-group > span { min-width: 73px; color: #94a3b8; font-size: .63rem; text-align: center; }.control-group input { width: 30px; min-height: 0; height: 25px; padding: 2px; border: 0; border-radius: 3px; color: #fff; background: #1e293b; text-align: center; }.viewer-search { position: relative; }.viewer-search input { width: 150px; min-height: 36px; height: 36px; padding: 6px 55px 6px 10px; color: #e2e8f0; border-color: #28364a; background: #111b2d; font-size: .63rem; }.viewer-search button { position: absolute; top: 1px; right: 1px; width: 34px; height: 34px; border: 0; color: #94a3b8; background: transparent; cursor: pointer; }.viewer-search small { position: absolute; top: 12px; right: 33px; color: #93c5fd; font-size: .53rem; }.viewer-actions { display: flex; justify-content: flex-end; gap: 4px; }.pdf-stage { height: calc(100vh - 98px); overflow: auto; display: grid; place-items: start center; padding: 28px; background-color: #2d3745; background-image: radial-gradient(#3c4859 1px, transparent 1px); background-size: 20px 20px; }.pdf-paper { position: relative; margin: auto; background: #fff; box-shadow: 0 16px 55px rgba(0,0,0,.35); transition: box-shadow .2s ease; }.pdf-paper.search-hit { box-shadow: 0 0 0 5px rgba(245,158,11,.9), 0 16px 55px rgba(0,0,0,.35); }.pdf-paper canvas { display: block; max-width: none; }.pdf-watermark { position: absolute; z-index: 2; top: 50%; left: 50%; padding: 11px 22px; border: 4px solid currentColor; transform: translate(-50%, -50%) rotate(-32deg); opacity: .16; font-size: clamp(1.2rem, 3.6vw, 3rem); font-weight: 950; letter-spacing: .09em; white-space: nowrap; pointer-events: none; }.pdf-watermark.released { color: #059669; }.pdf-watermark.draft { color: #dc2626; }.controlled-copy { display: none; }.viewer-loading, .viewer-error { align-self: center; justify-self: center; display: grid; justify-items: center; gap: 10px; padding: 30px; color: #cbd5e1; text-align: center; }.viewer-loading small, .viewer-error p { color: #7f8ca3; font-size: .68rem; }.viewer-error > span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--danger); font-weight: 900; }.viewer-footer { height: 30px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; color: #64748b; background: #0b1220; font-size: .55rem; }.viewer-footer .status-badge { min-height: 20px; padding: 2px 7px; font-size: .52rem; }
#printContainer { display: none; }
@media print {
  @page { margin: 7mm; }
  body.printing { height: auto; overflow: visible; background: #fff; }
  body.printing > *:not(#printContainer) { display: none !important; }
  body.printing #printContainer { display: block; }
  .print-page { position: relative; width: 100%; break-after: page; page-break-after: always; overflow: hidden; }
  .print-page:last-child { break-after: auto; page-break-after: auto; }
  .print-page canvas { display: block; width: 100%; height: auto; }
  .print-watermark { position: absolute; top: 50%; left: 50%; padding: 10px 20px; border: 4px solid rgba(185,28,28,.38); transform: translate(-50%,-50%) rotate(-32deg); color: rgba(185,28,28,.38); font-size: 28pt; font-weight: 900; white-space: nowrap; }
  .print-copy { position: absolute; right: 8mm; bottom: 6mm; left: 8mm; padding: 4px; border: 1px solid #475569; color: #0f172a; background: rgba(255,255,255,.82); font-size: 7pt; text-align: center; }
}

/* Responsive */
@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }.span-2-card { grid-column: span 2; }.policy-card { grid-column: span 1; }
  .metadata-grid { grid-template-columns: repeat(2, 1fr); }.metadata-grid > div:nth-child(4n) { border-right: 1px solid var(--line); }.metadata-grid > div:nth-child(2n) { border-right: 0; }.metadata-grid > div:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); }.metadata-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
  .viewer-topbar { grid-template-columns: minmax(200px, .7fr) auto auto; }.viewer-search { display: none; }.viewer-doc img { display: none; }
}
@media (max-width: 900px) {
  :root { --sidebar: 260px; }
  .sidebar { transform: translateX(-105%); transition: transform .25s ease; }.sidebar.open { transform: none; }.sidebar-scrim { display: block; position: fixed; z-index: 35; inset: 0; background: rgba(15,23,42,.45); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s; }.sidebar-scrim.visible { opacity: 1; visibility: visible; }
  .main-column { width: 100%; margin-left: 0; }.menu-button { display: grid; }.topbar-title { margin-right: auto; }.user-chip-copy { display: none; }
  .form-layout { grid-template-columns: 1fr; }.upload-side-card, .detail-side { position: static; }.detail-grid { grid-template-columns: 1fr; }.detail-side { grid-template-columns: 1fr 1fr; }
  .filters { flex-wrap: wrap; }.filters > * { min-width: 190px; }.filters .button { flex: 1; }
  .queue-card { align-items: flex-start; flex-direction: column; }.queue-actions { width: 100%; flex-wrap: wrap; }.queue-actions .button { flex: 1; }
  .role-summary { grid-template-columns: repeat(3, 1fr); }
  .login-shell { grid-template-columns: 1fr; }.login-hero { display: none; }.login-form-panel { min-height: 100vh; }.mobile-logo { display: block; margin-bottom: 38px; }.mobile-logo img { width: 100px; max-height: 60px; object-fit: contain; }
  .install-shell { grid-template-columns: 1fr; }.install-brand { padding-bottom: 0; }.install-brand img { margin-bottom: 20px; }
}
@media (max-width: 680px) {
  .content { padding: 24px 14px 42px; }.topbar { height: 66px; padding: 0 12px; }.topbar-title { display: none; }.page-heading { min-height: 0; align-items: flex-start; flex-direction: column; }.page-heading > .button, .heading-actions { width: 100%; }.heading-actions { flex-wrap: wrap; }.heading-actions .button { flex: 1; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }.metric-card { min-height: 108px; padding: 14px; }.metric-icon { width: 36px; height: 36px; }.metric-card > div:last-child { display: grid; }.metric-card strong { font-size: 1.55rem; }.metric-card small { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }.dashboard-grid > .card, .span-2-card, .policy-card { grid-column: 1; }.release-card { grid-row: auto; }
  .form-grid { grid-template-columns: 1fr; }.span-2 { grid-column: span 1; }.form-layout > .card { padding: 18px; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; }.filters > * { min-width: 0; }.filters .search-field { grid-column: 1/-1; max-width: none; }.filters select { grid-column: 1/-1; }
  .detail-main > .card, .detail-side > .card { padding: 17px; }.detail-side { grid-template-columns: 1fr; }.metadata-grid { grid-template-columns: 1fr 1fr; }.approval-timeline { grid-template-columns: 1fr; }.approval-step:not(:last-child)::after { width: 2px; height: auto; top: 38px; bottom: -11px; left: 22px; right: auto; }.decision-panel { align-items: stretch; flex-direction: column; }.decision-panel > div:last-child { flex-wrap: wrap; }.decision-panel .button { flex: 1; }.version-row { grid-template-columns: auto 1fr auto; }.version-row > .status-badge, .version-row > small { display: none; }
  .role-summary { grid-template-columns: 1fr 1fr; }.role-summary > div { padding: 13px; }
  .login-form-panel { padding: 28px 22px; }.login-form-wrap h2 { font-size: 1.9rem; }
  .install-shell { width: calc(100% - 24px); padding: 20px 0; }.install-brand { padding: 22px 10px; }.install-brand h1 { font-size: 2.25rem; }.install-card { padding: 19px !important; }
  .viewer-page { overflow: hidden; }.viewer-topbar { height: 108px; grid-template-columns: 1fr auto; grid-template-rows: 52px 44px; padding: 0 8px; }.viewer-doc { grid-column: 1; }.viewer-actions { grid-column: 2; }.viewer-controls { grid-column: 1/-1; grid-row: 2; justify-content: center; }.viewer-controls .control-group > button { width: 31px; }.viewer-search { display: none; }.pdf-stage { height: calc(100vh - 138px); padding: 14px; }.viewer-footer > span:last-child { display: none; }.viewer-footer { justify-content: center; }
  .notification-panel { right: -52px; }
}
@media (max-width: 430px) {
  .metric-grid { grid-template-columns: 1fr; }.metric-card { min-height: 86px; }.filters { grid-template-columns: 1fr; }.filters > *, .filters .search-field, .filters select { grid-column: 1; }.metadata-grid { grid-template-columns: 1fr; }.metadata-grid > div { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }.metadata-grid > div:last-child { border-bottom: 0 !important; }.queue-card-main { flex-direction: column; }.document-tile { width: 42px; height: 48px; }.role-summary { grid-template-columns: 1fr; }
}
