:root {
    color-scheme: dark;

    --background: #0c0e12;
    --panel: #151820;
    --panel-2: #1a1e27;
    --border: #292e39;
    --text: #f4f6f8;
    --muted: #9199a6;
    --accent: #6c8cff;
    --accent-hover: #7d99ff;
    --danger: #ff7272;

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(100%, 420px);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 34px;
}

.auth-card-wide {
    width: min(100%, 520px);
}

.brand-mark,
.brand-mark-small {
    display: grid;
    place-items: center;
    background: var(--accent);
    color: white;
    font-weight: 800;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    margin-bottom: 28px;
}

.brand-mark-small {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 8px;
}

.muted {
    color: var(--muted);
}

label {
    display: block;
    margin: 18px 0 8px;
    color: #d7dbe2;
    font-size: 14px;
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #0e1117;
    color: var(--text);
    padding: 13px 14px;
    font: inherit;
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
}

button,
.button-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 0;
    border-radius: 11px;
    background: var(--accent);
    color: white;
    padding: 13px 18px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.auth-card form > button {
    width: 100%;
    margin-top: 24px;
}

button:hover,
.button-link:hover {
    background: var(--accent-hover);
}

.secondary-link {
    display: block;
    margin-top: 20px;
    text-align: center;
    color: #b8c4ff;
    text-decoration: none;
}

.error-box,
.field-error {
    color: #ffd0d0;
    background: #30191c;
    border: 1px solid #573036;
    border-radius: 10px;
}

.error-box {
    padding: 12px;
    margin: 20px 0;
}

.field-error {
    padding: 8px 10px;
    margin-top: 7px;
    font-size: 13px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    min-height: 66px;
    padding: 12px 26px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
}

.topbar-brand,
.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logout-button {
    background: transparent;
    border: 1px solid var(--border);
    padding: 8px 12px;
}

.dashboard {
    width: min(1180px, calc(100% - 40px));
    margin: 44px auto;
}

.eyebrow {
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 0.14em;
    font-weight: 800;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.dashboard-card,
.owner-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.dashboard-card {
    min-height: 140px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dashboard-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.owner-panel {
    margin-top: 24px;
    padding: 22px;
}

.owner-panel a {
    color: #b8c4ff;
}

@media (max-width: 850px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .auth-card {
        padding: 24px;
    }

    .topbar {
        align-items: flex-start;
        padding: 12px 16px;
    }

    .topbar-user {
        flex-direction: column;
        align-items: flex-end;
    }

    .dashboard {
        width: min(100% - 28px, 1180px);
        margin-top: 30px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.owner-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.owner-links a {
    color: #b8c4ff;
    text-decoration: none;
}

.request-list {
    display: grid;
    gap: 18px;
    margin-top: 32px;
}

.request-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
}

.request-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.request-heading h2 {
    margin-bottom: 4px;
}

.status-pill {
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: var(--muted);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
}

.request-details {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 22px 0;
}

.request-details dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 5px;
}

.request-details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.request-reason {
    padding: 16px;
    border-radius: 12px;
    background: var(--panel-2);
    margin-bottom: 20px;
}

.request-reason p {
    margin: 8px 0 0;
}

.approval-form {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr)
        auto;
    gap: 14px;
    align-items: end;
}

.approval-form label {
    margin-top: 0;
}

.approval-form button {
    min-height: 46px;
}

.danger-button {
    margin-top: 12px;
    background: #472126;
}

.danger-button:hover {
    background: #5a2930;
}

.notice-box {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin-top: 20px;
}

.recent-section {
    margin-top: 38px;
}

.recent-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

@media (max-width: 720px) {

    .request-details {
        grid-template-columns: 1fr;
    }

    .approval-form {
        grid-template-columns: 1fr;
    }
}

.user-list {
    display: grid;
    gap: 10px;
    margin-top: 30px;
}

.user-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel);
    color: var(--text);
    text-decoration: none;
}

.user-row:hover {
    border-color: var(--accent);
}

.user-avatar {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--panel-2);
    font-weight: 800;
}

.user-summary {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.user-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}

.status-good {
    color: #87d7a2;
}

.status-bad {
    color: #ff8c8c;
}

.user-settings-form {
    display: grid;
    gap: 22px;
    margin-top: 30px;
}

.settings-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
}

.settings-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    cursor: pointer;
}

.toggle-row input,
.permission-card input {
    width: auto;
}

.permission-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.permission-card {
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--panel-2);
    cursor: pointer;
}

.permission-card:has(input:checked) {
    border-color: var(--accent);
}

.permission-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.permission-content small {
    color: var(--muted);
    line-height: 1.35;
}

.save-settings {
    justify-self: start;
    min-width: 180px;
}

.dashboard-card small {
    display: block;
    margin-top: 12px;
}

@media (max-width: 900px) {

    .permission-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .user-row {
        grid-template-columns:
            auto minmax(0, 1fr);
    }

    .user-meta {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {

    .settings-grid,
    .permission-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-card-link {
    color: var(--text);
    text-decoration: none;
}

.dashboard-card-link:hover {
    border-color: var(--accent);
}

.files-heading {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-end;
}

.storage-summary {
    display: flex;
    gap: 7px;
    align-items: baseline;
}

.storage-bar {
    width: 100%;
    height: 8px;
    margin-top: 18px;
    border-radius: 999px;
    background: var(--panel-2);
    overflow: hidden;
}

.storage-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px 0 18px;
    color: var(--muted);
}

.breadcrumbs a {
    color: #b8c4ff;
    text-decoration: none;
}

.file-actions {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.upload-form,
.new-folder-form {
    display: flex;
    gap: 10px;
}

.upload-form input,
.new-folder-form input {
    min-width: 0;
}

.file-browser {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel);
}

.file-browser-header,
.file-item {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(160px, auto);
    gap: 20px;
    align-items: center;
    padding: 14px 18px;
}

.file-browser-header {
    color: var(--muted);
    background: var(--panel-2);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.file-item {
    border-top: 1px solid var(--border);
}

.file-name {
    display: flex;
    min-width: 0;
    gap: 10px;
    align-items: center;
}

.file-name a,
.file-download {
    color: #b8c4ff;
    text-decoration: none;
}

.file-name a {
    overflow-wrap: anywhere;
}

.file-icon {
    flex: 0 0 auto;
}

.file-details {
    display: flex;
    gap: 14px;
    justify-content: flex-end;
    align-items: center;
}

.empty-files {
    padding: 42px 20px;
    text-align: center;
}

@media (max-width: 720px) {

    .files-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .file-actions {
        grid-template-columns: 1fr;
    }

    .upload-form,
    .new-folder-form {
        flex-direction: column;
    }

    .file-browser-header {
        display: none;
    }

    .file-item {
        grid-template-columns: 1fr;
    }

    .file-details {
        justify-content: flex-start;
        padding-left: 34px;
    }
}

.shared-write-item {
    grid-template-columns:
        minmax(0, 1fr)
        minmax(150px, auto);
}

.shared-item-tools {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.inline-rename-form {
    display: flex;
    gap: 8px;
    flex: 1 1 360px;
}

.inline-rename-form input[type="text"] {
    min-width: 0;
}

@media (max-width: 720px) {
    .shared-write-item {
        grid-template-columns: 1fr;
    }

    .shared-item-tools,
    .inline-rename-form {
        flex-direction: column;
    }
}

.file-delete-form {
    display: inline-flex;
    margin: 0;
}

.file-delete-form button {
    width: auto;
}

.file-details {
    flex-wrap: wrap;
}

.thumbnail-button,
.filename-preview-button,
.text-action-button {
    border: 0;
    padding: 0;
    background: none;
    color: #b8c4ff;
    cursor: pointer;
    font: inherit;
}

.thumbnail-button {
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.file-thumbnail {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.filename-preview-button {
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: left;
}

.text-action-button:hover,
.filename-preview-button:hover {
    text-decoration: underline;
}

.preview-open {
    overflow: hidden;
}

.preview-modal[hidden] {
    display: none;
}

.preview-modal {
    position: fixed;
    z-index: 5000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
}

.preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
}

.preview-window {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(1200px, 96vw);
    height: min(900px, 92vh);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
}

.preview-header,
.preview-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
}

.preview-header {
    border-bottom: 1px solid var(--border);
}

.preview-footer {
    border-top: 1px solid var(--border);
    color: var(--muted);
}

.preview-close {
    width: 42px;
    height: 42px;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--text);
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.preview-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 0;
    overflow: hidden;
    padding: 20px 72px;
    background: #090a0d;
}

.preview-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-nav {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 64px;
    transform: translateY(-50%);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(21, 24, 32, 0.9);
    color: var(--text);
    font-size: 38px;
    cursor: pointer;
}

.preview-nav-left {
    left: 14px;
}

.preview-nav-right {
    right: 14px;
}

@media (max-width: 720px) {

    .preview-modal {
        padding: 0;
    }

    .preview-window {
        width: 100vw;
        height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .preview-stage {
        padding: 12px 52px;
    }

    .preview-nav {
        width: 40px;
        height: 54px;
    }

    .preview-nav-left {
        left: 6px;
    }

    .preview-nav-right {
        right: 6px;
    }
}

.files-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 8px;
}

.files-quick-links .files-shared-link {
    margin-top: 0;
}

.move-picker {
    display: grid;
    gap: 20px;
    margin-top: 26px;
}

.move-folder-list {
    display: grid;
    gap: 8px;
}

.move-folder-option {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel-2);
    cursor: pointer;
}

.move-folder-option:hover {
    border-color: var(--accent);
}

.move-folder-option:has(input:checked) {
    border-color: var(--accent);
}

.move-folder-option input {
    width: auto;
    margin: 0;
}

.file-search-form {
    display: flex;
    gap: 10px;
    margin: 22px 0;
}

.file-search-form input {
    min-width: 0;
    flex: 1;
}

.file-search-form button {
    width: auto;
    min-width: 110px;
}

.search-summary {
    margin: 20px 0 12px;
}

@media (max-width: 600px) {
    .file-search-form {
        flex-direction: column;
    }

    .file-search-form button {
        width: 100%;
    }
}

.bulk-selected-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.bulk-selected-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel-2);
}

.bulk-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin: 22px 0 14px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel);
}

.bulk-selection-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bulk-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bulk-action-buttons button {
    width: auto;
}

.bulk-action-bar:not(.has-selection)
.bulk-action-buttons {
    opacity: 0.45;
}

.file-header-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-header-name input,
.bulk-item-checkbox {
    width: auto;
    margin: 0;
    flex: 0 0 auto;
}

.bulk-item-checkbox {
    width: 18px;
    height: 18px;
}

@media (max-width: 720px) {

    .bulk-action-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .bulk-action-buttons {
        display: grid;
        grid-template-columns: 1fr;
    }

    .bulk-action-buttons button {
        width: 100%;
    }
}

.bulk-select-all-control {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.bulk-select-all-control input {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: 0 0 auto;
}

@media (max-width: 720px) {
    .bulk-selection-status {
        flex-wrap: wrap;
    }
}


/* =========================================================
   FILES APP — CLEAN RESPONSIVE UI
   ========================================================= */

.files-app {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
    padding-bottom: 60px;
}


/* ---------- Hero ---------- */

.files-app-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
    margin-top: 34px;
    margin-bottom: 24px;
}

.files-app-title h1 {
    margin-bottom: 7px;
    font-size: clamp(28px, 4vw, 38px);
    letter-spacing: -0.035em;
}

.files-app-subtitle {
    margin: 0;
    max-width: 520px;
    color: var(--muted);
    line-height: 1.55;
}

.files-storage-card {
    width: min(280px, 100%);
    padding: 16px 18px;
    border: 1px solid #252c38;
    border-radius: 16px;
    background:
        linear-gradient(
            145deg,
            #171b23,
            #12151c
        );
}

.files-storage-numbers {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.files-storage-numbers strong {
    font-size: 17px;
}

.files-storage-numbers span {
    color: var(--muted);
    font-size: 13px;
}

.files-storage-track {
    height: 5px;
    margin-top: 13px;
    overflow: hidden;
    border-radius: 999px;
    background: #252a34;
}

.files-storage-fill {
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            #627fff,
            #8a9fff
        );
}


/* ---------- Main tabs ---------- */

.files-app-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin-bottom: 24px;
    padding: 5px;
    border: 1px solid #252b35;
    border-radius: 14px;
    background: #11141a;
    scrollbar-width: none;
}

.files-app-tabs::-webkit-scrollbar {
    display: none;
}

.files-app-tab {
    flex: 0 0 auto;
    min-width: 96px;
    padding: 10px 16px;
    border-radius: 10px;
    color: #929ba9;
    font-size: 14px;
    font-weight: 650;
    text-align: center;
    text-decoration: none;
    transition:
        background 150ms ease,
        color 150ms ease;
}

.files-app-tab:hover {
    color: #e9ecf1;
    background: #1a1e26;
}

.files-app-tab.active {
    color: #f7f8fa;
    background: #202631;
}


/* ---------- Notices ---------- */

.files-notices {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}


/* ---------- Breadcrumb ---------- */

.files-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    min-height: 38px;
    margin: 4px 0 14px;
    color: var(--muted);
    font-size: 14px;
}

.files-breadcrumbs a {
    color: #b8c3f7;
    text-decoration: none;
}

.files-breadcrumbs a:hover {
    color: #dfe5ff;
}

.breadcrumb-divider {
    color: #515966;
    font-size: 18px;
}


/* ---------- Search / Add toolbar ---------- */

.files-command-bar {
    position: relative;
    z-index: 20;
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 18px;
}

.files-search {
    display: flex;
    align-items: center;
    min-width: 0;
    border: 1px solid #272d38;
    border-radius: 14px;
    background: #11141a;
    transition:
        border 150ms ease,
        box-shadow 150ms ease;
}

.files-search:focus-within {
    border-color: #5368b8;
    box-shadow:
        0 0 0 3px
        rgba(108, 140, 255, 0.08);
}

