/* Redesign layer for Settings and Storage.
   Same tokens and topbar as the dashboard; cards, inputs and bars in
   black and white. */

:root {
    --acc-bg: #050506;
    --acc-surface: #0e0e11;
    --acc-surface-2: #141418;
    --acc-border: rgba(255, 255, 255, .08);
    --acc-border-strong: rgba(255, 255, 255, .16);
    --acc-text: #e8eaed;
    --acc-muted: #9aa0a6;
    --acc-muted-2: #6b7075;
}

body {
    background:
        radial-gradient(1100px 520px at 12% -8%, rgba(255, 255, 255, .05), transparent 60%),
        radial-gradient(900px 460px at 92% 0%, rgba(255, 255, 255, .03), transparent 55%),
        var(--acc-bg) !important;
}

/* Topbar */
body .topbar {
    padding: 14px 28px !important;
    gap: 26px !important;
    background: rgba(5, 5, 6, .78) !important;
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--acc-border) !important;
}
body .topbar-logo {
    font-size: 17px !important;
    font-weight: 700 !important;
    letter-spacing: -.03em !important;
    color: var(--acc-text) !important;
}
body .topbar-nav a {
    padding: 7px 12px !important;
    border-radius: 9px !important;
    font-size: 14px !important;
    color: var(--acc-muted) !important;
}
body .topbar-nav a:hover {
    color: var(--acc-text) !important;
    background: rgba(255, 255, 255, .05) !important;
}
body .topbar-user-btn {
    background: rgba(255, 255, 255, .05) !important;
    border: 1px solid var(--acc-border) !important;
    border-radius: 999px !important;
    padding: 4px 10px 4px 4px !important;
}
body .topbar-btn-fill,
body .topbar-nav a.topbar-btn-fill {
    background: #f4f4f5 !important;
    border-color: #f4f4f5 !important;
    color: #0a0a0a !important;
}
body .topbar-btn-fill:hover,
body .topbar-nav a.topbar-btn-fill:hover { background: #ffffff !important; color: #0a0a0a !important; }
body .topbar-btn-outline,
body .topbar-nav a.topbar-btn-outline {
    border-color: rgba(255, 255, 255, .16) !important;
    color: #e8eaed !important;
}
body .topbar-btn-outline:hover,
body .topbar-nav a.topbar-btn-outline:hover { background: rgba(255, 255, 255, .06) !important; color: #ffffff !important; }
body .topbar-pfp { background: #e8eaed !important; color: #0a0a0a !important; }
body .topbar-storage-fill { background: #e8eaed !important; }
body .profile-dropdown {
    background: var(--acc-surface) !important;
    border: 1px solid var(--acc-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .55) !important;
}

/* Page frame */
.container {
    max-width: 1100px !important;
    margin: 0 auto !important;
    padding: 34px 28px 80px !important;
}
.storage-main {
    max-width: 1000px !important;
    margin: 0 auto !important;
    padding: 34px 28px 80px !important;
}

/* Headings */
.acc-head {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0 0 22px;
}
.acc-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--acc-muted-2);
    line-height: 1;
}
.acc-head h1,
.storage-head h1 {
    margin: 0 !important;
    font-size: 31px !important;
    font-weight: 650 !important;
    letter-spacing: -.035em !important;
    line-height: 1.1;
    color: var(--acc-text) !important;
}
.acc-sub,
.storage-head .sub {
    margin: 0 !important;
    color: var(--acc-muted) !important;
    font-size: 13.5px !important;
    line-height: 1.6;
}

/* Settings layout */
.settings-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) !important;
    gap: 16px !important;
    align-items: start !important;
}
.settings-stack { display: grid !important; gap: 16px !important; }
.settings-card {
    background: var(--acc-surface) !important;
    border: 1px solid var(--acc-border) !important;
    border-radius: 16px !important;
    padding: 20px 22px !important;
    margin: 0 !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
}
.settings-card h3 {
    margin: 0 0 14px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: -.01em;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--acc-text) !important;
}
.settings-card h3 .material-symbols-outlined {
    font-size: 18px !important;
    color: var(--acc-muted) !important;
}
.settings-card p {
    margin: 0 0 14px !important;
    color: var(--acc-muted-2) !important;
    font-size: 12.5px !important;
    line-height: 1.6 !important;
}

