@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
    --ink: #172039;
    --muted: #7d879c;
    --line: #e8ebf2;
    --surface: #ffffff;
    --canvas: #f6f7fb;
    --primary: #665cf6;
    --primary-dark: #5147dd;
    --primary-soft: #eeecff;
    --green: #26b989;
    --red: #e65465;
    --shadow: 0 18px 50px rgba(34, 40, 72, .09);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: "DM Sans", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.svg-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.auth-page {
    display: grid;
    place-items: center;
    padding: 48px 24px;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 12% 12%, rgba(130, 117, 255, .22), transparent 30%),
        radial-gradient(circle at 90% 82%, rgba(75, 206, 172, .15), transparent 28%),
        #f4f5fb;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, .72fr);
    width: min(1080px, 100%);
    min-height: 650px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 30px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 30px 100px rgba(31, 36, 70, .16);
    backdrop-filter: blur(18px);
}

.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 70px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(145deg, #1d2541 0%, #31316e 55%, #665cf6 100%);
}

.auth-brand::before,
.auth-brand::after {
    position: absolute;
    content: "";
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 50%;
}

.auth-brand::before {
    width: 420px;
    height: 420px;
    right: -210px;
    top: -130px;
}

.auth-brand::after {
    width: 250px;
    height: 250px;
    right: -80px;
    top: -45px;
}

.brand-mark {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 48px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 17px;
    color: #fff;
    font: 800 25px/1 "Manrope", sans-serif;
    background: rgba(255, 255, 255, .13);
    box-shadow: inset 0 1px rgba(255, 255, 255, .25);
}

.brand-mark.small {
    width: 42px;
    height: 42px;
    margin: 0;
    flex: 0 0 42px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(145deg, #776eff, #5147df);
    box-shadow: 0 8px 18px rgba(102, 92, 246, .28);
    font-size: 20px;
}

.eyebrow {
    position: relative;
    z-index: 1;
    margin-bottom: 18px;
    color: #bdb9ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2em;
}

.auth-brand h1 {
    position: relative;
    z-index: 1;
    margin: 0;
    font: 700 clamp(38px, 5vw, 58px)/1.08 "Manrope", sans-serif;
    letter-spacing: -.045em;
}

.auth-brand > p {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, .68);
    font-size: 16px;
    line-height: 1.7;
}

.feature-list {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 38px;
}

.feature-list span {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 99px;
    color: rgba(255, 255, 255, .76);
    font-size: 12px;
    background: rgba(255, 255, 255, .06);
}

.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    background: rgba(255, 255, 255, .82);
}

.auth-card-head {
    margin-bottom: 30px;
}

.auth-card-head h2 {
    margin: 14px 0 8px;
    font: 700 28px/1.25 "Manrope", sans-serif;
    letter-spacing: -.03em;
}

.auth-card-head p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.step-pill,
.status-dot {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 99px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    background: var(--primary-soft);
}

.status-dot i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(38, 185, 137, .12);
}

.stack-form {
    display: grid;
    gap: 18px;
}

.stack-form label,
.field-label {
    display: grid;
    gap: 8px;
}

.stack-form label span,
.field-label span {
    font-size: 13px;
    font-weight: 600;
}

.stack-form input,
.field-label input {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    outline: 0;
    border: 1px solid #dde1eb;
    border-radius: 12px;
    color: var(--ink);
    background: #fff;
    transition: .2s ease;
}

.stack-form input:focus,
.field-label input:focus,
.search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 92, 246, .1);
}

.primary-button,
.danger-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: .2s ease;
}

.primary-button {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 9px 20px rgba(102, 92, 246, .22);
}

.primary-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.small-button {
    min-height: 42px;
    padding: 0 18px;
    font-size: 13px;
}

.danger-button {
    min-height: 42px;
    color: #fff;
    background: var(--red);
}

.ghost-button {
    min-height: 42px;
    color: var(--muted);
    background: #f2f3f7;
}

.alert {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px;
    padding: 13px 15px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    transition: .3s ease;
}

.alert-error {
    color: #b83344;
    background: #ffedf0;
}