.files-search-icon {
    flex: 0 0 auto;
    padding-left: 15px;
    color: #788293;
    font-size: 22px;
}

.files-search input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 13px 12px;
    box-shadow: none;
}

.files-search input:focus {
    border: 0;
}

.files-search button {
    flex: 0 0 auto;
    margin: 5px;
    padding: 9px 15px;
    border-radius: 10px;
    background: #232a35;
    color: #dce1ea;
    font-size: 13px;
}

.files-search button:hover {
    background: #2b3442;
}


/* ---------- Add menu ---------- */

.files-add-menu {
    position: relative;
}

.files-add-menu > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 100%;
    min-height: 52px;
    padding: 0 20px;
    border: 1px solid #657ff1;
    border-radius: 14px;
    background:
        linear-gradient(
            145deg,
            #627df0,
            #526bd2
        );
    color: white;
    font-weight: 750;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.files-add-menu > summary::-webkit-details-marker {
    display: none;
}

.files-add-plus {
    font-size: 21px;
    font-weight: 400;
    line-height: 1;
}

.files-add-panel {
    position: absolute;
    z-index: 60;
    top: calc(100% + 8px);
    right: 0;
    width: min(420px, calc(100vw - 32px));
    padding: 18px;
    border: 1px solid #303744;
    border-radius: 17px;
    background: #151920;
    box-shadow:
        0 22px 70px
        rgba(0, 0, 0, 0.42);
}

.files-add-section {
    display: grid;
    gap: 10px;
}

.files-add-heading {
    color: #d8dde6;
    font-size: 13px;
    font-weight: 750;
}

.files-add-form {
    display: grid;
    gap: 9px;
}

.files-add-form input {
    margin: 0;
}

.files-add-form button {
    width: 100%;
    padding: 11px 14px;
}

.files-add-divider {
    height: 1px;
    margin: 17px 0;
    background: #292f39;
}


/* ---------- Selection toolbar ---------- */

.files-selection-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    padding: 11px 12px 11px 15px;
    border: 1px solid #4a5d9c;
    border-radius: 14px;
    background:
        linear-gradient(
            145deg,
            rgba(73, 94, 169, 0.22),
            rgba(39, 48, 75, 0.22)
        );
}

.files-selection-bar.has-selection {
    display: flex;
}

.files-selection-count {
    display: flex;
    align-items: center;
    gap: 9px;
}

.selection-check {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #637de4;
    color: white;
    font-size: 13px;
}

.files-selection-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.files-selection-button {
    width: auto;
    padding: 8px 12px;
    border: 1px solid #3a4351;
    border-radius: 9px;
    background: #20252e;
    color: #dce1e8;
    font-size: 13px;
    font-weight: 650;
}

.files-selection-button:hover {
    background: #292f3a;
}

.files-selection-danger {
    color: #ff9e9e;
    border-color: #56383c;
    background: #291b1e;
}

.files-selection-danger:hover {
    background: #352126;
}


/* ---------- File list container ---------- */

.files-browser {
    position: relative;
    overflow: visible;
    border: 1px solid #252b35;
    border-radius: 17px;
    background: #12151b;
}

.files-browser-header {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        110px
        54px;
    gap: 18px;
    align-items: center;
    min-height: 46px;
    padding: 0 16px;
    border-bottom: 1px solid #252b35;
    border-radius:
        17px
        17px
        0
        0;
    background: #161a21;
    color: #7f8997;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.files-browser-header-name {
    display: flex;
    align-items: center;
}

.files-select-all {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: #8e98a6;
    font-size: 11px;
    cursor: pointer;
}

.files-select-all input {
    width: 17px;
    height: 17px;
    margin: 0;
}

.files-actions-heading {
    text-align: center;
}


/* ---------- Individual file row ---------- */

.files-row {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns:
        25px
        minmax(0, 1fr)
        110px
        54px;
    gap: 14px;
    align-items: center;
    min-height: 72px;
    padding: 10px 14px;
    border-bottom: 1px solid #222730;
    transition:
        background 140ms ease,
        border-color 140ms ease;
}

.files-row:last-child {
    border-bottom: 0;
}

.files-row:hover {
    background: #161a21;
}

.files-row.is-selected {
    background:
        linear-gradient(
            90deg,
            rgba(91, 116, 210, 0.12),
            rgba(91, 116, 210, 0.035)
        );
}

.files-row:has(.files-item-menu[open]) {
    z-index: 50;
}