/* Fields */
.form-group { margin-bottom: 12px !important; }
.form-group label {
    display: flex !important;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px !important;
    font-size: 12px !important;
    font-weight: 600;
    color: var(--acc-muted) !important;
}
.form-group label .material-symbols-outlined { font-size: 15px !important; color: var(--acc-muted-2) !important; }
.form-input {
    height: 38px !important;
    padding: 0 12px !important;
    background: var(--acc-bg) !important;
    border: 1px solid var(--acc-border) !important;
    border-radius: 10px !important;
    color: var(--acc-text) !important;
    font-size: 13px !important;
    font-family: inherit;
}
.form-input:focus {
    outline: none !important;
    border-color: rgba(255, 255, 255, .35) !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .08) !important;
}
.form-input::placeholder { color: var(--acc-muted-2) !important; }
select.form-input { padding: 0 10px !important; }
.account-fields { grid-template-columns: 1fr 1fr; gap: 12px !important; }

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    border-radius: 9px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    background: #f4f4f5;
    border: 1px solid #f4f4f5;
    color: #0a0a0a;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.cta-button:hover { background: #ffffff; }
.cta-button .material-symbols-outlined { font-size: 17px !important; line-height: 1; }
.cta-button[style*="rgba(242,139,130"] {
    background: rgba(242, 139, 130, .14) !important;
    border-color: rgba(242, 139, 130, .35) !important;
    color: #f28b82 !important;
}

