* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {

    --bg:
        #f4f7fb;

    --card:
        #ffffff;

    --soft:
        #f8fafc;

    --text:
        #172033;

    --muted:
        #6b7280;

    --border:
        #e5e9f0;

    --primary:
        #5146e5;

    --primary2:
        #7c73f1;

    --primarySoft:
        #eef0ff;

    --success:
        #16a34a;

    --danger:
        #dc2626;

    --shadow:
        0 10px 30px
        rgba(15,23,42,0.07);
}

body.dark {

    --bg:
        #0b1120;

    --card:
        #151e2e;

    --soft:
        #111827;

    --text:
        #f8fafc;

    --muted:
        #94a3b8;

    --border:
        #293548;

    --primary:
        #818cf8;

    --primary2:
        #a5b4fc;

    --primarySoft:
        #25294c;
}

body {

    min-height:
        100vh;

    font-family:
        "Segoe UI",
        Arial,
        sans-serif;

    color:
        var(--text);

    background:
        radial-gradient(
            circle at 10% 0%,
            rgba(81,70,229,0.08),
            transparent 28%
        ),
        var(--bg);

    transition:
        background .2s ease,
        color .2s ease;
}

button,
input,
select {
    font: inherit;
}

a {
    text-decoration:
        none;
    color:
        inherit;
}

.hidden {
    display:
        none !important;
}


/* =====================================================
   SIDEBAR
===================================================== */

.sidebar {

    position:
        fixed;

    top:
        0;

    left:
        0;

    bottom:
        0;

    width:
        245px;

    padding:
        24px 17px;

    background:
        var(--card);

    border-right:
        1px solid var(--border);

    display:
        flex;

    flex-direction:
        column;

    z-index:
        30;
}

.sidebar-brand {

    display:
        flex;

    align-items:
        center;

    gap:
        10px;

    padding:
        0 8px 24px;
}

.brand-logo {

    width:
        43px;

    height:
        43px;

    border-radius:
        13px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary2)
        );

    color:
        white;

    font-size:
        22px;

    box-shadow:
        0 8px 20px
        rgba(81,70,229,0.22);
}

.sidebar-brand strong {

    display:
        block;

    font-size:
        15px;
}

.sidebar-brand small {

    display:
        block;

    margin-top:
        2px;

    color:
        var(--muted);

    font-size:
        9px;
}

.navigation {

    display:
        flex;

    flex-direction:
        column;
}

.nav-label {

    margin:
        8px 9px;

    color:
        var(--muted);

    font-size:
        8px;

    letter-spacing:
        1.4px;

    font-weight:
        800;
}

.nav-gap {
    margin-top:
        26px;
}

.nav-item {

    display:
        flex;

    align-items:
        center;

    gap:
        11px;

    padding:
        11px 13px;

    margin-bottom:
        4px;

    border-radius:
        10px;

    color:
        var(--muted);

    font-size:
        12px;

    font-weight:
        700;

    transition:
        background .2s,
        color .2s,
        transform .2s;
}

.nav-item:hover {

    background:
        var(--soft);

    color:
        var(--text);

    transform:
        translateX(2px);
}

.nav-item.active {

    background:
        var(--primarySoft);

    color:
        var(--primary);
}

.sidebar-bottom {

    margin-top:
        auto;
}

.account-box {

    display:
        flex;

    align-items:
        center;

    gap:
        9px;

    padding:
        11px;

    border:
        1px solid var(--border);

    border-radius:
        12px;

    background:
        var(--soft);
}

.account-avatar {

    width:
        34px;

    height:
        34px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        50%;

    background:
        var(--primary);

    color:
        white;

    font-weight:
        800;

    font-size:
        12px;
}

.account-box strong {

    display:
        block;

    font-size:
        11px;

    overflow:
        hidden;

    text-overflow:
        ellipsis;

    white-space:
        nowrap;

    max-width:
        130px;
}

.account-box small {

    display:
        block;

    margin-top:
        3px;

    color:
        var(--muted);

    font-size:
        9px;
}

.logout-button {

    width:
        100%;

    margin-top:
        8px;

    padding:
        9px;

    border:
        1px solid var(--border);

    border-radius:
        9px;

    background:
        transparent;

    color:
        var(--muted);

    font-size:
        10px;

    font-weight:
        700;

    cursor:
        pointer;
}

.logout-button:hover {

    color:
        var(--danger);

    border-color:
        var(--danger);
}


/* =====================================================
   APP
===================================================== */

.app-shell {

    margin-left:
        245px;

    min-height:
        100vh;
}

.topbar {

    position:
        sticky;

    top:
        0;

    z-index:
        20;

    min-height:
        73px;

    padding:
        0 4%;

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    border-bottom:
        1px solid var(--border);

    background:
        rgba(255,255,255,0.87);

    backdrop-filter:
        blur(16px);
}

body.dark .topbar {

    background:
        rgba(11,17,32,0.88);
}

.top-kicker {

    color:
        var(--primary);

    font-size:
        8px;

    letter-spacing:
        1.5px;

    font-weight:
        800;
}

.topbar h2 {

    margin-top:
        3px;

    font-size:
        20px;
}

.topbar-actions {

    display:
        flex;

    gap:
        8px;
}

.icon-button {

    width:
        39px;

    height:
        39px;

    border:
        1px solid var(--border);

    border-radius:
        10px;

    background:
        var(--card);

    color:
        var(--text);

    cursor:
        pointer;
}

.icon-button:hover {

    border-color:
        var(--primary);

    color:
        var(--primary);
}

.main-content {

    width:
        min(1230px,92%);

    margin:
        auto;

    padding:
        30px 0 65px;
}


/* =====================================================
   BUTTONS
===================================================== */

.primary-button,
.secondary-button {

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        11px 16px;

    border-radius:
        10px;

    font-size:
        11px;

    font-weight:
        800;

    cursor:
        pointer;

    transition:
        transform .2s,
        box-shadow .2s,
        border-color .2s;
}