.files-row-select {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bulk-item-checkbox {
    width: 17px;
    height: 17px;
    margin: 0;
    cursor: pointer;
}


/* ---------- File identity ---------- */

.files-row-main {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.files-item-icon {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin: 0;
    overflow: hidden;
    border: 1px solid #2e3541;
    border-radius: 11px;
    background: #1a1f27;
    color: #94a7ff;
    padding: 0;
    text-decoration: none;
}

button.files-item-icon {
    cursor: pointer;
}

button.files-item-icon:hover {
    background: #202630;
}

.files-folder-icon {
    color: #8fa4ff;
    font-size: 21px;
}

.files-document-icon {
    color: #9ba6b7;
    font-size: 20px;
}

.files-image-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.files-item-info {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.files-item-name {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    color: #e5e8ed;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.35;
    text-align: left;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.files-item-name:hover {
    color: #aebcff;
}

.files-item-name-button {
    width: auto;
    max-width: 100%;
    justify-content: flex-start;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.files-item-name-button:hover {
    background: transparent;
}

.files-item-mobile-meta {
    display: none;
    color: #727c8b;
    font-size: 12px;
}

.files-row-size {
    color: #7f8998;
    font-size: 13px;
}


/* ---------- Three-dot file menu ---------- */

.files-row-actions {
    display: flex;
    justify-content: center;
}

.files-item-menu {
    position: relative;
}

.files-item-menu > summary {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #929baa;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.files-item-menu > summary::-webkit-details-marker {
    display: none;
}

.files-item-menu > summary:hover,
.files-item-menu[open] > summary {
    border-color: #343b47;
    background: #20252e;
    color: #e3e6eb;
}

.files-item-menu-panel {
    position: absolute;
    z-index: 100;
    top: calc(100% + 6px);
    right: 0;
    width: min(290px, calc(100vw - 32px));
    padding: 8px;
    border: 1px solid #303744;
    border-radius: 14px;
    background: #181c23;
    box-shadow:
        0 18px 55px
        rgba(0, 0, 0, 0.48);
}

.files-menu-title {
    overflow: hidden;
    padding: 9px 10px 11px;
    color: #8e97a5;
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.files-menu-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 40px;
    padding: 9px 10px;
    border-radius: 9px;
    color: #d7dce4;
    font-size: 14px;
    text-decoration: none;
}

.files-menu-action:hover {
    background: #232832;
}

.files-menu-action small {
    color: #74809a;
}

.files-menu-divider {
    height: 1px;
    margin: 7px 4px;
    background: #2a3039;
}


/* ---------- Rename inside menu ---------- */

.files-menu-rename {
    padding: 7px 6px;
}

.files-menu-rename label {
    margin: 0 0 7px;
    color: #838d9b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.files-menu-rename-row {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto;
    gap: 7px;
}

.files-menu-rename input {
    min-width: 0;
    padding: 9px 10px;
    border-radius: 9px;
    font-size: 13px;
}

.files-menu-rename button {
    width: auto;
    padding: 9px 11px;
    border-radius: 9px;
    font-size: 12px;
}


/* ---------- Delete inside menu ---------- */

.files-menu-delete {
    margin: 0;
}

.files-menu-delete button {
    width: 100%;
    justify-content: flex-start;
    padding: 10px;
    border-radius: 9px;
    background: transparent;
    color: #ff8f8f;
    font-size: 14px;
    font-weight: 650;
}

.files-menu-delete button:hover {
    background: #2c1d21;
}


/* ---------- Empty folder ---------- */

.files-empty-state {
    display: grid;
    place-items: center;
    min-height: 260px;
    padding: 42px 20px;
    text-align: center;
}

.files-empty-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 15px;
    border: 1px solid #2a303a;
    border-radius: 15px;
    background: #171b22;
    color: #697586;
    font-size: 25px;
}

.files-empty-state strong {
    margin-bottom: 6px;
    font-size: 16px;
}

.files-empty-state p {
    max-width: 320px;
    margin: 0;
    color: #788290;
    font-size: 13px;
    line-height: 1.5;
}


/* =========================================================
   TABLET / PHONE
   ========================================================= */

@media (max-width: 720px) {

    .files-app {
        width: min(
            100% - 24px,
            1180px
        );
        padding-bottom: 36px;
    }

    .files-app-hero {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
        margin-top: 24px;
        margin-bottom: 18px;
    }

    .files-app-title h1 {
        font-size: 30px;
    }

    .files-app-subtitle {
        font-size: 14px;
    }

    .files-storage-card {
        width: 100%;
    }


    /* Tabs remain horizontal and scrollable */

    .files-app-tabs {
        margin-bottom: 20px;
    }

    .files-app-tab {
        flex: 1 0 auto;
        min-width: 92px;
    }


    /* Search + Add */

    .files-command-bar {
        grid-template-columns:
            minmax(0, 1fr)
            auto;
    }

    .files-search button {
        display: none;
    }

    .files-add-menu > summary {
        min-height: 52px;
        padding: 0 16px;
    }


    /* Selection toolbar */

    .files-selection-bar.has-selection {
        align-items: stretch;
        flex-direction: column;
    }

    .files-selection-actions {
        display: grid;
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

    .files-selection-button {
        width: 100%;
        padding-inline: 7px;
    }


    /* Keep header visible on mobile */

    .files-browser-header {
        display: grid;
        grid-template-columns:
            minmax(0, 1fr)
            46px;
        min-height: 44px;
        padding: 0 12px;
    }

    .files-size-heading {
        display: none;
    }

    .files-actions-heading {
        font-size: 0;
    }

    .files-actions-heading::after {
        content: "Menu";
        font-size: 11px;
    }


    /* Mobile rows */

    .files-row {
        grid-template-columns:
            23px
            minmax(0, 1fr)
            42px;
        gap: 10px;
        min-height: 70px;
        padding: 10px 10px;
    }

    .files-row-size {
        display: none;
    }

    .files-item-icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
    }

    .files-item-mobile-meta {
        display: block;
    }

    .files-item-name {
        font-size: 14px;
    }

    .files-item-menu > summary {
        width: 38px;
        height: 38px;
    }

    .files-item-menu-panel {
        position: absolute;
        right: 0;
    }
}


@media (max-width: 430px) {

    .files-app {
        width: calc(100% - 18px);
    }

    .files-app-title h1 {
        font-size: 27px;
    }

    .files-app-subtitle {
        display: none;
    }

    .files-storage-card {
        padding: 14px;
    }

    .files-app-tabs {
        gap: 4px;
        padding: 4px;
    }

    .files-app-tab {
        min-width: 82px;
        padding-inline: 12px;
        font-size: 13px;
    }

    .files-breadcrumbs {
        margin-bottom: 12px;
        font-size: 13px;
    }

    .files-search-icon {
        padding-left: 12px;
    }

    .files-search input {
        padding-inline: 9px;
    }

    .files-add-menu > summary {
        padding-inline: 13px;
    }

    .files-selection-actions {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .files-browser {
        border-radius: 14px;
    }

    .files-browser-header {
        border-radius:
            14px
            14px
            0
            0;
    }

    .files-row {
        padding-inline: 8px;
    }

    .files-item-icon {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }
}


/* =========================================================
   FILES APP — MOBILE POLISH PASS
   ========================================================= */

@media (max-width: 720px) {

    .topbar {
        min-height: 64px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .files-app-hero {
        gap: 12px;
        margin-top: 20px;
        margin-bottom: 14px;
    }

    .files-app-title .eyebrow {
        margin-bottom: 8px;
        font-size: 11px;
        letter-spacing: 0.14em;
    }

    .files-app-title h1 {
        margin-bottom: 0;
        font-size: 28px;
    }

    .files-storage-card {
        padding: 11px 14px;
        border-radius: 13px;
        background:
            linear-gradient(
                145deg,
                #151922,
                #11141a
            );
    }

    .files-storage-numbers strong {
        font-size: 15px;
    }

    .files-storage-numbers span {
        font-size: 12px;
    }

    .files-app-tabs {
        margin-bottom: 14px;
        border-radius: 13px;
    }

    .files-app-tab {
        padding-top: 9px;
        padding-bottom: 9px;
    }

    .files-breadcrumbs {
        min-height: 28px;
        margin-top: 0;
        margin-bottom: 10px;
    }

    .files-command-bar {
        gap: 9px;
        margin-bottom: 12px;
    }

    .files-search,
    .files-add-menu > summary {
        min-height: 48px;
    }

    .files-search input {
        padding-top: 11px;
        padding-bottom: 11px;
    }

    .files-add-menu > summary {
        padding-inline: 14px;
    }

    .files-browser {
        box-shadow:
            0 10px 35px
            rgba(0, 0, 0, 0.16);
    }

    .files-browser-header {
        min-height: 42px;
    }

    .files-row {
        min-height: 66px;
    }

    .files-row:hover,
    .files-row.is-selected {
        box-shadow:
            inset 2px 0 0
            rgba(108, 140, 255, 0.5);
    }
}


@media (max-width: 430px) {

    .files-app {
        width: calc(100% - 20px);
    }

    .files-app-hero {
        margin-top: 16px;
    }

    .files-app-title h1 {
        font-size: 26px;
    }

    .files-storage-card {
        padding: 10px 13px;
    }

    .files-app-tabs {
        margin-bottom: 12px;
    }

    .files-breadcrumbs {
        font-size: 12px;
    }

    .files-search-icon {
        font-size: 19px;
    }

    .files-search input {
        font-size: 14px;
    }

    .files-add-menu > summary {
        font-size: 14px;
    }
}


/* Only apply hover visuals on devices that actually support hover. */

@media (hover: hover) and (pointer: fine) {

    .files-row:hover {
        background: #161a21;
        box-shadow:
            inset 2px 0 0
            rgba(108, 140, 255, 0.5);
    }

}


/* Selected state should remain explicit on every device. */

.files-row.is-selected {
    background:
        linear-gradient(
            90deg,
            rgba(91, 116, 210, 0.12),
            rgba(91, 116, 210, 0.035)
        );

    box-shadow:
        inset 2px 0 0
        rgba(108, 140, 255, 0.6);
}


/* Prevent touch devices from keeping a fake hover highlight. */

@media (hover: none) {

    .files-row:hover {
        background: transparent;
        box-shadow: none;
    }

    .files-row.is-selected:hover {
        background:
            linear-gradient(
                90deg,
                rgba(91, 116, 210, 0.12),
                rgba(91, 116, 210, 0.035)
            );

        box-shadow:
            inset 2px 0 0
            rgba(108, 140, 255, 0.6);
    }

}


/* =========================================================
   FILES SECONDARY PAGE NAVIGATION
   ========================================================= */

.files-topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.files-back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid #303744;
    border-radius: 10px;
    background: #171b22;
    color: #c5ccd8;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    transition:
        background 140ms ease,
        border-color 140ms ease,
        color 140ms ease;
}

.files-back-link:hover {
    border-color: #46516a;
    background: #20252e;
    color: white;
}

.files-back-arrow {
    font-size: 18px;
    line-height: 1;
}


/* =========================================================
   SHARED WITH ME
   ========================================================= */

.shared-modern-browser {
    overflow: hidden;
    border: 1px solid #252b35;
    border-radius: 17px;
    background: #12151b;
}

.shared-modern-header {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        190px
        120px;
    gap: 18px;
    align-items: center;
    min-height: 46px;
    padding: 0 16px;
    border-bottom: 1px solid #252b35;
    background: #161a21;
    color: #7f8997;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.shared-modern-row {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        190px
        120px;
    gap: 18px;
    align-items: center;
    min-height: 72px;
    padding: 10px 16px;
    border-bottom: 1px solid #222730;
}

.shared-modern-row:last-child {
    border-bottom: 0;
}

@media (hover: hover) and (pointer: fine) {

    .shared-modern-row:hover {
        background: #161a21;
    }

}

.shared-modern-main {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.shared-modern-owner {
    overflow: hidden;
    color: #8b95a3;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shared-modern-status {
    display: flex;
    justify-content: flex-start;
}

.shared-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 750;
}

.shared-status-badge.available {
    border: 1px solid #315244;
    background: #17271f;
    color: #85d8ad;
}

.shared-status-badge.unavailable {
    border: 1px solid #57363b;
    background: #2b1b1e;
    color: #ff9696;
}

.shared-mobile-meta {
    display: none;
    color: #727c8b;
    font-size: 12px;
}


/* =========================================================
   SHARED MOBILE
   ========================================================= */

@media (max-width: 720px) {

    .files-topbar-left {
        gap: 10px;
    }

    .files-back-link {
        min-height: 36px;
        padding: 6px 9px;
    }

    .shared-modern-header {
        grid-template-columns:
            minmax(0, 1fr)
            90px;
        padding-inline: 12px;
    }

    .shared-owner-heading {
        display: none;
    }

    .shared-status-heading {
        text-align: right;
    }

    .shared-modern-row {
        grid-template-columns:
            minmax(0, 1fr)
            auto;
        gap: 10px;
        min-height: 70px;
        padding: 10px 12px;
    }

    .shared-modern-owner {
        display: none;
    }

    .shared-mobile-meta {
        display: block;
    }

    .shared-modern-status {
        justify-content: flex-end;
    }

}


@media (max-width: 430px) {

    .files-back-text {
        display: none;
    }

    .files-back-link {
        width: 38px;
        padding: 0;
        justify-content: center;
    }

    .shared-status-badge {
        min-height: 26px;
        padding-inline: 7px;
        font-size: 10px;
    }

}


/* =========================================================
   TRASH
   ========================================================= */

.trash-hero {
    align-items: flex-end;
}

.trash-empty-form {
    margin: 0;
}

.trash-empty-button {
    width: auto;
    padding: 10px 14px;
    border: 1px solid #56383c;
    background: #291b1e;
    color: #ff9696;
    font-size: 13px;
}

.trash-empty-button:hover {
    background: #352126;
}


.trash-modern-browser {
    overflow: hidden;
    border: 1px solid #252b35;
    border-radius: 17px;
    background: #12151b;
}

.trash-modern-header {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        100px
        120px
        220px;
    gap: 18px;
    align-items: center;
    min-height: 46px;
    padding: 0 16px;
    border-bottom: 1px solid #252b35;
    background: #161a21;
    color: #7f8997;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.trash-modern-row {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        100px
        120px
        220px;
    gap: 18px;
    align-items: center;
    min-height: 78px;
    padding: 11px 16px;
    border-bottom: 1px solid #222730;
}

.trash-modern-row:last-child {
    border-bottom: 0;
}

@media (hover: hover) and (pointer: fine) {

    .trash-modern-row:hover {
        background: #161a21;
    }

}

.trash-modern-main {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.trash-item-name {
    overflow: hidden;
    color: #e5e8ed;
    font-size: 14px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trash-original-path {
    overflow: hidden;
    max-width: 100%;
    color: #727c8b;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trash-modern-size {
    color: #7f8998;
    font-size: 13px;
}

.trash-modern-status {
    display: flex;
}

.trash-modern-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.trash-modern-actions form {
    margin: 0;
}

.trash-restore-button,
.trash-delete-button {
    width: auto;
    min-height: 36px;
    padding: 8px 11px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
}

.trash-restore-button {
    border: 1px solid #3d4c70;
    background: #222b40;
    color: #c8d3ff;
}

.trash-restore-button:hover {
    background: #2b3650;
}

.trash-delete-button {
    border: 1px solid #56383c;
    background: #291b1e;
    color: #ff9696;
}

.trash-delete-button:hover {
    background: #352126;
}

.trash-mobile-meta {
    display: none;
    color: #727c8b;
    font-size: 12px;
}


/* =========================================================
   TRASH MOBILE
   ========================================================= */

@media (max-width: 720px) {

    .trash-hero {
        align-items: stretch;
    }

    .trash-empty-form {
        display: flex;
        justify-content: flex-start;
    }

    .trash-empty-button {
        min-height: 40px;
    }

    .trash-modern-header {
        grid-template-columns:
            minmax(0, 1fr)
            145px;
        padding-inline: 12px;
    }

    .trash-size-heading,
    .trash-status-heading {
        display: none;
    }

    .trash-actions-heading {
        text-align: right;
    }

    .trash-modern-row {
        grid-template-columns:
            minmax(0, 1fr)
            145px;
        gap: 10px;
        min-height: 82px;
        padding: 11px 12px;
    }

    .trash-modern-size,
    .trash-modern-status {
        display: none;
    }

    .trash-mobile-meta {
        display: block;
    }

    .trash-modern-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .trash-modern-actions button {
        width: 100%;
    }

}


@media (max-width: 430px) {

    .trash-modern-header {
        grid-template-columns:
            minmax(0, 1fr)
            118px;
    }

    .trash-modern-row {
        grid-template-columns:
            minmax(0, 1fr)
            118px;
        padding-inline: 9px;
    }

    .trash-restore-button,
    .trash-delete-button {
        padding-inline: 7px;
        font-size: 11px;
    }

}


/* =========================================================
   MODERN FILE SEARCH
   ========================================================= */

.search-modern-form {
    display: flex;
    align-items: center;
    min-height: 52px;
    margin-bottom: 16px;
    border: 1px solid #272d38;
    border-radius: 14px;
    background: #11141a;
}

.search-modern-form:focus-within {
    border-color: #5368b8;
    box-shadow:
        0 0 0 3px
        rgba(108, 140, 255, 0.08);
}

.search-modern-form input[type="search"] {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 12px;
    box-shadow: none;
}

.search-modern-form input[type="search"]:focus {
    border: 0;
}

.search-modern-form button {
    width: auto;
    margin: 5px;
    padding: 9px 16px;
    border-radius: 10px;
    background: #232a35;
    color: #dce1ea;
    font-size: 13px;
}

.search-modern-form button:hover {
    background: #2b3442;
}


.search-modern-summary {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin: 10px 2px 12px;
    color: #d5dae2;
    font-size: 13px;
}

.search-modern-summary span {
    color: #778190;
}


.search-modern-browser {
    overflow: visible;
    border: 1px solid #252b35;
    border-radius: 17px;
    background: #12151b;
}

.search-modern-header {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        110px
        54px;
    gap: 18px;
    align-items: center;
    min-height: 46px;
    padding: 0 16px;
    border-bottom: 1px solid #252b35;
    border-radius:
        17px
        17px
        0
        0;
    background: #161a21;
    color: #7f8997;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}


.search-modern-row {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        110px
        54px;
    gap: 18px;
    align-items: center;
    min-height: 72px;
    padding: 10px 16px;
    border-bottom: 1px solid #222730;
}

.search-modern-row:last-child {
    border-bottom: 0;
}

.search-modern-row:has(.files-item-menu[open]) {
    z-index: 50;
}

@media (hover: hover) and (pointer: fine) {

    .search-modern-row:hover {
        background: #161a21;
    }

}


.search-modern-main {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.search-result-location {
    display: block;
    overflow: hidden;
    max-width: 100%;
    color: #727c8b;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-modern-size {
    color: #7f8998;
    font-size: 13px;
}

.search-modern-actions {
    display: flex;
    justify-content: center;
}

.search-mobile-meta {
    display: none;
    color: #727c8b;
    font-size: 12px;
}

.search-start-state {
    min-height: 220px;
    border: 1px solid #252b35;
    border-radius: 17px;
    background: #12151b;
}


/* =========================================================
   SEARCH MOBILE
   ========================================================= */

@media (max-width: 720px) {

    .search-modern-form {
        min-height: 48px;
        margin-bottom: 12px;
    }

    .search-modern-form button {
        display: none;
    }

    .search-modern-summary {
        margin-top: 8px;
    }

    .search-modern-header {
        grid-template-columns:
            minmax(0, 1fr)
            46px;
        min-height: 42px;
        padding-inline: 12px;
    }

    .search-size-heading {
        display: none;
    }

    .search-actions-heading {
        text-align: center;
    }

    .search-modern-row {
        grid-template-columns:
            minmax(0, 1fr)
            42px;
        gap: 10px;
        min-height: 70px;
        padding: 10px 10px;
    }

    .search-modern-size {
        display: none;
    }

    .search-mobile-meta {
        display: block;
    }

}


@media (max-width: 430px) {

    .search-modern-browser {
        border-radius: 14px;
    }

    .search-modern-header {
        border-radius:
            14px
            14px
            0
            0;
    }

    .search-result-location {
        max-width: 220px;
    }

}


/* =========================================================
   MOVE / COPY DESTINATION PICKER
   ========================================================= */

.transfer-item-card {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid #29303b;
    border-radius: 15px;
    background:
        linear-gradient(
            145deg,
            #171b22,
            #13161c
        );
}

.transfer-item-icon {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 1px solid #303845;
    border-radius: 11px;
    background: #1d222b;
    color: #94a7ff;
    font-size: 20px;
}

.transfer-item-info {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.transfer-item-info strong {
    overflow: hidden;
    color: #e7eaf0;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transfer-item-label {
    color: #768190;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}


.transfer-picker {
    display: grid;
    gap: 14px;
}


.transfer-destination-card {
    overflow: hidden;
    border: 1px solid #252b35;
    border-radius: 16px;
    background: #12151b;
}

.transfer-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 10px 15px;
    border-bottom: 1px solid #252b35;
    background: #161a21;
}

.transfer-section-heading div {
    display: grid;
    gap: 2px;
}

.transfer-section-heading strong {
    color: #dfe3e9;
    font-size: 13px;
}

.transfer-section-heading span {
    color: #737d8c;
    font-size: 11px;
}


.transfer-folder-list {
    display: grid;
}

.transfer-folder-option {
    display: grid;
    grid-template-columns:
        24px
        30px
        minmax(0, 1fr)
        24px;
    gap: 10px;
    align-items: center;
    min-height: 58px;
    margin: 0;
    padding: 9px 14px;
    border-bottom: 1px solid #222730;
    background: transparent;
    cursor: pointer;
    transition:
        background 130ms ease,
        box-shadow 130ms ease;
}

.transfer-folder-option:last-child {
    border-bottom: 0;
}

@media (hover: hover) and (pointer: fine) {

    .transfer-folder-option:hover {
        background: #171b22;
    }

}

.transfer-folder-option input {
    width: 17px;
    height: 17px;
    margin: 0;
}

.transfer-folder-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #1e2430;
    color: #91a5ff;
    font-size: 16px;
}

.transfer-folder-name {
    overflow: hidden;
    color: #d7dce4;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transfer-folder-check {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #637de4;
    color: white;
    font-size: 11px;
    opacity: 0;
    transform: scale(0.8);
    transition:
        opacity 120ms ease,
        transform 120ms ease;
}

.transfer-folder-option:has(input:checked) {
    background:
        linear-gradient(
            90deg,
            rgba(91, 116, 210, 0.14),
            rgba(91, 116, 210, 0.035)
        );

    box-shadow:
        inset 2px 0 0
        rgba(108, 140, 255, 0.65);
}

.transfer-folder-option:has(input:checked)
.transfer-folder-check {
    opacity: 1;
    transform: scale(1);
}


.transfer-action-bar {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding-top: 3px;
}

.transfer-cancel-button,
.transfer-confirm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.transfer-cancel-button {
    border: 1px solid #343b47;
    background: #181c23;
    color: #b8c0cc;
}

.transfer-cancel-button:hover {
    background: #20252e;
}

.transfer-confirm-button {
    width: auto;
    border: 1px solid #667ff0;
    background:
        linear-gradient(
            145deg,
            #627df0,
            #526bd2
        );
    color: white;
}


/* =========================================================
   MOVE / COPY MOBILE
   ========================================================= */

@media (max-width: 720px) {

    .transfer-item-card {
        margin-bottom: 12px;
        padding: 12px;
    }

    .transfer-folder-option {
        min-height: 56px;
        padding-inline: 11px;
    }

    .transfer-action-bar {
        position: sticky;
        bottom: 8px;
        z-index: 30;
        display: grid;
        grid-template-columns:
            minmax(0, 0.8fr)
            minmax(0, 1.2fr);
        padding: 10px;
        border: 1px solid #2c333e;
        border-radius: 14px;
        background:
            rgba(18, 21, 27, 0.94);
        backdrop-filter: blur(12px);
        box-shadow:
            0 14px 40px
            rgba(0, 0, 0, 0.32);
    }

    .transfer-cancel-button,
    .transfer-confirm-button {
        width: 100%;
        min-height: 44px;
    }

}


@media (max-width: 430px) {

    .transfer-folder-option {
        grid-template-columns:
            22px
            28px
            minmax(0, 1fr)
            22px;
        gap: 8px;
    }

    .transfer-folder-name {
        font-size: 13px;
    }

}


/* =========================================================
   SHARED FOLDER BROWSER
   ========================================================= */

.shared-command-bar {
    position: relative;
    z-index: 20;
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 18px;
}

.shared-folder-context {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 52px;
    padding: 9px 13px;
    border: 1px solid #272d38;
    border-radius: 14px;
    background: #11141a;
}

.shared-folder-context-icon {
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #1d2430;
    color: #92a6ff;
}

.shared-folder-context > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.shared-folder-context strong {
    color: #dce1e8;
    font-size: 13px;
}

.shared-folder-context span:last-child {
    overflow: hidden;
    color: #737d8b;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.shared-folder-row {
    grid-template-columns:
        minmax(0, 1fr)
        110px
        54px;
}


@media (max-width: 720px) {

    .shared-command-bar {
        grid-template-columns:
            minmax(0, 1fr)
            auto;
        gap: 9px;
        margin-bottom: 12px;
    }

    .shared-folder-context {
        min-height: 48px;
    }

    .shared-folder-context span:last-child {
        display: none;
    }

    .shared-folder-row {
        grid-template-columns:
            minmax(0, 1fr)
            42px;
    }

}


@media (max-width: 430px) {

    .shared-folder-context {
        padding-inline: 10px;
    }

    .shared-folder-context strong {
        font-size: 12px;
    }

}


/* =========================================================
   BULK MOVE / COPY
   ========================================================= */

.bulk-modern-selected {
    overflow: hidden;
    margin-bottom: 14px;
    border: 1px solid #29303b;
    border-radius: 15px;
    background: #12151b;
}

.bulk-modern-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 9px 14px;
    border-bottom: 1px solid #252b35;
    background: #161a21;
}

.bulk-modern-heading strong {
    color: #dce1e8;
    font-size: 13px;
}

.bulk-modern-heading span {
    color: #737d8b;
    font-size: 11px;
}

.bulk-modern-items {
    display: grid;
}

.bulk-modern-item {
    display: grid;
    grid-template-columns:
        34px
        minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 52px;
    padding: 8px 13px;
    border-bottom: 1px solid #222730;
}

.bulk-modern-item:last-child {
    border-bottom: 0;
}

.bulk-modern-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #1e2430;
    color: #91a5ff;
}

.bulk-modern-name {
    overflow: hidden;
    color: #d9dee6;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   SHARE PAGE
   ========================================================= */

.share-modern-target {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 16px;
    padding: 13px 15px;
    border: 1px solid #29303b;
    border-radius: 15px;
    background:
        linear-gradient(
            145deg,
            #171b22,
            #13161c
        );
}

.share-modern-label {
    color: #768190;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.share-modern-target-name {
    overflow: hidden;
    color: #e7eaf0;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.share-modern-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 0.9fr)
        minmax(0, 1.1fr);
    gap: 14px;
    align-items: start;
}

.share-modern-card {
    overflow: hidden;
    border: 1px solid #252b35;
    border-radius: 16px;
    background: #12151b;
}

.share-modern-card-heading {
    min-height: 58px;
    padding: 11px 15px;
    border-bottom: 1px solid #252b35;
    background: #161a21;
}

.share-modern-card-heading div {
    display: grid;
    gap: 2px;
}

.share-modern-card-heading strong {
    color: #dfe3e9;
    font-size: 13px;
}

.share-modern-card-heading span {
    color: #737d8c;
    font-size: 11px;
}


.share-modern-form {
    padding: 15px;
}

.share-modern-form label {
    margin: 0 0 8px;
    color: #aeb6c2;
    font-size: 12px;
}

.share-modern-form select {
    margin: 0;
}

.share-modern-form button {
    width: 100%;
    margin-top: 11px;
}


.share-modern-access-list {
    display: grid;
}

.share-modern-person {
    display: grid;
    grid-template-columns:
        38px
        minmax(0, 1fr)
        auto;
    gap: 11px;
    align-items: center;
    min-height: 66px;
    padding: 10px 13px;
    border-bottom: 1px solid #222730;
}

.share-modern-person:last-child {
    border-bottom: 0;
}

.share-modern-avatar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid #35405a;
    border-radius: 50%;
    background: #20283a;
    color: #adbcff;
    font-size: 13px;
    font-weight: 800;
}

.share-modern-person-info {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.share-modern-person-info strong {
    overflow: hidden;
    color: #dde2e9;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-modern-person-info span {
    overflow: hidden;
    color: #737d8b;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-modern-person form {
    margin: 0;
}

.share-remove-button {
    width: auto;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #56383c;
    background: #291b1e;
    color: #ff9696;
    font-size: 11px;
}

.share-remove-button:hover {
    background: #352126;
}


.share-modern-empty {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 100px;
    padding: 18px;
}

.share-modern-empty-icon {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border: 1px solid #2d3440;
    border-radius: 10px;
    background: #181c23;
    color: #697586;
}

.share-modern-empty div {
    display: grid;
    gap: 3px;
}

.share-modern-empty strong {
    color: #dce1e8;
    font-size: 13px;
}

.share-modern-empty div span {
    color: #737d8b;
    font-size: 11px;
}


/* =========================================================
   SHARE MOBILE
   ========================================================= */

@media (max-width: 720px) {

    .share-modern-grid {
        grid-template-columns: 1fr;
    }

    .share-modern-target {
        margin-bottom: 12px;
        padding: 12px;
    }

}


@media (max-width: 430px) {

    .share-modern-person {
        grid-template-columns:
            34px
            minmax(0, 1fr)
            auto;
        gap: 8px;
        padding-inline: 10px;
    }

    .share-modern-avatar {
        width: 32px;
        height: 32px;
    }

    .share-remove-button {
        padding-inline: 8px;
    }

}


/* =========================================================
   PERSONAL HOME — MOBILE-FIRST REDESIGN
   ========================================================= */

.home-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(
            circle at 50% -20%,
            rgba(111, 126, 255, 0.08),
            transparent 34rem
        ),
        var(--bg);
    color: var(--text);
}

.home-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(16, 18, 23, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.home-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
}

.home-brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--accent);
    color: white;
    font-weight: 900;
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.18);
}

.home-brand-name {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.home-account-menu {
    position: relative;
}

.home-account-menu > summary {
    list-style: none;
}

.home-account-menu > summary::-webkit-details-marker {
    display: none;
}

.home-account-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 7px;
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
}

.home-account-summary:hover {
    background: var(--panel);
}

.home-avatar {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--panel-2);
    font-weight: 800;
}

.home-account-text {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
}

.home-chevron {
    color: var(--muted);
    font-size: 12px;
}

.home-account-dropdown {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    width: min(280px, calc(100vw - 28px));
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel);
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.28);
}

.home-account-identity {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px 5px;
}

.home-account-identity small {
    color: var(--muted);
}

.home-account-divider {
    height: 1px;
    margin: 10px 0;
    background: var(--border);
}

.home-signout {
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    text-align: left;
}

.home-shell {
    width: min(1100px, calc(100% - 28px));
    margin: 0 auto;
    padding: 32px 0 52px;
}

.home-welcome {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
}

.home-welcome h1 {
    max-width: 720px;
    margin: 5px 0 8px;
    font-size: clamp(28px, 5vw, 46px);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.home-welcome-copy {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.home-kicker {
    margin: 0;
    color: var(--accent);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.16em;
}

.home-status-pill {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--panel);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.home-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #72cf8b;
    box-shadow: 0 0 0 4px rgba(114, 207, 139, 0.08);
}

.home-section {
    margin-top: 42px;
}

.home-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
}

.home-section-heading h2 {
    margin: 4px 0 0;
    font-size: 21px;
    letter-spacing: -0.02em;
}

.home-app-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.home-app-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 150px;
    padding: 17px;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.025),
            transparent 55%
        ),
        var(--panel);
    color: var(--text);
    text-decoration: none;
    transition:
        border-color 140ms ease,
        transform 140ms ease,
        background 140ms ease;
}