.alert-success {
    color: #137859;
    background: #e8f8f2;
}

.alert button {
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.alert button svg {
    width: 16px;
    height: 16px;
}

.alert-hide {
    opacity: 0;
    transform: translateY(-8px);
}

.app-page {
    display: flex;
    background: var(--canvas);
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    width: 260px;
    padding: 28px 22px 22px;
    border-right: 1px solid var(--line);
    background: #fff;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 8px 34px;
}

.logo > span:nth-child(2),
.sidebar-user > span:nth-child(2) {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.logo strong {
    font: 800 17px/1 "Manrope", sans-serif;
    letter-spacing: -.03em;
}

.logo small,
.sidebar-user small {
    color: var(--muted);
    font-size: 11px;
}

.upload-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 13px;
    color: #fff;
    cursor: pointer;
    background: var(--primary);
    box-shadow: 0 10px 23px rgba(102, 92, 246, .22);
    font-weight: 700;
}

.upload-button svg {
    width: 19px;
    height: 19px;
    stroke-width: 2.1;
}

.main-nav {
    display: grid;
    gap: 6px;
    margin-top: 26px;
}

.main-nav a,
.main-nav button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 44px;
    padding: 0 13px;
    border: 0;
    border-radius: 11px;
    color: #687188;
    cursor: pointer;
    font-weight: 600;
    text-align: left;
    background: transparent;
}

.main-nav a.active {
    color: var(--primary);
    background: var(--primary-soft);
}

.main-nav button:hover,
.main-nav a:hover {
    color: var(--primary);
    background: #f5f4ff;
}

.main-nav svg {
    width: 19px;
    height: 19px;
}

.storage-card {
    margin-top: auto;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fafaff;
}

.storage-title {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
}

.storage-title span {
    color: var(--muted);
}

.storage-title strong {
    font-size: 11px;
}

.storage-bar {
    height: 5px;
    margin: 11px 0 9px;
    overflow: hidden;
    border-radius: 99px;
    background: #e4e5ef;
}

.storage-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #948cff);
}

.storage-card p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 17px;
    padding: 15px 5px 0;
    border-top: 1px solid var(--line);
}

.avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 10px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 13px;
    font-weight: 800;
}

.sidebar-user strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
}

.sidebar-user form {
    margin-left: auto;
}

.sidebar-user button {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    color: var(--muted);
    cursor: pointer;
    background: transparent;
}

.sidebar-user button:hover {
    color: var(--red);
    background: #ffedf0;
}

.sidebar-user button svg {
    width: 17px;
    height: 17px;
}

.content {
    width: calc(100% - 260px);
    min-height: 100vh;
    margin-left: 260px;
    padding: 0 42px 50px;
}

.topbar {
    display: flex;
    align-items: center;
    height: 82px;
    border-bottom: 1px solid var(--line);
}

.search {
    position: relative;
    width: min(430px, 50vw);
}

.search svg {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 17px;
    height: 17px;
    color: #9ba3b5;
    transform: translateY(-50%);
}

.search input {
    width: 100%;
    height: 42px;
    padding: 0 15px 0 42px;
    outline: 0;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--ink);
    background: #eceef4;
    transition: .2s ease;
}

.search input::placeholder {
    color: #9ba3b5;
}

.view-switch {
    display: flex;
    gap: 3px;
    margin-left: auto;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.view-switch button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    color: #a1a8b8;
    cursor: pointer;
    background: transparent;
}

.view-switch button.active {
    color: var(--primary);
    background: var(--primary-soft);
}

.view-switch svg {
    width: 16px;
    height: 16px;
}

.mobile-menu {
    display: none;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 40px 0 26px;
}

.page-head h1 {
    margin: 10px 0 5px;
    font: 800 30px/1.1 "Manrope", sans-serif;
    letter-spacing: -.04em;
}

.page-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    color: #9098aa;
    font-size: 11px;
}

.breadcrumbs a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.breadcrumbs a:last-child {
    color: var(--primary);
    font-weight: 700;
}

.breadcrumbs svg {
    width: 13px;
    height: 13px;
}

