:root {
    --xcloud-ink: #0f172a;
    --xcloud-muted: #667085;
    --xcloud-line: #e4e9f2;
    --xcloud-surface: #ffffff;
    --xcloud-bg: #f5f7fb;
    --xcloud-accent: #6d5efc;
    --xcloud-accent-2: #0ea5a6;
    --xcloud-dark: #0b1020;
    --xcloud-radius: 20px;
    --admin-bg: #f4f6fb;
    --admin-ink: #111827;
    --admin-muted: #667085;
    --admin-line: #e5e9f2;
    --admin-sidebar: #0b1222;
    --admin-accent: #6d5efc;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    background: var(--xcloud-bg);
    color: var(--xcloud-ink);
    font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
}

::selection {
    background: rgba(109, 94, 252, .25);
}

/* --------------------------------------------------------------------------
   Shared brand
-------------------------------------------------------------------------- */

.x-brand {
    align-items: center;
    color: inherit;
    display: inline-flex;
    gap: 11px;
    text-decoration: none;
}

.x-brand:hover {
    color: inherit;
}

.x-brand__mark {
    align-items: center;
    background: linear-gradient(135deg, var(--xcloud-accent), #9b8cff 55%, var(--xcloud-accent-2));
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(109, 94, 252, .28);
    color: #fff;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 850;
    height: 38px;
    justify-content: center;
    letter-spacing: -.04em;
    width: 38px;
}

.x-brand__text {
    display: flex;
    flex-direction: column;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.06;
}

.x-brand__text small {
    color: var(--xcloud-muted);
    font-size: .67rem;
    font-weight: 600;
    letter-spacing: .08em;
    margin-top: 3px;
    text-transform: uppercase;
}

.x-btn {
    align-items: center;
    border-radius: 12px;
    display: inline-flex;
    font-size: .86rem;
    font-weight: 700;
    gap: 7px;
    justify-content: center;
    padding: 10px 16px;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

.x-btn:hover {
    transform: translateY(-1px);
}

.x-btn--primary {
    background: var(--xcloud-accent);
    border: 1px solid var(--xcloud-accent);
    box-shadow: 0 10px 24px rgba(109, 94, 252, .24);
    color: #fff;
}

.x-btn--primary:hover {
    background: #5a4af0;
    border-color: #5a4af0;
    color: #fff;
}

.x-btn--ghost {
    background: transparent;
    border: 1px solid var(--xcloud-line);
    color: var(--xcloud-ink);
}

.x-btn--ghost:hover {
    background: #fff;
    border-color: #cfd7e6;
    color: var(--xcloud-ink);
}

.x-btn--light {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .26);
    color: #fff;
}

.x-btn--light:hover {
    background: rgba(255, 255, 255, .24);
    color: #fff;
}

.x-badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: .72rem;
    font-weight: 750;
    gap: 5px;
    letter-spacing: .02em;
    padding: 5px 10px;
}

.x-badge--public {
    background: #e9fbf5;
    color: #087f5b;
}

.x-badge--private {
    background: #f0edff;
    color: #5b4bd6;
}

.x-badge--muted {
    background: #eef1f6;
    color: #667085;
}

.x-badge--warning {
    background: #fff7e8;
    color: #a15c00;
}

/* --------------------------------------------------------------------------
   Home
-------------------------------------------------------------------------- */

.home-page {
    background:
        radial-gradient(circle at 12% 4%, rgba(109, 94, 252, .13), transparent 34rem),
        radial-gradient(circle at 89% 18%, rgba(14, 165, 166, .1), transparent 30rem),
        var(--xcloud-bg);
}

.home-nav {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1180px;
    padding: 22px 24px;
}

.home-nav__actions {
    align-items: center;
    display: flex;
    gap: 9px;
}

.home-hero {
    align-items: center;
    display: grid;
    gap: 54px;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    margin: 0 auto;
    max-width: 1180px;
    padding: 62px 24px 78px;
}

.home-eyebrow {
    color: var(--xcloud-accent);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .14em;
    margin-bottom: 17px;
    text-transform: uppercase;
}