.home-app-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--panel-2);
    color: var(--accent);
    font-size: 22px;
    font-weight: 900;
}

.home-app-content {
    min-width: 0;
}

.home-app-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.home-app-title-row strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px;
    white-space: nowrap;
}

.home-app-content small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.home-app-arrow {
    color: var(--muted);
    font-size: 24px;
    line-height: 1;
}

.home-app-card-disabled {
    opacity: 0.62;
}

.home-coming-soon {
    position: absolute;
    top: 17px;
    right: 15px;
    padding: 4px 7px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.home-empty-card {
    margin-top: 38px;
    padding: 38px 24px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
    text-align: center;
}

.home-empty-card h2 {
    margin: 14px 0 8px;
}

.home-empty-card p {
    margin: 0;
    color: var(--muted);
}

.home-empty-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: auto;
    border-radius: 14px;
    background: var(--panel-2);
    color: var(--accent);
    font-size: 25px;
}

.home-owner-section {
    margin-top: 30px;
}

.home-owner-panel {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
}

.home-owner-panel > summary {
    list-style: none;
}

.home-owner-panel > summary::-webkit-details-marker {
    display: none;
}

.home-owner-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 18px;
    cursor: pointer;
    user-select: none;
}

.home-owner-summary strong {
    display: block;
    margin-top: 3px;
}

.home-owner-chevron {
    color: var(--muted);
}

.home-owner-links {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 1px;
    padding: 1px;
    border-top: 1px solid var(--border);
    background: var(--border);
}

.home-owner-links a {
    display: flex;
    min-width: 0;
    padding: 17px;
    flex-direction: column;
    gap: 5px;
    background: var(--panel);
    color: var(--text);
    text-decoration: none;
}

.home-owner-links a:hover {
    background: var(--panel-2);
}

.home-owner-links small {
    color: var(--muted);
}

.home-pending-badge {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    margin-left: 5px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    font-size: 10px;
}

@media (hover: hover) and (pointer: fine) {

    a.home-app-card:hover {
        border-color: var(--accent);
        transform: translateY(-2px);
        background:
            linear-gradient(
                145deg,
                rgba(255, 255, 255, 0.04),
                transparent 55%
            ),
            var(--panel);
    }

}

@media (max-width: 850px) {

    .home-app-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .home-owner-links {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 650px) {

    .home-topbar {
        min-height: 58px;
        padding: 8px 14px;
    }

    .home-brand-name,
    .home-account-text,
    .home-chevron {
        display: none;
    }

    .home-shell {
        width: min(100% - 24px, 1100px);
        padding-top: 25px;
    }

    .home-welcome {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .home-status-pill {
        padding: 7px 10px;
    }

    .home-section {
        margin-top: 32px;
    }

    .home-app-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .home-app-card {
        min-height: 132px;
        padding: 14px;
        border-radius: 16px;
    }

    .home-app-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 20px;
    }

    .home-coming-soon {
        top: 13px;
        right: 11px;
    }

}

@media (max-width: 360px) {

    .home-app-grid {
        grid-template-columns: 1fr;
    }

    .home-app-card {
        min-height: 112px;
    }

}


/* =========================================================
   PERSONAL HOME — WELCOMING PRODUCT PASS
   ========================================================= */

.home-body {
    background:
        radial-gradient(
            circle at 30% -10%,
            rgba(108, 140, 255, 0.14),
            transparent 30rem
        ),
        radial-gradient(
            circle at 105% 30%,
            rgba(108, 140, 255, 0.05),
            transparent 24rem
        ),
        var(--background);
}

.home-hero {
    position: relative;
    min-height: 180px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 30px 0 20px;
}

.home-hero-content {
    position: relative;
    z-index: 2;
}

.home-hero h1 {
    max-width: 760px;
    margin: 7px 0 10px;
    font-size: clamp(32px, 7vw, 54px);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.home-hero-copy {
    margin: 0;
    color: #abb2bf;
    font-size: clamp(15px, 3vw, 18px);
    line-height: 1.5;
}

.home-hero-glow {
    position: absolute;
    top: -90px;
    right: -80px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(108, 140, 255, 0.08);
    filter: blur(20px);
    pointer-events: none;
}

.home-app-grid {
    gap: 12px;
}

.home-app-card {
    min-height: 136px;
    padding: 16px;
    gap: 18px;
    border-radius: 20px;
}

.home-app-card-active {
    background:
        linear-gradient(
            145deg,
            rgba(108, 140, 255, 0.075),
            transparent 58%
        ),
        var(--panel);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.12);
}

.home-app-card-disabled {
    opacity: 1;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.018),
            transparent 60%
        ),
        rgba(21, 24, 32, 0.64);
}

.home-app-card-disabled .home-app-content,
.home-app-card-disabled .home-app-icon {
    opacity: 0.55;
}

.home-app-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.home-app-icon {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.025);
    background:
        rgba(108, 140, 255, 0.055);
}

.home-app-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-app-card-active .home-app-icon {
    color: #86a0ff;
    background:
        rgba(108, 140, 255, 0.09);
}