.primary-button {

    border:
        0;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary2)
        );

    color:
        white;

    box-shadow:
        0 8px 20px
        rgba(81,70,229,0.18);
}

.primary-button:hover {

    transform:
        translateY(-2px);
}

.primary-button:disabled {

    opacity:
        .45;

    cursor:
        not-allowed;

    transform:
        none;
}

.secondary-button {

    border:
        1px solid var(--border);

    background:
        var(--card);

    color:
        var(--text);
}

.secondary-button:hover {

    border-color:
        var(--primary);

    transform:
        translateY(-2px);
}

.compact {

    padding:
        10px 14px;
}

.text-button {

    color:
        var(--primary);

    font-size:
        10px;

    font-weight:
        800;
}


/* =====================================================
   HERO
===================================================== */

.dashboard-hero {

    position:
        relative;

    overflow:
        hidden;

    min-height:
        275px;

    padding:
        40px;

    border:
        1px solid var(--border);

    border-radius:
        23px;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #eef0ff
        );

    box-shadow:
        var(--shadow);

    display:
        flex;

    align-items:
        center;
}

body.dark .dashboard-hero {

    background:
        linear-gradient(
            135deg,
            #151e2e,
            #202647
        );
}

.hero-content {

    position:
        relative;

    z-index:
        2;

    max-width:
        680px;
}

.hero-badge {

    display:
        inline-block;

    padding:
        6px 10px;

    border-radius:
        999px;

    background:
        var(--primarySoft);

    color:
        var(--primary);

    font-size:
        8px;

    letter-spacing:
        1.2px;

    font-weight:
        800;
}

.hero-content h1 {

    margin:
        15px 0 10px;

    font-size:
        clamp(34px,5vw,53px);

    line-height:
        .99;

    letter-spacing:
        -2px;
}

.hero-content h1 span {

    color:
        var(--primary);
}

.hero-content p {

    max-width:
        570px;

    color:
        var(--muted);

    font-size:
        13px;

    line-height:
        1.7;
}

.hero-buttons {

    display:
        flex;

    gap:
        8px;

    margin-top:
        22px;
}

.hero-cloud-large {

    position:
        absolute;

    right:
        8%;

    font-size:
        150px;

    color:
        var(--primary);

    opacity:
        .10;
}


/* =====================================================
   STATS
===================================================== */

.stats-grid {

    display:
        grid;

    grid-template-columns:
        repeat(4,1fr);

    gap:
        14px;

    margin-top:
        18px;
}

.stat-card,
.content-card {

    border:
        1px solid var(--border);

    border-radius:
        18px;

    background:
        var(--card);

    box-shadow:
        0 4px 15px
        rgba(15,23,42,0.04);
}

.stat-card {

    padding:
        18px;

    transition:
        transform .2s,
        box-shadow .2s;
}

.stat-card:hover {

    transform:
        translateY(-3px);

    box-shadow:
        var(--shadow);
}

.stat-icon {

    width:
        38px;

    height:
        38px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        11px;

    background:
        var(--primarySoft);

    color:
        var(--primary);

    font-size:
        10px;

    font-weight:
        800;
}

.stat-card > span {

    display:
        block;

    margin-top:
        14px;

    color:
        var(--muted);

    font-size:
        8px;

    letter-spacing:
        1px;

    font-weight:
        800;
}

.stat-card strong {

    display:
        block;

    margin-top:
        4px;

    font-size:
        25px;
}

.stat-card small {

    color:
        var(--muted);

    font-size:
        9px;
}


/* =====================================================
   CONTENT
===================================================== */

.content-card {

    padding:
        22px;
}

.dashboard-two-column {

    display:
        grid;

    grid-template-columns:
        1.15fr .85fr;

    gap:
        15px;

    margin-top:
        16px;
}

.card-heading {

    display:
        flex;

    align-items:
        flex-start;

    justify-content:
        space-between;

    gap:
        10px;

    margin-bottom:
        16px;
}

.section-kicker {

    display:
        block;

    color:
        var(--primary);

    font-size:
        8px;

    letter-spacing:
        1.4px;

    font-weight:
        800;
}

.card-heading h3 {

    margin-top:
        3px;

    font-size:
        16px;
}


/* =====================================================
   RECENT
===================================================== */

.recent-list {

    display:
        flex;

    flex-direction:
        column;

    gap:
        6px;
}

.recent-item {

    display:
        flex;

    align-items:
        center;

    gap:
        9px;

    padding:
        8px;

    border-radius:
        10px;
}

.recent-item:hover {

    background:
        var(--soft);
}

.recent-thumb {

    width:
        44px;

    height:
        44px;

    flex:
        0 0 44px;

    overflow:
        hidden;

    border-radius:
        8px;

    background:
        var(--soft);
}

.recent-thumb img {

    width:
        100%;

    height:
        100%;

    object-fit:
        cover;
}

.recent-info {

    min-width:
        0;

    flex:
        1;
}

.recent-info strong {

    display:
        block;

    overflow:
        hidden;

    text-overflow:
        ellipsis;

    white-space:
        nowrap;

    font-size:
        11px;
}

.recent-info small {

    display:
        block;

    margin-top:
        3px;

    color:
        var(--muted);

    font-size:
        9px;
}

.recent-open {

    color:
        var(--primary);

    font-weight:
        800;
}

.recent-empty {

    padding:
        35px;

    text-align:
        center;

    color:
        var(--muted);
}

.recent-empty span {

    display:
        block;

    margin-bottom:
        5px;

    font-size:
        30px;
}


/* =====================================================
   QUICK ACTIONS
===================================================== */

.quick-actions {

    display:
        flex;

    flex-direction:
        column;

    gap:
        8px;
}

.quick-action {

    display:
        flex;

    align-items:
        center;

    gap:
        10px;

    padding:
        11px;

    border:
        1px solid var(--border);

    border-radius:
        11px;

    background:
        var(--soft);

    transition:
        border-color .2s,
        transform .2s;
}

