:root {
    --primary: #125b9f;
    --primary-strong: #073f80;
    --primary-soft: #e5effc;
    --ink: #1d2732;
    --muted: #6d7c8b;
    --line: #dce5ee;
    --surface: #fff;
    --background: #f3f7fb;
    --mint: #e5f5ef;
    --green: #147a65;
    --danger: #a23c4c;
    --danger-soft: #fff0f2;
    --shadow: 0 16px 44px rgba(28, 65, 102, .1);
    color-scheme: light;
    font-family: Roboto, "Segoe UI Variable Text", "Segoe UI", sans-serif;
}

* { box-sizing: border-box }
html,body { min-height:100%;margin:0 }
body { color:var(--ink);background:var(--background);font-family:inherit;line-height:1.5;-webkit-font-smoothing:antialiased }
button,input { font:inherit }
a { color:var(--primary) }
svg { fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round }
h1,h2,h3,p { margin-top:0 }
h1,h2,h3 { font-family:Roboto,"Segoe UI Variable Display","Segoe UI",sans-serif }
h1:focus { outline:none }

.admin-page { display:grid;gap:30px }
.page-header { display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:24px }
.page-heading-copy { max-width:720px }
.eyebrow { display:inline-flex;align-items:center;gap:7px;margin-bottom:12px;color:var(--primary);font-size:.7rem;font-weight:800;letter-spacing:.11em;text-transform:uppercase }
.eyebrow svg { width:17px;height:17px }
.page-header h1 { margin-bottom:12px;font-size:clamp(2rem,4vw,3.3rem);line-height:1.02;letter-spacing:-.05em }
.page-header p { margin-bottom:0;color:var(--muted);font-size:.96rem;line-height:1.65 }
.page-header-aside { display:flex;align-items:center;gap:10px }
.count-chip,.status-chip { min-height:36px;padding:0 13px;display:inline-flex;align-items:center;gap:7px;color:var(--primary);background:var(--primary-soft);border-radius:999px;font-size:.72rem;font-weight:750 }
.count-chip svg,.status-chip svg { width:17px;height:17px }

.surface-card { padding:30px;background:var(--surface);border:1px solid var(--line);border-radius:28px;box-shadow:var(--shadow) }
.card-heading { margin-bottom:26px;display:flex;align-items:center;gap:14px }
.card-icon { width:46px;height:46px;display:grid;place-items:center;flex:0 0 46px;color:var(--primary);background:var(--primary-soft);border-radius:15px }
.card-icon svg { width:24px;height:24px }
.card-heading h2 { margin-bottom:3px;font-size:1.15rem;letter-spacing:-.025em }
.card-heading p { margin-bottom:0;color:var(--muted);font-size:.78rem }