.home-title {
    font-size: clamp(2.05rem, 4.8vw, 4.1rem);
    font-weight: 850;
    letter-spacing: -.065em;
    line-height: .98;
    margin: 0 0 22px;
}

.home-title span {
    background: linear-gradient(110deg, var(--xcloud-accent), var(--xcloud-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.home-lead {
    color: #536078;
    font-size: clamp(1rem, 1.5vw, 1.16rem);
    line-height: 1.7;
    margin: 0 0 28px;
    max-width: 620px;
}

.home-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
}

.home-note {
    color: var(--xcloud-muted);
    font-size: .8rem;
    margin-top: 16px;
}

.home-note code {
    background: #fff;
    border: 1px solid var(--xcloud-line);
    border-radius: 7px;
    color: #4d5b74;
    padding: 2px 6px;
}

.browser-mock {
    background: #fff;
    border: 1px solid #e1e7f0;
    border-radius: 25px;
    box-shadow: 0 32px 80px rgba(24, 39, 75, .16);
    overflow: hidden;
    transform: rotate(1.2deg);
}

.browser-mock__bar {
    align-items: center;
    background: #f7f9fc;
    border-bottom: 1px solid #e8edf5;
    display: flex;
    gap: 8px;
    padding: 12px 15px;
}

.browser-mock__dot {
    background: #d6ddea;
    border-radius: 50%;
    height: 8px;
    width: 8px;
}

.browser-mock__url {
    background: #fff;
    border: 1px solid #e3e9f2;
    border-radius: 8px;
    color: #7c879b;
    flex: 1;
    font-size: .68rem;
    margin-left: 6px;
    padding: 5px 9px;
}

.browser-mock__body {
    padding: 21px;
}

.browser-mock__title {
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: -.03em;
    margin: 0 0 4px;
}

.browser-mock__subtitle {
    color: #8a94a8;
    font-size: .74rem;
    margin-bottom: 17px;
}

.browser-mock__grid {
    display: grid;
    gap: 9px;
    grid-template-columns: 1fr 1fr;
}

.browser-mock__item {
    background: #f7f9fc;
    border: 1px solid #e9eef6;
    border-radius: 11px;
    padding: 11px;
}

.browser-mock__icon {
    align-items: center;
    background: #e9e6ff;
    border-radius: 7px;
    color: #5b4bd6;
    display: inline-flex;
    font-size: .6rem;
    font-weight: 800;
    height: 27px;
    justify-content: center;
    margin-bottom: 9px;
    width: 27px;
}

.browser-mock__line {
    background: #dfe5ef;
    border-radius: 4px;
    height: 6px;
    margin-top: 6px;
    width: 78%;
}

.browser-mock__line--short {
    width: 52%;
}

.home-features {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 auto;
    max-width: 1180px;
    padding: 0 24px 76px;
}

.feature-card {
    background: rgba(255, 255, 255, .75);
    border: 1px solid rgba(224, 231, 242, .9);
    border-radius: var(--xcloud-radius);
    padding: 23px;
}

.feature-card__icon {
    align-items: center;
    background: #f0edff;
    border-radius: 11px;
    color: #5b4bd6;
    display: inline-flex;
    font-size: 1rem;
    height: 38px;
    justify-content: center;
    margin-bottom: 15px;
    width: 38px;
}

.feature-card h2 {
    font-size: .98rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0 0 8px;
}

.feature-card p {
    color: #69758a;
    font-size: .84rem;
    line-height: 1.6;
    margin: 0;
}

.home-footer {
    border-top: 1px solid rgba(219, 226, 238, .8);
    color: #7a869a;
    font-size: .78rem;
    margin: 0 auto;
    max-width: 1180px;
    padding: 22px 24px 34px;
}

.home-stats {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 24px;
}

.home-stat strong {
    display: block;
    font-size: 1.2rem;
    font-weight: 850;
    letter-spacing: -.04em;
}

.home-stat span {
    color: #8490a5;
    font-size: .7rem;
    font-weight: 650;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Public space
-------------------------------------------------------------------------- */

.space-page {
    background:
        radial-gradient(circle at 8% 0%, rgba(109, 94, 252, .08), transparent 28rem),
        var(--xcloud-bg);
    min-height: 100vh;
}

.space-topbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1180px;
    padding: 20px 24px;
}

.space-topbar__right {
    align-items: center;
    display: flex;
    gap: 8px;
}

.space-wrap {
    margin: 0 auto;
    max-width: 1180px;
    padding: 0 24px 60px;
}

.space-hero {
    background: linear-gradient(125deg, var(--accent, #6d5efc), #101a35);
    background:
        radial-gradient(circle at 92% 8%, rgba(255, 255, 255, .17), transparent 16rem),
        radial-gradient(circle at 4% 110%, rgba(255, 255, 255, .1), transparent 20rem),
        linear-gradient(125deg, var(--accent, #6d5efc), color-mix(in srgb, var(--accent, #6d5efc) 52%, #101a35));
    border-radius: 27px;
    box-shadow: 0 28px 70px color-mix(in srgb, var(--accent, #6d5efc) 24%, transparent);
    color: #fff;
    margin-bottom: 25px;
    overflow: hidden;
    padding: clamp(25px, 4vw, 45px);
    position: relative;
}

.space-hero__top {
    align-items: flex-start;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.space-hero__eyebrow {
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .14em;
    opacity: .72;
    text-transform: uppercase;
}

.space-hero h1 {
    font-size: clamp(1.8rem, 3.6vw, 3rem);
    font-weight: 850;
    letter-spacing: -.055em;
    line-height: 1.04;
    margin: 10px 0 12px;
    max-width: 760px;
}

.space-hero__client {
    font-size: .95rem;
    font-weight: 650;
    opacity: .82;
}

.space-hero__description {
    font-size: .94rem;
    line-height: 1.65;
    margin: 18px 0 0;
    max-width: 760px;
    opacity: .88;
}

.space-hero__meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
}

.space-pill {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    font-size: .73rem;
    font-weight: 700;
    padding: 6px 11px;
}

.space-pill--solid {
    background: #fff;
    color: #26324a;
}

.space-pill--warning {
    background: #ffefc2;
    border-color: #ffdf8a;
    color: #7a4d00;
}

.space-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin: 26px 0 17px;
}

.space-toolbar__title {
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -.025em;
    margin: 0;
}

.space-toolbar__title span {
    color: #8b96a9;
    font-size: .8rem;
    font-weight: 600;
    margin-left: 7px;
}

.space-toolbar__right {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.space-search {
    background: #fff;
    border: 1px solid var(--xcloud-line);
    border-radius: 999px;
    color: var(--xcloud-ink);
    font-size: .84rem;
    min-width: 235px;
    padding: 9px 15px;
}

.space-search:focus {
    border-color: #c7c0ff;
    box-shadow: 0 0 0 4px rgba(109, 94, 252, .11);
    outline: none;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 20px;
}

.category-chip {
    background: #fff;
    border: 1px solid var(--xcloud-line);
    border-radius: 999px;
    color: #5f6b80;
    cursor: pointer;
    font-size: .75rem;
    font-weight: 700;
    padding: 7px 12px;
    transition: all .15s ease;
}

.category-chip:hover {
    border-color: #cfd6e5;
    color: var(--xcloud-ink);
}

.category-chip.is-active {
    background: var(--xcloud-ink);
    border-color: var(--xcloud-ink);
    color: #fff;
}

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

.file-card {
    background: #fff;
    border: 1px solid var(--xcloud-line);
    border-radius: 19px;
    display: flex;
    flex-direction: column;
    min-height: 236px;
    padding: 19px;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.file-card:hover {
    border-color: #d5dbe7;
    box-shadow: 0 18px 46px rgba(24, 39, 75, .09);
    transform: translateY(-2px);
}

.file-card__top {
    align-items: flex-start;
    display: flex;
    gap: 11px;
    justify-content: space-between;
    margin-bottom: 13px;
}

.file-card__badge {
    align-items: center;
    border-radius: 12px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .61rem;
    font-weight: 850;
    height: 43px;
    justify-content: center;
    letter-spacing: .02em;
    width: 43px;
}

.file-card__badge--html { background: #fff0e8; color: #c2410c; }
.file-card__badge--pdf { background: #ffecec; color: #c92a2a; }
.file-card__badge--figma { background: #f0edff; color: #5b4bd6; }
.file-card__badge--image { background: #e8f8f2; color: #087f5b; }
.file-card__badge--video { background: #e8f2ff; color: #1d5fd1; }
.file-card__badge--archive { background: #fff7e0; color: #946200; }
.file-card__badge--document { background: #eef1f8; color: #475569; }
.file-card__badge--other { background: #f1f4f9; color: #667085; }

.file-card__actions-top {
    display: flex;
    gap: 5px;
}

.icon-btn {
    align-items: center;
    background: #f7f9fc;
    border: 1px solid #e7ecf4;
    border-radius: 9px;
    color: #667085;
    cursor: pointer;
    display: inline-flex;
    font-size: .72rem;
    font-weight: 750;
    height: 30px;
    justify-content: center;
    text-decoration: none;
    width: 30px;
}

.icon-btn:hover {
    background: #eef1f8;
    color: var(--xcloud-ink);
}

.file-card h3 {
    font-size: .98rem;
    font-weight: 800;
    letter-spacing: -.022em;
    line-height: 1.3;
    margin: 0 0 7px;
    overflow-wrap: anywhere;
}

.file-card__description {
    color: #6c798f;
    display: -webkit-box;
    font-size: .8rem;
    line-height: 1.55;
    margin: 0 0 15px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.file-card__meta {
    align-items: center;
    color: #8a95a8;
    display: flex;
    flex-wrap: wrap;
    font-size: .7rem;
    gap: 5px 9px;
    margin-top: auto;
}

.file-card__meta span+span::before {
    content: "·";
    margin-right: 9px;
}

.file-card__footer {
    align-items: center;
    border-top: 1px solid #eef1f6;
    display: flex;
    gap: 7px;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 13px;
}

.file-card__open {
    color: var(--xcloud-accent);
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none;
}

.file-card__open:hover {
    color: var(--xcloud-accent);
    text-decoration: underline;
}

.file-card__download {
    color: #8590a4;
    font-size: .73rem;
    font-weight: 650;
    text-decoration: none;
}

.file-card__download:hover {
    color: var(--xcloud-ink);
}

.file-card--hidden {
    background: #fbfcfe;
    border-style: dashed;
    opacity: .82;
}

.file-card__hidden-badge {
    background: #fff3d6;
    border-radius: 999px;
    color: #8a5a00;
    font-size: .63rem;
    font-weight: 800;
    padding: 4px 8px;
}

.space-empty {
    background: #fff;
    border: 1px dashed #d9e0ec;
    border-radius: 20px;
    color: #7a8699;
    padding: 52px 24px;
    text-align: center;
}

.space-empty strong {
    color: var(--xcloud-ink);
    display: block;
    font-size: 1rem;
    margin-bottom: 5px;
}

.space-search-empty {
    background: #fff;
    border: 1px dashed #d9e0ec;
    border-radius: 18px;
    color: #7a8699;
    display: none;
    padding: 35px 20px;
    text-align: center;
}

.space-footer {
    border-top: 1px solid #e3e9f2;
    color: #8a95a8;
    display: flex;
    flex-wrap: wrap;
    font-size: .75rem;
    gap: 12px;
    justify-content: space-between;
    margin-top: 38px;
    padding-top: 18px;
}

.preview-modal .modal-content {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
}

.preview-modal .modal-header {
    border-bottom: 1px solid #e8edf5;
    padding: 14px 18px;
}

.preview-modal .modal-title {
    font-size: .9rem;
    font-weight: 800;
}

.preview-modal .modal-body {
    background: #eef1f7;
    padding: 0;
}

.preview-frame {
    background: #fff;
    border: 0;
    display: block;
    height: min(76vh, 900px);
    width: 100%;
}

/* --------------------------------------------------------------------------
   Unlock / login
-------------------------------------------------------------------------- */

.gate-page {
    align-items: center;
    background:
        radial-gradient(circle at 15% 8%, rgba(109, 94, 252, .35), transparent 30rem),
        radial-gradient(circle at 90% 90%, rgba(14, 165, 166, .18), transparent 28rem),
        var(--xcloud-dark);
    color: #fff;
    display: flex;
    min-height: 100vh;
    padding: 28px 18px;
}

.gate-wrap {
    margin: 0 auto;
    max-width: 430px;
    width: 100%;
}

.gate-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.gate-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 32px 90px rgba(0, 0, 0, .35);
    color: var(--xcloud-ink);
    padding: 31px;
}

.gate-card__icon {
    align-items: center;
    background: #f0edff;
    border-radius: 14px;
    color: #5b4bd6;
    display: inline-flex;
    font-size: 1.3rem;
    height: 48px;
    justify-content: center;
    margin-bottom: 18px;
    width: 48px;
}

.gate-card h1 {
    font-size: 1.4rem;
    font-weight: 850;
    letter-spacing: -.04em;
    margin: 0 0 7px;
}

.gate-card__subtitle {
    color: #6c798f;
    font-size: .86rem;
    line-height: 1.6;
    margin: 0 0 22px;
}

.gate-meta {
    background: #f7f9fc;
    border: 1px solid #e9eef6;
    border-radius: 12px;
    font-size: .77rem;
    margin-bottom: 20px;
    padding: 11px 13px;
}

.gate-meta strong {
    display: block;
    font-size: .74rem;
    margin-bottom: 2px;
}

.gate-meta span {
    color: #7a8699;
}

.gate-card .form-label {
    font-size: .78rem;
    font-weight: 750;
}

.gate-card .form-control {
    border: 1px solid #dfe5ef;
    border-radius: 11px;
    font-size: .9rem;
    padding: 11px 13px;
}

.gate-card .form-control:focus {
    border-color: #c7c0ff;
    box-shadow: 0 0 0 4px rgba(109, 94, 252, .11);
}

.gate-card .btn {
    border-radius: 11px;
    font-size: .86rem;
    font-weight: 750;
    padding: 11px;
}

.gate-back {
    color: rgba(255, 255, 255, .68);
    display: block;
    font-size: .78rem;
    margin-top: 19px;
    text-align: center;
    text-decoration: none;
}

.gate-back:hover {
    color: #fff;
}

.login-page {
    align-items: center;
    background:
        radial-gradient(circle at 10% 5%, rgba(109, 94, 252, .28), transparent 32rem),
        radial-gradient(circle at 90% 95%, rgba(14, 165, 166, .14), transparent 28rem),
        #0b1020;
    color: #fff;
    display: flex;
    min-height: 100vh;
    padding: 28px 18px;
}

.login-wrap {
    margin: 0 auto;
    max-width: 420px;
    width: 100%;
}

.login-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.login-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 32px 90px rgba(0, 0, 0, .4);
    color: var(--xcloud-ink);
    padding: 32px;
}

.login-card h1 {
    font-size: 1.45rem;
    font-weight: 850;
    letter-spacing: -.04em;
    margin: 0 0 7px;
}

.login-subtitle {
    color: #6c798f;
    font-size: .86rem;
    line-height: 1.55;
    margin: 0 0 23px;
}

.login-card .form-label {
    font-size: .78rem;
    font-weight: 750;
}

.login-card .form-control {
    border: 1px solid #dfe5ef;
    border-radius: 11px;
    font-size: .9rem;
    padding: 11px 13px;
}

.login-card .form-control:focus {
    border-color: #c7c0ff;
    box-shadow: 0 0 0 4px rgba(109, 94, 252, .11);
}

.login-card .btn {
    border-radius: 11px;
    font-size: .86rem;
    font-weight: 750;
    padding: 11px;
}

.login-links {
    color: #7a8699;
    font-size: .77rem;
    margin-top: 19px;
    text-align: center;
}

.login-links a {
    color: #5b4bd6;
    font-weight: 700;
    text-decoration: none;
}

.login-links a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Admin shell
-------------------------------------------------------------------------- */

.admin-page {
    background: var(--admin-bg);
    color: var(--admin-ink);
}

.admin-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--admin-sidebar);
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 25px;
    height: 100vh;
    overflow-y: auto;
    padding: 22px 17px;
    position: sticky;
    top: 0;
}

.admin-brand {
    align-items: center;
    color: #fff;
    display: flex;
    gap: 10px;
    padding: 3px 5px;
    text-decoration: none;
}

.admin-brand:hover {
    color: #fff;
}

.admin-brand__mark {
    align-items: center;
    background: linear-gradient(135deg, var(--admin-accent), #9b8cff 55%, var(--xcloud-accent-2));
    border-radius: 11px;
    color: #fff;
    display: inline-flex;
    font-size: .9rem;
    font-weight: 850;
    height: 35px;
    justify-content: center;
    width: 35px;
}

.admin-brand__text {
    font-size: .98rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
}

.admin-brand__text small {
    color: #8d99b2;
    display: block;
    font-size: .64rem;
    font-weight: 600;
    letter-spacing: .08em;
    margin-top: 3px;
    text-transform: uppercase;
}

.admin-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
}

.admin-nav__label {
    color: #68758e;
    font-size: .61rem;
    font-weight: 800;
    letter-spacing: .14em;
    margin: 17px 9px 5px;
    text-transform: uppercase;
}

.admin-nav__link {
    align-items: center;
    border-radius: 10px;
    color: #aab4c7;
    display: flex;
    font-size: .82rem;
    font-weight: 650;
    gap: 10px;
    padding: 9px 10px;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.admin-nav__link:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.admin-nav__link.is-active {
    background: rgba(109, 94, 252, .22);
    color: #fff;
}

.admin-nav__icon {
    color: #7e8ba4;
    display: inline-flex;
    font-size: .88rem;
    justify-content: center;
    width: 18px;
}

.admin-nav__link.is-active .admin-nav__icon {
    color: #b9aeff;
}

.admin-sidebar__footer {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding-top: 16px;
}

.admin-user {
    color: #7e8ba4;
    font-size: .7rem;
    margin-bottom: 11px;
    overflow-wrap: anywhere;
}

.admin-user strong {
    color: #e8edf7;
    display: block;
    font-size: .76rem;
    margin-bottom: 2px;
}

.admin-main {
    min-width: 0;
}

.admin-topbar {
    align-items: center;
    background: rgba(244, 246, 251, .9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--admin-line);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 21px 32px;
    position: sticky;
    top: 0;
    z-index: 15;
}

.admin-topbar__title {
    font-size: 1.25rem;
    font-weight: 850;
    letter-spacing: -.04em;
    margin: 0;
}

.admin-topbar__subtitle {
    color: var(--admin-muted);
    font-size: .78rem;
    margin: 3px 0 0;
}

.admin-content {
    margin: 0 auto;
    max-width: 1280px;
    padding: 28px 32px 52px;
}

.admin-page-title {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 23px;
}

.admin-page-title h1 {
    font-size: 1.55rem;
    font-weight: 850;
    letter-spacing: -.045em;
    margin: 0 0 5px;
}

.admin-page-title p {
    color: var(--admin-muted);
    font-size: .84rem;
    margin: 0;
    max-width: 680px;
}

.admin-card {
    background: #fff;
    border: 1px solid var(--admin-line);
    border-radius: 17px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(17, 24, 39, .02);
}

.admin-card__body {
    padding: 19px;
}

.admin-card__header {
    align-items: center;
    border-bottom: 1px solid #edf0f6;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 15px 19px;
}

.admin-card__header h2 {
    font-size: .92rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0;
}

.admin-card__header p {
    color: var(--admin-muted);
    font-size: .74rem;
    margin: 2px 0 0;
}

.admin-stat {
    background: #fff;
    border: 1px solid var(--admin-line);
    border-radius: 15px;
    height: 100%;
    padding: 17px;
}

.admin-stat__label {
    color: var(--admin-muted);
    font-size: .69rem;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.admin-stat__value {
    font-size: 1.65rem;
    font-weight: 850;
    letter-spacing: -.05em;
    line-height: 1.1;
    margin: 6px 0 3px;
}

.admin-stat__hint {
    color: #8a95a8;
    font-size: .69rem;
}

.admin-table {
    margin: 0;
    vertical-align: middle;
}

.admin-table th {
    border-bottom: 1px solid var(--admin-line);
    color: var(--admin-muted);
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .08em;
    padding: 10px 14px;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-table td {
    border-bottom: 1px solid #f0f3f8;
    font-size: .8rem;
    padding: 12px 14px;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr:hover {
    background: #fafbfe;
}

.admin-title-cell strong {
    display: block;
    font-size: .82rem;
    font-weight: 750;
    line-height: 1.3;
}

.admin-title-cell span {
    color: var(--admin-muted);
    display: block;
    font-size: .7rem;
    margin-top: 2px;
    overflow-wrap: anywhere;
}

.admin-title-cell a {
    color: inherit;
    text-decoration: none;
}

.admin-title-cell a:hover strong {
    color: var(--admin-accent);
}

.admin-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.admin-actions form {
    display: inline-flex;
}

.admin-empty {
    color: var(--admin-muted);
    font-size: .82rem;
    padding: 38px 20px;
    text-align: center;
}

.admin-empty strong {
    color: var(--admin-ink);
    display: block;
    font-size: .92rem;
    margin-bottom: 4px;
}

.admin-form label,
.admin-form .form-label {
    color: #344054;
    font-size: .76rem;
    font-weight: 750;
    margin-bottom: 5px;
}

.admin-form .form-control,
.admin-form .form-select {
    border: 1px solid #dfe5ef;
    border-radius: 10px;
    font-size: .84rem;
    padding: 9px 11px;
}

.admin-form .form-control:focus,
.admin-form .form-select:focus {
    border-color: #c7c0ff;
    box-shadow: 0 0 0 4px rgba(109, 94, 252, .1);
}

.admin-form .form-text {
    color: var(--admin-muted);
    font-size: .7rem;
}

.admin-form .form-check-input:checked {
    background-color: var(--admin-accent);
    border-color: var(--admin-accent);
}

.form-section {
    border-bottom: 1px solid #edf0f6;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.form-section:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section__title {
    font-size: .88rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0 0 4px;
}

.form-section__hint {
    color: var(--admin-muted);
    font-size: .74rem;
    margin: 0 0 17px;
}

.badge-soft {
    border-radius: 999px;
    display: inline-flex;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .02em;
    padding: 4px 9px;
    white-space: nowrap;
}

.badge-soft--ok { background: #e9fbf5; color: #087f5b; }
.badge-soft--public { background: #e9fbf5; color: #087f5b; }
.badge-soft--private { background: #f0edff; color: #5b4bd6; }
.badge-soft--muted { background: #eef1f6; color: #667085; }
.badge-soft--warn { background: #fff7e8; color: #a15c00; }
.badge-soft--err { background: #ffecec; color: #c92a2a; }
.badge-soft--info { background: #e8f2ff; color: #1d5fd1; }

.file-type {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .57rem;
    font-weight: 850;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.file-type--html { background: #fff0e8; color: #c2410c; }
.file-type--pdf { background: #ffecec; color: #c92a2a; }
.file-type--figma { background: #f0edff; color: #5b4bd6; }
.file-type--image { background: #e8f8f2; color: #087f5b; }
.file-type--video { background: #e8f2ff; color: #1d5fd1; }
.file-type--archive { background: #fff7e0; color: #946200; }
.file-type--document { background: #eef1f8; color: #475569; }
.file-type--other { background: #f1f4f9; color: #667085; }

.upload-zone {
    background: #fafbff;
    border: 1.5px dashed #cfd6e5;
    border-radius: 14px;
    cursor: pointer;
    padding: 25px 18px;
    text-align: center;
    transition: border-color .15s ease, background .15s ease;
}

.upload-zone:hover,
.upload-zone.is-dragover {
    background: #f5f2ff;
    border-color: var(--admin-accent);
}

.upload-zone__icon {
    align-items: center;
    background: #f0edff;
    border-radius: 12px;
    color: #5b4bd6;
    display: inline-flex;
    font-size: 1.1rem;
    height: 42px;
    justify-content: center;
    margin-bottom: 10px;
    width: 42px;
}

.upload-zone strong {
    display: block;
    font-size: .84rem;
    margin-bottom: 3px;
}

.upload-zone span {
    color: var(--admin-muted);
    font-size: .72rem;
}

.upload-zone input[type="file"] {
    display: none;
}

.upload-selection {
    display: grid;
    gap: 5px;
    margin-top: 11px;
}

.upload-selection__item {
    align-items: center;
    background: #f7f9fc;
    border: 1px solid #e9eef6;
    border-radius: 8px;
    display: flex;
    font-size: .71rem;
    gap: 8px;
    justify-content: space-between;
    padding: 6px 9px;
}

.upload-selection__item span {
    color: var(--admin-muted);
}

.copy-field {
    align-items: center;
    background: #f7f9fc;
    border: 1px solid #e9eef6;
    border-radius: 10px;
    display: flex;
    gap: 8px;
    margin-top: 7px;
    padding: 6px 7px 6px 11px;
}

.copy-field code {
    color: #4d5b74;
    flex: 1;
    font-size: .72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.space-header {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 22px;
}

.space-header__title {
    font-size: 1.55rem;
    font-weight: 850;
    letter-spacing: -.045em;
    margin: 0 0 5px;
}

.space-header__meta {
    align-items: center;
    color: var(--admin-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: .76rem;
    gap: 7px;
}

.space-header__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.accent-dot {
    border-radius: 50%;
    display: inline-block;
    height: 9px;
    width: 9px;
}

.settings-list {
    font-size: .8rem;
}

.settings-list div {
    align-items: flex-start;
    border-bottom: 1px solid #f0f3f8;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 9px 0;
}

.settings-list div:last-child {
    border-bottom: 0;
}

.settings-list dt,
.settings-list span:first-child {
    color: var(--admin-muted);
    font-weight: 650;
}

.settings-list code {
    color: #344054;
    font-size: .73rem;
    text-align: right;
    word-break: break-word;
}

.alert {
    border: 0;
    border-radius: 12px;
    font-size: .83rem;
}

/* --------------------------------------------------------------------------
   Responsive
-------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
    .home-hero {
        gap: 38px;
        grid-template-columns: 1fr;
        padding-top: 32px;
    }

    .browser-mock {
        transform: none;
    }

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

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        flex-direction: column;
        gap: 13px;
        height: auto;
        overflow: visible;
        position: relative;
    }

    .admin-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .admin-nav__label {
        display: none;
    }

    .admin-nav__link {
        font-size: .78rem;
        padding: 7px 10px;
    }

    .admin-sidebar__footer {
        align-items: center;
        display: flex;
        gap: 12px;
        justify-content: space-between;
        margin-top: 4px;
        padding-top: 10px;
    }

    .admin-user {
        margin-bottom: 0;
    }

    .admin-topbar {
        padding: 16px 20px;
        position: relative;
    }

    .admin-content {
        padding: 22px 20px 42px;
    }
}

@media (max-width: 767.98px) {
    .home-nav,
    .space-topbar {
        padding-left: 16px;
        padding-right: 16px;
    }

    .home-hero,
    .home-features,
    .space-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }

    .space-hero__top {
        flex-direction: column;
    }

    .space-toolbar {
        align-items: stretch;
    }

    .space-toolbar__right {
        width: 100%;
    }

    .space-search {
        width: 100%;
    }

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

    .admin-page-title {
        flex-direction: column;
    }

    .gate-card,
    .login-card {
        padding: 24px;
    }

    .admin-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .space-header {
        flex-direction: column;
    }

    .copy-field code {
        max-width: 55vw;
    }
}

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