.quick-action:hover {

    border-color:
        var(--primary);

    transform:
        translateY(-2px);
}

.quick-action > span {

    width:
        35px;

    height:
        35px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        9px;

    background:
        var(--primarySoft);

    color:
        var(--primary);

    font-weight:
        800;
}

.quick-action div {

    flex:
        1;
}

.quick-action strong {

    display:
        block;

    font-size:
        11px;
}

.quick-action small {

    display:
        block;

    margin-top:
        2px;

    color:
        var(--muted);

    font-size:
        9px;
}


/* =====================================================
   SECURITY
===================================================== */

.security-grid {

    display:
        grid;

    grid-template-columns:
        repeat(3,1fr);

    gap:
        10px;
}

.security-grid > div {

    padding:
        13px;

    border:
        1px solid var(--border);

    border-radius:
        12px;

    background:
        var(--soft);
}

.security-icon {

    width:
        27px;

    height:
        27px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        50%;

    background:
        rgba(22,163,74,.11);

    color:
        var(--success);

    font-size:
        11px;

    font-weight:
        800;
}

.security-grid strong {

    display:
        block;

    margin-top:
        9px;

    font-size:
        11px;
}

.security-grid p {

    margin-top:
        4px;

    color:
        var(--muted);

    font-size:
        9px;

    line-height:
        1.5;
}


/* =====================================================
   SECTION INTRO
===================================================== */

.section-intro {

    display:
        flex;

    align-items:
        flex-end;

    justify-content:
        space-between;

    gap:
        20px;

    margin-bottom:
        21px;
}

.section-intro h1 {

    margin-top:
        5px;

    font-size:
        29px;

    letter-spacing:
        -1px;
}

.section-intro p {

    margin-top:
        5px;

    color:
        var(--muted);

    font-size:
        11px;
}


/* =====================================================
   GALLERY TOOLBAR
===================================================== */

.gallery-toolbar {

    display:
        grid;

    grid-template-columns:
        1fr 140px 150px auto;

    gap:
        8px;

    padding:
        11px;

    border:
        1px solid var(--border);

    border-radius:
        14px;

    background:
        var(--card);
}

.search-wrapper {

    display:
        flex;

    align-items:
        center;

    gap:
        7px;

    padding:
        0 10px;

    border:
        1px solid var(--border);

    border-radius:
        9px;

    background:
        var(--soft);
}

.search-wrapper input {

    width:
        100%;

    padding:
        10px 0;

    border:
        0;

    outline:
        0;

    background:
        transparent;

    color:
        var(--text);

    font-size:
        10px;
}

.gallery-toolbar select {

    padding:
        9px;

    border:
        1px solid var(--border);

    border-radius:
        9px;

    outline:
        0;

    background:
        var(--soft);

    color:
        var(--text);

    font-size:
        10px;
}

.view-switcher {

    display:
        flex;

    padding:
        3px;

    border:
        1px solid var(--border);

    border-radius:
        9px;

    background:
        var(--soft);
}

.view-button {

    width:
        34px;

    border:
        0;

    border-radius:
        7px;

    background:
        transparent;

    color:
        var(--muted);

    cursor:
        pointer;
}

.view-button.active {

    background:
        var(--card);

    color:
        var(--primary);

    box-shadow:
        0 2px 5px
        rgba(15,23,42,.07);
}

.gallery-status-bar {

    display:
        flex;

    justify-content:
        space-between;

    margin:
        11px 2px;

    color:
        var(--muted);

    font-size:
        9px;
}


/* =====================================================
   GALLERY
===================================================== */

.gallery {

    display:
        grid;

    grid-template-columns:
        repeat(4,1fr);

    gap:
        14px;
}

.image-card {

    overflow:
        hidden;

    border:
        1px solid var(--border);

    border-radius:
        15px;

    background:
        var(--card);

    box-shadow:
        0 4px 13px
        rgba(15,23,42,.04);

    transition:
        transform .2s,
        box-shadow .2s;
}

.image-card:hover {

    transform:
        translateY(-4px);

    box-shadow:
        var(--shadow);
}

.image-image-wrap {

    position:
        relative;

    height:
        180px;

    overflow:
        hidden;

    background:
        var(--soft);
}

.image-preview {

    width:
        100%;

    height:
        100%;

    object-fit:
        cover;

    transition:
        transform .3s ease;
}

.image-card:hover
.image-preview {

    transform:
        scale(1.04);
}

.image-type-badge {

    position:
        absolute;

    top:
        8px;

    left:
        8px;

    padding:
        4px 6px;

    border-radius:
        6px;

    background:
        rgba(15,23,42,.56);

    color:
        white;

    font-size:
        7px;

    font-weight:
        800;
}

.favorite-button {

    position:
        absolute;

    top:
        8px;

    right:
        8px;

    width:
        29px;

    height:
        29px;

    border:
        1px solid
        rgba(255,255,255,.45);

    border-radius:
        50%;

    background:
        rgba(15,23,42,.45);

    color:
        white;

    cursor:
        pointer;
}

.favorite-button.active {

    color:
        #ffd43b;
}

.image-details {

    padding:
        12px;
}

.image-name {

    overflow:
        hidden;

    white-space:
        nowrap;

    text-overflow:
        ellipsis;

    font-size:
        11px;

    font-weight:
        750;
}

.image-meta {

    margin-top:
        4px;

    color:
        var(--muted);

    font-size:
        9px;
}

.image-actions {

    display:
        grid;

    grid-template-columns:
        repeat(3,1fr);

    gap:
        5px;

    margin-top:
        10px;
}

.action-button {

    padding:
        7px 3px;

    border:
        1px solid var(--border);

    border-radius:
        7px;

    background:
        var(--soft);

    color:
        var(--text);

    font-size:
        8px;

    font-weight:
        750;

    cursor:
        pointer;
}

.action-button:hover {

    border-color:
        var(--primary);

    color:
        var(--primary);
}