.home-app-content strong {
    display: block;
    font-size: 16px;
    letter-spacing: -0.015em;
}

.home-app-content small {
    margin-top: 5px;
}

.home-open-arrow {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    border-radius: 50%;
    color: #aeb7c8;
    background: rgba(255, 255, 255, 0.035);
    font-size: 15px;
}

.home-soon-label {
    padding: 4px 7px;
    border-radius: 999px;
    color: #747c89;
    background: rgba(255, 255, 255, 0.025);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.home-owner-section {
    margin-top: 36px;
}

@media (max-width: 650px) {

    .home-shell {
        padding-top: 8px;
    }

    .home-hero {
        min-height: 165px;
        padding: 30px 2px 18px;
    }

    .home-hero h1 {
        max-width: 330px;
        font-size: 38px;
    }

    .home-section {
        margin-top: 24px;
    }

    .home-section-heading {
        margin-bottom: 13px;
    }

    .home-section-heading h2 {
        font-size: 23px;
    }

    .home-app-card {
        min-height: 126px;
        padding: 14px;
        gap: 14px;
    }

    .home-app-icon {
        width: 40px;
        height: 40px;
    }

    .home-app-icon svg {
        width: 20px;
        height: 20px;
    }

    .home-app-content strong {
        font-size: 15px;
    }

    .home-app-content small {
        font-size: 11px;
        line-height: 1.35;
    }

}

@media (hover: hover) and (pointer: fine) {

    a.home-app-card-active:hover {
        border-color: rgba(108, 140, 255, 0.65);
        transform: translateY(-3px);
        box-shadow:
            0 16px 34px rgba(0, 0, 0, 0.2);
    }

}

@media (hover: none) {

    a.home-app-card-active:active {
        transform: scale(0.98);
    }

}


/* Dynamic home greeting */

.home-date {
    margin: 0 0 7px;
    color: #c2c8d2;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: -0.01em;
}

@media (max-width: 650px) {
    .home-date {
        font-size: 13px;
    }
}


/* Home brand refinement */

.home-brand-mark svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-brand-name {
    display: inline !important;
}

@media (max-width: 650px) {

    .home-brand {
        gap: 9px;
    }

    .home-brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 11px;
    }

    .home-brand-name {
        display: inline !important;
        font-size: 15px;
    }

    .home-account-text,
    .home-chevron {
        display: none;
    }

}


/* =========================================================
   HOME — LIVE APPS + QUIET UPCOMING APPS
   ========================================================= */

.home-live-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.home-live-card {
    display: grid;
    grid-template-columns:
        auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    min-height: 92px;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background:
        linear-gradient(
            135deg,
            rgba(108, 140, 255, 0.10),
            transparent 65%
        ),
        var(--panel);
    color: var(--text);
    text-decoration: none;
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.13);
}

.home-live-icon,
.home-upcoming-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.035);
    color: #86a0ff;
    background: rgba(108, 140, 255, 0.08);
}

.home-live-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
}

.home-live-icon svg,
.home-upcoming-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-live-copy {
    min-width: 0;
}

.home-live-copy strong {
    display: block;
    font-size: 16px;
    letter-spacing: -0.015em;
}

.home-live-copy small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.home-live-arrow {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.035);
    color: #b5bdca;
}

.home-upcoming-section {
    margin-top: 34px;
}

.home-upcoming-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.home-upcoming-item {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 11px;
    padding: 12px;
    border: 1px solid rgba(41, 46, 57, 0.72);
    border-radius: 15px;
    background: rgba(21, 24, 32, 0.42);
}

.home-upcoming-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    opacity: 0.62;
}

.home-upcoming-icon svg {
    width: 18px;
    height: 18px;
}

.home-upcoming-copy {
    min-width: 0;
}

.home-upcoming-copy strong {
    display: block;
    overflow: hidden;
    color: #a5acb7;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-upcoming-copy small {
    display: none;
}

@media (hover: hover) and (pointer: fine) {

    .home-live-card:hover {
        border-color: rgba(108, 140, 255, 0.7);
        transform: translateY(-2px);
    }

}

@media (max-width: 650px) {

    .home-live-grid {
        grid-template-columns: 1fr;
    }

    .home-live-card {
        min-height: 88px;
        padding: 15px;
    }

    .home-upcoming-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .home-upcoming-item {
        padding: 10px;
    }

}

@media (max-width: 360px) {

    .home-upcoming-grid {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   EDIT HOME
   ========================================================= */

.home-edit-button,
.edit-home-done {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--panel);
    color: var(--text);
    text-decoration: none;
    font-size: 12px;
    font-weight: 750;
}

.home-edit-button:hover,
.edit-home-done:hover {
    border-color: var(--accent);
    background: var(--panel-2);
}

.edit-home-shell {
    width: min(760px, calc(100% - 28px));
    margin: 0 auto;
    padding: 40px 0 70px;
}

.edit-home-heading h1 {
    margin: 7px 0 9px;
    font-size: clamp(32px, 7vw, 48px);
    letter-spacing: -0.04em;
}

.edit-home-heading > p:last-child {
    max-width: 560px;
    color: var(--muted);
    line-height: 1.55;
}

.edit-home-section {
    margin-top: 38px;
}

.edit-home-section-title h2 {
    margin-bottom: 5px;
    font-size: 20px;
}

.edit-home-section-title p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 13px;
}

.edit-home-options {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
}

.edit-home-option {
    display: grid;
    grid-template-columns:
        auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 70px;
    padding: 13px 15px;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
}

.edit-home-option:last-child {
    border-bottom: 0;
}

.edit-home-option:hover {
    background: var(--panel-2);
}

.edit-home-option-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(108, 140, 255, 0.09);
    color: #86a0ff;
    font-weight: 800;
}

.edit-home-option strong,
.edit-home-option small {
    display: block;
}

.edit-home-option strong {
    font-size: 14px;
}

.edit-home-option small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.edit-home-option-arrow {
    color: var(--muted);
    font-size: 22px;
}

.edit-home-note {
    margin-top: 28px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(108, 140, 255, 0.055);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 650px) {

    .home-section-heading {
        align-items: center;
    }

    .home-edit-button {
        flex: 0 0 auto;
    }

    .edit-home-shell {
        padding-top: 28px;
    }

}


/* =========================================================
   EDIT HOME — ACCENT COLOR PICKER
   ========================================================= */

.edit-accent-setting {
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

.edit-accent-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.edit-accent-heading strong,
.edit-accent-heading small {
    display: block;
}

.edit-accent-heading strong {
    font-size: 14px;
}

.edit-accent-heading small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.accent-picker {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-top: 15px;
}

.accent-choice {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel-2);
    color: var(--text);
}

.accent-choice:hover {
    background: var(--panel-2);
    border-color: var(--swatch);
}

.accent-choice-selected {
    border-color: var(--swatch);
    box-shadow:
        inset 0 0 0 1px var(--swatch);
}

.accent-swatch {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--swatch);
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.04);
}

.accent-choice-name {
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
}

.accent-check {
    margin-left: auto;
    color: var(--swatch);
    font-size: 12px;
    font-weight: 900;
}


/* Make the personalized accent flow through Home */

.home-brand-mark {
    background: var(--accent);
}

.home-kicker,
.home-live-icon,
.home-app-icon,
.home-upcoming-icon,
.edit-home-option-icon {
    color: var(--accent);
}

.home-live-icon,
.home-app-icon,
.home-upcoming-icon,
.edit-home-option-icon {
    background:
        color-mix(
            in srgb,
            var(--accent) 10%,
            transparent
        );
}

.home-live-card {
    background:
        linear-gradient(
            135deg,
            color-mix(
                in srgb,
                var(--accent) 11%,
                transparent
            ),
            transparent 65%
        ),
        var(--panel);
}

.home-body {
    background:
        radial-gradient(
            circle at 30% -10%,
            color-mix(
                in srgb,
                var(--accent) 14%,
                transparent
            ),
            transparent 30rem
        ),
        radial-gradient(
            circle at 105% 30%,
            color-mix(
                in srgb,
                var(--accent) 5%,
                transparent
            ),
            transparent 24rem
        ),
        var(--background);
}

.home-hero-glow {
    background:
        color-mix(
            in srgb,
            var(--accent) 9%,
            transparent
        );
}

@media (max-width: 520px) {

    .accent-picker {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   EDIT HOME — BACKGROUND PICKER
   ========================================================= */

.edit-background-setting {
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

.edit-background-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.edit-background-heading strong,
.edit-background-heading small {
    display: block;
}

.edit-background-heading strong {
    font-size: 14px;
}

.edit-background-heading small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.background-picker {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.background-choice {
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel-2);
    color: var(--text);
    text-align: left;
}

.background-choice:hover {
    background: var(--panel-2);
    border-color: var(--accent);
}

.background-choice-selected {
    border-color: var(--accent);
    box-shadow:
        inset 0 0 0 1px var(--accent);
}

.background-preview {
    position: relative;
    display: block;
    height: 72px;
    border-bottom: 1px solid var(--border);
}

.background-check {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 12px;
    font-weight: 900;
}

.background-choice-copy {
    display: block;
    padding: 10px 11px 11px;
}

.background-choice-copy strong,
.background-choice-copy small {
    display: block;
}

.background-choice-copy strong {
    font-size: 12px;
}

.background-choice-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
}


/* Preview thumbnails */

.background-preview-midnight .background-preview {
    background:
        radial-gradient(
            circle at 30% 0%,
            rgba(108, 140, 255, 0.34),
            transparent 65%
        ),
        #0c0e12;
}

.background-preview-soft_black .background-preview {
    background:
        linear-gradient(
            145deg,
            #151515,
            #080808
        );
}

.background-preview-deep_blue .background-preview {
    background:
        radial-gradient(
            circle at 20% 10%,
            #173765,
            transparent 62%
        ),
        linear-gradient(
            145deg,
            #101827,
            #080d16
        );
}

.background-preview-deep_purple .background-preview {
    background:
        radial-gradient(
            circle at 30% 10%,
            #472c68,
            transparent 62%
        ),
        linear-gradient(
            145deg,
            #1b1425,
            #0b0910
        );
}

.background-preview-warm_ember .background-preview {
    background:
        radial-gradient(
            circle at 25% 10%,
            #6b371d,
            transparent 62%
        ),
        linear-gradient(
            145deg,
            #21140e,
            #0e0b09
        );
}

.background-preview-aurora .background-preview {
    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(61, 180, 189, 0.72),
            transparent 48%
        ),
        radial-gradient(
            circle at 85% 5%,
            rgba(76, 105, 215, 0.72),
            transparent 48%
        ),
        #0b1117;
}


/* =========================================================
   USER BACKGROUND THEMES
   ========================================================= */

.home-body.theme-bg-midnight {
    background:
        radial-gradient(
            circle at 30% -10%,
            color-mix(
                in srgb,
                var(--accent) 14%,
                transparent
            ),
            transparent 30rem
        ),
        radial-gradient(
            circle at 105% 30%,
            color-mix(
                in srgb,
                var(--accent) 5%,
                transparent
            ),
            transparent 24rem
        ),
        var(--background);
}

.home-body.theme-bg-soft_black {
    background:
        linear-gradient(
            180deg,
            #101010 0%,
            #08090b 58%,
            #060708 100%
        );
}

.home-body.theme-bg-deep_blue {
    background:
        radial-gradient(
            circle at 20% 0%,
            rgba(40, 94, 170, 0.24),
            transparent 34rem
        ),
        radial-gradient(
            circle at 100% 40%,
            rgba(37, 65, 118, 0.12),
            transparent 30rem
        ),
        #090e17;
}

.home-body.theme-bg-deep_purple {
    background:
        radial-gradient(
            circle at 25% 0%,
            rgba(113, 65, 153, 0.25),
            transparent 34rem
        ),
        radial-gradient(
            circle at 100% 45%,
            rgba(71, 42, 102, 0.12),
            transparent 28rem
        ),
        #0d0a12;
}

.home-body.theme-bg-warm_ember {
    background:
        radial-gradient(
            circle at 25% 0%,
            rgba(159, 78, 36, 0.26),
            transparent 34rem
        ),
        radial-gradient(
            circle at 100% 42%,
            rgba(95, 49, 27, 0.12),
            transparent 28rem
        ),
        #100c09;
}

.home-body.theme-bg-aurora {
    background:
        radial-gradient(
            circle at 10% 5%,
            rgba(48, 169, 174, 0.18),
            transparent 30rem
        ),
        radial-gradient(
            circle at 90% 0%,
            rgba(77, 104, 209, 0.20),
            transparent 32rem
        ),
        radial-gradient(
            circle at 50% 75%,
            rgba(52, 102, 130, 0.08),
            transparent 36rem
        ),
        #081015;
}


@media (max-width: 420px) {

    .background-picker {
        grid-template-columns: 1fr 1fr;
    }

    .background-preview {
        height: 62px;
    }

}


/* =========================================================
   EDIT HOME — WIDGET CONTROLS
   ========================================================= */

.edit-widget-setting {
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

.edit-widget-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.edit-widget-heading strong,
.edit-widget-heading small {
    display: block;
}

.edit-widget-heading strong {
    font-size: 14px;
}

.edit-widget-heading small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.edit-widget-list {
    margin-top: 15px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel-2);
}

.edit-widget-row {
    display: grid;
    grid-template-columns:
        auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 11px 12px;
}

.edit-widget-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background:
        color-mix(
            in srgb,
            var(--accent) 10%,
            transparent
        );
    color: var(--accent);
}

.edit-widget-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.edit-widget-copy {
    min-width: 0;
}

.edit-widget-copy strong,
.edit-widget-copy small {
    display: block;
}

.edit-widget-copy strong {
    font-size: 13px;
}

.edit-widget-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.widget-toggle {
    min-width: 58px;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-size: 11px;
}

.widget-toggle:hover {
    background: var(--panel);
}