.compact-upload {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: #5d667b;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 5px 14px rgba(36, 41, 70, .04);
    font-size: 12px;
    font-weight: 700;
}

.compact-upload:hover {
    color: var(--primary);
    border-color: #d6d2ff;
}

.compact-upload svg {
    width: 17px;
    height: 17px;
}

.drop-zone {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 180px;
    margin-bottom: 24px;
    border: 2px dashed #cfcafc;
    border-radius: 18px;
    color: var(--primary);
    cursor: pointer;
    background: rgba(238, 236, 255, .7);
}

.drop-zone.dragging {
    display: flex;
    position: fixed;
    z-index: 80;
    inset: 20px;
    min-height: 0;
    margin: 0;
    border-width: 3px;
    background: rgba(246, 245, 255, .96);
    box-shadow: var(--shadow);
}

.drop-zone svg {
    width: 38px;
    height: 38px;
    margin-bottom: 14px;
}

.drop-zone strong {
    font-size: 16px;
}

.drop-zone span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
}

.file-card {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 88px;
    padding: 13px 10px 13px 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface);
    transition: .2s ease;
}

.file-card:hover {
    border-color: #d8d4fb;
    box-shadow: 0 12px 28px rgba(38, 43, 72, .07);
    transform: translateY(-2px);
}

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

.file-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 13px;
    color: #778095;
    background: #f0f2f6;
}

.file-icon svg {
    width: 23px;
    height: 23px;
}

.file-icon.kind-folder {
    color: #8a72e8;
    background: #f0ecff;
}

.file-icon.kind-image {
    color: #28a983;
    background: #e8f8f2;
}

.file-icon.kind-video {
    color: #e65d75;
    background: #ffedf0;
}

.file-icon.kind-audio {
    color: #e99b42;
    background: #fff5e6;
}

.file-icon.kind-pdf {
    color: #e45454;
    background: #ffeded;
}

.file-icon.kind-archive {
    color: #468ed8;
    background: #eaf4ff;
}

.file-info {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.file-info strong {
    display: block;
    overflow: hidden;
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-info small {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-actions {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 4px;
}

.file-actions > a,
.file-actions > button {
    display: none;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: #929aac;
    cursor: pointer;
    background: transparent;
}

.file-actions > button {
    display: grid;
}

.file-card:hover .file-actions > a {
    display: grid;
}

.file-actions > a:hover,
.file-actions > button:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.file-actions svg {
    width: 16px;
    height: 16px;
}

.item-menu {
    position: absolute;
    z-index: 20;
    top: 34px;
    right: 0;
    display: none;
    width: 180px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    box-shadow: var(--shadow);
}

.item-menu.open {
    display: grid;
}

.item-menu button {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 7px;
    color: #626b80;
    cursor: pointer;
    text-align: left;
    background: transparent;
    font-size: 11px;
    font-weight: 600;
}

.item-menu button:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.item-menu button.danger {
    color: var(--red);
}

.item-menu button.danger:hover {
    background: #ffedf0;
}

.list-view {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}

.list-view .file-card {
    min-height: 64px;
    padding-top: 8px;
    padding-bottom: 8px;
    border-radius: 12px;
}

.list-view .file-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 10px;
}

.list-view .file-icon svg {
    width: 20px;
    height: 20px;
}

.list-view .file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.list-view .file-info small {
    margin-left: 30px;
}

.empty-state {
    display: grid;
    place-items: center;
    min-height: 380px;
    padding: 50px 20px;
    border: 1px dashed #dfe2eb;
    border-radius: 18px;
    text-align: center;
    background: rgba(255, 255, 255, .58);
}

.empty-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin-bottom: 19px;
    border-radius: 23px;
    color: var(--primary);
    background: var(--primary-soft);
    transform: rotate(-4deg);
}

.empty-icon svg {
    width: 34px;
    height: 34px;
}

.empty-state h2 {
    margin: 0 0 8px;
    font: 700 19px/1.3 "Manrope", sans-serif;
}

.empty-state p {
    max-width: 420px;
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.modal {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: .2s ease;
}

.modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 25, 47, .5);
    backdrop-filter: blur(4px);
}

