:root {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-soft: #f9fafc;
    --sidebar: #ffffff;
    --sidebar-muted: #7c8799;
    --text: #172033;
    --muted: #697386;
    --line: #e7eaf0;
    --line-strong: #d6dbe5;
    --accent: #4f46e5;
    --accent-dark: #3730a3;
    --accent-soft: #eef2ff;
    --success: #0f9f6e;
    --success-soft: #e8f8f1;
    --danger: #d14343;
    --danger-soft: #fff0f0;
    --warning: #b7791f;
    --warning-soft: #fff8e7;
    --shadow: 0 12px 32px rgba(23, 32, 51, .07);
    --radius: 14px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--text); font: 14px/1.55 Inter, "Segoe UI", "Microsoft YaHei", sans-serif; background: var(--bg); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(79,70,229,.24); outline-offset: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.02em; }
h1 { margin-bottom: 4px; font-size: 24px; line-height: 1.2; }
h2 { margin-bottom: 5px; font-size: 21px; line-height: 1.25; }
h3 { margin-bottom: 3px; font-size: 16px; line-height: 1.3; }
.muted, .section-intro p, .panel-heading p { color: var(--muted); }
.hidden { display: none !important; }

/* Login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: #fff; }
.login-layout { width: min(440px, 100%); display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 20px 60px rgba(23,32,51,.08); }
.login-intro { display: none; }
.login-intro h1 { margin: 0 0 15px; color: var(--text); font-size: 34px; }
.login-intro p { max-width: 360px; color: var(--muted); font-size: 16px; }
.login-points { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.login-points span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; font-size: 12px; }
.login-card { padding: 38px; background: var(--surface); }
.login-card-head, .dialog-head, .panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.login-title { justify-content: center; }
.login-title h2 { width: 100%; margin-bottom: 0; text-align: center; }
.login-logo { display: block; width: 64px; height: 64px; object-fit: contain; margin: 0 auto 18px; border-radius: 12px; }
.session-badge, .status-label, .user-chip { border-radius: 999px; }
.session-badge { padding: 5px 9px; color: var(--accent-dark); background: var(--accent-soft); font-size: 12px; }
.form-stack { display: grid; gap: 15px; }
.login-card .form-stack { margin-top: 29px; }
label { display: grid; gap: 7px; color: #4c5668; font-size: 12px; font-weight: 650; }
input, textarea, select { width: 100%; min-height: 40px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 11px; color: var(--text); background: #fff; }
textarea { min-height: 90px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #9aa3b2; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.11); outline: 0; }
.custom-select { position: relative; display: block; width: 100%; }
.custom-select-native { position: absolute; width: 1px !important; height: 1px; margin: -1px; overflow: hidden; border: 0; padding: 0; opacity: 0; pointer-events: none; clip: rect(0 0 0 0); }
.custom-select-trigger { position: relative; display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 40px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 34px 9px 11px; color: var(--text); background: #fff; text-align: left; transition: border-color .18s ease, box-shadow .18s ease; }
.custom-select-trigger::after { position: absolute; top: 50%; right: 14px; width: 7px; height: 7px; border-right: 1.5px solid #6b7588; border-bottom: 1.5px solid #6b7588; content: ''; transform: translateY(-65%) rotate(45deg); transition: transform .18s ease, border-color .18s ease; }
.custom-select-trigger[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.11); }
.custom-select-trigger[aria-expanded="true"]::after { border-color: var(--accent); transform: translateY(-25%) rotate(225deg); }
.custom-select-menu { position: absolute; z-index: 40; top: calc(100% + 5px); right: 0; left: 0; display: grid; gap: 2px; max-height: 180px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 5px; background: #fff; box-shadow: 0 14px 30px rgba(23,32,51,.14); }
.custom-select-option { width: 100%; min-height: 36px; border: 0; border-radius: 7px; padding: 7px 10px; color: var(--text); background: transparent; font-size: 13px; text-align: left; }
.custom-select-option:hover, .custom-select-option[aria-selected="true"] { color: var(--accent-dark); background: var(--accent-soft); }
.full-button { width: 100%; margin-top: 3px; }
.login-switch { display: inline-block; margin-top: 24px; color: var(--accent); font-size: 13px; }
.form-message { min-height: 20px; margin: 0; color: var(--muted); font-size: 12px; }
.form-message.error { color: var(--danger); }
.form-message.ok { color: var(--success); }
.auth-links { display: flex; justify-content: center; gap: 20px; margin-top: 22px; }
.text-button { border: 0; border-radius: 7px; padding: 4px 6px; color: var(--accent); background: transparent; font-size: 13px; font-weight: 700; text-decoration: none; }
.text-button:hover { color: var(--accent-dark); background: var(--accent-soft); text-decoration: none; }
.auth-panel { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.auth-panel h3 { margin-bottom: 0; text-align: center; }
.login-card.auth-alt .login-card-head,
.login-card.auth-alt .auth-links,
.login-card.auth-alt .login-logo { display: none; }
.login-card.auth-alt .auth-panel { margin-top: 0; padding-top: 0; border-top: 0; }
.auth-return { display: block; margin: 4px auto 0; }

/* Floating label input */
.lbi { position: relative; display: block; min-width: 0; padding-top: 10px; color: var(--text); font-family: inherit; }
.lbi-box { position: relative; display: block; min-height: 50px; border: 1px solid #2f3744; border-radius: 11px; background: #fff; transition: border-color 180ms ease, box-shadow 180ms ease; }
.lbi-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.lbi-ring path { fill: none; stroke: transparent; stroke-width: 1; stroke-linecap: round; transition: stroke 220ms ease, stroke-width 220ms ease; }
.lbi[data-focus="true"] .lbi-ring path { stroke: transparent; stroke-width: 1; }
.lbi[data-filled="true"]:not([data-focus="true"]) .lbi-ring path { stroke: transparent; }
.lbi-label { position: absolute; z-index: 2; left: 15px; top: 50%; max-width: calc(100% - 28px); padding: 0 4px; overflow: hidden; color: #697386; font-size: 14px; font-weight: 500; line-height: 1; text-overflow: ellipsis; white-space: nowrap; transform: translateY(-50%); transform-origin: left center; transition: transform 300ms cubic-bezier(.22,1,.36,1), color 180ms ease, background-color 180ms ease; pointer-events: none; user-select: none; }
.lbi[data-up="true"] .lbi-label { background: var(--surface); color: var(--muted); transform: translateY(-50%) translateY(-25px) scale(.8); }
.lbi[data-focus="true"] .lbi-label { color: var(--accent-dark); }
.lbi-field { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; min-height: 0; margin: 0; border: 0; border-radius: inherit; padding: 0 15px; color: var(--text); background: transparent; font: inherit; font-size: 14px; outline: none; box-shadow: none; }
.lbi-field:focus { border: 0; outline: none; box-shadow: none; }
.lbi-field::placeholder { color: transparent; }
.lbi[data-up="true"] .lbi-field::placeholder { color: #a0a8b6; }
.lbi-field:-webkit-autofill,
.lbi-field:-webkit-autofill:hover,
.lbi-field:-webkit-autofill:focus { -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 1000px #fff inset; box-shadow: 0 0 0 1000px #fff inset; transition: background-color 9999s ease-out 0s; }
.lbi-box.lbi-textarea { min-height: 110px; }
.lbi-textarea .lbi-label { top: 22px; }
.lbi[data-up="true"] .lbi-textarea .lbi-label { top: 0; transform: translateY(-50%) scale(.8); }
.lbi-textarea .lbi-field { padding-top: 28px; padding-bottom: 10px; resize: vertical; }
.lbi > .field-help, .lbi > small { display: block; margin-top: 6px; }

/* App shell */
.app-page { min-height: 100vh; }
.app-frame { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; width: 236px; flex-direction: column; padding: 22px 14px 16px; color: var(--text); background: var(--sidebar); border-right: 1px solid var(--line); box-shadow: 2px 0 16px rgba(23,32,51,.04); }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 26px; }
.sidebar-brand strong { display: block; max-width: 145px; overflow: hidden; color: var(--text); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-brand small { display: block; margin-top: 2px; color: var(--sidebar-muted); font-size: 11px; }
.brand-logo { width: 34px; height: 34px; flex: 0 0 34px; object-fit: contain; border-radius: 8px; }
.side-nav { display: grid; gap: 4px; }
.nav-group { display: grid; gap: 3px; }
.nav-submenu { display: grid; gap: 2px; margin: 0 0 4px 13px; padding-left: 12px; border-left: 1px solid var(--line); }
.nav-subitem { min-height: 32px; border: 0; border-radius: 7px; padding: 0 10px; color: var(--muted); background: transparent; font-size: 12px; text-align: left; }
.nav-subitem:hover { color: var(--text); background: #f5f7fb; }
.nav-subitem.active { color: var(--accent-dark); background: var(--accent-soft); }
.nav-item, .side-link { display: flex; align-items: center; width: 100%; min-height: 42px; border: 0; border-radius: 9px; padding: 0 12px; color: #596579; background: transparent; text-align: left; transition: background .18s ease, color .18s ease; }
.nav-item:hover, .side-link:hover { color: var(--text); background: #f5f7fb; }
.nav-item.active { color: var(--accent-dark); background: var(--accent-soft); }
.sidebar-bottom { display: grid; gap: 4px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.logout-button { border: 0; font-size: 14px; }
.main-area { width: calc(100% - 236px); min-width: 0; margin-left: 236px; }
.topbar { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 89px; padding: 22px clamp(22px, 4vw, 54px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.88); }
.topbar > div:first-of-type { position: static; z-index: 1; transform: none; text-align: left; }
.topbar > .topbar-actions { position: relative; z-index: 2; margin-left: auto; }
.topbar h1 { font-size: 23px; }
.topbar-actions, .button-row, .quick-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.user-chip { display: grid; gap: 1px; padding: 6px 11px; border: 1px solid var(--line); color: var(--text); background: #fff; font-size: 12px; font-weight: 700; }
.user-chip small { color: var(--muted); font-size: 10px; font-weight: 500; }
.icon-action { min-width: 48px; min-height: 36px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 0 10px; color: var(--muted); background: #fff; font-size: 12px; }
.icon-action:hover { color: var(--accent); border-color: var(--accent); }
.close-dialog { width: 32px; min-width: 32px; height: 32px; min-height: 32px; border: 0; border-radius: 0; padding: 0; color: #697386; background: transparent; font-size: 24px; font-weight: 300; line-height: 1; }
.close-dialog:hover { color: var(--text); border-color: transparent; background: transparent; }
.profile-actions { position: relative; }
.profile-trigger { display: inline-flex; align-items: center; gap: 9px; min-height: 38px; border: 0; border-radius: 999px; padding: 2px 5px 2px 2px; color: var(--text); background: transparent; }
.profile-trigger:hover { background: var(--surface-soft); }
.user-avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: 0 0 34px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--accent-dark); background: var(--accent-soft); font-size: 13px; font-weight: 800; }
.user-avatar img { width: 100%; height: 100%; padding: 2px; object-fit: contain; border-radius: inherit; background: #fff; }
.profile-name { max-width: 140px; overflow: hidden; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; min-width: 126px; padding: 6px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: 0 14px 30px rgba(23,32,51,.14); }
.profile-menu-item { display: block; width: 100%; border: 0; border-radius: 7px; padding: 8px 10px; color: var(--text); background: transparent; font-size: 13px; text-align: left; }
.profile-menu-item:hover { color: var(--accent-dark); background: var(--accent-soft); }
.mobile-menu { display: none; align-items: center; justify-content: center; width: 40px; min-width: 40px; height: 38px; min-height: 38px; margin-right: 12px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 0; color: var(--text); background: #fff; }
.mobile-menu-icon { display: grid; gap: 4px; width: 18px; }
.mobile-menu-icon i { display: block; height: 1.5px; border-radius: 999px; background: currentColor; }
.page-content { width: 100%; max-width: none; margin: 0 auto; padding: 32px clamp(22px, 4vw, 54px) 60px; }
.app-loading-overlay { display: none; }
body.app-page.app-booting .app-loading-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); background: rgba(255,255,255,.94); font-size: 13px; }
body.app-page.app-booting .page-content { visibility: hidden; }
.app-loading-spinner { width: 16px; height: 16px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: app-loading-spin .7s linear infinite; }
@keyframes app-loading-spin { to { transform: rotate(360deg); } }
.page-section { display: none; }
.page-section.active { display: block; }
.welcome-row, .section-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 25px; }
.account-section-toolbar-user { justify-content: flex-end; }
.welcome-row h2, .section-intro h2 { margin-bottom: 4px; font-size: 26px; }
.welcome-row p, .section-intro p { margin-bottom: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.metric-card, .surface-panel, .account-card, .task-card, .user-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 4px 16px rgba(23,32,51,.035); }
.metric-card { background: linear-gradient(135deg, #f5f7ff 0%, #fff 66%); }
.metric-card { padding: 20px; }
.metric-card span { display: block; color: var(--muted); font-size: 12px; }
.metric-card strong { display: block; margin: 6px 0 1px; color: var(--text); font-size: 30px; line-height: 1; }
.metric-card small { color: #9aa3b2; font-size: 11px; }
.overview-grid { display: grid; grid-template-columns: 1.35fr .85fr; gap: 14px; }
.section-subhead { margin: 30px 0 14px; }
.section-subhead h3 { margin-bottom: 3px; }
.section-subhead p { margin: 0; color: var(--muted); font-size: 12px; }
.profile-detail-list { display: grid; }
.profile-detail-list > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.profile-detail-list > div:last-child { border-bottom: 0; }
.profile-detail-list span { color: var(--muted); }
.profile-detail-list strong { color: var(--text); text-align: right; overflow-wrap: anywhere; }
.surface-panel { padding: 22px; }
.panel-heading { margin-bottom: 18px; }
.panel-heading p { margin: 0; font-size: 12px; }
.steps { display: grid; gap: 17px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 13px; align-items: flex-start; }
.steps b { width: 30px; height: 30px; display: grid; flex: 0 0 30px; place-items: center; border-radius: 9px; color: var(--accent-dark); background: var(--accent-soft); font-size: 11px; }
.steps strong, .steps span { display: block; }
.steps strong { margin-bottom: 2px; font-size: 13px; }
.steps span { color: var(--muted); font-size: 12px; }
.status-label { padding: 5px 8px; font-size: 11px; font-weight: 700; }
.status-label.online { color: var(--success); background: var(--success-soft); }
.status-line { display: flex; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.status-line:last-child { border-bottom: 0; }
.status-line b { color: var(--text); font-weight: 650; }

/* Controls and lists */
.primary-button, .outline-button, .danger-button { min-height: 38px; border-radius: 9px; padding: 0 14px; font-weight: 700; transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease; }
.primary-button { border: 1px solid var(--accent); color: #fff; background: var(--accent); }
.primary-button:hover { border-color: var(--accent-dark); background: var(--accent-dark); transform: translateY(-1px); }
.outline-button { border: 1px solid var(--line-strong); color: #475166; background: #fff; }
.outline-button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.danger-button { border: 1px solid #f2c2c2; color: var(--danger); background: var(--danger-soft); }
.danger-button:hover { border-color: var(--danger); background: #ffe3e3; }
button:disabled { cursor: not-allowed; opacity: .55; transform: none !important; }
.account-list, .user-list { width: 100%; min-width: 0; }
.account-list.account-table-wrap { display: block; }
.account-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.account-compact-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
.account-list-item { display: flex; align-items: center; gap: 16px; min-width: 0; padding: 15px 18px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(135deg, #f5f7ff 0%, #fff 66%); box-shadow: 0 5px 16px rgba(23,32,51,.035); }
.account-list-item .account-title { flex: 1 1 auto; min-width: 0; }
.account-list-item .card-actions { flex: 0 0 auto; }
.account-delete-flow { display: inline-flex; align-items: center; gap: 6px; }
.account-delete-flow button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; border-radius: 9px; white-space: nowrap; }
.account-delete-flow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.account-delete-flow .account-delete { min-width: 88px; }
.account-delete-flow .account-delete-pending { color: #fff; border-color: #df5664; background: #df5664; box-shadow: 0 4px 10px rgba(223,86,100,.2); }
.account-delete-flow .account-delete-pending:hover { border-color: #c94352; background: #c94352; }
.account-delete-flow .account-delete-undo { min-width: 58px; padding: 0 11px; }
.account-delete-flow .account-delete-undo:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.account-list-item.account-delete-complete .account-delete { color: var(--success); border-color: #bfe8d5; background: var(--success-soft); }
.user-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.account-card, .user-card { min-width: 0; overflow-wrap: anywhere; }
.account-card { padding: 18px; }
.account-card-head, .user-card-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.account-title { display: flex; gap: 10px; align-items: center; }
.account-title strong { display: block; font-size: 17px; }
.account-title small { display: block; margin-top: 2px; color: var(--muted); }
.account-title-copy { min-width: 0; }
.account-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.account-online-status { display: inline-flex; align-items: center; min-height: 20px; border-radius: 999px; padding: 0 7px; font-size: 10px; font-weight: 700; line-height: 1; }
.account-online-status::before { width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: currentColor; content: ''; }
.account-online-status.online { color: var(--success); background: var(--success-soft); }
.account-online-status.offline { color: var(--danger); background: var(--danger-soft); }
.account-avatar { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 42px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--accent-dark); background: var(--accent-soft); font-size: 14px; font-weight: 800; }
.account-avatar img { width: 100%; height: 100%; padding: 2px; object-fit: contain; border-radius: inherit; background: #fff; }
.status-text { color: var(--muted); font-size: 11px; }
.account-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.account-settings .wide { grid-column: 1 / -1; }
.account-settings label { font-size: 11px; }
.account-settings input { min-height: 36px; padding: 7px 9px; }
.check-line { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 500; }
.check-line input { width: 16px; min-height: 16px; accent-color: var(--accent); }
.account-checks { display: flex; flex-wrap: wrap; gap: 13px; margin: 14px 0; }
.account-status { min-height: 38px; margin: 12px 0; padding: 9px 10px; border-radius: 8px; color: var(--muted); background: var(--surface-soft); font-size: 11px; }
.card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.card-actions button { min-height: 32px; padding: 0 10px; font-size: 11px; }
.empty-state, .loading-state { padding: 30px 18px; border: 1px dashed var(--line-strong); border-radius: 11px; color: var(--muted); text-align: center; }
.account-list > .empty-state { padding: 20px 0; border: 0; border-radius: 0; }
.task-layout, .user-layout { display: grid; grid-template-columns: minmax(320px, .82fr) minmax(420px, 1.18fr); gap: 14px; align-items: start; }
.page-section[data-page="tasks"] > .legacy-task-intro,
.page-section[data-page="tasks"] > .task-layout { display: none; }
.managed-account-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 5px 16px rgba(23,32,51,.035); }
.account-back-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: 0 0 36px; border: 0; border-radius: 50%; color: var(--muted); background: var(--surface-soft); font-size: 22px; line-height: 1; }
.account-back-button:hover { color: var(--text); background: var(--accent-soft); }
.managed-account-avatar { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; flex: 0 0 54px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface-soft); }
.managed-account-avatar img { width: 100%; height: 100%; padding: 2px; object-fit: contain; border-radius: inherit; background: #fff; }
.managed-account-copy { display: grid; gap: 3px; min-width: 0; }
.managed-account-copy strong { color: var(--text); font-size: 18px; }
.managed-account-copy small { color: var(--muted); font-size: 12px; }
.task-module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
.task-module { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 5px 16px rgba(23,32,51,.035); }
.task-module-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 18px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .18s ease; }
.task-module-head:hover { background: var(--surface-soft); }
.task-module-disabled .task-module-head { cursor: default; }
.task-module-title { display: flex; align-items: center; gap: 9px; color: var(--text); }
.task-module-title strong { font-size: 13px; }
.task-module-icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; }
.task-module-icon svg { width: 19px; height: 19px; overflow: visible; }
.task-icon-like { color: #ed5571; }
.task-icon-forward { color: #16a7bd; }
.task-icon-publish { color: #20b478; }
.task-icon-comment { color: #4186e9; }
.task-module-title::after { width: 7px; height: 7px; margin: -3px 0 0 4px; border-right: 1.5px solid #9aa4b4; border-bottom: 1.5px solid #9aa4b4; content: ''; transform: rotate(45deg); transition: border-color .18s ease, transform .18s ease; }
.task-module-title:hover::after { border-color: var(--accent); }
.task-module-disabled .task-module-title::after { display: none; }
.task-module:not(.task-module-disabled):not(.task-module-collapsed) .task-module-title::after { margin-top: 3px; transform: rotate(225deg); }
.task-module-body { display: grid; gap: 13px; max-height: 1000px; overflow: hidden; padding: 17px 18px 18px; opacity: 1; transition: max-height .22s ease, opacity .18s ease, padding .22s ease; }
.task-module-collapsed .task-module-body { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; }
.task-module-collapsed .task-module-head { border-bottom-color: transparent; }
.task-module-body > p { margin: 2px 0; color: var(--muted); font-size: 12px; }
.task-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.task-field { display: grid; gap: 6px; min-width: 0; }
.task-field > span { color: var(--text); font-size: 11px; font-weight: 700; }
.task-field small { color: var(--muted); font-size: 10px; }
.task-field input, .task-field textarea { width: 100%; min-width: 0; border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 10px; color: var(--text); background: #fff; font: inherit; font-size: 12px; outline: none; }
.task-field textarea { min-height: 90px; resize: vertical; }
.task-field input:focus, .task-field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.task-inline-input { display: flex; min-width: 0; }
.task-inline-input input { border-radius: 9px 0 0 9px; }
.task-inline-input b { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 9px 9px 0; color: var(--muted); background: var(--surface-soft); font-size: 11px; font-weight: 600; }
.task-check { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.task-check input { width: 15px; height: 15px; accent-color: var(--accent); }
.task-switch { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.task-switch input { position: absolute; opacity: 0; pointer-events: none; }
.task-switch span { position: relative; display: inline-block; width: 46px; height: 26px; border: 1px solid #d9e1ed; border-radius: 999px; background: #f2f5f9; box-shadow: inset 0 1px 2px rgba(35,52,78,.08); transition: background .22s ease, border-color .22s ease, box-shadow .22s ease; }
.task-switch span::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(35,52,78,.2); content: ''; transition: transform .22s cubic-bezier(.22,.8,.32,1), box-shadow .22s ease; }
.task-switch input:checked + span { border-color: #2d8be0; background: #2d8be0; box-shadow: inset 0 1px 2px rgba(13,73,133,.2), 0 3px 8px rgba(45,139,224,.2); }
.task-switch input:checked + span::after { transform: translateX(20px); box-shadow: 0 2px 5px rgba(13,73,133,.28); }
.task-switch input:disabled + span { opacity: .75; }
.task-switch em { font-style: normal; font-weight: 600; }
.capsule-setting { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 54px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface-soft); }
.capsule-setting > span { display: grid; gap: 1px; min-width: 0; }
.capsule-setting strong { font-size: 12px; }
.capsule-setting small { color: var(--muted); font-size: 10px; font-weight: 400; }
.capsule-setting input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.capsule-setting i { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 46px; border: 1px solid #d9e1ed; border-radius: 999px; background: #f2f5f9; box-shadow: inset 0 1px 2px rgba(35,52,78,.08); transition: background .22s ease, border-color .22s ease, box-shadow .22s ease; }
.capsule-setting i::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(35,52,78,.2); content: ''; transition: transform .22s cubic-bezier(.22,.8,.32,1), box-shadow .22s ease; }
.capsule-setting input:checked + i { border-color: #2d8be0; background: #2d8be0; box-shadow: inset 0 1px 2px rgba(13,73,133,.2), 0 3px 8px rgba(45,139,224,.2); }
.capsule-setting input:checked + i::after { transform: translateX(20px); box-shadow: 0 2px 5px rgba(13,73,133,.28); }
.capsule-setting input:disabled + i { opacity: .55; }
.task-module-disabled .task-module-body { min-height: 66px; }
.task-module-disabled.task-module-collapsed .task-module-body { min-height: 0; }
.task-form, .user-form { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.task-list, .user-list { display: grid; gap: 10px; }
.task-card, .user-card { padding: 16px; }
.task-card-head strong, .user-card-head strong { font-size: 14px; }
.account-owner, .account-summary { display: block; margin-top: 4px; color: var(--accent-dark); font-size: 11px; }
.account-summary { margin-top: 8px; color: var(--text); }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 11px 0; }
.meta-chip { padding: 4px 7px; border-radius: 6px; color: var(--muted); background: var(--surface-soft); font-size: 11px; }
.task-content { margin: 10px 0 14px; padding: 9px; border-radius: 8px; color: var(--muted); background: var(--surface-soft); font-size: 12px; white-space: pre-wrap; }
.task-status { color: var(--muted); font-size: 11px; }
.field-help { color: var(--muted); font-size: 11px; font-weight: 400; }
.settings-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.settings-tab { min-height: 36px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 0 14px; color: var(--muted); background: #fff; font-weight: 700; }
.settings-tab.active { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.settings-grid > .settings-panel:not(.hidden) { grid-column: 1 / -1; }
.settings-panel { display: grid; min-width: 0; gap: 14px; }
.settings-panel .panel-heading { margin-bottom: 3px; }
.account-settings-dashboard { display: grid; gap: 14px; }
.settings-profile-hero { display: flex; align-items: center; gap: 16px; min-height: 96px; padding: 16px 22px; background: linear-gradient(135deg, #f5f7ff 0%, #fff 66%); }
.settings-profile-avatar { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; flex: 0 0 64px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--accent-soft); }
.settings-profile-avatar img { width: 100%; height: 100%; padding: 2px; object-fit: contain; border-radius: inherit; background: #fff; }
.settings-profile-copy { display: grid; gap: 7px; min-width: 0; }
.settings-profile-copy h2 { margin: 0; font-size: 20px; }
.settings-profile-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.settings-profile-name-line h2 { margin: 0; }
.settings-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.settings-badges span { display: inline-flex; align-items: center; min-height: 24px; border-radius: 999px; padding: 0 10px; color: #1d70c9; background: #eaf3ff; font-size: 11px; font-weight: 750; }
.settings-section-label { margin: 4px 2px -3px; color: var(--muted); font-size: 12px; font-weight: 700; }
.settings-metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.settings-metric-card { display: grid; justify-items: center; min-height: 110px; padding: 14px 12px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, #f5f7ff 0%, #fff 66%); box-shadow: 0 4px 16px rgba(23,32,51,.035); text-align: center; }
.settings-metric-card strong { margin: 4px 0 1px; font-size: 24px; line-height: 1.1; }
.settings-metric-card small { color: var(--muted); font-size: 11px; }
.settings-metric-icon, .settings-panel-icon, .settings-shortcut-icon { display: inline-flex; align-items: center; justify-content: center; }
.settings-metric-icon { width: 30px; height: 30px; border-radius: 9px; color: #237bcf; background: #eaf3ff; font-size: 15px; }
.settings-metric-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.settings-metric-icon-green { color: #1eaa72; background: #e8f8f1; }
.settings-metric-icon-blue { color: #237bcf; background: #eaf3ff; }
.settings-panel-title { display: flex; align-items: flex-start; gap: 11px; }
.settings-panel-title h3 { margin-bottom: 3px; }
.settings-panel-title p { margin: 0; color: var(--muted); font-size: 11px; }
.settings-lower-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 14px; align-items: start; }
.settings-shortcuts-panel { min-width: 0; background: linear-gradient(135deg, #f5f7ff 0%, #fff 66%); }
.settings-shortcuts-panel > .settings-panel-title { margin-bottom: 13px; }
.settings-shortcut-list { display: grid; margin: 0 -22px -22px; border-top: 1px solid var(--line); }
.settings-shortcut-row { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 52px; border: 0; border-bottom: 1px solid var(--line); padding: 8px 22px; color: var(--text); background: transparent; text-align: left; }
.settings-shortcut-row:last-child { border-bottom: 0; }
.settings-shortcut-row:hover:not(:disabled) { background: var(--surface-soft); }
.settings-shortcut-row:disabled { cursor: default; opacity: .62; }
.settings-shortcut-icon { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px; color: #237bcf; background: #eaf3ff; font-size: 13px; }
.settings-icon-green { color: #1eaa72; background: #e8f8f1; }
.settings-icon-orange { color: #e98b38; background: #fff0e2; }
.settings-icon-purple { color: #7355dc; background: #f0ebff; }
.settings-shortcut-copy { display: grid; flex: 1 1 auto; gap: 1px; min-width: 0; }
.settings-shortcut-copy strong { font-size: 12px; }
.settings-shortcut-copy small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.settings-shortcut-arrow { color: #9da8b8; font-size: 22px; line-height: 1; }
.settings-shortcut-state { color: var(--muted); font-size: 10px; white-space: nowrap; }
.settings-shortcut-static { cursor: default; }
.logo-upload { display: grid; gap: 10px; }
.logo-dropzone { display: flex; align-items: center; gap: 12px; min-height: 88px; border: 1px dashed var(--line-strong); border-radius: 14px; padding: 16px; color: var(--text); background: linear-gradient(135deg, #f8f9ff 0%, #fff 72%); cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.logo-dropzone:hover, .logo-dropzone.is-dragging { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.logo-dropzone-icon { display: grid; flex: 0 0 38px; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--accent); background: #eaf3ff; }
.logo-dropzone-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.logo-dropzone-copy { display: grid; gap: 3px; min-width: 0; }
.logo-dropzone-copy strong { font-size: 13px; }
.logo-dropzone-copy small { color: var(--muted); font-size: 11px; font-weight: 500; }
.logo-preview { display: flex; align-items: center; gap: 12px; min-height: 74px; overflow: hidden; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.logo-preview img { width: 54px; height: 54px; flex: 0 0 54px; object-fit: contain; border-radius: 9px; background: #fff; }
.logo-preview-label { color: var(--muted); font-size: 11px; }
.logo-upload-actions { display: flex; justify-content: flex-end; min-height: 0; }
.logo-upload-actions button { min-height: 32px; padding: 0 11px; font-size: 11px; }
.mail-test { display: flex; align-items: flex-end; gap: 9px; }
.mail-test label { flex: 1; }
.operation-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 14px; align-items: start; }
.management-operation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.operation-side { display: grid; gap: 14px; }
.feed-list, .compact-list { display: grid; gap: 9px; }
.feed-item, .compact-item { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.feed-head, .compact-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.feed-head strong, .compact-item-head strong { font-size: 12px; }
.feed-content, .compact-item p { margin: 0 0 9px; color: var(--text); font-size: 12px; white-space: pre-wrap; }
.feed-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.feed-actions button { min-height: 29px; padding: 0 9px; font-size: 11px; }
.table-panel, .account-table-wrap, .user-table-wrap { min-width: 0; max-width: 100%; overflow-x: auto; }
.table-panel table, .log-table, .account-table-wrap > .account-table, .user-table-wrap > .data-table { width: 100%; min-width: 720px; }
.account-table-wrap, .user-table-wrap { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.data-table { min-width: 960px; }
.account-table-wrap > .account-table, .account-admin-table { min-width: 1000px; }
.user-table-wrap > .data-table, .user-table { min-width: 920px; }
.data-row { display: grid; min-width: 960px; gap: 12px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.data-head { color: var(--text); font-weight: 700; }
.user-table .data-row { grid-template-columns: minmax(140px, 1.2fr) minmax(170px, 1.35fr) minmax(80px, .6fr) minmax(145px, 1fr) minmax(145px, 1fr) minmax(76px, .55fr) minmax(130px, .85fr); min-width: 920px; }
.account-table .data-row { grid-template-columns: minmax(145px, 1.2fr) minmax(120px, 1fr) minmax(110px, .85fr) minmax(110px, .85fr) minmax(220px, 1.6fr) minmax(240px, 1.8fr); min-width: 1000px; }
.data-row > * { min-width: 0; overflow-wrap: anywhere; }
.data-row strong, .data-row small { display: block; }
.data-row small { margin-top: 2px; color: var(--muted); }
.table-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.table-actions button { min-height: 32px; padding: 0 10px; font-size: 11px; }
.log-row { display: grid; grid-template-columns: 120px 100px 1fr 130px; gap: 12px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.log-row:first-child { color: var(--text); font-weight: 700; }
.log-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-admin-row > div { min-width: 0; }
.account-admin-identity, .account-admin-enabled { display: flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; white-space: nowrap; }
.account-admin-identity strong { flex: 0 0 auto; }
.account-admin-identity .account-owner, .account-admin-enabled .account-owner { display: inline-block; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-admin-identity .account-owner { color: var(--muted); font-size: 11px; }
.log-ok { color: var(--success); } .log-bad { color: var(--danger); }

/* Dialogs */
dialog { border: 0; }
.dialog-card { width: min(500px, calc(100% - 28px)); max-height: min(720px, calc(100vh - 28px)); overflow: auto; padding: 24px; border: 1px solid var(--line); border-radius: 16px; color: var(--text); background: #fff; box-shadow: 0 22px 60px rgba(23,32,51,.2); }
.dialog-card::backdrop { background: rgba(17,24,39,.36); }
.small-dialog { width: min(440px, calc(100% - 28px)); }
.dialog-head { margin-bottom: 20px; }
.dialog-head h2 { margin-bottom: 0; }
.album-dialog { width: min(860px, calc(100% - 28px)); }
.album-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; margin: -7px 0 14px; }
.album-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.album-card { display: grid; gap: 8px; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; padding: 0; color: var(--text); background: var(--surface); text-align: left; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.album-card:hover { border-color: var(--accent); box-shadow: 0 8px 20px rgba(23,32,51,.09); transform: translateY(-1px); }
.album-cover { display: grid; place-items: center; height: 116px; overflow: hidden; color: var(--muted); background: linear-gradient(135deg, #f0f4ff, #fff); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-card-copy { display: grid; gap: 3px; padding: 0 12px 12px; }
.album-card-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.album-card-copy small { color: var(--muted); font-size: 11px; }
.album-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.album-photo-card { display: grid; gap: 6px; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: zoom-in; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.album-photo-card:hover, .album-photo-card:focus-visible { border-color: var(--accent); box-shadow: 0 8px 20px rgba(23,32,51,.09); transform: translateY(-1px); outline: 0; }
.album-photo-card figure { display: grid; place-items: center; height: 145px; margin: 0; overflow: hidden; background: var(--surface-soft); }
.album-photo-card img { width: 100%; height: 100%; object-fit: cover; }
.album-photo-card figcaption { overflow: hidden; padding: 0 9px 9px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.photo-preview-dialog { width: min(960px, calc(100% - 28px)); }
.photo-preview-stage { display: grid; place-items: center; min-height: 240px; max-height: calc(100vh - 180px); overflow: auto; padding: 8px; border-radius: 12px; background: #101522; }
.photo-preview-stage img { display: block; max-width: 100%; max-height: calc(100vh - 220px); object-fit: contain; }
.qr-proxy-choice { display: grid; gap: 5px; margin: -5px 0 14px; }
.qr-proxy-choice label { display: grid; gap: 6px; color: var(--text); font-size: 12px; font-weight: 700; }
.qr-proxy-choice select { width: 100%; min-height: 40px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 12px; color: var(--text); background: #fff; }
.qr-proxy-choice small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.proxy-settings-panel { grid-column: 1 / -1; }
.proxy-list { display: grid; gap: 8px; margin-top: 16px; }
.proxy-row { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(170px, 1.1fr) minmax(74px, .45fr) minmax(120px, .75fr) minmax(160px, 1.2fr); gap: 10px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: var(--surface-soft); font-size: 11px; }
.proxy-row strong { color: var(--text); font-size: 12px; }
.proxy-row small { display: block; margin-top: 2px; color: var(--muted); }
.proxy-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.proxy-row-actions button { min-height: 30px; padding: 0 9px; font-size: 10px; }
.proxy-row.is-disabled { opacity: .62; }
.qr-wrap { min-height: 245px; display: grid; place-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.qr-wrap img { width: 220px; height: 220px; border-radius: 7px; background: #fff; }
.dialog-message { margin: 14px 0; color: var(--muted); text-align: center; }
.qr-actions { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 2px; }
.toast { position: fixed; right: 25px; bottom: 24px; z-index: 80; max-width: min(420px, calc(100% - 32px)); transform: translateY(16px); opacity: 0; pointer-events: none; padding: 11px 15px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: #fff; box-shadow: var(--shadow); transition: opacity .2s ease, transform .2s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { color: var(--danger); border-color: #f1c5c5; background: var(--danger-soft); }

@media (max-width: 1050px) {
    .overview-grid, .operation-grid, .task-layout, .user-layout, .settings-grid, .task-module-grid, .settings-lower-grid { grid-template-columns: 1fr; }
    .account-list, .user-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
}
@media (max-width: 760px) {
    .login-page { padding: 14px; }
    .login-card { padding: 30px 25px; }
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
    .sidebar.open { transform: translateX(0); box-shadow: 15px 0 32px rgba(17,24,39,.2); }
    .main-area { width: 100%; margin-left: 0; }
    .topbar { min-height: 76px; padding: 18px 16px; }
    .mobile-menu { display: inline-flex; }
    .topbar > div:first-of-type { position: static; margin-right: auto; transform: none; text-align: left; }
    .page-content { padding: 24px 15px 45px; }
    .welcome-row, .section-intro { align-items: flex-start; flex-direction: column; }
    .welcome-row h2, .section-intro h2 { font-size: 22px; }
    .metric-grid, .settings-metric-grid { grid-template-columns: 1fr; }
    .form-grid, .account-settings, .task-field-grid { grid-template-columns: 1fr; }
    .proxy-row { grid-template-columns: 1fr 1fr; }
    .proxy-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
    .account-settings .wide { grid-column: auto; }
    .account-list, .user-list { grid-template-columns: 1fr; }
    .account-list-item { flex-wrap: wrap; }
    .account-list-item .card-actions { width: 100%; }
    .account-list-item .card-actions button { width: 100%; }
    .account-list-item .card-actions .account-delete-flow { display: flex; flex: 1 1 auto; }
    .account-list-item .card-actions .account-delete-flow button { width: auto; flex: 1 1 auto; }
    .card-actions { width: 100%; justify-content: flex-start; }
    .card-actions button { flex: 1 1 auto; min-width: 0; }
    .button-row, .quick-actions { width: 100%; }
    .button-row > button, .quick-actions > button { flex: 1; }
    .topbar-actions .user-chip { display: none; }
    .mail-test { align-items: stretch; flex-direction: column; }
    .settings-profile-hero { padding: 15px 17px; }
    .settings-shortcut-list { margin-right: -17px; margin-left: -17px; }
    .settings-shortcut-row { padding-right: 17px; padding-left: 17px; }
}
@media (min-width: 761px) {
    .account-back-button { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
