/* ===============================
   CloudCoffre — Modern UI
   =============================== */

:root {
    --bg: #10151a;
    --panel: rgba(255, 255, 255, .06);
    --panel2: rgba(255, 255, 255, .08);
    --border: rgba(255, 255, 255, .12);
    --muted: rgba(255, 255, 255, .65);
    --text: rgba(255, 255, 255, .92);
    --primary: #23c55e;
    --primary2: #16a34a;
    --accent: #f7931a;
    --warn: #f59e0b;
    --danger: #ef4444;
    --radius: 18px;
    --radius2: 22px;
    --shadow: 0 20px 60px rgba(0, 0, 0, .45);
    --shadow2: 0 10px 30px rgba(0, 0, 0, .35);
    --glass: rgba(255, 255, 255, .08);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.45;
    min-height: 100vh;
}

.bgGlow {
    position: fixed;
    inset: -40vmax;
    z-index: -2;
    background: radial-gradient(closest-side, rgba(35, 197, 94, .25), transparent 70%) 20% 30%, radial-gradient(closest-side, rgba(247, 147, 26, .18), transparent 70%) 70% 40%, radial-gradient(closest-side, rgba(59, 130, 246, .16), transparent 70%) 50% 80%;
    filter: blur(42px);
    opacity: .95;
}

.wrap {
    width: min(1200px, 100% - 32px);
    margin: 0 auto;
}

.main {
    padding: 28px 0 56px;
}

.muted {
    color: var(--muted);
}

.mini {
    font-size: 12px;
}

.link {
    color: rgba(255, 255, 255, .78);
    text-decoration: none;
}

.link:hover {
    color: white;
    text-decoration: underline;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    background: rgba(16, 21, 26, .55);
    border-bottom: 1px solid var(--border);
}

.topbarInner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brandName {
    font-weight: 900;
    letter-spacing: .2px;
}

.brandSub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: #06120a;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 14px 32px rgba(0, 0, 0, .35);
}

.brand.small .logo {
    width: 34px;
    height: 34px;
    font-size: 18px;
}

.nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.navBtn {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    padding: 9px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    font-size: 13px;
    transition: background .2s, transform .08s, border-color .2s;
}

.navBtn:hover {
    background: rgba(255, 255, 255, .07);
}

.navBtn:active {
    transform: translateY(1px);
}

.navBtn.active {
    border-color: rgba(35, 197, 94, .55);
    background: rgba(35, 197, 94, .12);
}

.topActions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, .18);
    color: white;
    font-weight: 900;
    font-size: 12px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .05);
    font-weight: 800;
    font-size: 12px;
}

.pill.ok {
    border-color: rgba(35, 197, 94, .55);
    background: rgba(35, 197, 94, .12);
}

.pill.warn {
    border-color: rgba(245, 158, 11, .55);
    background: rgba(245, 158, 11, .12);
}

.card {
    border: 1px solid var(--border);
    background: var(--glass);
    border-radius: var(--radius2);
    padding: 16px;
    box-shadow: var(--shadow2);
}

.notice {
    margin-top: 14px;
    border: 1px solid rgba(247, 147, 26, .35);
    background: rgba(247, 147, 26, .08);
    border-radius: var(--radius);
    padding: 12px 12px;
    color: rgba(255, 255, 255, .86);
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.hero {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 18px;
    align-items: start;
}

.heroLeft h1 {
    font-size: clamp(28px, 3.2vw, 46px);
    line-height: 1.05;
    margin: 10px 0 10px;
}

.grad {
    background: linear-gradient(135deg, var(--accent), #ffd27a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stats {
    display: flex;
    gap: 24px;
    margin: 18px 0;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: start;
}

.statNum {
    font-size: 2rem;
    font-weight: 900;
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.rowBtns {
    display: flex;
    gap: 10px;
}

.coffreLayout {
    display: flex;
    gap: 18px;
}

.side {
    min-width: 180px;
}

.sideList {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.sideBtn {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    padding: 7px 10px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    transition: background .2s, border-color .2s;
}

.sideBtn.active {
    border-color: var(--primary);
    background: rgba(35, 197, 94, .12);
}

.dropzone {
    border: 2px dashed var(--primary);
    background: rgba(35, 197, 94, .08);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 18px;
    transition: background .2s;
}

.dropzone.isDrag {
    background: rgba(35, 197, 94, .18);
}

.dzTitle {
    font-weight: 900;
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.search {
    flex: 1;
}

.input,
.select {
    width: 100%;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, .25);
    color: var(--text);
    border-radius: 12px;
    padding: 10px 12px;
    outline: none;
    font-size: 1rem;
}

.input:focus,
.select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(35, 197, 94, .12);
}

.listHead,
.list {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr;
    gap: 8px;
    align-items: center;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
}

.listHead {
    color: var(--muted);
}

.list {
    font-weight: 400;
    font-size: 15px;
}

.fileRow {
    display: contents;
}

.fileName,
.fileType,
.fileSize,
.fileDate,
.fileActions {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.fileName {
    font-weight: 700;
}

.fileActions {
    display: flex;
    gap: 6px;
}

.btnPrimary,
.btnGhost {
    border: 1px solid transparent;
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .08s, filter .2s, background .2s, border-color .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btnPrimary {
    color: #06120a;
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    box-shadow: 0 14px 32px rgba(35, 197, 94, .18);
}

.btnPrimary:hover {
    filter: brightness(1.03);
}

.btnPrimary:active {
    transform: translateY(1px);
}

.btnGhost {
    color: var(--text);
    background: rgba(255, 255, 255, .05);
    border-color: var(--border);
}

.btnGhost:hover {
    background: rgba(255, 255, 255, .08);
}

.btnGhost:active {
    transform: translateY(1px);
}

.full {
    width: 100%;
}

.iconClose {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--danger);
    cursor: pointer;
    margin-left: auto;
}

.drawer,
.modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 340px;
    max-width: 100vw;
    background: var(--panel2);
    box-shadow: var(--shadow);
    z-index: 100;
    border-radius: var(--radius2) 0 0 var(--radius2);
    display: flex;
    flex-direction: column;
    transition: transform .2s;
}

.drawer[hidden],
.modal[hidden] {
    display: none;
}

.drawerHead,
.modalHead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 18px 0 18px;
}

.drawerItems,
.drawerContent,
.modalBody {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 99;
}

.overlay[hidden] {
    display: none;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #06120a;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 900;
    box-shadow: var(--shadow2);
    z-index: 200;
    min-width: 180px;
    text-align: center;
    transition: opacity .2s;
}

.toast[hidden] {
    display: none;
}

.pricing {
    display: flex;
    gap: 18px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.priceCard {
    min-width: 220px;
    flex: 1;
}

.price {
    font-size: 1.3rem;
    font-weight: 900;
    margin: 8px 0;
}

.ul {
    margin: 0 0 8px 0;
    padding: 0 0 0 18px;
}

.ul li {
    margin-bottom: 4px;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }
    .coffreLayout {
        flex-direction: column;
    }
    .side {
        min-width: 0;
    }
    .pricing {
        flex-direction: column;
    }
    .drawer,
    .modal {
        width: 100vw;
        border-radius: 0;
    }
}