.modal-card {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    padding: 26px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(16, 21, 42, .25);
    transform: translateY(10px) scale(.98);
    transition: .2s ease;
}

.modal[aria-hidden="false"] .modal-card {
    transform: translateY(0) scale(1);
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 23px;
}

.modal-head h2 {
    margin: 0 0 6px;
    font: 700 20px/1.2 "Manrope", sans-serif;
    letter-spacing: -.025em;
}

.modal-head p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.modal-head > button {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    color: var(--muted);
    cursor: pointer;
    background: #f2f3f7;
}

.modal-head > button svg {
    width: 15px;
    height: 15px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 24px;
}

.modal-open {
    overflow: hidden;
}

.settings-nav + .sidebar-user {
    margin-top: auto;
}

.settings-content {
    max-width: 1320px;
}

.settings-topbar > div {
    display: grid;
    gap: 3px;
}

.settings-topbar strong {
    font: 700 14px/1.2 "Manrope", sans-serif;
}

.settings-topbar span {
    color: var(--muted);
    font-size: 11px;
}

.settings-head {
    display: flex;
    align-items: center;
    gap: 17px;
    margin: 42px 0 26px;
}

.settings-head h1 {
    margin: 0 0 5px;
    font: 800 29px/1.15 "Manrope", sans-serif;
    letter-spacing: -.04em;
}

.settings-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.settings-icon,
.settings-mini-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 15px;
    color: var(--primary);
    background: var(--primary-soft);
}

.settings-icon svg {
    width: 24px;
    height: 24px;
}

.settings-mini-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 11px;
}

.settings-mini-icon svg {
    width: 17px;
    height: 17px;
}

.settings-alert {
    max-width: 960px;
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, .7fr);
    gap: 18px;
    align-items: start;
}

.panel-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 9px 30px rgba(34, 40, 72, .04);
}

.password-card {
    width: min(590px, 100%);
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 22px;
}

.panel-heading h2 {
    margin: 0 0 5px;
    font: 700 17px/1.25 "Manrope", sans-serif;
    letter-spacing: -.025em;
}

.panel-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.count-badge {
    display: grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0 9px;
    border-radius: 10px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 12px;
    font-weight: 800;
}

.form-divider {
    height: 1px;
    margin: 2px 0;
    background: var(--line);
}

.stack-form label small {
    margin-top: -2px;
    color: var(--muted);
    font-size: 10px;
}

.stack-form select,
.role-form select {
    width: 100%;
    height: 50px;
    padding: 0 38px 0 14px;
    outline: 0;
    border: 1px solid #dde1eb;
    border-radius: 12px;
    color: var(--ink);
    cursor: pointer;
    background: #fff;
}

.stack-form select:focus,
.role-form select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 92, 246, .1);
}

.form-submit {
    display: flex;
    justify-content: flex-end;
}

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

.user-row {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fcfcfe;
}

.user-summary {
    display: flex;
    align-items: center;
    gap: 11px;
}

.user-summary > span:nth-child(2) {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.user-summary strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
}

.user-summary small {
    color: var(--muted);
    font-size: 10px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
}

.role-pill {
    margin-left: auto;
    padding: 6px 9px;
    border-radius: 99px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.role-admin {
    color: #6551c7;
    background: #eeeaff;
}

.role-user {
    color: #257d65;
    background: #e6f7f1;
}

.user-tools {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.role-form {
    width: 125px;
}

.role-form select {
    height: 34px;
    padding-left: 10px;
    border-radius: 9px;
    font-size: 10px;
}

.reset-details {
    position: relative;
}

.reset-details summary {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 10px;
    border-radius: 9px;
    color: #697186;
    cursor: pointer;
    list-style: none;
    background: #f0f1f5;
    font-size: 10px;
    font-weight: 700;
}

.reset-details summary::-webkit-details-marker {
    display: none;
}

.reset-details summary svg {
    width: 14px;
    height: 14px;
}

.mini-form {
    position: absolute;
    z-index: 15;
    top: 41px;
    left: 0;
    display: grid;
    gap: 8px;
    width: 230px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow);
}

.mini-form input {
    width: 100%;
    height: 38px;
    padding: 0 11px;
    outline: 0;
    border: 1px solid #dde1eb;
    border-radius: 9px;
    font-size: 11px;
}

.mini-form input:focus {
    border-color: var(--primary);
}

.icon-danger-button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    color: var(--red);
    cursor: pointer;
    background: #ffedf0;
}

