:root {
    color-scheme: dark;
    --ink: #ecf7ff;
    --muted: #91a8bc;
    --line: #203247;
    --panel: #101b29;
    --soft: #07111d;
    --primary: #5277ff;
    --primary-dark: #3e60df;
    --accent: #7190ff;
    --danger: #ff7d8b;
    --violet: #9b7bff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: #030509;
}

.login-page {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 20px;
    background: #030509;
}

.login-page::before { content: ''; position: absolute; z-index: -1; width: 360px; height: 1px; background: #4de8d3; opacity: .24; transform: rotate(-28deg); top: 18%; left: -120px; }
.login-page::after { content: ''; position: absolute; z-index: -1; width: 320px; height: 1px; background: #7190ff; opacity: .2; transform: rotate(-28deg); right: -100px; bottom: 22%; }

.mail-scene { position: absolute; z-index: -1; width: 410px; height: 300px; right: 9%; top: 50%; opacity: .56; transform: translateY(-50%); }
.mail-envelope { position: absolute; width: 220px; height: 142px; right: 34px; top: 70px; border: 1px solid rgba(113, 144, 255, .52); border-radius: 10px; background: rgba(8, 18, 32, .52); transform: rotate(-8deg); }
.mail-envelope::before, .mail-envelope::after { content: ''; position: absolute; width: 134px; height: 1px; top: 49px; background: rgba(77, 232, 211, .66); }
.mail-envelope::before { left: -4px; transform: rotate(33deg); transform-origin: left center; }
.mail-envelope::after { right: -4px; transform: rotate(-33deg); transform-origin: right center; }
.mail-envelope span { position: absolute; width: 82px; height: 1px; left: 68px; bottom: 30px; background: rgba(113, 144, 255, .55); }
.mail-message { position: absolute; width: 108px; height: 72px; border: 1px solid rgba(77, 232, 211, .48); border-radius: 8px; background: rgba(7, 16, 29, .65); }
.mail-message::after { content: ''; position: absolute; left: 16px; right: 16px; top: 22px; height: 2px; background: rgba(77, 232, 211, .46); box-shadow: 0 12px 0 rgba(113, 144, 255, .34); }
.message-one { top: 18px; right: 252px; }
.message-two { right: 8px; bottom: 28px; }
.mail-route { position: absolute; left: 30px; right: 0; bottom: 10px; height: 1px; background: rgba(113, 144, 255, .42); transform: rotate(-13deg); transform-origin: left; }
.mail-route i { position: absolute; top: -4px; width: 8px; height: 8px; border: 1px solid #4de8d3; border-radius: 50%; background: #030509; }
.mail-route i:nth-child(1) { left: 18%; }
.mail-route i:nth-child(2) { left: 52%; }
.mail-route i:nth-child(3) { left: 84%; }

.brand-mark {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    margin-bottom: 28px;
    color: var(--ink);
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 0 0 5px rgba(113, 144, 255, .08), 0 12px 30px rgba(113, 144, 255, .2);
    font-weight: 800;
    font-size: 24px;
}

.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 38px; }
.login-brand .eyebrow { margin-bottom: 4px; color: var(--ink); letter-spacing: 1px; }
.brand-subtitle { margin: 0; color: var(--muted); font-size: 13px; }
.accent-label { color: var(--accent); letter-spacing: 1px; }

.eyebrow {
    margin: 0 0 10px;
    color: inherit;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.topbar h1 {
    margin: 0;
}

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(100%, 430px);
    padding: 34px;
    background: #080e17;
    border: 1px solid #24354a;
    border-top: 2px solid var(--violet);
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .56), 0 0 0 1px rgba(77, 232, 211, .035);
}

.login-header h2 {
    margin: 0 0 28px;
    font-size: 30px;
}

.login-header h1 { margin: 0; color: #f5fbff; font-size: 31px; letter-spacing: 0; }
.login-intro { margin: 8px 0 24px; color: var(--muted); line-height: 1.45; font-size: 14px; }

.login-form {
    display: grid;
    gap: 12px;
}

.field-control { position: relative; }
.field-control input { padding-left: 44px; padding-right: 44px; }
.field-icon { position: absolute; z-index: 1; top: 50%; left: 14px; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; pointer-events: none; }
.field-control:focus-within .field-icon { stroke: var(--primary); }
.password-toggle { position: absolute; top: 50%; right: 10px; width: 34px; min-height: 34px; height: 34px; transform: translateY(-50%); padding: 7px; color: var(--muted); background: transparent; box-shadow: none; }
.password-toggle:hover { color: var(--primary); background: transparent; }
.password-toggle svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

label {
    font-weight: 700;
    font-size: 14px;
}

input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 14px;
    font-size: 16px;
    color: var(--ink);
    background: #071019;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .02);
}

input:focus {
    outline: 3px solid rgba(22, 217, 209, 0.14);
    border-color: var(--primary);
}

button {
    min-height: 48px;
    border: 0;
    border-radius: 8px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 10px 26px rgba(82, 119, 255, .24);
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    user-select: none;
}

.login-submit { position: relative; }
.login-submit span:last-child { position: absolute; right: 19px; font-size: 19px; font-weight: 500; }

.login-footer { margin: 26px 0 0; color: var(--muted); text-align: center; font-size: 12px; }

button:hover {
    background: var(--primary-dark);
}

.alert {
    margin-bottom: 18px;
    border: 1px solid #f1b8b0;
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--danger);
    background: #291923;
}