.action-button.delete:hover {

    border-color:
        var(--danger);

    color:
        var(--danger);
}


/* LIST VIEW */

.gallery.list-view {

    grid-template-columns:
        1fr;
}

.gallery.list-view
.image-card {

    display:
        grid;

    grid-template-columns:
        180px 1fr;
}

.gallery.list-view
.image-image-wrap {

    height:
        135px;
}

.gallery.list-view
.image-details {

    display:
        flex;

    flex-direction:
        column;

    justify-content:
        center;
}


/* =====================================================
   UPLOAD
===================================================== */

.upload-layout {

    display:
        grid;

    grid-template-columns:
        1.2fr .8fr;

    gap:
        15px;
}

.upload-card {

    padding:
        21px;
}

.drop-zone {

    min-height:
        320px;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        center;

    text-align:
        center;

    padding:
        25px;

    border:
        2px dashed #cbd4e1;

    border-radius:
        18px;

    background:
        linear-gradient(
            180deg,
            var(--soft),
            var(--card)
        );

    transition:
        border .2s,
        background .2s,
        transform .2s;

    cursor:
        pointer;
}

body.dark .drop-zone {

    border-color:
        #38475d;
}

.drop-zone:hover,
.drop-zone.dragover {

    border-color:
        var(--primary);

    background:
        var(--primarySoft);

    transform:
        scale(1.01);
}

.upload-symbol {

    width:
        61px;

    height:
        61px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        18px;

    background:
        var(--primarySoft);

    color:
        var(--primary);

    font-size:
        28px;

    margin-bottom:
        13px;
}

.drop-zone h2 {

    font-size:
        18px;
}

.drop-zone p {

    margin-top:
        4px;

    color:
        var(--muted);

    font-size:
        11px;
}

.upload-rule {

    margin:
        11px 0 15px;

    color:
        var(--muted);

    font-size:
        9px;

    line-height:
        1.7;
}

.selected-files {

    display:
        grid;

    grid-template-columns:
        repeat(2,1fr);

    gap:
        7px;

    margin-top:
        12px;
}

.selected-file {

    position:
        relative;

    display:
        flex;

    align-items:
        center;

    gap:
        7px;

    padding:
        8px;

    border:
        1px solid var(--border);

    border-radius:
        9px;

    background:
        var(--soft);
}

.selected-thumb {

    width:
        39px;

    height:
        39px;

    flex:
        0 0 39px;

    border-radius:
        7px;

    overflow:
        hidden;
}

.selected-thumb img {

    width:
        100%;

    height:
        100%;

    object-fit:
        cover;
}

.selected-file-info {

    min-width:
        0;

    padding-right:
        17px;
}

.selected-file-info strong {

    display:
        block;

    overflow:
        hidden;

    text-overflow:
        ellipsis;

    white-space:
        nowrap;

    font-size:
        9px;
}

.selected-file-info small {

    display:
        block;

    margin-top:
        2px;

    color:
        var(--muted);

    font-size:
        8px;
}

.remove-selected {

    position:
        absolute;

    right:
        6px;

    top:
        6px;

    width:
        20px;

    height:
        20px;

    border:
        0;

    border-radius:
        50%;

    background:
        rgba(220,38,38,.08);

    color:
        var(--danger);

    cursor:
        pointer;
}

.upload-progress {

    margin-top:
        14px;
}

.progress-heading {

    display:
        flex;

    justify-content:
        space-between;

    margin-bottom:
        6px;

    color:
        var(--muted);

    font-size:
        9px;
}

.progress-track {

    height:
        8px;

    overflow:
        hidden;

    border-radius:
        999px;

    background:
        var(--border);
}

.progress-fill {

    width:
        0%;

    height:
        100%;

    border-radius:
        inherit;

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--primary2)
        );

    transition:
        width .12s ease;
}

.upload-gallery-link {

    width:
        100%;

    margin-top:
        8px;
}


/* =====================================================
   TIPS
===================================================== */

.tips-card h3 {

    margin:
        4px 0 18px;

    font-size:
        16px;
}

.tip-item {

    display:
        flex;

    gap:
        9px;

    padding:
        10px 0;

    border-bottom:
        1px solid var(--border);
}

.tip-number {

    color:
        var(--primary);

    font-size:
        8px;

    font-weight:
        800;
}

.tip-item strong {

    font-size:
        10px;
}

.tip-item p {

    margin-top:
        3px;

    color:
        var(--muted);

    font-size:
        9px;

    line-height:
        1.5;
}

.architecture-mini {

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        7px;

    margin-top:
        17px;

    flex-wrap:
        wrap;

    font-size:
        8px;
}

.architecture-mini div {

    padding:
        7px 8px;

    border:
        1px solid var(--border);

    border-radius:
        7px;

    background:
        var(--soft);
}

.architecture-mini span {

    color:
        var(--primary);
}


/* =====================================================
   ABOUT
===================================================== */

.about-grid {

    display:
        grid;

    grid-template-columns:
        1.15fr .85fr;

    gap:
        15px;
}

.about-main h2 {

    margin:
        6px 0 12px;

    font-size:
        23px;
}

.about-main p {

    margin-bottom:
        10px;

    color:
        var(--muted);

    font-size:
        11px;

    line-height:
        1.7;
}

.tech-list > div {

    display:
        flex;

    justify-content:
        space-between;

    gap:
        15px;

    padding:
        9px 0;

    border-bottom:
        1px solid var(--border);
}

.tech-list span {

    color:
        var(--muted);

    font-size:
        9px;
}

.tech-list strong {

    font-size:
        9px;

    text-align:
        right;
}

.architecture-card {

    grid-column:
        1 / -1;
}

.architecture-flow {

    display:
        grid;

    grid-template-columns:
        1fr auto 1fr auto 1fr;

    align-items:
        center;

    gap:
        10px;

    margin-top:
        15px;
}