.icon-danger-button:hover {
    color: #fff;
    background: var(--red);
}

.icon-danger-button svg {
    width: 15px;
    height: 15px;
}

.add-user-card .primary-button {
    margin-top: 3px;
}

.upload-overlay {
    position: fixed;
    z-index: 200;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    color: #fff;
    background: rgba(21, 25, 47, .88);
    backdrop-filter: blur(7px);
    transition: .2s ease;
}

.upload-overlay[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.upload-overlay strong {
    margin-top: 18px;
    font-size: 16px;
}

.upload-overlay span {
    margin-top: 6px;
    color: rgba(255, 255, 255, .6);
    font-size: 12px;
}

.spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(255, 255, 255, .2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 520px;
    }

    .auth-brand {
        min-height: 330px;
        padding: 44px;
    }

    .auth-brand h1 {
        font-size: 40px;
    }

    .auth-brand .brand-mark {
        margin-bottom: 28px;
    }

    .feature-list {
        display: none;
    }

    .auth-card {
        padding: 44px;
    }

    .sidebar {
        transform: translateX(-105%);
        box-shadow: 20px 0 60px rgba(29, 34, 63, .12);
        transition: .25s ease;
    }

    .sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-open::after {
        position: fixed;
        z-index: 20;
        inset: 0;
        content: "";
        background: rgba(20, 25, 47, .35);
        backdrop-filter: blur(2px);
    }

    .content {
        width: 100%;
        margin-left: 0;
        padding: 0 24px 40px;
    }

    .mobile-menu {
        display: grid;
        gap: 4px;
        width: 38px;
        height: 38px;
        margin-right: 12px;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: #fff;
    }

    .mobile-menu span {
        display: block;
        height: 2px;
        border-radius: 2px;
        background: #747d91;
    }

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

@media (max-width: 600px) {
    .auth-page {
        display: block;
        padding: 0;
        background: #fff;
    }

    .auth-shell {
        display: block;
        width: 100%;
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-brand {
        min-height: 270px;
        padding: 38px 28px;
        border-radius: 0 0 30px 30px;
    }

    .auth-brand h1 {
        font-size: 34px;
    }

    .auth-brand > p {
        margin-top: 16px;
        font-size: 14px;
    }

    .auth-brand .brand-mark {
        width: 44px;
        height: 44px;
        margin-bottom: 22px;
        border-radius: 14px;
        font-size: 20px;
    }

    .eyebrow {
        display: none;
    }

    .auth-card {
        padding: 38px 28px 50px;
    }

    .content {
        padding: 0 16px 30px;
    }

    .topbar {
        height: 70px;
    }

    .search {
        width: auto;
        flex: 1;
    }

    .view-switch {
        display: none;
    }

    .page-head {
        align-items: center;
        margin: 28px 0 20px;
    }

    .page-head h1 {
        font-size: 25px;
    }

    .compact-upload {
        width: 42px;
        padding: 0;
        justify-content: center;
        font-size: 0;
    }

    .file-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .file-card {
        min-height: 76px;
    }

    .file-actions > a {
        display: none !important;
    }

    .breadcrumbs {
        max-width: 70vw;
        overflow: hidden;
        white-space: nowrap;
    }

    .settings-head {
        align-items: flex-start;
        margin-top: 28px;
    }

    .settings-head h1 {
        font-size: 24px;
    }

    .settings-icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .panel-card {
        padding: 18px;
    }

    .user-tools {
        flex-wrap: wrap;
    }

    .reset-details {
        position: static;
    }

    .mini-form {
        right: 14px;
        left: 14px;
        width: auto;
    }
}
