:root {
    color-scheme: dark;
    --bg: #070707;
    --surface: #0d0d0e;
    --surface-2: #141415;
    --surface-3: #1a1a1c;
    --line: #29292c;
    --line-soft: #1d1d1f;
    --text: #f4f2f2;
    --muted: #8b898d;
    --red: #ef2b35;
    --red-bright: #ff3b45;
    --red-dark: #8e1118;
    --green: #39d98a;
    --shadow: 0 24px 70px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; font-family: "DM Sans", sans-serif; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button { color: inherit; }
button svg { display: block; flex: 0 0 auto; }
svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .025; z-index: 10; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font: 800 14px/1 "Manrope", sans-serif; letter-spacing: .12em; }
.brand > span:last-child > span { color: var(--red); }
.brand-mark { display: grid; grid-template-columns: repeat(3, 4px); gap: 3px; align-items: end; width: 24px; height: 24px; padding: 4px; background: var(--red); border-radius: 6px; box-shadow: 0 0 25px rgba(239, 43, 53, .25); }
.brand-mark i { display: block; background: white; border-radius: 2px; }
.brand-mark i:nth-child(1) { height: 7px; }
.brand-mark i:nth-child(2) { height: 14px; }
.brand-mark i:nth-child(3) { height: 10px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--red-bright); text-transform: uppercase; letter-spacing: .16em; font-size: 11px; font-weight: 700; }
.eyebrow i { width: 19px; height: 1px; background: var(--red); }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(400px, 1.12fr) minmax(440px, .88fr); }
.login-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: 52px clamp(48px, 7vw, 112px); border-right: 1px solid var(--line-soft); background: radial-gradient(circle at 18% 72%, rgba(180, 16, 25, .22), transparent 32%), linear-gradient(135deg, #0b0b0c 0%, #070707 70%); }
.login-brand::before { content: ""; position: absolute; width: 520px; height: 520px; right: -250px; top: 15%; border: 1px solid rgba(239,43,53,.12); border-radius: 50%; box-shadow: 0 0 0 70px rgba(239,43,53,.018), 0 0 0 140px rgba(239,43,53,.015); }
.login-brand::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,.018) 35.2%, transparent 35.4%); pointer-events: none; }
.brand-message { position: relative; z-index: 1; width: 100%; max-width: 720px; }
.brand-message h1 { margin: 22px 0 24px; font: 800 clamp(46px, 5vw, 74px)/1.08 "Manrope", sans-serif; letter-spacing: -.045em; }
.brand-message h1 em { display: inline-block; margin-top: .08em; color: transparent; font-family: "DM Sans", sans-serif; font-size: .92em; font-weight: 500; font-style: normal; line-height: 1.14; letter-spacing: -.025em; -webkit-text-stroke: 1px rgba(255,255,255,.38); }
.brand-message p { max-width: 570px; margin: 0; color: #a2a0a4; font-size: 17px; line-height: 1.7; }
.login-brand footer { color: #57565a; font-size: 12px; letter-spacing: .06em; }
.login-panel { display: grid; place-items: center; padding: 40px; background: #09090a; }
.login-card { width: min(410px, 100%); }
.mobile-brand { display: none; margin-bottom: 60px; }
.login-card h2 { margin: 14px 0 8px; font: 700 34px/1.2 "Manrope", sans-serif; letter-spacing: -.035em; }
.form-copy { margin: 0 0 38px; color: var(--muted); line-height: 1.6; }
.field { display: grid; gap: 9px; margin: 0 0 20px; }
.field > span:first-child { color: #c3c1c3; font-size: 12px; font-weight: 600; letter-spacing: .025em; }
.input-wrap { min-height: 52px; display: flex; align-items: center; gap: 11px; padding: 0 15px; border: 1px solid var(--line); border-radius: 9px; background: #101011; transition: border .2s, box-shadow .2s, background .2s; }
.input-wrap:focus-within { border-color: rgba(239,43,53,.75); background: #121213; box-shadow: 0 0 0 3px rgba(239,43,53,.09); }
.input-wrap > svg { width: 18px; color: #66656a; }
.input-wrap input { width: 100%; height: 50px; border: 0; outline: 0; background: transparent; color: var(--text); }
.input-wrap input::placeholder { color: #4f4e52; }
.icon-button, .menu-button, .modal-close { padding: 0; border: 0; background: transparent; cursor: pointer; color: #706f73; }
.icon-button { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 7px; }
.icon-button svg { width: 17px; }
.icon-button:hover, .modal-close:hover { color: var(--text); }
.form-error { min-height: 20px; margin: -5px 0 10px; color: #ff6870; font-size: 12px; }
.primary-button, .secondary-button { min-height: 48px; display: inline-flex; justify-content: center; align-items: center; gap: 10px; border-radius: 8px; border: 1px solid transparent; padding: 0 19px; font-weight: 700; cursor: pointer; transition: transform .18s, background .18s, border-color .18s, opacity .18s; }
.primary-button { width: 100%; background: var(--red); color: white; box-shadow: 0 10px 30px rgba(239,43,53,.16); }
.primary-button:hover { background: var(--red-bright); transform: translateY(-1px); }
.primary-button:disabled { opacity: .55; cursor: wait; transform: none; }
.primary-button svg { width: 18px; }
.primary-button.compact { width: auto; min-height: 42px; font-size: 13px; }
.secondary-button { min-height: 42px; background: var(--surface-2); border-color: var(--line); color: #d3d1d3; font-size: 13px; }
.secondary-button:hover { border-color: #48474b; background: #1a1a1c; }
.access-note { margin: 25px 0 0; text-align: center; color: #5e5d61; font-size: 11px; text-transform: uppercase; letter-spacing: .09em; }
.access-note span { color: var(--red); margin-right: 5px; }

.dashboard { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; background: #09090a; }
.sidebar { position: fixed; z-index: 5; inset: 0 auto 0 0; width: 250px; display: flex; flex-direction: column; padding: 30px 20px 22px; background: #0b0b0c; border-right: 1px solid var(--line-soft); }
.sidebar-brand { padding: 0 10px 35px; }
.sidebar nav p { margin: 8px 12px 10px; color: #4e4d51; font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 13px; min-height: 45px; margin: 3px 0; padding: 0 13px; border: 0; border-radius: 7px; background: transparent; color: #79787c; cursor: pointer; text-align: left; font-size: 13px; font-weight: 600; transition: .18s; }
.nav-item svg { width: 18px; }
.nav-item:hover { background: #131315; color: #c9c7ca; }
.nav-item.active { color: white; background: linear-gradient(90deg, rgba(239,43,53,.18), rgba(239,43,53,.045)); box-shadow: inset 2px 0 var(--red); }
.nav-item.active svg { color: var(--red-bright); }
.sidebar-bottom { margin-top: auto; }
.security-chip { display: flex; align-items: center; gap: 11px; padding: 14px; margin-bottom: 8px; border: 1px solid #202022; border-radius: 8px; background: #0e0e0f; }
.security-chip > span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgba(57,217,138,.55); }
.security-chip div { display: grid; gap: 2px; }
.security-chip strong { font-size: 11px; }
.security-chip small { color: #5b5a5e; font-size: 10px; }
.logout-button { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 12px; padding: 0 13px; border: 0; border-radius: 7px; background: transparent; color: #666569; cursor: pointer; font-size: 12px; }
.logout-button:hover { color: #e8646b; background: rgba(239,43,53,.06); }
.logout-button svg { width: 17px; }
.workspace { grid-column: 2; min-width: 0; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 4vw, 54px); border-bottom: 1px solid var(--line-soft); background: rgba(10,10,11,.86); backdrop-filter: blur(16px); }
.topbar-title { display: grid; gap: 3px; }
.topbar-title span { color: #555458; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; }
.topbar-title strong { font: 700 14px "Manrope", sans-serif; }
.profile { display: flex; align-items: center; gap: 13px; }
.profile-trigger { padding: 6px 7px; border: 1px solid transparent; border-radius: 9px; background: transparent; cursor: pointer; text-align: right; transition: background .18s, border-color .18s; }
.profile-trigger:hover { border-color: var(--line); background: #111113; }
.profile-copy { display: grid; justify-items: end; gap: 2px; }
.profile-copy strong { font-size: 12px; }
.profile-copy span { color: #68676b; font-size: 10px; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(239,43,53,.36); border-radius: 8px; background: rgba(239,43,53,.1); color: #ff7178; font-size: 11px; font-weight: 800; }
.menu-button { display: none; width: 36px; height: 36px; }
.menu-button span { display: block; width: 19px; height: 1px; margin: 5px auto; background: white; }
.content { padding: 42px clamp(24px, 4vw, 54px) 60px; max-width: 1500px; margin: 0 auto; }
.page-section { display: none; animation: fadeIn .25s ease; }
.page-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 32px; }
.page-heading h1 { margin: 10px 0 5px; font: 700 clamp(29px, 3vw, 38px)/1.15 "Manrope", sans-serif; letter-spacing: -.035em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.heading-actions { display: flex; gap: 10px; }
.heading-actions svg { width: 17px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.stat-card { position: relative; overflow: hidden; min-height: 145px; display: flex; align-items: center; gap: 18px; padding: 26px; border: 1px solid var(--line-soft); border-radius: 11px; background: var(--surface); }
.stat-card::after { content: ""; position: absolute; width: 100px; height: 100px; right: -45px; top: -45px; border: 1px solid #242426; border-radius: 50%; }
.stat-card.accent { background: linear-gradient(135deg, rgba(239,43,53,.12), #0d0d0e 54%); border-color: rgba(239,43,53,.21); }
.stat-icon { width: 47px; height: 47px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #2a292c; border-radius: 9px; background: #151517; color: #939195; }
.accent .stat-icon { color: var(--red-bright); border-color: rgba(239,43,53,.25); background: rgba(239,43,53,.08); }
.stat-card > div:last-child { display: grid; gap: 4px; }
.stat-card span { color: #777579; font-size: 11px; }
.stat-card strong { font: 700 30px "Manrope", sans-serif; letter-spacing: -.03em; }
.stat-card small { color: #555458; font-size: 10px; }
.stat-card .status-word { color: #e8e6e7; font-size: 22px; }
.live-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--green); }
.dashboard-grid { display: grid; grid-template-columns: 1.45fr .8fr; gap: 14px; }
.panel-card { border: 1px solid var(--line-soft); border-radius: 11px; background: var(--surface); box-shadow: 0 12px 35px rgba(0,0,0,.1); }
.panel-card > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 25px 18px; }
.panel-card h2 { margin: 4px 0 0; font: 700 16px "Manrope", sans-serif; }
.panel-kicker { color: var(--red); font-size: 9px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.text-button { border: 0; background: transparent; color: #716f73; font-size: 11px; cursor: pointer; }
.text-button:hover { color: var(--red-bright); }
.account-list { min-height: 230px; padding: 0 25px 22px; }
.account-row { display: flex; align-items: center; gap: 13px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.account-symbol { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: #171719; color: #a09ea2; }
.account-symbol svg { width: 17px; }
.account-copy { min-width: 0; display: grid; gap: 3px; }
.account-copy strong { overflow: hidden; text-overflow: ellipsis; font-size: 12px; white-space: nowrap; }
.account-copy span { color: #555458; font-size: 10px; }
.account-state { margin-left: auto; display: flex; align-items: center; gap: 6px; color: #6d6b6f; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.account-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.security-list { padding: 3px 25px 24px; }
.security-list > div { display: flex; gap: 12px; padding: 15px 0; border-top: 1px solid var(--line-soft); }
.check { width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: rgba(57,217,138,.08); color: var(--green); font-size: 10px; }
.security-list p { display: grid; gap: 4px; margin: 0; }
.security-list strong { font-size: 11px; }
.security-list small { color: #5b5a5e; font-size: 10px; line-height: 1.5; }
.empty-state { min-height: 190px; display: grid; place-items: center; align-content: center; gap: 8px; color: #656468; text-align: center; font-size: 12px; }
.empty-state svg { width: 28px; color: #3d3c40; }
.empty-state strong { color: #949296; }
.loading-block { background: linear-gradient(90deg, transparent, rgba(255,255,255,.018), transparent); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.table-card { overflow: hidden; }
.table-toolbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 22px; border-bottom: 1px solid var(--line-soft); }
.search-box { width: min(340px, 100%); display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 13px; border: 1px solid var(--line); border-radius: 7px; background: #101011; }
.search-box svg { width: 16px; color: #5d5b60; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: white; font-size: 12px; }
.result-count { color: #5c5b5f; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 940px; }
th { padding: 13px 22px; color: #57565a; background: #101011; font-size: 9px; text-align: left; text-transform: uppercase; letter-spacing: .12em; }
td { padding: 16px 22px; border-top: 1px solid var(--line-soft); color: #9a989c; font-size: 12px; }
tbody tr:hover { background: rgba(255,255,255,.012); }
.user-cell { display: flex; align-items: center; gap: 11px; }
.mini-avatar { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 8px; background: #1a1a1c; color: #d4d1d3; font-size: 10px; font-weight: 700; }
.user-cell-copy { min-width: 0; display: grid; gap: 2px; }
.user-cell strong { color: #d8d6d8; font-weight: 600; }
.user-cell small { overflow: hidden; color: #5f5d61; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 23px; padding: 0 9px; border: 1px solid #2b2a2d; border-radius: 99px; color: #777579; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; }
.badge.admin { border-color: rgba(239,43,53,.25); background: rgba(239,43,53,.07); color: #ed777d; }
.badge.active::before, .badge.suspended::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.badge.suspended::before { background: #777579; }
.badge.expired { border-color: rgba(239,43,53,.3); background: rgba(239,43,53,.07); color: #e46a70; }
.badge.expired::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; }
.row-action { padding: 7px 8px; border: 0; border-radius: 6px; background: transparent; color: #777579; cursor: pointer; font-size: 10px; white-space: nowrap; }
.row-action:hover { color: var(--red-bright); }
.row-action.access-action { color: #d7767b; background: rgba(239,43,53,.07); }
.row-action.access-action:hover { color: white; background: var(--red); }
.access-time { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border: 1px solid #29282b; border-radius: 99px; color: #98969a; background: #121214; font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.access-time.permanent { color: #666469; }
.access-time.expired { border-color: rgba(239,43,53,.28); color: #ea7379; background: rgba(239,43,53,.06); }
.accounts-directory { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; padding: 20px; }
.directory-card { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line-soft); border-radius: 9px; background: #101011; }
.directory-card .account-symbol { width: 42px; height: 42px; }
.directory-card .account-state { margin-left: auto; }

.modal { width: min(470px, calc(100% - 32px)); padding: 0; border: 1px solid #2d2c2f; border-radius: 12px; background: #0d0d0e; color: var(--text); box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(0,0,0,.76); backdrop-filter: blur(5px); }
.modal form { padding: 27px; }
.modal header { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.modal h2 { margin: 8px 0 5px; font: 700 24px "Manrope", sans-serif; }
.modal header p { margin: 0; color: var(--muted); font-size: 12px; }
.modal-close { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 7px; font-size: 27px; font-weight: 300; line-height: 1; }
.modal footer { display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; }
.duration-control { min-height: 48px; display: grid; grid-template-columns: minmax(90px, .7fr) minmax(130px, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #101011; }
.duration-control:focus-within { border-color: rgba(239,43,53,.75); box-shadow: 0 0 0 3px rgba(239,43,53,.09); }
.duration-control input, .duration-control select { min-width: 0; height: 46px; border: 0; outline: 0; background: transparent; color: var(--text); }
.duration-control input { padding: 0 15px; }
.duration-control select { padding: 0 36px 0 14px; border-left: 1px solid var(--line); cursor: pointer; color-scheme: dark; }
.field > small { color: #57565a; font-size: 9px; line-height: 1.5; }
.access-dialog { width: min(520px, calc(100% - 32px)); }
.access-dialog form { padding: 27px; }
.access-dialog header .modal-close svg { width: 17px; }
.access-user-summary { display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 12px; margin: -4px 0 22px; padding: 14px; border: 1px solid var(--line-soft); border-radius: 9px; background: #101011; }
.access-user-summary .mini-avatar { width: 42px; height: 42px; grid-row: 1 / span 2; }
.access-user-summary > div { min-width: 0; display: grid; gap: 3px; }
.access-user-summary strong, .access-user-summary > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access-user-summary strong { font-size: 12px; }
.access-user-summary > div span { color: #5f5d61; font-size: 9px; }
.access-current-state { grid-column: 2; color: #9b999d; font-size: 10px; font-variant-numeric: tabular-nums; }
.access-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: -3px 0 18px; }
.access-presets button { min-height: 29px; padding: 0 10px; border: 1px solid #2a292c; border-radius: 99px; background: #131315; color: #777579; cursor: pointer; font-size: 9px; }
.access-presets button:hover { border-color: rgba(239,43,53,.4); color: #ef777d; }
.access-preview { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 13px; padding: 13px 14px; border: 1px solid rgba(239,43,53,.16); border-radius: 8px; background: rgba(239,43,53,.045); }
.access-preview span { color: #6c6a6e; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; }
.access-preview strong { color: #d5d2d4; font-size: 10px; text-align: right; }
.profile-dialog { width: min(620px, calc(100% - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.profile-modal-content { padding: 28px; }
.profile-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: 0 0 22px !important; }
.profile-dialog-header h2 { margin: 7px 0 5px; }
.profile-dialog-header p { margin: 0; color: var(--muted); font-size: 12px; }
.profile-dialog-header .modal-close { border: 1px solid transparent; }
.profile-dialog-header .modal-close:hover { border-color: var(--line); background: #151517; }
.profile-dialog-header .modal-close svg { width: 17px; }
.profile-identity { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 13px; margin-bottom: 24px; padding: 15px; border: 1px solid var(--line-soft); border-radius: 10px; background: #101011; }
.profile-large-avatar { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(239,43,53,.32); border-radius: 10px; background: rgba(239,43,53,.09); color: #ff7178; font-size: 12px; font-weight: 800; }
.profile-identity > div { min-width: 0; display: grid; gap: 3px; }
.profile-identity strong, .profile-identity > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-identity strong { font-size: 13px; }
.profile-identity > div span { color: #6c6a6e; font-size: 10px; }
.profile-role { min-height: 24px; display: inline-flex; align-items: center; padding: 0 9px; border: 1px solid rgba(239,43,53,.24); border-radius: 99px; background: rgba(239,43,53,.06); color: #dc686e; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.profile-form { margin: 0; }
.profile-section-heading { margin-bottom: 17px; }
.profile-section-heading > div { display: grid; gap: 4px; }
.profile-section-heading strong { font: 700 14px "Manrope", sans-serif; }
.profile-section-heading span { color: #676569; font-size: 10px; line-height: 1.5; }
.profile-form .field { margin-bottom: 14px; }
.profile-form .field small { color: #57565a; font-size: 9px; line-height: 1.5; }
.profile-form .input-wrap { min-height: 46px; }
.profile-form .input-wrap input { height: 44px; font-size: 12px; }
.profile-form-actions { display: flex; justify-content: flex-end; padding-top: 2px; }
.profile-form-actions .primary-button, .profile-form-actions .secondary-button { width: auto; min-width: 150px; }
.profile-divider { height: 1px; margin: 24px 0; background: var(--line-soft); }
.profile-password-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.profile-feedback { min-height: 18px; margin: 17px 0 0; padding-top: 14px; border-top: 1px solid var(--line-soft); color: #777579; font-size: 11px; text-align: center; }
.profile-feedback:empty { display: none; }
.profile-feedback.success { color: var(--green); }
.profile-feedback.error { color: #ff747b; }
.profile-dialog.is-loading .profile-form, .profile-dialog.is-loading .profile-identity { opacity: .45; pointer-events: none; }
.toast { position: fixed; z-index: 20; right: 24px; bottom: 24px; max-width: 360px; padding: 14px 18px; border: 1px solid #333236; border-radius: 8px; background: #151517; box-shadow: var(--shadow); color: #d6d4d6; font-size: 12px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s; }
.toast.visible { opacity: 1; transform: none; }
.toast.error { border-color: rgba(239,43,53,.45); color: #ff858b; }

@media (max-width: 1050px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-card:last-child { grid-column: span 2; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .accounts-directory { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-brand { display: none; }
    .login-panel { min-height: 100vh; padding: 28px; }
    .mobile-brand { display: inline-flex; }
    .dashboard { display: block; }
    .sidebar { transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow); }
    .dashboard.menu-open .sidebar { transform: none; }
    .workspace { width: 100%; }
    .menu-button { display: block; }
    .topbar-title { display: none; }
    .content { padding-top: 30px; }
}

@media (min-width: 821px) and (max-height: 700px) {
    .login-brand { padding-top: 28px; padding-bottom: 28px; }
    .brand-message h1 { margin: 14px 0 17px; font-size: clamp(42px, 4.55vw, 64px); line-height: 1.08; }
    .brand-message p { max-width: 540px; font-size: 14px; line-height: 1.55; }
    .login-brand footer { font-size: 10px; }
}

@media (min-width: 821px) and (max-height: 520px) {
    .login-brand { padding-top: 22px; padding-bottom: 22px; }
    .brand-message h1 { margin: 11px 0 14px; font-size: clamp(38px, 4.15vw, 56px); line-height: 1.08; }
    .brand-message p { max-width: 520px; font-size: 13px; line-height: 1.5; }
    .eyebrow { font-size: 10px; }
}

@media (max-width: 620px) {
    .profile-copy { display: none; }
    .page-heading { align-items: stretch; flex-direction: column; }
    .heading-actions { flex-wrap: wrap; }
    .heading-actions > * { flex: 1 1 150px; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card:last-child { grid-column: auto; }
    .accounts-directory { padding: 12px; }
    .table-toolbar { align-items: stretch; flex-direction: column; }
    .profile-modal-content { padding: 22px 18px; }
    .profile-password-grid { grid-template-columns: 1fr; gap: 0; }
    .profile-identity { grid-template-columns: 44px minmax(0, 1fr); }
    .profile-large-avatar { width: 44px; height: 44px; }
    .profile-role { grid-column: 2; justify-self: start; }
    .profile-form-actions > * { width: 100% !important; }
}

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