.architecture-node {

    min-height:
        120px;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        center;

    border:
        1px solid var(--border);

    border-radius:
        13px;

    background:
        var(--soft);

    text-align:
        center;
}

.architecture-node span {

    width:
        27px;

    height:
        27px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        50%;

    background:
        var(--primarySoft);

    color:
        var(--primary);

    font-size:
        8px;

    font-weight:
        800;

    margin-bottom:
        7px;
}

.architecture-node strong {

    font-size:
        13px;
}

.architecture-node small {

    margin-top:
        3px;

    color:
        var(--muted);

    font-size:
        8px;
}

.flow-arrow {

    color:
        var(--primary);

    font-size:
        19px;
}


/* =====================================================
   VIEWER
===================================================== */

.viewer {

    position:
        fixed;

    inset:
        0;

    z-index:
        100;
}

.viewer-backdrop {

    position:
        absolute;

    inset:
        0;

    background:
        rgba(2,6,23,.87);

    backdrop-filter:
        blur(12px);
}

.viewer-window {

    position:
        relative;

    z-index:
        2;

    width:
        min(1100px,94%);

    height:
        94vh;

    margin:
        3vh auto;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        center;
}

.viewer-media {

    width:
        min(900px,82%);

    max-height:
        72vh;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;
}

.viewer-media img {

    max-width:
        100%;

    max-height:
        72vh;

    object-fit:
        contain;

    border-radius:
        12px;

    box-shadow:
        0 30px 70px
        rgba(0,0,0,.45);
}

.viewer-close,
.viewer-nav {

    position:
        absolute;

    width:
        45px;

    height:
        45px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border:
        0;

    border-radius:
        50%;

    background:
        rgba(255,255,255,.13);

    color:
        white;

    cursor:
        pointer;
}

.viewer-close {

    right:
        0;

    top:
        3px;

    font-size:
        27px;
}

.viewer-nav {

    top:
        44%;

    font-size:
        32px;
}

.viewer-prev {
    left:
        0;
}

.viewer-next {
    right:
        0;
}

.viewer-info {

    width:
        min(900px,82%);

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        18px;

    margin-top:
        12px;

    color:
        white;
}

.viewer-type {

    color:
        #a5b4fc;

    font-size:
        8px;

    letter-spacing:
        1px;

    font-weight:
        800;
}

.viewer-info h3 {

    margin-top:
        3px;

    font-size:
        14px;
}

.viewer-info p {

    margin-top:
        4px;

    color:
        rgba(255,255,255,.60);

    font-size:
        9px;
}

.download-button {

    padding:
        9px 14px;

    border-radius:
        9px;

    background:
        white;

    color:
        #111827;

    font-size:
        10px;

    font-weight:
        800;
}


/* =====================================================
   AUTH PAGE
===================================================== */

.auth-page {

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    min-height:
        100vh;

    padding:
        25px;
}

.auth-shell {

    width:
        min(1000px,100%);

    min-height:
        610px;

    display:
        grid;

    grid-template-columns:
        1.05fr .95fr;

    overflow:
        hidden;

    border:
        1px solid var(--border);

    border-radius:
        24px;

    background:
        var(--card);

    box-shadow:
        var(--shadow);
}

.auth-visual {

    position:
        relative;

    overflow:
        hidden;

    padding:
        45px;

    background:
        linear-gradient(
            145deg,
            #5146e5,
            #7c73f1
        );

    color:
        white;
}

.auth-cloud {

    position:
        absolute;

    right:
        -10px;

    bottom:
        -40px;

    font-size:
        210px;

    opacity:
        .12;
}

.auth-label {

    display:
        inline-block;

    padding:
        7px 10px;

    border-radius:
        999px;

    background:
        rgba(255,255,255,.13);

    font-size:
        8px;

    letter-spacing:
        1.2px;

    font-weight:
        800;
}

.auth-visual h1 {

    margin-top:
        25px;

    max-width:
        450px;

    font-size:
        43px;

    line-height:
        1;

    letter-spacing:
        -2px;
}

.auth-visual h1 span {

    opacity:
        .65;
}

.auth-visual > p {

    max-width:
        450px;

    margin-top:
        15px;

    color:
        rgba(255,255,255,.80);

    font-size:
        12px;

    line-height:
        1.7;
}

.auth-features {

    position:
        absolute;

    left:
        45px;

    bottom:
        40px;

    display:
        flex;

    flex-direction:
        column;

    gap:
        12px;
}

.auth-features div {

    display:
        flex;

    align-items:
        center;

    gap:
        10px;
}

.auth-features strong {

    font-size:
        9px;

    opacity:
        .55;
}

.auth-features span {

    font-size:
        10px;

    font-weight:
        650;
}

.auth-card {

    padding:
        43px;

    display:
        flex;

    flex-direction:
        column;

    justify-content:
        center;
}

.auth-brand {

    display:
        flex;

    align-items:
        center;

    gap:
        9px;

    margin-bottom:
        28px;
}

.auth-brand strong {

    display:
        block;

    font-size:
        14px;
}

.auth-brand small {

    display:
        block;

    margin-top:
        2px;

    color:
        var(--muted);

    font-size:
        8px;
}

.auth-tabs {

    display:
        grid;

    grid-template-columns:
        1fr 1fr;

    padding:
        3px;

    margin-bottom:
        24px;

    border:
        1px solid var(--border);

    border-radius:
        10px;

    background:
        var(--soft);
}

.auth-tab {

    padding:
        9px;

    border:
        0;

    border-radius:
        8px;

    background:
        transparent;

    color:
        var(--muted);

    font-size:
        10px;

    font-weight:
        750;

    cursor:
        pointer;
}

.auth-tab.active {

    background:
        var(--card);

    color:
        var(--primary);

    box-shadow:
        0 2px 7px
        rgba(15,23,42,.06);
}

.auth-form h2 {

    font-size:
        23px;
}

.auth-form > p {

    margin:
        5px 0 20px;

    color:
        var(--muted);

    font-size:
        10px;
}