.dashboard-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px 20px;
}

.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    background: #050a11;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 26px 16px 18px;
    border-right: 1px solid #18283a;
    background: #08111d;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 10px 8px;
    font-size: 19px;
    font-weight: 800;
}

.brand-mark.small { width: 38px; height: 38px; margin: 0; font-size: 14px; border-radius: 8px; }
.sidebar-caption { margin: 0 10px 25px; color: #7086a0; font-size: 12px; }
.sidebar-nav { display: grid; gap: 4px; }
.menu-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border: 1px solid transparent; border-radius: 7px; color: #91a5bd; text-decoration: none; font-size: 14px; }
.menu-link:hover { color: #eaf4ff; background: #0f1d2c; }
.menu-link.active { color: #ffffff; border-color: #263c58; background: #14243a; box-shadow: inset 3px 0 #7190ff; }
.menu-icon { position: relative; width: 18px; height: 18px; border: 1.5px solid currentColor; border-radius: 5px; opacity: .9; }
.menu-icon::after { content: ''; position: absolute; width: 5px; height: 5px; right: -3px; top: -3px; border: 1.5px solid currentColor; border-radius: 50%; background: #08111d; }
.sidebar-footer { display: flex; align-items: center; gap: 8px; margin: auto 10px 0; padding-top: 18px; border-top: 1px solid #162538; color: #7890a8; font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #4de8d3; box-shadow: 0 0 0 4px rgba(77, 232, 211, .08); }
.sidebar-backdrop { display: none; }
.mobile-appbar { display: none; }
.admin-content { min-width: 0; max-width: 1680px; width: 100%; margin: 0 auto; padding: 34px clamp(28px, 4vw, 72px) 52px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 0 30px; background: transparent; border: 0; border-radius: 0; }
.topbar-start { display: flex; align-items: center; gap: 16px; }
.topbar .eyebrow { color: #7188a4; margin-bottom: 5px; }
.topbar h1 { color: #f2f7ff; font-size: 28px; }
.menu-toggle { display: none; width: 40px; min-height: 40px; padding: 0; border: 1px solid #29405b; border-radius: 7px; background: #101d2d; box-shadow: none; }
.menu-toggle span { display: block; width: 16px; height: 1.5px; margin: 3px auto; background: #dcecff; }
.logout-button { min-height: 38px; padding: 0 14px; border: 1px solid #29405b; border-radius: 7px; background: transparent; box-shadow: none; color: #c0d0e1; font-size: 13px; }
.logout-button:hover { border-color: #7190ff; color: #ffffff; background: #13233a; }
.admin-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 30px 32px; border: 1px solid #20334b; border-radius: 10px; background: #091522; }
.admin-intro .eyebrow { color: #8199ff; }
.admin-intro h2 { margin: 0; color: #f1f7ff; font-size: 28px; }
.admin-intro p:not(.eyebrow) { margin: 9px 0 0; color: #91a8c0; }
.overview-hero { overflow: hidden; }
.overview-copy { position: relative; }
.overview-meta { position: relative; display: flex; align-items: flex-end; flex-direction: column; gap: 10px; }
.overview-time { color: #7f98b4; font-size: 12px; }
.role-badge { display: inline-flex; align-items: center; gap: 9px; min-height: 34px; padding: 0 12px; border: 1px solid #26405c; border-radius: 999px; color: #bcd0e5; font-size: 12px; font-weight: 700; white-space: nowrap; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.stat-panel { position: relative; min-height: 158px; padding: 21px; overflow: hidden; border: 1px solid #1d3048; border-radius: 9px; background: #091320; }
.stat-panel::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: #5277ff; opacity: .85; }
.stat-panel::after { content: ''; position: absolute; right: 19px; top: 20px; width: 9px; height: 9px; border: 1px solid #7190ff; border-radius: 50%; box-shadow: 0 0 0 5px rgba(113, 144, 255, .06); }
.metric-label { display: block; color: #91a8c0; font-size: 13px; }
.stat-panel strong { display: block; margin-top: 24px; color: #f4f8ff; font-size: 38px; line-height: 1; }
.stat-panel small { display: block; margin-top: 14px; color: #7189a3; font-size: 12px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .8fr); gap: 16px; margin-top: 16px; }
.activity-panel, .quick-panel { padding: 24px; border: 1px solid #1d3048; border-radius: 9px; background: #091320; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-heading .eyebrow, .quick-panel .eyebrow { color: #7188a4; }
.section-heading h2, .quick-panel h2 { margin: 0; color: #edf6ff; font-size: 19px; }
.live-status { display: inline-flex; align-items: center; gap: 7px; color: #a7c9c4; font-size: 12px; }
.live-status i { width: 7px; height: 7px; border-radius: 50%; background: #4de8d3; }
.activity-list { margin-top: 20px; }
.activity-list > div { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 0; border-top: 1px solid #17283b; }
.activity-marker { width: 8px; height: 8px; border-radius: 50%; background: #7190ff; box-shadow: 0 0 0 4px rgba(113, 144, 255, .09); }
.activity-marker.muted { background: #52657a; box-shadow: none; }
.activity-list p { display: grid; gap: 3px; margin: 0; }
.activity-list strong { color: #dce9f5; font-size: 13px; }
.activity-list small, .activity-list time { color: #6f879f; font-size: 12px; }
.quick-panel h2 { margin-bottom: 18px; }
.quick-panel a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; border-top: 1px solid #17283b; color: #b6c9dd; text-decoration: none; font-size: 13px; }
.quick-panel a:hover { color: #ffffff; }
.quick-panel a span { color: #7190ff; font-size: 18px; }

.welcome-panel { margin-top: 20px; padding: 28px; border: 1px solid #1d3048; border-radius: 8px; background: #091320; }
.welcome-panel h2 { margin: 0 0 12px; }
.ghost-button { color: #c0d0e1; background: #13233a; }
.ghost-button:hover { background: #1b3150; }
.action-link { display: inline-flex; align-items: center; text-decoration: none; }

.resource-admin-layout { min-height: 100vh; display: grid; grid-template-columns: 272px minmax(0, 1fr); background: #050a11; }
.resource-shell { min-width: 0; min-height: 100vh; padding: 34px clamp(20px, 4vw, 72px) 56px; background: #050a11; }
.resource-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; max-width: 1680px; margin: 0 auto 26px; }
.resource-header h1 { margin: 0; color: #eff6ff; font-size: 30px; }
.resource-header .eyebrow { color: #7190ff; }
.resource-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.back-link { display: inline-block; margin-bottom: 16px; color: #9eb4cd; text-decoration: none; font-size: 13px; }
.back-link:hover { color: #ffffff; }
.resource-status { display: inline-flex; align-items: center; gap: 9px; min-height: 34px; padding: 0 12px; border: 1px solid #2c4260; border-radius: 999px; color: #9bb4cd; background: #0a1624; font-size: 12px; }
.resource-create { min-height: 40px; padding: 0 15px; border: 1px solid #6f8cff; border-radius: 7px; background: #5277ff; color: #ffffff; box-shadow: 0 10px 22px rgba(82, 119, 255, .2); font-size: 13px; }
.resource-create:hover { background: #3e60df; }
.resource-import { min-height: 40px; padding: 0 14px; border: 1px solid #315170; border-radius: 7px; color: #c8daeb; background: #0b1827; box-shadow: none; font-size: 13px; }
.resource-import:hover { border-color: #6686bb; color: #ffffff; background: #14243a; }
.resource-notice { max-width: 1680px; margin: 0 auto 16px; padding: 12px 14px; border: 1px solid rgba(77, 232, 211, .35); border-radius: 7px; color: #b7e8e2; background: rgba(77, 232, 211, .08); font-size: 13px; }
.toast-notification { position: fixed; z-index: 50; top: 24px; left: 50%; display: flex; align-items: center; gap: 12px; width: min(440px, calc(100vw - 32px)); padding: 14px 16px; border: 1px solid #315a7a; border-radius: 9px; color: #eaf7ff; background: #0b1a2a; box-shadow: 0 18px 48px rgba(0, 0, 0, .4); transform: translateX(-50%); transition: opacity .22s ease, transform .22s ease; }
.toast-notification.is-success { border-color: rgba(68, 221, 188, .55); }
.toast-notification.is-error { border-color: rgba(247, 112, 131, .62); background: #25131d; }
.toast-notification.is-leaving { opacity: 0; transform: translate(-50%, -10px); }
.toast-symbol { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: #08221e; background: #4de8d3; font-size: 16px; font-weight: 900; }
.is-error .toast-symbol { color: #ffffff; background: #e45a72; }
.toast-notification strong { display: block; font-size: 13px; }
.toast-notification p { margin: 3px 0 0; color: #a7bbcf; font-size: 12px; line-height: 1.45; }
.is-error p { color: #f1bbc7; }
.bulk-import-panel { display: grid; grid-template-columns: minmax(250px, .82fr) minmax(390px, 1.18fr); gap: 32px; max-width: 1680px; margin: 0 auto 16px; padding: 28px; border: 1px solid #304866; border-radius: 11px; background: #0b1727; box-shadow: inset 0 1px 0 rgba(113, 144, 255, .1); }
.modal-bulk-panel { display: block; width: 100%; margin: 0; padding: 32px 34px; border-color: #365476; box-shadow: inset 0 2px 0 #5277ff, 0 28px 90px rgba(0, 0, 0, .46); }
.bulk-import-content { display: grid; grid-template-columns: minmax(240px, .72fr) minmax(460px, 1.28fr); gap: 34px; padding-top: 24px; }
.bulk-import-copy .eyebrow { color: #7190ff; }
.bulk-import-copy h2, .bulk-import-copy h3 { margin: 0; color: #eff6ff; font-size: 21px; }
.bulk-import-copy { position: relative; padding: 8px 34px 8px 0; border-right: 1px solid #294363; }
.bulk-import-copy::before { content: ''; position: absolute; top: 8px; left: -1px; width: 3px; height: 88px; background: #5277ff; }
.bulk-step { margin: 0 0 12px; color: #7794ff; font-size: 11px; font-weight: 800; letter-spacing: .7px; }
.bulk-import-copy p:not(.eyebrow):not(.bulk-step) { margin: 10px 0 16px; color: #90a7c0; font-size: 13px; line-height: 1.5; }
.bulk-import-copy .bulk-step + h3 + p { margin-bottom: 18px; }
.bulk-import-copy code { display: block; width: 100%; padding: 11px 12px; overflow: visible; border: 1px solid #2c4770; border-radius: 6px; color: #c2d2ff; background: #07101a; font-size: 12px; line-height: 1.55; white-space: normal; overflow-wrap: anywhere; }
.import-count { display: block; margin-top: 14px; color: #7c96b5; font-size: 12px; }
.bulk-import-form { display: grid; grid-template-columns: 1fr; gap: 12px; align-content: start; }
.bulk-import-form select, .bulk-import-form textarea { width: 100%; border: 1px solid #2a405e; border-radius: 7px; padding: 11px; color: #eaf4ff; background: #07101a; font: inherit; font-size: 13px; }
.bulk-import-form select { min-height: 44px; }
.bulk-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.bulk-list-heading .form-label { margin: 0; }
.bulk-list-heading span { padding: 4px 8px; border: 1px solid #2d4767; border-radius: 999px; color: #8ba8c6; font-size: 11px; white-space: nowrap; }
.bulk-import-form textarea { min-height: 330px; max-height: min(52dvh, 560px); resize: vertical; line-height: 1.6; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025); }
.bulk-import-form textarea:focus, .bulk-import-form select:focus { outline: 3px solid rgba(82, 119, 255, .16); border-color: #7190ff; }
.bulk-import-form .bulk-submit { width: 100%; min-height: 54px; margin: 4px 0 0; border: 1px solid #7894ff; background: #456af4; box-shadow: 0 14px 28px rgba(69, 106, 244, .28); font-size: 16px; }
.bulk-import-form .bulk-submit:hover { background: #385de0; box-shadow: 0 18px 32px rgba(69, 106, 244, .36); transform: translateY(-1px); }
.resource-grid { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 16px; max-width: 1680px; margin: 0 auto; }
.resource-grid.single { grid-template-columns: minmax(0, 1fr); }
.resource-form-panel, .resource-table-panel { border: 1px solid #1d3048; border-radius: 9px; background: #091320; }
.resource-form-panel { align-self: start; padding: 24px; }
.resource-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: auto; border: 0; border-radius: 10px; color: #eaf4ff; background: transparent; box-shadow: 0 28px 90px rgba(0, 0, 0, .62); }
.resource-dialog-wide { width: min(920px, calc(100vw - 32px)); }
.resource-dialog::backdrop { background: rgba(1, 6, 12, .78); backdrop-filter: blur(6px); }
.modal-form-panel { width: 100%; padding: 28px; border-color: #2b4565; box-shadow: inset 0 1px 0 rgba(113, 144, 255, .14); }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid #294363; }
.modal-heading h2 { font-size: 27px; }
.modal-close { min-height: 38px; padding: 0 14px; border: 1px solid #40638a; border-radius: 7px; color: #c7d9eb; background: #0b1828; box-shadow: none; font-size: 13px; }
.modal-close:hover { border-color: #6f91ba; color: #ffffff; background: #162a42; }
.modal-error-report { margin-top: 18px; padding: 13px 14px; border: 1px solid rgba(228, 90, 114, .52); border-radius: 7px; color: #ffd4db; background: rgba(228, 90, 114, .1); }
.modal-error-report strong { font-size: 13px; }
.modal-error-report p { margin: 4px 0 0; color: #edb1bd; font-size: 12px; line-height: 1.45; }
.resource-form-panel .eyebrow, .resource-table-heading .eyebrow { color: #7188a4; }
.resource-form-panel h2, .resource-table-heading h2 { margin: 0; color: #ecf4ff; font-size: 20px; }
.resource-form { display: grid; gap: 12px; margin-top: 22px; }
.resource-form input, .resource-form select, .table-actions input, .table-actions select { width: 100%; min-height: 42px; border: 1px solid #253b56; border-radius: 7px; padding: 0 11px; color: #eaf4ff; background: #07101a; font: inherit; font-size: 13px; }
.resource-form input[readonly] { color: #9eb9d7; border-color: #314b6d; background: #0d1a2b; cursor: default; }
.form-label { margin: 3px 0 -6px; color: #91a9c4; font-size: 12px; font-weight: 700; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-row > div { display: grid; gap: 6px; }
.same-user-control { display: flex; align-items: center; gap: 11px; min-height: 58px; padding: 10px 12px; border: 1px solid #294362; border-radius: 8px; color: #d8e8f7; background: #0b1828; cursor: pointer; }
.same-user-control:hover { border-color: #5277ff; background: #0d1c2e; }
.same-user-control input { position: absolute; width: 1px; min-height: 1px; padding: 0; opacity: 0; pointer-events: none; }
.switch-track { position: relative; flex: 0 0 36px; width: 36px; height: 20px; border: 1px solid #49617d; border-radius: 999px; background: #18263a; transition: background .18s ease, border-color .18s ease; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #92a9c1; transition: transform .18s ease, background .18s ease; }
.same-user-control input:checked + .switch-track { border-color: #617fff; background: #5277ff; }
.same-user-control input:checked + .switch-track::after { transform: translateX(16px); background: #ffffff; }
.same-user-control input:focus-visible + .switch-track { outline: 3px solid rgba(82, 119, 255, .27); outline-offset: 2px; }
.same-user-control strong, .same-user-control small { display: block; }
.same-user-control strong { color: #eaf4ff; font-size: 12px; }
.same-user-control small { margin-top: 3px; color: #7f98b5; font-size: 11px; line-height: 1.3; }
.bulk-same-user { grid-column: 1 / -1; min-height: 54px; }
.provider-note { margin: 1px 0 4px; padding: 10px; border-left: 2px solid #7190ff; color: #9db4cc; background: #0a1727; font-size: 12px; line-height: 1.5; }
.resource-form input:focus, .resource-form select:focus, .table-actions input:focus, .table-actions select:focus { outline: 3px solid rgba(82, 119, 255, .16); border-color: #7190ff; }
.resource-primary { min-height: 43px; margin-top: 4px; border-radius: 7px; background: #5277ff; color: #fff; }
.resource-primary:hover { background: #3e60df; }
.resource-table-panel { min-width: 0; }
.resource-table-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; border-bottom: 1px solid #1d3048; }
.table-tools { display: flex; align-items: center; gap: 10px; }
.table-search { width: min(220px, 32vw); min-height: 36px; border: 1px solid #29405b; border-radius: 6px; padding: 0 10px; color: #eaf4ff; background: #07101a; font-size: 12px; }
.table-search:focus { outline: 3px solid rgba(82, 119, 255, .16); border-color: #7190ff; }
.resource-table-heading span { padding: 5px 9px; border: 1px solid #29405b; border-radius: 999px; color: #91a8c0; font-size: 12px; }
.resource-table-wrap { overflow-x: auto; }
.resource-table-wrap table { width: 100%; min-width: 720px; border-collapse: collapse; }
.resource-table-wrap th { padding: 13px 18px; color: #7087a0; text-align: left; text-transform: uppercase; font-size: 10px; letter-spacing: .7px; }
.resource-table-wrap td { padding: 14px 18px; border-top: 1px solid #17283b; color: #b8cadb; font-size: 13px; vertical-align: middle; }
.resource-table-wrap td strong { color: #eaf3ff; }
.empty-row td { padding: 0; }
.empty-state { display: grid; justify-items: center; gap: 8px; min-height: 285px; padding: 70px 22px 30px; color: #8095ad; text-align: center; }
.empty-icon { position: relative; width: 58px; height: 42px; margin-bottom: 8px; border: 1px solid #3d5f86; border-radius: 7px; background: #0a1727; }
.empty-icon::before, .empty-icon::after { content: ''; position: absolute; top: 14px; width: 34px; height: 1px; background: #7190ff; }
.empty-icon::before { left: -1px; transform: rotate(33deg); transform-origin: left; }
.empty-icon::after { right: -1px; transform: rotate(-33deg); transform-origin: right; }
.empty-state strong { color: #dbeaff; font-size: 15px; }
.empty-state p { max-width: 260px; margin: 0; font-size: 12px; line-height: 1.55; }
.table-actions { display: flex; align-items: center; gap: 7px; min-width: 190px; }
.table-actions form { display: flex; align-items: center; gap: 7px; }
.table-actions input, .table-actions select { min-height: 33px; min-width: 95px; padding-inline: 8px; }
.table-button { min-height: 33px; padding: 0 10px; border: 1px solid #304a69; border-radius: 6px; background: #13233a; color: #d7e7f7; box-shadow: none; font-size: 12px; }
.table-button:hover { background: #1b3150; }
.table-button.danger { border-color: #5a3245; color: #f1b5c3; background: transparent; }
.table-button.danger:hover { background: #351924; }
.webmail-link { color: #9bb7ff; text-decoration: none; font-size: 12px; white-space: nowrap; }
.webmail-link:hover { color: #ffffff; text-decoration: underline; }
.password-editor { position: relative; }
.password-editor summary { color: #91b9ff; cursor: pointer; font-size: 12px; white-space: nowrap; }
.password-editor[open] { position: absolute; z-index: 2; right: 16px; width: 276px; margin-top: -2px; padding: 12px; border: 1px solid #2d4565; border-radius: 8px; background: #0b1624; box-shadow: 0 18px 36px rgba(0, 0, 0, .35); }
.password-editor form { display: grid; gap: 8px; margin-top: 10px; }
.password-editor input { width: 100%; min-height: 36px; border: 1px solid #29405b; border-radius: 6px; padding: 0 9px; color: #eaf4ff; background: #07101a; font-size: 12px; }

@media (max-width: 1080px) {
    .admin-layout { grid-template-columns: 232px minmax(0, 1fr); }
    .admin-sidebar { padding-inline: 12px; }
    .admin-content { padding-inline: 28px; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-grid { grid-template-columns: 1fr; }
    .resource-grid { grid-template-columns: 1fr; }
    .resource-admin-layout { grid-template-columns: 232px minmax(0, 1fr); }
    .bulk-import-panel, .bulk-import-content { grid-template-columns: 1fr; gap: 18px; }
    .bulk-import-copy { padding: 0 0 18px 14px; border-right: 0; border-bottom: 1px solid #294363; }
    .bulk-import-copy::before { top: 0; left: 0; }
}

@media (max-width: 760px) {
    .admin-layout { display: block; }
    .resource-admin-layout { display: block; }
    .admin-sidebar { position: fixed; z-index: 30; top: 0; left: 0; width: min(274px, 88vw); height: 100dvh; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 16px 0 40px rgba(0, 0, 0, .34); }
    .menu-open .admin-sidebar { transform: translateX(0); }
    .sidebar-backdrop { position: fixed; z-index: 29; inset: 0; display: none; padding: 0; border: 0; border-radius: 0; background: rgba(0, 0, 0, .58); }
    .menu-open .sidebar-backdrop { display: block; }
    .mobile-appbar { position: fixed; z-index: 20; top: 0; right: 0; left: 0; display: flex; align-items: center; justify-content: space-between; height: 62px; padding: 0 14px; border-bottom: 1px solid #1d3048; background: rgba(8, 17, 29, .96); box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
    .mobile-menu-toggle { width: 38px; min-height: 38px; padding: 0; border: 1px solid #29405b; border-radius: 7px; background: #101d2d; box-shadow: none; }
    .mobile-menu-toggle span { display: block; width: 16px; height: 1.5px; margin: 3px auto; background: #dcecff; }
    .mobile-brand { display: inline-flex; align-items: center; gap: 8px; color: #eef6ff; text-decoration: none; font-size: 15px; font-weight: 800; }
    .mobile-brand .brand-mark.small { width: 30px; height: 30px; font-size: 11px; }
    .mobile-logout { min-height: 34px; padding: 0 10px; border: 1px solid #2c4260; border-radius: 6px; color: #c1d1e2; background: transparent; box-shadow: none; font-size: 12px; }
    .mobile-logout:hover { background: #14243a; }
    .admin-content { padding: 82px 18px 34px; }
    .menu-toggle { display: grid; place-content: center; }
    .topbar { padding-bottom: 22px; }
    .topbar .menu-toggle { display: none; }
    .topbar h1 { font-size: 22px; }
    .logout-button { min-height: 36px; padding-inline: 10px; font-size: 12px; }
    .admin-intro { align-items: flex-start; flex-direction: column; padding: 22px; }
    .admin-intro h2 { font-size: 22px; }
    .role-badge { min-height: 30px; }
    .resource-shell { min-height: 100dvh; padding: 82px 16px 36px; }
    .resource-header { align-items: flex-start; flex-direction: column-reverse; gap: 13px; margin-bottom: 20px; }
    .resource-header-actions { width: 100%; justify-content: space-between; }
    .resource-header h1 { font-size: 25px; }
    .resource-form-panel { padding: 20px; }
    .resource-dialog { width: min(100vw - 24px, 640px); max-height: calc(100dvh - 24px); }
    .modal-form-panel { padding: 20px; }
    .resource-table-heading { padding: 19px; }
    .table-tools { align-items: flex-end; flex-direction: column; }
    .table-search { width: 160px; }
    .bulk-import-panel { padding: 20px; }
    .bulk-import-form { grid-template-columns: 1fr; }
    .bulk-import-form .resource-primary { width: 100%; }
    .resource-status { display: none; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .login-panel { padding: 28px 22px; }
    .login-brand { margin-bottom: 38px; }

    .topbar-start { gap: 10px; }
    .topbar .eyebrow { font-size: 10px; }
    .logout-button { font-size: 0; width: 38px; padding: 0; }
    .logout-button::after { content: 'x'; font-size: 17px; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-panel { min-height: 130px; padding: 16px; }
    .stat-panel strong { font-size: 28px; }
    .activity-panel, .quick-panel { padding: 18px; }
    .activity-list > div { grid-template-columns: 9px minmax(0, 1fr); }
    .activity-list time { grid-column: 2; }
    .mail-scene { right: -210px; opacity: .45; }
}