.widget-toggle-on {
    border-color: var(--accent);
    background:
        color-mix(
            in srgb,
            var(--accent) 10%,
            transparent
        );
    color: var(--accent);
}

.widget-toggle-on:hover {
    background:
        color-mix(
            in srgb,
            var(--accent) 15%,
            transparent
        );
}


/* =========================================================
   HOME — WIDGETS
   ========================================================= */

.home-widget-section {
    margin-top: 34px;
}

.home-widget-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.home-widget {
    position: relative;
    min-width: 0;
    min-height: 170px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background:
        linear-gradient(
            145deg,
            color-mix(
                in srgb,
                var(--accent) 9%,
                transparent
            ),
            transparent 62%
        ),
        rgba(21, 24, 32, 0.82);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.12);
}

.home-widget::after {
    content: "";
    position: absolute;
    right: -50px;
    bottom: -70px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background:
        color-mix(
            in srgb,
            var(--accent) 10%,
            transparent
        );
    filter: blur(10px);
    pointer-events: none;
}

.home-widget-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.home-widget-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-widget-icon-small {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background:
        color-mix(
            in srgb,
            var(--accent) 10%,
            transparent
        );
    color: var(--accent);
}

.home-widget-icon-small svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-clock-time {
    position: relative;
    z-index: 2;
    margin-top: 22px;
    font-size: clamp(36px, 8vw, 52px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.055em;
}

.home-clock-date {
    position: relative;
    z-index: 2;
    margin-top: 8px;
    color: #b6bdc8;
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 650px) {

    .home-widget-grid {
        grid-template-columns: 1fr;
    }

    .home-widget {
        min-height: 158px;
        padding: 17px;
    }

}


/* =========================================================
   HOME — STORAGE WIDGET
   ========================================================= */

.home-storage-widget {
    display: block;
    color: var(--text);
    text-decoration: none;
    transition:
        transform 140ms ease,
        border-color 140ms ease;
}

.home-storage-value {
    position: relative;
    z-index: 2;
    margin-top: 22px;
    font-size: clamp(30px, 7vw, 44px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.045em;
}

.home-storage-subtitle {
    position: relative;
    z-index: 2;
    margin-top: 7px;
    color: #b6bdc8;
    font-size: 12px;
    font-weight: 600;
}

.home-storage-bar {
    position: relative;
    z-index: 2;
    height: 7px;
    margin-top: 15px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.home-storage-bar-fill {
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: var(--accent);
}

.home-storage-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 17px;
    color: var(--muted);
    font-size: 11px;
}

.home-storage-footer strong {
    color: var(--accent);
    font-size: 11px;
}

@media (hover: hover) and (pointer: fine) {

    .home-storage-widget:hover {
        border-color: var(--accent);
        transform: translateY(-2px);
    }

}

@media (hover: none) {

    .home-storage-widget:active {
        transform: scale(0.985);
    }

}


/* =========================================================
   HOME — RECENT FILES WIDGET
   ========================================================= */

.home-recent-files-widget {
    grid-column: 1 / -1;
    min-height: 0;
}

.home-recent-files-list {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 1px;
    margin-top: 15px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--border);
}

.home-recent-file-row {
    display: grid;
    grid-template-columns:
        auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    min-width: 0;
    min-height: 58px;
    padding: 9px 11px;
    background: rgba(21, 24, 32, 0.92);
    color: var(--text);
    text-decoration: none;
}

.home-recent-file-row:hover {
    background: var(--panel-2);
}

.home-recent-file-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background:
        color-mix(
            in srgb,
            var(--accent) 9%,
            transparent
        );
    color: var(--accent);
}

.home-recent-file-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-recent-file-copy {
    min-width: 0;
}

.home-recent-file-copy strong,
.home-recent-file-copy small {
    display: block;
}

.home-recent-file-copy strong {
    overflow: hidden;
    color: var(--text);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-recent-file-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.home-recent-file-arrow {
    color: var(--muted);
    font-size: 20px;
}

.home-recent-files-footer {
    position: relative;
    z-index: 2;
    display: inline-block;
    margin-top: 14px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 750;
    text-decoration: none;
}

.home-recent-files-empty {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 16px;
    padding: 18px;
    border: 1px dashed var(--border);
    border-radius: 14px;
}

.home-recent-files-empty strong {
    font-size: 13px;
}

.home-recent-files-empty span {
    color: var(--muted);
    font-size: 11px;
}

@media (max-width: 650px) {

    .home-recent-files-widget {
        grid-column: auto;
    }

}


/* =========================================================
   EDIT HOME — WIDGET SIZE CONTROLS
   ========================================================= */

.widget-size-picker {
    grid-column: 2 / -1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.widget-size-label {
    margin-right: 3px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.widget-size-choice {
    min-width: 0;
    padding: 6px 9px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.widget-size-choice:hover {
    background: var(--panel);
}

.widget-size-choice-selected {
    border-color: var(--accent);
    background:
        color-mix(
            in srgb,
            var(--accent) 11%,
            transparent
        );
    color: var(--accent);
}

@media (max-width: 420px) {

    .widget-size-picker {
        grid-column: 1 / -1;
        padding-left: 50px;
    }

}


/* =========================================================
   HOME — USER-CONTROLLED WIDGET SIZES
   ========================================================= */

.home-widget-size-small {
    grid-column: span 1;
    min-height: 145px;
    padding: 15px;
}

.home-widget-size-medium {
    grid-column: span 1;
    min-height: 185px;
    padding: 19px;
}

.home-widget-size-wide {
    grid-column: 1 / -1;
    min-height: 175px;
    padding: 19px;
}


/* Let compact widgets actually feel compact */

.home-widget-size-small .home-clock-time,
.home-widget-size-small .home-storage-value {
    margin-top: 17px;
    font-size: 34px;
}

.home-widget-size-medium .home-clock-time,
.home-widget-size-medium .home-storage-value {
    margin-top: 24px;
}


/* Recent Files previously forced itself wide.
   User choice now gets final say. */

.home-recent-files-widget.home-widget-size-small,
.home-recent-files-widget.home-widget-size-medium {
    grid-column: span 1;
}

.home-recent-files-widget.home-widget-size-wide {
    grid-column: 1 / -1;
}


@media (max-width: 650px) {

    .home-widget-size-small,
    .home-widget-size-medium,
    .home-widget-size-wide,
    .home-recent-files-widget.home-widget-size-small,
    .home-recent-files-widget.home-widget-size-medium,
    .home-recent-files-widget.home-widget-size-wide {
        grid-column: 1;
    }

    .home-widget-size-small {
        min-height: 132px;
        padding: 14px;
    }

    .home-widget-size-medium {
        min-height: 165px;
        padding: 17px;
    }

    .home-widget-size-wide {
        min-height: 185px;
        padding: 18px;
    }

}


/* =========================================================
   HOME — TRUE MOBILE WIDGET SIZING
   ========================================================= */

@media (max-width: 650px) {

    .home-widget-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .home-widget-size-small,
    .home-recent-files-widget.home-widget-size-small {
        grid-column: span 1;
        min-height: 138px;
        padding: 13px;
    }

    .home-widget-size-medium,
    .home-recent-files-widget.home-widget-size-medium {
        grid-column: 1 / -1;
        min-height: 165px;
        padding: 16px;
    }

    .home-widget-size-wide,
    .home-recent-files-widget.home-widget-size-wide {
        grid-column: 1 / -1;
        min-height: 190px;
        padding: 18px;
    }

    .home-widget-size-small .home-clock-time,
    .home-widget-size-small .home-storage-value {
        font-size: 29px;
        margin-top: 16px;
    }

    .home-widget-size-small .home-clock-date,
    .home-widget-size-small .home-storage-subtitle {
        font-size: 10px;
    }

    .home-widget-size-small .home-storage-footer {
        font-size: 9px;
        gap: 6px;
    }

    .home-widget-size-small .home-storage-footer strong {
        font-size: 9px;
    }

}


/* =========================================================
   EDIT HOME — DRAGGABLE WIDGET ORDER
   ========================================================= */

.edit-widget-row-enabled {
    grid-template-columns:
        auto auto minmax(0, 1fr) auto;
}

.widget-drag-handle {
    display: grid;
    align-content: center;
    gap: 3px;
    width: 28px;
    min-width: 28px;
    height: 38px;
    padding: 8px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    cursor: grab;
    touch-action: none;
}

.widget-drag-handle:hover {
    background: rgba(255, 255, 255, 0.04);
}

.widget-drag-handle span {
    display: block;
    width: 12px;
    height: 2px;
    border-radius: 999px;
    background: var(--muted);
}

.widget-row-dragging {
    position: relative;
    z-index: 20;
    border-radius: 14px;
    background:
        color-mix(
            in srgb,
            var(--accent) 10%,
            var(--panel-2)
        );
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.28);
    opacity: 0.92;
}

.widget-drag-active {
    user-select: none;
    -webkit-user-select: none;
}

.widget-drag-active .widget-drag-handle {
    cursor: grabbing;
}

.edit-widget-list.widget-order-saved {
    border-color: var(--accent);
}

.edit-widget-list.widget-order-error {
    border-color: var(--danger);
}

@media (max-width: 420px) {

    .edit-widget-row-enabled {
        grid-template-columns:
            auto auto minmax(0, 1fr) auto;
    }

    .edit-widget-row-enabled .widget-size-picker {
        grid-column: 2 / -1;
        padding-left: 0;
    }

}


/* =========================================================
   PUBLIC AUTH — SIGN IN
   ========================================================= */

.public-auth-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(
            circle at 20% 0%,
            rgba(108, 140, 255, 0.13),
            transparent 30rem
        ),
        radial-gradient(
            circle at 95% 80%,
            rgba(65, 191, 179, 0.05),
            transparent 26rem
        ),
        #0a0c10;
    color: var(--text);
}

.public-auth-shell {
    width: min(100% - 28px, 470px);
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 38px 0 28px;
}

.public-auth-card {
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 26px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.025),
            transparent 48%
        ),
        rgba(21, 24, 32, 0.88);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.27);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.public-auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 800;
}

.public-auth-logo {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--accent);
    color: white;
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.2);
}

.public-auth-logo svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.public-auth-intro {
    margin-top: 42px;
}

.public-auth-kicker {
    margin: 0 0 7px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.17em;
}

.public-auth-intro h1 {
    margin: 0;
    font-size: clamp(34px, 9vw, 48px);
    line-height: 1;
    letter-spacing: -0.045em;
}

.public-auth-intro > p:last-child {
    margin: 11px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.public-auth-error {
    margin-top: 24px;
    padding: 12px 13px;
    border: 1px solid rgba(255, 114, 114, 0.26);
    border-radius: 12px;
    background: rgba(255, 114, 114, 0.07);
    color: #ffb0b0;
    font-size: 12px;
    line-height: 1.45;
}

.public-auth-form {
    display: grid;
    gap: 17px;
    margin-top: 29px;
}

.public-auth-field label {
    margin: 0 0 7px;
    color: #c8cdd6;
    font-size: 12px;
    font-weight: 700;
}

.public-auth-field input {
    min-height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: 13px;
    background: rgba(7, 9, 13, 0.62);
    padding: 13px 14px;
    color: var(--text);
    font-size: 15px;
    transition:
        border-color 130ms ease,
        box-shadow 130ms ease,
        background 130ms ease;
}

.public-auth-field input:focus {
    border-color: var(--accent);
    background: rgba(7, 9, 13, 0.86);
    box-shadow:
        0 0 0 3px rgba(108, 140, 255, 0.08);
}

.public-auth-submit {
    width: 100%;
    min-height: 51px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 17px;
    border-radius: 13px;
    font-size: 14px;
}

.public-auth-submit span {
    font-size: 18px;
}

.public-auth-access {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 25px;
    color: var(--muted);
    font-size: 12px;
}

.public-auth-access a {
    color: #b8c4ff;
    font-weight: 750;
    text-decoration: none;
}

.public-auth-access a:hover {
    color: white;
}

.public-auth-footer {
    margin: 18px 0 0;
    color: #646b76;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-align: center;
}

@media (max-width: 520px) {

    .public-auth-shell {
        justify-content: center;
        padding:
            max(22px, env(safe-area-inset-top))
            0
            max(22px, env(safe-area-inset-bottom));
    }

    .public-auth-card {
        padding: 24px 20px;
        border-radius: 22px;
    }

    .public-auth-intro {
        margin-top: 36px;
    }

}


/* =========================================================
   PUBLIC AUTH — REQUEST ACCESS
   ========================================================= */

.public-auth-shell-long {
    justify-content: flex-start;
    padding-top: clamp(30px, 7vh, 70px);
}

.public-access-card {
    width: 100%;
}

.public-access-form textarea {
    min-height: 105px;
    resize: vertical;
}

.public-field-help {
    display: block;
    margin-top: 6px;
    color: #707887;
    font-size: 10px;
    line-height: 1.45;
}

.public-field-error {
    margin-top: 7px;
    padding: 8px 10px;
    border-radius: 9px;
    background: rgba(255, 114, 114, 0.07);
    color: #ffaaaa;
    font-size: 11px;
    line-height: 1.4;
}

@media (max-width: 520px) {

    .public-auth-shell-long {
        justify-content: flex-start;
        padding-top:
            max(18px, env(safe-area-inset-top));
    }

}


/* =========================================================
   REQUEST ACCESS — MOBILE DENSITY POLISH
   ========================================================= */

.public-access-form {
    gap: 14px;
}

.public-access-form .public-auth-field input,
.public-access-form .public-auth-field select {
    min-height: 47px;
    padding: 11px 13px;
}

.public-access-form .public-auth-field label {
    margin-bottom: 6px;
}

.public-access-form textarea {
    min-height: 110px;
    padding: 12px 13px;
}

@media (max-width: 520px) {

    .public-access-card {
        padding: 22px 18px;
    }

    .public-access-card .public-auth-intro {
        margin-top: 30px;
    }

    .public-access-form {
        margin-top: 24px;
        gap: 13px;
    }

}


/* =========================================================
   PUBLIC AUTH — REQUEST SUBMITTED
   ========================================================= */

.public-submitted-card {
    text-align: left;
}

.public-submitted-status {
    margin-top: 42px;
}

.public-submitted-check {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 22px;
    border-radius: 17px;
    background:
        color-mix(
            in srgb,
            var(--accent) 13%,
            transparent
        );
    color: var(--accent);
}

.public-submitted-check svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.public-submitted-status h1 {
    margin: 7px 0 10px;
    font-size: clamp(34px, 9vw, 48px);
    line-height: 1;
    letter-spacing: -0.045em;
}

.public-submitted-status > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.public-submitted-info {
    margin-top: 28px;
    padding: 15px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.public-submitted-info strong {
    display: block;
    font-size: 13px;
}

.public-submitted-info p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.public-submitted-button {
    margin-top: 25px;
}

@media (max-width: 520px) {

    .public-submitted-status {
        margin-top: 34px;
    }

}


/* =========================================================
   OWNER — USERS
   ========================================================= */

.owner-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(
            circle at 25% -10%,
            rgba(108, 140, 255, 0.10),
            transparent 30rem
        ),
        var(--background);
    color: var(--text);
}

.owner-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(12, 14, 18, 0.90);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.owner-home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--panel);
    color: var(--text);
    text-decoration: none;
    font-size: 12px;
    font-weight: 750;
}