.auth-form label {

    display:
        block;

    margin-top:
        12px;

    color:
        var(--text);

    font-size:
        9px;

    font-weight:
        750;
}

.auth-form input {

    width:
        100%;

    margin-top:
        5px;

    padding:
        11px;

    border:
        1px solid var(--border);

    border-radius:
        9px;

    outline:
        none;

    background:
        var(--soft);

    color:
        var(--text);

    font-size:
        10px;
}

.auth-form input:focus {

    border-color:
        var(--primary);
}

.auth-submit {

    width:
        100%;

    margin-top:
        20px;
}

.form-message {

    min-height:
        17px;

    margin-top:
        11px;

    font-size:
        9px;

    font-weight:
        650;
}

.form-message.error {
    color:
        var(--danger);
}

.form-message.success {
    color:
        var(--success);
}

.auth-note {

    margin-top:
        18px;

    color:
        var(--muted);

    text-align:
        center;

    font-size:
        8px;
}


/* =====================================================
   EMPTY / LOADING
===================================================== */

.loading {

    padding:
        60px;

    text-align:
        center;

    color:
        var(--muted);

    font-size:
        11px;
}

.empty-state {

    padding:
        65px 20px;

    text-align:
        center;

    border:
        1px dashed var(--border);

    border-radius:
        17px;

    background:
        var(--card);
}

.empty-state-icon {

    margin-bottom:
        10px;

    font-size:
        48px;

    opacity:
        .45;
}

.empty-state h3 {

    font-size:
        17px;
}

.empty-state p {

    margin:
        5px 0 14px;

    color:
        var(--muted);

    font-size:
        10px;
}


/* =====================================================
   TOAST
===================================================== */

.toast {

    position:
        fixed;

    right:
        22px;

    bottom:
        22px;

    z-index:
        300;

    max-width:
        350px;

    padding:
        12px 16px;

    border-radius:
        10px;

    background:
        #111827;

    color:
        white;

    font-size:
        11px;

    opacity:
        0;

    transform:
        translateY(12px);

    pointer-events:
        none;

    transition:
        opacity .2s,
        transform .2s;
}

.toast.show {

    opacity:
        1;

    transform:
        translateY(0);
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 950px) {

    .sidebar {

        width:
            210px;
    }

    .app-shell {

        margin-left:
            210px;
    }

    .gallery {

        grid-template-columns:
            repeat(3,1fr);
    }

    .stats-grid {

        grid-template-columns:
            repeat(2,1fr);
    }

}

@media (max-width: 760px) {

    .sidebar {

        position:
            static;

        width:
            100%;

        height:
            auto;
    }

    .sidebar-bottom {

        display:
            none;
    }

    .app-shell {

        margin-left:
            0;
    }

    .navigation {

        flex-direction:
            row;

        flex-wrap:
            wrap;
    }

    .nav-label {

        display:
            none;
    }

    .nav-item {

        flex:
            1;
    }

    .dashboard-two-column,
    .upload-layout,
    .about-grid {

        grid-template-columns:
            1fr;
    }

    .architecture-card {

        grid-column:
            auto;
    }

    .gallery-toolbar {

        grid-template-columns:
            1fr 1fr;
    }

    .search-wrapper {

        grid-column:
            1 / -1;
    }

    .auth-shell {

        grid-template-columns:
            1fr;
    }

    .auth-visual {

        min-height:
            260px;
    }

    .auth-features {

        position:
            static;

        margin-top:
            25px;
    }

}

@media (max-width: 520px) {

    .main-content {

        width:
            94%;
    }

    .stats-grid,
    .gallery {

        grid-template-columns:
            1fr;
    }

    .gallery-toolbar {

        grid-template-columns:
            1fr;
    }

    .search-wrapper {

        grid-column:
            auto;
    }

    .selected-files {

        grid-template-columns:
            1fr;
    }

    .auth-page {

        padding:
            10px;
    }

    .auth-card,
    .auth-visual {

        padding:
            28px;
    }

}
/* =====================================================
   ACCOUNT MANAGEMENT
===================================================== */

.account-box {
    cursor: pointer;
}

.account-overview {

    display:
        flex;

    align-items:
        center;

    gap:
        15px;

    padding:
        21px;

    margin-bottom:
        17px;

    border:
        1px solid var(--border);

    border-radius:
        18px;

    background:
        var(--card);

    box-shadow:
        var(--shadow);
}

.profile-avatar-large {

    width:
        62px;

    height:
        62px;

    flex:
        0 0 62px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        17px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary2)
        );

    color:
        white;

    font-size:
        22px;

    font-weight:
        800;
}

.account-overview-info {

    flex:
        1;
}

.account-overview-info > span {

    color:
        var(--muted);

    font-size:
        8px;

    letter-spacing:
        1px;

    font-weight:
        800;
}

.account-overview-info h2 {

    margin-top:
        3px;

    font-size:
        21px;
}

.account-overview-info p {

    margin-top:
        4px;

    color:
        var(--muted);

    font-size:
        10px;
}

.settings-grid {

    display:
        grid;

    grid-template-columns:
        1fr 1fr;

    gap:
        15px;

    margin-top:
        15px;
}

.setting-title {

    margin-top:
        5px;

    font-size:
        16px;
}

.setting-description {

    margin:
        6px 0 15px;

    color:
        var(--muted);

    font-size:
        10px;

    line-height:
        1.6;
}

.privacy-control {

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        15px;

    margin-top:
        18px;

    padding:
        14px;

    border:
        1px solid var(--border);

    border-radius:
        12px;

    background:
        var(--soft);
}

.privacy-control strong {

    display:
        block;

    font-size:
        11px;
}

.privacy-control p {

    margin-top:
        4px;

    color:
        var(--muted);

    font-size:
        9px;

    line-height:
        1.5;
}

.switch {

    position:
        relative;

    width:
        46px;

    height:
        25px;

    flex:
        0 0 46px;
}