/* Avatar */
.avatar {
    width: 64px !important;
    height: 64px !important;
    border-radius: 50%;
    background: #e8eaed !important;
    color: #0a0a0a !important;
    font-weight: 700;
    font-size: 1.4rem;
}
.avatar-edit {
    background: #e8eaed !important;
    border: 2px solid var(--acc-surface) !important;
}
.avatar-edit .material-symbols-outlined { color: #0a0a0a !important; }

input[type="checkbox"] { accent-color: #e8eaed !important; }

/* Email banners */
#email-verify-banner,
#email-changed-banner {
    background: var(--acc-surface-2) !important;
    border: 1px solid var(--acc-border-strong) !important;
    border-radius: 14px !important;
    padding: 13px 16px !important;
    margin-bottom: 16px !important;
}

/* 2FA status chips */
#2fa-status > div { font-size: 13px; }

/* Storage summary */
.storage-head { gap: 6px !important; }
.back-link { color: var(--acc-muted) !important; font-size: 12.5px !important; }
.back-link:hover { color: var(--acc-text) !important; }

.summary {
    background: var(--acc-surface) !important;
    border: 1px solid var(--acc-border) !important;
    border-radius: 16px !important;
    padding: 22px !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
}
.summary-amount #usedValue {
    font-size: 38px !important;
    font-weight: 650 !important;
    letter-spacing: -.03em !important;
}
.summary-limit { color: var(--acc-muted) !important; font-size: 13px !important; }
.summary-badge {
    background: rgba(255, 255, 255, .08) !important;
    color: var(--acc-text) !important;
    font-size: 12px !important;
}
.summary-badge[data-level="warn"] { background: rgba(253, 214, 99, .14) !important; color: #fdd663 !important; }
.summary-badge[data-level="full"] { background: rgba(242, 139, 130, .16) !important; color: #f28b82 !important; }
.summary-track { height: 8px !important; background: rgba(255, 255, 255, .08) !important; }
.summary-fill { background: #e8eaed !important; }
.summary-fill[data-level="warn"] { background: #fdd663 !important; }
.summary-fill[data-level="full"] { background: #f28b82 !important; }
.summary-foot { color: var(--acc-muted) !important; font-size: 12.5px !important; }

/* Storage projects */
.projects { gap: 12px !important; }
.projects-head {
    border-bottom: 1px solid var(--acc-border) !important;
    padding-bottom: 10px !important;
}
.projects-head h2 { font-size: 15px !important; font-weight: 600 !important; color: var(--acc-text); }
.projects-head .muted { color: var(--acc-muted-2) !important; font-size: 12px !important; }
.project-list { gap: 8px !important; }
.project {
    background: var(--acc-surface) !important;
    border: 1px solid var(--acc-border) !important;
    border-radius: 12px !important;
    padding: 13px 16px !important;
}
.project:hover { background: var(--acc-surface-2) !important; border-color: var(--acc-border-strong) !important; }
.project-name { color: var(--acc-text) !important; font-size: 13.5px !important; }
.project-size { color: var(--acc-text) !important; font-size: 12.5px !important; }
.project-track { background: rgba(255, 255, 255, .07) !important; }
.project-fill { background: #e8eaed !important; }
.project-meta { color: var(--acc-muted) !important; font-size: 11.5px !important; }
.project-actions a { color: var(--acc-muted) !important; font-size: 11.5px !important; }
.project-actions a:hover { color: var(--acc-text) !important; background: rgba(255, 255, 255, .06) !important; }
.footnote {
    color: var(--acc-muted-2) !important;
    border-top: 1px solid var(--acc-border) !important;
    font-size: 11.5px !important;
}
.empty, .error {
    background: var(--acc-surface) !important;
    border: 1px solid var(--acc-border) !important;
    border-radius: 12px !important;
    color: var(--acc-muted) !important;
}
.skeleton {
    border-radius: 12px !important;
    background: linear-gradient(90deg, rgba(255, 255, 255, .04) 25%, rgba(255, 255, 255, .08) 37%, rgba(255, 255, 255, .04) 63%) !important;
    background-size: 400% 100% !important;
}

@media (max-width: 900px) {
    .settings-layout { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
    .container, .storage-main { padding: 24px 16px 64px !important; }
    .acc-head h1, .storage-head h1 { font-size: 25px !important; }
    .account-fields { grid-template-columns: 1fr !important; }
    .settings-card { padding: 18px !important; }
}

/* Sessions and devices */
#card-sessions .sess-sub {
    margin: 0 0 14px;
    color: var(--acc-muted);
    font-size: 12.5px;
    line-height: 1.55;
}
.sess-list { display: flex; flex-direction: column; gap: 8px; }
.sess-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    background: var(--acc-surface);
    border: 1px solid var(--acc-border);
    border-radius: 12px;
    min-width: 0;
}
.sess-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .05);
    color: var(--acc-muted);
    font-size: 19px;
}
.sess-info { flex: 1; min-width: 0; }
.sess-title {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    color: var(--acc-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}
.sess-current {
    padding: 1px 7px;
    border-radius: 999px;
    border: 1px solid rgba(129, 201, 149, .28);
    background: rgba(129, 201, 149, .12);
    color: #81c995;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}
.sess-meta {
    margin-top: 2px;
    color: var(--acc-muted-2);
    font-size: 11.5px;
    overflow-wrap: anywhere;
}
.sess-btn {
    flex: 0 0 auto;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid rgba(242, 139, 130, .3);
    background: transparent;
    color: #f28b82;
    font: inherit;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.sess-btn:hover { background: rgba(242, 139, 130, .1); }
.sess-btn:focus-visible { outline: 2px solid #8ab4f8; outline-offset: 2px; }
.sess-empty, .sess-loading {
    padding: 8px 0;
    color: var(--acc-muted-2);
    font-size: 12.5px;
}
.sess-all {
    justify-content: center;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--acc-border-strong);
    color: var(--acc-text);
}
.sess-all:hover { background: rgba(255, 255, 255, .09); }
@media (max-width: 640px) {
    .sess-row { align-items: flex-start; flex-wrap: wrap; }
    .sess-btn { margin-left: 47px; }
}

/* In-page confirmation for session revocation */
.sess-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(3, 3, 4, .72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.sess-modal.open { display: flex; }
.sess-modal-card {
    width: 100%;
    max-width: 420px;
    padding: 22px;
    background: var(--acc-surface);
    border: 1px solid var(--acc-border);
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .65);
}
.sess-modal-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.sess-modal-icon {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(242, 139, 130, .12);
    color: #f28b82;
    font-size: 20px;
}
.sess-modal-head h3 {
    margin: 0;
    color: var(--acc-text);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -.01em;
}
.sess-modal-card p {
    margin: 0 0 20px;
    color: var(--acc-muted);
    font-size: 13.5px;
    line-height: 1.6;
}
.sess-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.sess-modal-actions button {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}
.sess-modal-cancel {
    background: transparent;
    border: 1px solid var(--acc-border-strong);
    color: var(--acc-text);
}
.sess-modal-cancel:hover { background: rgba(255, 255, 255, .05); }
.sess-modal-confirm.danger {
    background: rgba(242, 139, 130, .14);
    border: 1px solid rgba(242, 139, 130, .4);
    color: #f28b82;
}
.sess-modal-confirm.danger:hover { background: rgba(242, 139, 130, .22); }
.sess-modal-confirm:focus-visible,
.sess-modal-cancel:focus-visible { outline: 2px solid #8ab4f8; outline-offset: 2px; }
@media (max-width: 640px) {
    .sess-modal-card { padding: 18px; }
    .sess-modal-actions button { flex: 1; }
}