.owner-home-link:hover {
    border-color: var(--accent);
    background: var(--panel-2);
}

.owner-shell {
    width: min(860px, calc(100% - 28px));
    margin: 0 auto;
    padding: 36px 0 64px;
}

.owner-page-heading h1 {
    margin: 7px 0 8px;
    font-size: clamp(34px, 7vw, 48px);
    line-height: 1;
    letter-spacing: -0.045em;
}

.owner-page-heading > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.owner-notices {
    display: grid;
    gap: 8px;
    margin-top: 24px;
}

.owner-notice {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
    color: #cbd1da;
    font-size: 12px;
    line-height: 1.45;
}

.owner-users-section {
    margin-top: 38px;
}

.owner-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}

.owner-section-heading h2 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.owner-section-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.owner-user-list {
    display: grid;
    gap: 9px;
}

.owner-user-card {
    display: grid;
    grid-template-columns:
        auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.02),
            transparent 60%
        ),
        var(--panel);
    color: var(--text);
    text-decoration: none;
    transition:
        border-color 130ms ease,
        transform 130ms ease,
        background 130ms ease;
}

.owner-user-avatar {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background:
        color-mix(
            in srgb,
            var(--accent) 11%,
            var(--panel-2)
        );
    color: var(--accent);
    font-size: 15px;
    font-weight: 850;
}

.owner-user-main {
    min-width: 0;
}

.owner-user-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.owner-user-name-row strong {
    min-width: 0;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.owner-user-username {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.owner-user-details {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 9px;
    color: #8e96a4;
    font-size: 10px;
}

.owner-user-details span {
    white-space: nowrap;
}

.owner-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.owner-status-active {
    background: rgba(95, 189, 122, 0.09);
    color: #79cf91;
}

.owner-status-disabled {
    background: rgba(255, 114, 114, 0.08);
    color: #ff8e8e;
}

.owner-user-arrow {
    color: var(--muted);
    font-size: 24px;
}

.owner-empty-state {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 28px 18px;
    border: 1px dashed var(--border);
    border-radius: 16px;
    color: var(--muted);
    text-align: center;
}

.owner-empty-state strong {
    color: var(--text);
}

.owner-empty-state span {
    font-size: 12px;
}

@media (hover: hover) and (pointer: fine) {

    .owner-user-card:hover {
        border-color: var(--accent);
        background: var(--panel-2);
        transform: translateY(-1px);
    }

}

@media (max-width: 520px) {

    .owner-topbar {
        min-height: 58px;
        padding: 8px 14px;
    }

    .owner-shell {
        padding-top: 27px;
    }

    .owner-users-section {
        margin-top: 31px;
    }

    .owner-user-card {
        gap: 12px;
        padding: 13px;
    }

    .owner-user-avatar {
        width: 42px;
        height: 42px;
        border-radius: 13px;
    }

    .owner-user-details {
        gap: 5px 10px;
    }

}


/* =========================================================
   OWNER — USER SETTINGS
   ========================================================= */

.owner-user-settings-shell {
    width: min(900px, calc(100% - 28px));
}

.owner-user-profile-heading {
    display: flex;
    align-items: center;
    gap: 16px;
}

.owner-user-profile-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background:
        color-mix(
            in srgb,
            var(--accent) 12%,
            var(--panel-2)
        );
    color: var(--accent);
    font-size: 20px;
    font-weight: 850;
}

.owner-user-profile-copy {
    min-width: 0;
}

.owner-user-profile-copy h1 {
    margin: 5px 0 3px;
    overflow: hidden;
    font-size: clamp(30px, 7vw, 44px);
    line-height: 1;
    letter-spacing: -0.04em;
    text-overflow: ellipsis;
}

.owner-user-profile-copy > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.owner-modern-settings-form {
    display: grid;
    gap: 18px;
    margin-top: 32px;
}

.owner-settings-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.02),
            transparent 60%
        ),
        var(--panel);
}

.owner-settings-card-heading {
    display: flex;
    align-items: center;
    gap: 13px;
}

.owner-settings-card-heading h2 {
    margin: 4px 0 0;
    font-size: 18px;
}

.owner-settings-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background:
        color-mix(
            in srgb,
            var(--accent) 10%,
            transparent
        );
    color: var(--accent);
}

.owner-settings-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.owner-settings-description {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.owner-settings-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.owner-field label {
    margin: 0 0 7px;
    color: #ced3db;
    font-size: 12px;
}

.owner-field select,
.owner-field input {
    min-height: 47px;
}

.owner-field small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
}

.owner-input-with-unit {
    position: relative;
}

.owner-input-with-unit input {
    padding-right: 48px;
}

.owner-input-with-unit > span {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.owner-account-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    cursor: pointer;
}

.owner-toggle-copy {
    min-width: 0;
}

.owner-toggle-copy strong,
.owner-toggle-copy small {
    display: block;
}

.owner-toggle-copy strong {
    color: var(--text);
    font-size: 13px;
}

.owner-toggle-copy small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
}

.owner-switch {
    position: relative;
    flex: 0 0 auto;
    width: 48px;
    height: 28px;
}

.owner-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.owner-switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #333943;
    transition: background 150ms ease;
}

.owner-switch-track::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    transition: transform 150ms ease;
}

.owner-switch input:checked + .owner-switch-track {
    background: var(--accent);
}

.owner-switch input:checked + .owner-switch-track::after {
    transform: translateX(20px);
}

.owner-permission-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 18px;
}

.owner-permission-card {
    position: relative;
    display: grid;
    grid-template-columns:
        auto minmax(0, 1fr);
    gap: 11px;
    min-width: 0;
    margin: 0;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel-2);
    cursor: pointer;
}

.owner-permission-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.owner-permission-check {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.12);
    color: transparent;
    font-size: 12px;
    font-weight: 900;
}

.owner-permission-card:has(input:checked) {
    border-color:
        color-mix(
            in srgb,
            var(--accent) 55%,
            var(--border)
        );
    background:
        color-mix(
            in srgb,
            var(--accent) 5%,
            var(--panel-2)
        );
}

.owner-permission-card:has(input:checked)
.owner-permission-check {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
}

.owner-permission-copy {
    min-width: 0;
}

.owner-permission-copy strong,
.owner-permission-copy small {
    display: block;
}

.owner-permission-copy strong {
    color: var(--text);
    font-size: 12px;
}

.owner-permission-copy small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
}

.owner-save-bar {
    position: sticky;
    bottom: 12px;
    z-index: 20;
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(21, 24, 32, 0.92);
    box-shadow:
        0 12px 36px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.owner-cancel-button,
.owner-save-button {
    min-height: 42px;
    padding: 9px 15px;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.owner-cancel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
}

.owner-save-button {
    background: var(--accent);
    color: white;
}

.owner-protected-card {
    margin-top: 32px;
}

@media (max-width: 620px) {

    .owner-user-profile-avatar {
        width: 52px;
        height: 52px;
        border-radius: 16px;
    }

    .owner-modern-settings-form {
        margin-top: 28px;
    }

    .owner-settings-card {
        padding: 17px;
    }

    .owner-settings-grid,
    .owner-permission-grid {
        grid-template-columns: 1fr;
    }

    .owner-save-bar {
        bottom:
            max(
                10px,
                env(safe-area-inset-bottom)
            );
    }

    .owner-cancel-button,
    .owner-save-button {
        flex: 1;
    }

}


/* Owner settings — keep content clear of sticky save bar */

.owner-modern-settings-form {
    padding-bottom: 90px;
}

@media (max-width: 620px) {

    .owner-modern-settings-form {
        padding-bottom: 115px;
    }

}


/* =========================================================
   OWNER — REGISTRATION REQUESTS
   ========================================================= */

.owner-registration-shell {
    width: min(900px, calc(100% - 28px));
}

.registration-section {
    margin-top: 38px;
}

.registration-request-list {
    display: grid;
    gap: 14px;
}

.registration-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.02),
            transparent 60%
        ),
        var(--panel);
}

.registration-person {
    display: flex;
    align-items: center;
    gap: 13px;
}

.registration-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background:
        color-mix(
            in srgb,
            var(--accent) 11%,
            var(--panel-2)
        );
    color: var(--accent);
    font-weight: 850;
}

.registration-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.registration-name-row h2 {
    margin: 0;
    font-size: 17px;
}

.registration-person p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.registration-pending-pill {
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(232, 146, 76, 0.09);
    color: #e8a36d;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.registration-details {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
    padding-top: 17px;
    border-top: 1px solid var(--border);
}

.registration-details span,
.registration-reason > span {
    display: block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.registration-details strong {
    display: block;
    margin-top: 5px;
    overflow-wrap: anywhere;
    font-size: 11px;
}

.registration-reason {
    margin-top: 16px;
    padding: 13px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
}

.registration-reason p {
    margin: 7px 0 0;
    color: #c8cdd5;
    font-size: 11px;
    line-height: 1.5;
}

.registration-actions {
    margin-top: 18px;
    padding-top: 17px;
    border-top: 1px solid var(--border);
}

.registration-approve-form {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr)
        auto;
    align-items: end;
    gap: 10px;
}

.registration-field label {
    margin: 0 0 6px;
    color: #cbd0d8;
    font-size: 11px;
}

.registration-field select,
.registration-field input {
    min-height: 44px;
}

.registration-approve-button {
    min-height: 44px;
    white-space: nowrap;
}

.registration-deny-button {
    min-height: 38px;
    margin-top: 10px;
    padding: 8px 11px;
    border: 1px solid rgba(255, 114, 114, 0.2);
    background: transparent;
    color: #ff8f8f;
    font-size: 10px;
}

.registration-deny-button:hover {
    background: rgba(255, 114, 114, 0.07);
}

.registration-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 34px 18px;
    border: 1px dashed var(--border);
    border-radius: 18px;
    text-align: center;
}

.registration-empty-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 13px;
    border-radius: 14px;
    background: rgba(95, 189, 122, 0.08);
    color: #73c98a;
}

.registration-empty-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.registration-empty strong {
    font-size: 14px;
}

.registration-empty span {
    max-width: 330px;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.registration-recent-section {
    margin-top: 38px;
}

.registration-recent-list {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel);
}

.registration-recent-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
}

.registration-recent-row:last-child {
    border-bottom: 0;
}

.registration-recent-row strong,
.registration-recent-row > div span {
    display: block;
}

.registration-recent-row strong {
    font-size: 12px;
}

.registration-recent-row > div span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.registration-status {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.registration-status-approved {
    background: rgba(95, 189, 122, 0.08);
    color: #78ce90;
}

.registration-status-denied {
    background: rgba(255, 114, 114, 0.08);
    color: #ff8e8e;
}

@media (max-width: 680px) {

    .registration-card {
        padding: 16px;
    }

    .registration-details {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .registration-approve-form {
        grid-template-columns: 1fr;
    }

    .registration-approve-button {
        width: 100%;
    }

}


/* =========================================================
   ACCOUNT
   ========================================================= */

.home-account-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 2px;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.home-account-link span {
    color: var(--muted);
    font-size: 18px;
}

.account-done-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--panel);
    color: var(--text);
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.account-shell {
    width: min(760px, calc(100% - 28px));
    margin: 0 auto;
    padding: 36px 0 70px;
}

.account-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.account-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 62px;
    height: 62px;
    border-radius: 19px;
    background:
        color-mix(
            in srgb,
            var(--accent) 13%,
            var(--panel-2)
        );
    color: var(--accent);
    font-size: 21px;
    font-weight: 850;
}

.account-profile-copy {
    min-width: 0;
}

.account-profile-copy h1 {
    margin: 5px 0 3px;
    overflow: hidden;
    font-size: clamp(30px, 8vw, 44px);
    line-height: 1;
    letter-spacing: -0.045em;
    text-overflow: ellipsis;
}

.account-profile-copy > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.account-section {
    margin-top: 36px;
}

.account-section-heading {
    margin-bottom: 12px;
}

.account-section-heading h2 {
    margin: 0;
    font-size: 19px;
}

.account-section-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.account-info-card,
.account-action-list {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
}

.account-info-row {
    display: grid;
    grid-template-columns:
        minmax(110px, 0.8fr)
        minmax(0, 1.4fr);
    gap: 16px;
    padding: 14px 15px;
    border-bottom: 1px solid var(--border);
}

.account-info-row:last-child {
    border-bottom: 0;
}

.account-info-row span {
    color: var(--muted);
    font-size: 11px;
}

.account-info-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
    text-align: right;
}

.account-action-row {
    display: grid;
    grid-template-columns:
        auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 70px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
}