.switch input {

    opacity:
        0;

    width:
        0;

    height:
        0;
}

.slider {

    position:
        absolute;

    inset:
        0;

    border-radius:
        999px;

    background:
        #cbd5e1;

    cursor:
        pointer;

    transition:
        .2s;
}

.slider::before {

    content:
        "";

    position:
        absolute;

    width:
        19px;

    height:
        19px;

    left:
        3px;

    top:
        3px;

    border-radius:
        50%;

    background:
        white;

    transition:
        .2s;

    box-shadow:
        0 2px 5px
        rgba(0,0,0,.16);
}

.switch input:checked + .slider {

    background:
        var(--primary);
}

.switch input:checked + .slider::before {

    transform:
        translateX(21px);
}

.privacy-note {

    display:
        grid;

    grid-template-columns:
        auto 1fr;

    gap:
        7px 10px;

    margin-top:
        14px;

    font-size:
        9px;
}

.privacy-note strong {

    color:
        var(--primary);
}

.privacy-note span {

    color:
        var(--muted);

    line-height:
        1.5;
}

.settings-form {

    display:
        flex;

    flex-direction:
        column;

    gap:
        10px;

    margin-top:
        15px;
}

.settings-form label {

    display:
        flex;

    flex-direction:
        column;

    gap:
        5px;

    color:
        var(--text);

    font-size:
        9px;

    font-weight:
        700;
}

.settings-form input {

    width:
        100%;

    padding:
        10px;

    border:
        1px solid var(--border);

    border-radius:
        9px;

    outline:
        none;

    background:
        var(--soft);

    color:
        var(--text);

    font-size:
        10px;
}

.settings-form input:focus {

    border-color:
        var(--primary);
}

.danger-card {

    border-color:
        rgba(220,38,38,.20);
}

.danger-kicker {

    color:
        var(--danger);
}

.danger-button {

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    width:
        100%;

    padding:
        11px 15px;

    border:
        1px solid
        rgba(220,38,38,.25);

    border-radius:
        10px;

    background:
        rgba(220,38,38,.07);

    color:
        var(--danger);

    font-size:
        10px;

    font-weight:
        800;

    cursor:
        pointer;
}

.danger-button:hover {

    background:
        rgba(220,38,38,.12);
}


/* =====================================================
   PUBLIC USER SEARCH
===================================================== */

.user-search {

    display:
        flex;

    align-items:
        center;

    gap:
        7px;

    padding:
        0 10px;

    border:
        1px solid var(--border);

    border-radius:
        9px;

    background:
        var(--soft);

    margin-top:
        15px;
}

.user-search input {

    width:
        100%;

    padding:
        10px 0;

    border:
        0;

    outline:
        0;

    background:
        transparent;

    color:
        var(--text);

    font-size:
        10px;
}

.user-search-results {

    display:
        flex;

    flex-direction:
        column;

    gap:
        6px;

    margin-top:
        10px;
}

.user-result {

    display:
        flex;

    align-items:
        center;

    gap:
        9px;

    padding:
        8px;

    border:
        1px solid var(--border);

    border-radius:
        10px;

    background:
        var(--soft);

    transition:
        border-color .2s,
        transform .2s;
}

.user-result:hover {

    border-color:
        var(--primary);

    transform:
        translateY(-1px);
}

.user-result-avatar {

    width:
        32px;

    height:
        32px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    flex:
        0 0 32px;

    border-radius:
        50%;

    background:
        var(--primarySoft);

    color:
        var(--primary);

    font-size:
        10px;

    font-weight:
        800;
}

.user-result div {

    flex:
        1;

    min-width:
        0;
}

.user-result strong {

    display:
        block;

    overflow:
        hidden;

    text-overflow:
        ellipsis;

    white-space:
        nowrap;

    font-size:
        10px;
}

.user-result small {

    display:
        block;

    margin-top:
        2px;

    color:
        var(--muted);

    font-size:
        8px;
}

.user-result > span {

    color:
        var(--primary);

    font-size:
        13px;
}

.search-empty {

    padding:
        18px;

    text-align:
        center;

    color:
        var(--muted);

    font-size:
        9px;
}


/* =====================================================
   PUBLIC PROFILE PAGE
===================================================== */

.public-header {

    min-height:
        72px;

    padding:
        0 5%;

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    background:
        var(--card);

    border-bottom:
        1px solid var(--border);
}

.public-brand {

    display:
        flex;

    align-items:
        center;

    gap:
        10px;
}

.public-brand strong {

    display:
        block;

    font-size:
        14px;
}

.public-brand small {

    display:
        block;

    margin-top:
        2px;

    color:
        var(--muted);

    font-size:
        8px;
}

.public-profile-container {

    width:
        min(1100px,92%);

    margin:
        auto;

    padding:
        32px 0 60px;
}

.public-profile-header {

    display:
        flex;

    align-items:
        center;

    gap:
        16px;

    padding:
        25px;

    border:
        1px solid var(--border);

    border-radius:
        20px;

    background:
        var(--card);

    box-shadow:
        var(--shadow);

    margin-bottom:
        14px;
}

.public-avatar {

    width:
        65px;

    height:
        65px;

    flex:
        0 0 65px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        18px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary2)
        );

    color:
        white;

    font-size:
        23px;

    font-weight:
        800;
}

.public-profile-header h1 {

    margin-top:
        4px;

    font-size:
        27px;

    letter-spacing:
        -1px;
}

.public-profile-header p {

    margin-top:
        4px;

    color:
        var(--muted);

    font-size:
        10px;
}

.public-profile-count {

    margin-left:
        auto;

    text-align:
        right;
}

.public-profile-count strong {

    display:
        block;

    font-size:
        18px;
}

.public-profile-count small {

    color:
        var(--muted);

    font-size:
        9px;
}