.form-stack { display:grid;gap:22px }
.form-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px }
.material-field { position:relative;display:grid;gap:7px }
.material-field label { position:absolute;z-index:1;top:-7px;left:14px;padding:0 7px;color:#667483;background:#fff;font-size:.69rem;font-weight:700;line-height:1.4 }
.material-input { width:100%;min-height:58px;padding:13px 16px 9px;color:var(--ink);background:#fff;border:1px solid #aeb9c6;border-radius:15px;outline:0;transition:border-color .16s,box-shadow .16s }
.material-input:hover { border-color:#788a9d }
.material-input:focus { padding:12px 15px 8px;border:2px solid var(--primary);box-shadow:0 0 0 3px rgba(18,87,154,.1) }
.field-hint { margin:0 4px;color:var(--muted);font-size:.7rem }
.validation-summary-errors { padding:14px 18px;color:var(--danger);background:var(--danger-soft);border:1px solid #f1cbd1;border-radius:14px;font-size:.78rem }
.validation-summary-errors ul { margin:0;padding-left:18px }
.validation-message { color:var(--danger);font-size:.72rem }
.invalid { border-color:var(--danger) }

.card-actions { padding-top:2px;display:flex;justify-content:flex-end;gap:10px }
.tp-button { min-height:48px;padding:0 20px;display:inline-flex;align-items:center;justify-content:center;gap:9px;border:0;border-radius:15px;font-weight:750;font-size:.8rem;cursor:pointer;transition:transform .16s,box-shadow .16s,background .16s,opacity .16s }
.tp-button svg { width:19px;height:19px }
.tp-button:hover:not(:disabled) { transform:translateY(-1px) }
.tp-button:focus-visible { outline:3px solid rgba(18,91,162,.2);outline-offset:2px }
.tp-button:disabled { cursor:wait;opacity:.58 }
.tp-button-primary { color:#fff;background:var(--primary);box-shadow:0 9px 22px rgba(18,91,159,.22) }
.tp-button-primary:hover:not(:disabled) { background:#0e4f8d;box-shadow:0 12px 26px rgba(18,91,159,.27) }
.tp-button-tonal { color:var(--primary);background:var(--primary-soft) }
.tp-button-success { color:#fff;background:var(--green);box-shadow:0 9px 22px rgba(20,122,101,.18) }
.tp-button-danger { color:var(--danger);background:var(--danger-soft);border:1px solid #f0c6cd }

.state-card { min-height:150px;padding:28px;display:grid;place-items:center;align-content:center;gap:11px;color:var(--muted);text-align:center;background:#fff;border:1px solid var(--line);border-radius:24px;box-shadow:0 10px 30px rgba(28,66,104,.06) }
.state-card strong { color:var(--ink);font-size:1rem }
.state-card p { max-width:460px;margin-bottom:0;font-size:.8rem }
.state-icon { width:46px;height:46px;display:grid;place-items:center;color:var(--primary);background:var(--primary-soft);border-radius:50% }
.state-icon svg { width:24px;height:24px }
.state-card.error { color:#7d4b53;background:#fff8f9;border-color:#f0d2d7 }
.state-card.error .state-icon { color:var(--danger);background:var(--danger-soft) }
.spinner { width:34px;height:34px;border:4px solid #dce5e0;border-top-color:var(--primary);border-radius:50%;animation:spin .8s linear infinite }
@keyframes spin { to { transform:rotate(360deg) } }

.progress-shell { padding:22px 24px;background:#fff;border:1px solid var(--line);border-radius:21px;box-shadow:0 10px 28px rgba(28,66,104,.06) }
.progress-copy { margin-bottom:10px;display:flex;justify-content:space-between;gap:16px;color:#506173;font-size:.78rem }
.progress-track { height:8px;overflow:hidden;background:#e7edf4;border-radius:999px }
.progress-value { height:100%;background:linear-gradient(90deg,var(--primary),#3b83be);border-radius:inherit;transition:width .25s }
.progress-value.indeterminate { width:45%!important;animation:progress-slide 1.25s ease-in-out infinite }
@keyframes progress-slide { from { transform:translateX(-110%) } to { transform:translateX(245%) } }

.result-card { padding:18px 20px;display:flex;align-items:flex-start;gap:13px;border-radius:18px;font-size:.8rem;line-height:1.55 }
.result-card svg { width:22px;height:22px;flex:0 0 22px }
.result-card.success { color:#245e51;background:var(--mint);border:1px solid #c9e8de }
.result-card.error { color:#7b3b46;background:var(--danger-soft);border:1px solid #f0cbd1 }

.blazor-error-boundary { padding:18px;color:#7b3b46;background:var(--danger-soft);border-radius:16px }

@media (max-width:720px) {
    .admin-page { gap:24px }
    .page-header { display:block }
    .page-header-aside { margin-top:18px }
    .page-header h1 { font-size:2.35rem }
    .surface-card { padding:22px 18px;border-radius:24px }
    .form-grid { grid-template-columns:1fr }
    .card-actions { display:grid }
    .tp-button { width:100% }
}

@media (prefers-reduced-motion:reduce) {
    *,*::before,*::after { scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important }
}