.account-action-row:last-child {
    border-bottom: 0;
}

.account-action-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background:
        color-mix(
            in srgb,
            var(--accent) 10%,
            transparent
        );
    color: var(--accent);
}

.account-action-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.account-action-copy {
    min-width: 0;
}

.account-action-copy strong,
.account-action-copy small {
    display: block;
}

.account-action-copy strong {
    font-size: 13px;
}

.account-action-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.account-action-arrow {
    color: var(--muted);
    font-size: 21px;
}

.account-signout-button {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(255, 114, 114, 0.18);
    background: rgba(255, 114, 114, 0.055);
    color: #ff9696;
}

.account-signout-button:hover {
    background: rgba(255, 114, 114, 0.10);
}

@media (max-width: 520px) {

    .account-shell {
        padding-top: 28px;
    }

    .account-avatar {
        width: 54px;
        height: 54px;
        border-radius: 17px;
    }

    .account-info-row {
        grid-template-columns:
            minmax(90px, 0.7fr)
            minmax(0, 1.3fr);
        gap: 10px;
    }

}


/* =========================================================
   ACCOUNT — EDIT PROFILE
   ========================================================= */

.account-profile-form {
    display: grid;
    gap: 15px;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
}

.account-edit-field label {
    margin: 0 0 7px;
    color: #ced3db;
    font-size: 11px;
    font-weight: 700;
}

.account-edit-field input {
    min-height: 47px;
    padding: 11px 13px;
    border-radius: 12px;
}

.account-edit-field small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
}

.account-readonly-field {
    min-height: 47px;
    display: flex;
    align-items: center;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--muted);
    font-size: 13px;
}

.account-profile-save {
    width: 100%;
    min-height: 47px;
    margin-top: 3px;
}

.account-messages {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.account-message {
    padding: 11px 13px;
    border: 1px solid
        color-mix(
            in srgb,
            var(--accent) 35%,
            var(--border)
        );
    border-radius: 11px;
    background:
        color-mix(
            in srgb,
            var(--accent) 6%,
            transparent
        );
    color: #ccd2dc;
    font-size: 11px;
}


/* =========================================================
   ACCOUNT — PASSWORD
   ========================================================= */

.account-password-form {
    display: grid;
    gap: 15px;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
}

.account-password-note {
    margin: 0;
    padding: 11px 12px;
    border-radius: 11px;
    background:
        color-mix(
            in srgb,
            var(--accent) 5%,
            transparent
        );
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.account-password-save {
    width: 100%;
    min-height: 47px;
}


/* =========================================================
   PUBLIC AUTH — PASSWORD RECOVERY
   ========================================================= */

.public-forgot-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 7px;
}

.public-forgot-row a {
    color: #9eacf1;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.public-forgot-row a:hover {
    color: white;
}


/* =========================================================
   HAVEN — JELLYFISH BRAND MARK
   ========================================================= */

.home-brand-mark,
.public-auth-logo {
    flex: 0 0 auto;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.home-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 0;
}

.public-auth-logo {
    width: 44px;
    height: 44px;
    border-radius: 0;
}

.home-brand-mark img,
.public-auth-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* =========================================================
   HAVEN — FINAL LOCKED BRAND
   ========================================================= */

.home-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.home-brand-logo-image {
    display: block;
    width: auto;
    height: 38px;
    max-width: min(190px, 48vw);
    object-fit: contain;
}

.public-auth-brand {
    display: flex;
    align-items: center;
}

.public-auth-brand-image {
    display: block;
    width: auto;
    height: 58px;
    max-width: min(280px, 78vw);
    object-fit: contain;
    filter:
        drop-shadow(
            0 8px 22px
            rgba(76, 106, 255, 0.15)
        );
}

@media (max-width: 520px) {

    .home-brand-logo-image {
        height: 35px;
        max-width: 175px;
    }

    .public-auth-brand-image {
        height: 54px;
        max-width: 245px;
    }

}


/* =========================================================
   HAVEN — FINAL LOGO CLEANUP
   ========================================================= */

.home-brand-logo-image,
.public-auth-brand-image {
    mix-blend-mode: screen;
}

.public-auth-brand {
    overflow: visible;
}

.public-auth-brand-image {
    height: 62px;
    max-width: min(295px, 82vw);
}

@media (max-width: 520px) {

    .public-auth-brand-image {
        height: 58px;
        max-width: 265px;
    }

}


/* =========================================================
   HAVEN — OFFICIAL BRAND THEME
   ========================================================= */

.background-preview-haven .background-preview {
    background:
        radial-gradient(
            circle at 18% 20%,
            rgba(255, 156, 230, 0.80),
            transparent 42%
        ),
        radial-gradient(
            circle at 82% 15%,
            rgba(96, 214, 255, 0.85),
            transparent 44%
        ),
        radial-gradient(
            circle at 52% 92%,
            rgba(167, 139, 255, 0.65),
            transparent 50%
        ),
        linear-gradient(
            145deg,
            #11152c,
            #060914 72%
        );
}


/*
   Selecting Haven intentionally overrides the user's normal
   accent while this background is active. Their saved accent
   remains untouched and returns with another background.
*/

.home-body.theme-bg-haven {
    --accent: #a78bff;
    --accent-hover: #c1a6ff;

    --background: #060914;
    --panel: rgba(15, 19, 37, 0.88);
    --panel-2: rgba(20, 25, 47, 0.82);

    --text: #e9ecff;
    --muted: #9199b4;

    --border: rgba(167, 139, 255, 0.14);

    --haven-pink: #ff9ce6;
    --haven-violet: #a78bff;
    --haven-cyan: #60d6ff;
    --haven-glow: #e9ecff;

    background:
        radial-gradient(
            circle at 8% -2%,
            rgba(255, 156, 230, 0.15),
            transparent 27rem
        ),
        radial-gradient(
            circle at 92% 4%,
            rgba(96, 214, 255, 0.16),
            transparent 30rem
        ),
        radial-gradient(
            circle at 52% 68%,
            rgba(167, 139, 255, 0.09),
            transparent 34rem
        ),
        linear-gradient(
            180deg,
            #0a0d1b 0%,
            #060914 48%,
            #04060d 100%
        );

    background-attachment: fixed;
}


/* Glass-like surfaces */

.home-body.theme-bg-haven .home-topbar {
    background:
        rgba(6, 9, 20, 0.82);

    border-color:
        rgba(167, 139, 255, 0.12);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}


.home-body.theme-bg-haven .home-app-card,
.home-body.theme-bg-haven .home-widget,
.home-body.theme-bg-haven .edit-home-options,
.home-body.theme-bg-haven .account-info-card,
.home-body.theme-bg-haven .account-action-list,
.home-body.theme-bg-haven .account-profile-form,
.home-body.theme-bg-haven .account-password-form {
    border-color:
        rgba(167, 139, 255, 0.15);

    background:
        linear-gradient(
            145deg,
            rgba(255, 156, 230, 0.025),
            rgba(96, 214, 255, 0.018) 52%,
            transparent
        ),
        rgba(14, 18, 35, 0.88);

    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.16),
        inset 0 1px 0 rgba(233, 236, 255, 0.025);
}


/* Brand-colored section labels */

.home-body.theme-bg-haven .home-kicker {
    background:
        linear-gradient(
            90deg,
            var(--haven-pink),
            var(--haven-violet) 52%,
            var(--haven-cyan)
        );

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}


/* Soft bioluminescent treatment on controls */

.home-body.theme-bg-haven button:focus-visible,
.home-body.theme-bg-haven a:focus-visible,
.home-body.theme-bg-haven input:focus,
.home-body.theme-bg-haven select:focus,
.home-body.theme-bg-haven textarea:focus {
    border-color:
        rgba(167, 139, 255, 0.78);

    box-shadow:
        0 0 0 3px rgba(167, 139, 255, 0.09),
        0 0 20px rgba(96, 214, 255, 0.045);
}


/* Theme selection gets a subtle branded glow */

.background-preview-haven.background-choice-selected {
    border-color:
        rgba(167, 139, 255, 0.72);

    box-shadow:
        0 0 0 1px rgba(255, 156, 230, 0.10),
        0 8px 28px rgba(96, 214, 255, 0.07);
}


/* CERUNE — LOGIN THEME */
.public-auth-body {
    background:
        radial-gradient(
            circle at 18% 10%,
            rgba(106, 0, 255, 0.24),
            transparent 28rem
        ),
        radial-gradient(
            circle at 82% 22%,
            rgba(0, 229, 255, 0.16),
            transparent 26rem
        ),
        radial-gradient(
            circle at 50% 100%,
            rgba(255, 75, 203, 0.12),
            transparent 30rem
        ),
        linear-gradient(
            180deg,
            #07101f 0%,
            #08111d 38%,
            #050a12 100%
        );
    color: #f7f9ff;
}

.public-auth-shell {
    width: min(100% - 28px, 460px);
    padding: 34px 0 26px;
}

.public-auth-card {
    position: relative;
    padding: 30px 28px 28px;
    overflow: hidden;
    border: 1px solid rgba(118, 99, 255, 0.24);
    border-radius: 28px;
    background:
        linear-gradient(
            145deg,
            rgba(105, 58, 255, 0.10),
            transparent 34%
        ),
        linear-gradient(
            215deg,
            rgba(0, 211, 255, 0.055),
            transparent 42%
        ),
        rgba(10, 18, 34, 0.88);
    box-shadow:
        0 26px 80px rgba(0, 0, 0, 0.48),
        0 0 60px rgba(111, 71, 255, 0.08);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.public-auth-card::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    top: -95px;
    right: -80px;
    border-radius: 50%;
    background: rgba(0, 217, 255, 0.10);
    filter: blur(35px);
    pointer-events: none;
}

.public-auth-brand {
    display: flex;
    justify-content: center;
    width: 100%;
    overflow: visible;
}

.public-auth-brand-image {
    display: block;
    width: min(290px, 80vw);
    max-width: 100%;
    height: auto;
    object-fit: contain;
    mix-blend-mode: screen;
    filter:
        drop-shadow(0 0 18px rgba(105, 73, 255, 0.32))
        drop-shadow(0 0 28px rgba(0, 218, 255, 0.12));
}

.public-auth-intro {
    margin-top: 26px;
}

.public-auth-kicker {
    color: #7deaff;
    font-size: 11px;
    letter-spacing: 0.19em;
    text-shadow:
        0 0 14px rgba(0, 222, 255, 0.30);
}

.public-auth-intro h1 {
    color: #ffffff;
    font-size: clamp(36px, 9vw, 48px);
    text-shadow:
        0 8px 28px rgba(0, 0, 0, 0.36);
}

.public-auth-intro > p:last-child {
    color: #aeb8ca;
}

.public-auth-form {
    gap: 18px;
    margin-top: 28px;
}

.public-auth-field label {
    color: #e7ebf6;
}

.public-auth-field input {
    border: 1px solid rgba(142, 131, 255, 0.20);
    background: rgba(4, 10, 20, 0.78);
    color: #ffffff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.public-auth-field input:focus {
    border-color: #7b72ff;
    background: rgba(4, 10, 20, 0.94);
    box-shadow:
        0 0 0 3px rgba(115, 91, 255, 0.12),
        0 0 24px rgba(0, 210, 255, 0.08);
}

.public-forgot-row a,
.public-auth-access a {
    color: #b9a7ff;
}

.public-forgot-row a:hover,
.public-auth-access a:hover {
    color: #73eaff;
}

.public-auth-submit {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(
            100deg,
            #7d4cff 0%,
            #b851ee 42%,
            #24c9ff 100%
        );
    color: #ffffff;
    box-shadow:
        0 12px 30px rgba(87, 74, 255, 0.24),
        0 0 24px rgba(0, 206, 255, 0.10);
}

.public-auth-submit:hover {
    filter: brightness(1.08);
}

.public-auth-access {
    color: #8f9aad;
}

.public-auth-footer {
    color: #69778d;
}

@media (max-width: 520px) {
    .public-auth-shell {
        width: min(100% - 26px, 460px);
    }

    .public-auth-card {
        padding: 26px 22px 27px;
        border-radius: 25px;
    }

    .public-auth-brand-image {
        width: min(260px, 78vw);
        height: auto;
    }

    .public-auth-intro {
        margin-top: 22px;
    }
}

/* CERUNE — OCEAN LOGIN BACKGROUND */
.public-auth-body {
    position: relative;
    overflow-x: hidden;
    background:
        radial-gradient(
            ellipse at 8% 14%,
            rgba(64, 54, 255, 0.22) 0%,
            rgba(36, 32, 120, 0.10) 27%,
            transparent 52%
        ),
        radial-gradient(
            ellipse at 92% 18%,
            rgba(0, 213, 255, 0.15) 0%,
            rgba(0, 88, 120, 0.07) 30%,
            transparent 55%
        ),
        radial-gradient(
            ellipse at 48% 88%,
            rgba(177, 57, 255, 0.16) 0%,
            rgba(61, 30, 122, 0.08) 36%,
            transparent 62%
        ),
        linear-gradient(
            180deg,
            #040814 0%,
            #060b18 34%,
            #040812 67%,
            #02050b 100%
        );
}

.public-auth-body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(
            ellipse at 50% -10%,
            rgba(91, 197, 255, 0.15),
            transparent 44%
        ),
        linear-gradient(
            115deg,
            transparent 10%,
            rgba(61, 184, 255, 0.035) 32%,
            transparent 44%,
            rgba(167, 84, 255, 0.035) 68%,
            transparent 82%
        );
    mix-blend-mode: screen;
}

.public-auth-body::after {
    content: "";
    position: fixed;
    inset: auto -15vw -25vh -15vw;
    height: 55vh;
    pointer-events: none;
    background:
        radial-gradient(
            ellipse at center,
            rgba(0, 208, 255, 0.10),
            rgba(101, 45, 255, 0.07) 38%,
            transparent 70%
        );
    filter: blur(28px);
}

.public-auth-shell {
    position: relative;
    z-index: 1;
}