.public-profile-info {

    display:
        flex;

    align-items:
        center;

    gap:
        10px;

    padding:
        12px 15px;

    border:
        1px solid
        rgba(81,70,229,.15);

    border-radius:
        11px;

    background:
        var(--primarySoft);

    margin-bottom:
        17px;
}

.public-profile-info span {

    color:
        var(--primary);

    font-size:
        9px;

    font-weight:
        800;
}

.public-profile-info p {

    color:
        var(--muted);

    font-size:
        9px;
}

.public-profile-gallery {

    display:
        grid;

    grid-template-columns:
        repeat(4,1fr);

    gap:
        14px;
}

.public-image-card {

    overflow:
        hidden;

    border:
        1px solid var(--border);

    border-radius:
        15px;

    background:
        var(--card);

    box-shadow:
        var(--shadow);

    transition:
        transform .2s,
        box-shadow .2s;
}

.public-image-card:hover {

    transform:
        translateY(-3px);

    box-shadow:
        0 15px 35px
        rgba(15,23,42,.10);
}

.public-image-link {

    display:
        block;

    height:
        195px;

    overflow:
        hidden;

    background:
        var(--soft);
}

.public-image-link img {

    width:
        100%;

    height:
        100%;

    object-fit:
        cover;

    transition:
        transform .3s;
}

.public-image-card:hover
.public-image-link img {

    transform:
        scale(1.04);
}

.public-image-info {

    padding:
        12px;
}

.public-image-info strong {

    display:
        block;

    overflow:
        hidden;

    white-space:
        nowrap;

    text-overflow:
        ellipsis;

    font-size:
        11px;
}

.public-image-info small {

    display:
        block;

    margin-top:
        4px;

    color:
        var(--muted);

    font-size:
        9px;
}

.public-download {

    display:
        block;

    margin-top:
        9px;

    padding:
        8px;

    border-radius:
        8px;

    background:
        var(--primarySoft);

    color:
        var(--primary);

    text-align:
        center;

    font-size:
        9px;

    font-weight:
        800;
}

.public-download:hover {

    background:
        var(--primary);

    color:
        white;
}


/* =====================================================
   RESPONSIVE ACCOUNT / PUBLIC PROFILE
===================================================== */

@media (max-width: 850px) {

    .settings-grid {

        grid-template-columns:
            1fr;

    }

    .public-profile-gallery {

        grid-template-columns:
            repeat(3,1fr);

    }

}

@media (max-width: 600px) {

    .account-overview {

        flex-wrap:
            wrap;

    }

    .account-overview
    .secondary-button {

        width:
            100%;

    }

    .public-profile-header {

        flex-wrap:
            wrap;

    }

    .public-profile-count {

        margin-left:
            81px;

        text-align:
            left;

    }

    .public-profile-gallery {

        grid-template-columns:
            repeat(2,1fr);

    }

    .public-profile-info {

        align-items:
            flex-start;

        flex-direction:
            column;

    }

}

@media (max-width: 430px) {

    .public-profile-gallery {

        grid-template-columns:
            1fr;

    }

}
/* =====================================================
   DASHBOARD IMAGE SEARCH
===================================================== */

.dashboard-search-card {

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        20px;

    margin-top:
        17px;

    padding:
        18px 20px;

    border:
        1px solid var(--border);

    border-radius:
        18px;

    background:
        var(--card);

    box-shadow:
        0 4px 15px
        rgba(15,23,42,.04);
}

.dashboard-search-text {

    flex:
        1;
}

.dashboard-search-text h3 {

    margin-top:
        4px;

    font-size:
        15px;
}

.dashboard-search-text p {

    margin-top:
        4px;

    color:
        var(--muted);

    font-size:
        9px;

    line-height:
        1.5;
}

.dashboard-search-form {

    display:
        flex;

    align-items:
        center;

    gap:
        7px;

    width:
        min(470px, 100%);
}

.dashboard-search-input {

    display:
        flex;

    align-items:
        center;

    gap:
        7px;

    flex:
        1;

    padding:
        0 11px;

    border:
        1px solid var(--border);

    border-radius:
        10px;

    background:
        var(--soft);
}

.dashboard-search-input span {

    color:
        var(--muted);

    font-size:
        14px;
}

.dashboard-search-input input {

    width:
        100%;

    padding:
        11px 0;

    border:
        0;

    outline:
        0;

    background:
        transparent;

    color:
        var(--text);

    font-size:
        10px;
}


/* =====================================================
   PROFILE SEARCH CARD
===================================================== */

.profile-search-card {

    position:
        relative;

    display:
        grid;

    grid-template-columns:
        1fr
        minmax(250px, 430px);

    gap:
        8px 25px;

    align-items:
        center;

    margin-bottom:
        17px;

    padding:
        19px 21px;

    border:
        1px solid
        rgba(81,70,229,.16);

    border-radius:
        18px;

    background:
        linear-gradient(
            135deg,
            var(--card),
            var(--primarySoft)
        );

    box-shadow:
        0 6px 18px
        rgba(15,23,42,.04);
}

.profile-search-card > div:first-child h3 {

    margin-top:
        4px;

    font-size:
        15px;
}

.profile-search-card > div:first-child p {

    margin-top:
        4px;

    color:
        var(--muted);

    font-size:
        9px;
}

.profile-search-card .user-search {

    margin-top:
        0;

    width:
        100%;
}

.profile-search-card .user-search-results {

    grid-column:
        1 / -1;

    margin-top:
        5px;

    max-height:
        220px;

    overflow-y:
        auto;
}


/* =====================================================
   RESPONSIVE SEARCH
===================================================== */

@media (max-width: 800px) {

    .dashboard-search-card {

        flex-direction:
            column;

        align-items:
            stretch;

    }

    .dashboard-search-form {

        width:
            100%;

    }

    .profile-search-card {

        grid-template-columns:
            1fr;

    }

}

@media (max-width: 500px) {

    .dashboard-search-form {

        flex-direction:
            column;

    }

    .dashboard-search-form .primary-button {

        width:
            100%;

    }

}