/* ==========================================================
   FileDrive — AI dashboard design system
   Direction: dark trading-terminal, gold accent, left sidebar
   ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bg: #0b0e13;
    --bg-elev: #121722;
    --bg-elev-2: #1a2130;
    --bg-elev-3: #212940;
    --border: #262e3d;
    --text: #e8eaed;
    --text-dim: #8b94a7;
    --text-faint: #5b6478;
    --gold: #d4a650;
    --gold-bright: #f0c674;
    --green: #22c55e;
    --red: #ef4444;
    --blue: #5b9bf0;
    --purple: #a78bfa;
    --radius: 12px;
    --sidebar-w: 244px;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 900px 500px at 85% -10%, rgba(212,166,80,0.09), transparent 60%),
        radial-gradient(ellipse 700px 500px at 0% 100%, rgba(91,155,240,0.06), transparent 60%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.5;
}
a { color: var(--gold); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.mono { font-family: var(--font-mono); }

::selection { background: rgba(212,166,80,0.35); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-elev-3); border-radius: 8px; border: 2px solid var(--bg); }

/* ==========================================================
   App shell: sidebar + main content
   ========================================================== */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w); flex-shrink: 0;
    background: rgba(15,19,28,0.92); backdrop-filter: blur(14px);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; z-index: 45;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 10px; padding: 22px 20px 18px;
    text-decoration: none; color: var(--text); font-family: var(--font-display);
    font-weight: 700; font-size: 17px; border-bottom: 1px solid var(--border);
}
.sidebar-brand .mark {
    width: 30px; height: 30px; border-radius: 9px;
    background: linear-gradient(135deg, var(--gold-bright), var(--gold) 60%, #8a6a2f);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px; color: #14100a; font-weight: 700; box-shadow: 0 4px 14px rgba(212,166,80,0.3);
}
.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.sidebar-group-label {
    font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; color: var(--text-faint);
    padding: 14px 12px 8px; text-transform: uppercase;
}
.sidebar-nav a {
    display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px;
    color: var(--text-dim); text-decoration: none; font-size: 13.5px; font-weight: 500;
    margin-bottom: 2px; transition: background .15s, color .15s;
}
.sidebar-nav a svg { flex-shrink: 0; opacity: 0.8; }
.sidebar-nav a:hover { background: var(--bg-elev-2); color: var(--text); }
.sidebar-nav a.active {
    background: linear-gradient(90deg, rgba(212,166,80,0.16), rgba(212,166,80,0.04));
    color: var(--gold-bright); box-shadow: inset 2px 0 0 var(--gold);
}
.sidebar-nav a.active svg { opacity: 1; }

.sidebar-footer { border-top: 1px solid var(--border); padding: 14px 14px 16px; }
.lang-switch { display: flex; gap: 6px; margin-bottom: 12px; }
.lang-switch a {
    flex: 1; text-align: center; padding: 6px 0; border-radius: 7px; font-size: 11.5px; font-weight: 700;
    letter-spacing: 0.03em; text-decoration: none; color: var(--text-dim); background: var(--bg-elev-2);
    border: 1px solid var(--border); transition: all .15s;
}
.lang-switch a.active { background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: #16130b; border-color: transparent; }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; color: #fff; font-family: var(--font-display);
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-info .name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info .role { font-size: 11px; color: var(--text-faint); text-transform: capitalize; }
.logout-btn { color: var(--text-faint); display: flex; padding: 6px; border-radius: 7px; transition: all .15s; }
.logout-btn:hover { color: var(--red); background: rgba(239,68,68,0.1); }

.sidebar-burger {
    display: none; position: fixed; top: 14px; left: 14px; z-index: 60;
    width: 38px; height: 38px; border-radius: 10px; background: var(--bg-elev); border: 1px solid var(--border);
    color: var(--text); align-items: center; justify-content: center; cursor: pointer;
}
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 44; }

.main-content { flex: 1; min-width: 0; }
.container { max-width: 1120px; margin: 0 auto; padding: 28px 28px 60px; }

/* ---------- Topbar (inside main content) ---------- */
.topbar { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.topbar-search { flex: 1; min-width: 200px; position: relative; }
.topbar-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }
.topbar-search input {
    width: 100%; padding: 10px 14px 10px 38px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--bg-elev); color: var(--text); font-size: 13.5px; font-family: var(--font-body);
    transition: border-color .15s, background .15s;
}
.topbar-search input:focus { border-color: var(--gold); background: var(--bg-elev-2); outline: none; }
.topbar-greeting { font-size: 13.5px; color: var(--text-dim); }
.topbar-greeting b { color: var(--text); }

/* ---------- Auth pages ---------- */
.auth-page { display: flex; min-height: 100vh; }
.auth-side {
    flex: 1; display: none; position: relative; overflow: hidden; padding: 60px;
    background: linear-gradient(160deg, #171c2a, #0b0e13 70%);
    border-right: 1px solid var(--border);
    flex-direction: column; justify-content: center;
}
.auth-side::before {
    content: ''; position: absolute; width: 480px; height: 480px; border-radius: 50%;
    background: radial-gradient(circle, rgba(212,166,80,0.16), transparent 70%); top: -140px; right: -140px;
}
.auth-side .mark-lg {
    width: 52px; height: 52px; border-radius: 14px; margin-bottom: 26px;
    background: linear-gradient(135deg, var(--gold-bright), var(--gold), #8a6a2f);
    display: flex; align-items: center; justify-content: center; font-weight: 700; color: #14100a; font-size: 22px;
    font-family: var(--font-display); box-shadow: 0 10px 30px rgba(212,166,80,0.25);
}
.auth-side h2 { font-size: 28px; line-height: 1.35; max-width: 380px; position: relative; }
.auth-side .tagline { color: var(--text-dim); font-size: 14.5px; margin: 14px 0 30px; max-width: 360px; position: relative; }
.auth-features { display: flex; flex-direction: column; gap: 14px; position: relative; }
.auth-feature { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--text-dim); }
.auth-feature .ico {
    width: 32px; height: 32px; border-radius: 9px; background: var(--bg-elev-2); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center; color: var(--gold-bright); flex-shrink: 0;
}
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-box { width: 380px; max-width: 100%; }
.auth-box .mark-lg-mobile {
    width: 42px; height: 42px; border-radius: 11px; margin-bottom: 18px;
    background: linear-gradient(135deg, var(--gold), #8a6a2f);
    display: flex; align-items: center; justify-content: center; font-weight: 700; color: #14100a;
}
.auth-box h1 { font-size: 24px; margin-bottom: 6px; }
.auth-box .sub { color: var(--text-dim); font-size: 13.5px; margin-bottom: 24px; }
.auth-box label { display: block; font-size: 12.5px; color: var(--text-dim); margin: 14px 0 6px; font-weight: 500; }
.auth-box input, .modal-box input, .modal-box textarea, .field-input {
    width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 9px; font-size: 14px;
    background: var(--bg-elev-2); color: var(--text); font-family: var(--font-body);
    transition: border-color .15s;
}
.auth-box input:focus, .modal-box input:focus, .modal-box textarea:focus, .field-input:focus {
    border-color: var(--gold); background: #1e2536; outline: none;
}
.btn, .auth-box button, .toolbar button, .modal-box button, button.btn-primary {
    background: linear-gradient(135deg, var(--gold-bright), var(--gold));
    color: #16130b; border: none; padding: 11px 18px; border-radius: 9px;
    font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 18px;
    font-family: var(--font-body); transition: transform .12s, box-shadow .12s;
    display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover, .auth-box button:hover, .toolbar button:hover, .modal-box button:hover {
    box-shadow: 0 6px 18px rgba(212,166,80,0.25); transform: translateY(-1px);
}
.auth-box .lang-switch { margin-top: 0; margin-bottom: 22px; max-width: 130px; }
.muted, .text-dim { color: var(--text-dim); font-size: 13px; }

.alert { padding: 11px 15px; border-radius: 9px; font-size: 13.5px; margin-bottom: 18px; border: 1px solid transparent; display: flex; align-items: center; gap: 8px; }
.alert-error { background: rgba(239,68,68,0.1); color: #fca5a5; border-color: rgba(239,68,68,0.25); }
.alert-ok { background: rgba(34,197,94,0.1); color: #86efac; border-color: rgba(34,197,94,0.25); }

/* ---------- Storage bar ---------- */
.storage-bar-wrap { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.storage-bar { flex: 1; height: 7px; background: var(--bg-elev-2); border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.storage-bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); }

/* ---------- Toolbar / breadcrumb ---------- */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.toolbar-actions { display: flex; gap: 8px; align-items: center; }
.toolbar-actions button { margin-top: 0; }
.toolbar-actions button.secondary { background: var(--bg-elev-2); color: var(--text); border: 1px solid var(--border); }
.breadcrumb a { color: var(--text-dim); text-decoration: none; font-size: 13.5px; }
.breadcrumb a:hover { color: var(--gold-bright); }

.view-toggle { display: flex; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 9px; padding: 3px; }
.view-toggle button {
    background: none; border: none; color: var(--text-dim); padding: 6px 10px; border-radius: 6px; cursor: pointer;
    font-size: 12px; font-weight: 600; margin-top: 0; display: flex; align-items: center; gap: 5px; font-family: var(--font-body);
}
.view-toggle button.active { background: var(--bg-elev-3); color: var(--gold-bright); }

/* ---------- Table ---------- */
.filetable { width: 100%; border-collapse: collapse; background: var(--bg-elev); border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.filetable th, .filetable td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; text-align: left; }
.filetable tr:last-child td { border-bottom: none; }
.filetable th { background: var(--bg-elev-2); color: var(--text-dim); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; }
.filetable tr:hover td { background: rgba(212,166,80,0.03); }
.filetable a { color: var(--text); text-decoration: none; }
.filetable a:hover { color: var(--gold-bright); }
.filetable .mono { color: var(--text-dim); }
.name-cell { display: flex; align-items: center; gap: 10px; }

.btn-link { background: none; border: none; color: var(--gold); cursor: pointer; font-size: 12.5px; padding: 0; margin-right: 12px; text-decoration: none; font-weight: 500; font-family: var(--font-body); }
.btn-link:hover { color: var(--gold-bright); text-decoration: underline; }
.btn-danger { color: var(--red); }
.btn-danger:hover { color: #fca5a5; }

/* ---------- File icon badges ---------- */
.file-badge {
    width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    font-size: 9.5px; font-weight: 700; font-family: var(--font-mono); letter-spacing: 0.02em;
}
.file-badge.folder { background: linear-gradient(135deg, rgba(240,198,116,0.22), rgba(212,166,80,0.08)); color: var(--gold-bright); border: 1px solid rgba(212,166,80,0.25); }
.file-badge.ea { background: linear-gradient(135deg, rgba(34,197,94,0.2), rgba(34,197,94,0.06)); color: #86efac; border: 1px solid rgba(34,197,94,0.28); }
.file-badge.pdf { background: linear-gradient(135deg, rgba(239,68,68,0.2), rgba(239,68,68,0.06)); color: #fca5a5; border: 1px solid rgba(239,68,68,0.28); }
.file-badge.doc { background: linear-gradient(135deg, rgba(91,155,240,0.2), rgba(91,155,240,0.06)); color: #93c1f7; border: 1px solid rgba(91,155,240,0.28); }
.file-badge.sheet { background: linear-gradient(135deg, rgba(34,197,94,0.18), rgba(34,197,94,0.05)); color: #86efac; border: 1px solid rgba(34,197,94,0.25); }
.file-badge.zip { background: linear-gradient(135deg, rgba(167,139,250,0.2), rgba(167,139,250,0.06)); color: #c4b5fd; border: 1px solid rgba(167,139,250,0.28); }
.file-badge.img { background: linear-gradient(135deg, rgba(240,198,116,0.2), rgba(91,155,240,0.08)); color: var(--gold-bright); border: 1px solid rgba(212,166,80,0.25); }
.file-badge.video { background: linear-gradient(135deg, rgba(167,139,250,0.2), rgba(91,155,240,0.06)); color: #c4b5fd; border: 1px solid rgba(167,139,250,0.25); }
.file-badge.audio { background: linear-gradient(135deg, rgba(91,155,240,0.2), rgba(167,139,250,0.06)); color: #93c1f7; border: 1px solid rgba(91,155,240,0.25); }
.file-badge.text, .file-badge.code, .file-badge.file { background: var(--bg-elev-2); color: var(--text-dim); border: 1px solid var(--border); }

/* ---------- Modal ---------- */
.modal { display: none; position: fixed; inset: 0; background: rgba(6,8,12,0.65); backdrop-filter: blur(2px); align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal.show { display: flex; }
.modal-box { background: var(--bg-elev); padding: 28px; border-radius: 14px; width: 420px; max-width: 100%; border: 1px solid var(--border); max-height: 88vh; overflow-y: auto; }
.modal-box h3 { margin: 0 0 6px; font-size: 18px; }
.modal-box .sub { color: var(--text-dim); font-size: 13px; margin-bottom: 14px; }
.modal-box label { display: block; font-size: 12.5px; color: var(--text-dim); margin: 12px 0 5px; font-weight: 500; }
.modal-box textarea { min-height: 70px; resize: vertical; font-family: var(--font-body); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.btn-secondary { background: var(--bg-elev-2) !important; color: var(--text) !important; box-shadow: none !important; border: 1px solid var(--border); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

#shareLinkBox { background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 9px; padding: 12px; }
#shareLinkOutput { font-family: var(--font-mono); font-size: 12.5px; background: transparent !important; border: none !important; padding: 4px 0 !important; }

/* ---------- Dropzone (drag & drop upload) ---------- */
.dropzone {
    border: 2px dashed var(--border); border-radius: 12px; padding: 26px; text-align: center;
    background: var(--bg-elev-2); cursor: pointer; transition: all .15s; margin-bottom: 4px;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--gold); background: rgba(212,166,80,0.06); }
.dropzone svg { color: var(--text-faint); margin-bottom: 8px; }
.dropzone.dragover svg { color: var(--gold); }
.dropzone .dz-main { font-size: 13.5px; color: var(--text); font-weight: 500; }
.dropzone .dz-sub { font-size: 12px; color: var(--text-faint); margin-top: 3px; }
.dropzone input[type=file] { display: none; }
.dropzone .dz-filename { font-family: var(--font-mono); color: var(--gold-bright); font-size: 12.5px; margin-top: 8px; }

.page-dropzone-overlay {
    display: none; position: fixed; inset: 0; z-index: 55; background: rgba(11,14,19,0.85);
    align-items: center; justify-content: center; border: 3px dashed var(--gold);
}
.page-dropzone-overlay.show { display: flex; }
.page-dropzone-overlay .msg { font-size: 20px; font-weight: 600; color: var(--gold-bright); font-family: var(--font-display); }

/* ---------- Grid view ---------- */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.grid-card {
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; padding: 16px;
    text-align: center; text-decoration: none; color: var(--text); transition: all .15s; position: relative;
}
.grid-card:hover { border-color: rgba(212,166,80,0.35); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
.grid-card .file-badge { width: 44px; height: 44px; font-size: 10.5px; margin: 0 auto 10px; }
.grid-card .gc-name { font-size: 12.5px; font-weight: 500; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.grid-card .gc-meta { font-size: 11px; color: var(--text-faint); margin-top: 6px; font-family: var(--font-mono); }
.grid-card .gc-actions { position: absolute; top: 8px; right: 8px; opacity: 0; transition: opacity .15s; }
.grid-card:hover .gc-actions { opacity: 1; }
.gc-menu-btn { background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 6px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-dim); }
.gc-dropdown {
    display: none; position: absolute; top: 34px; right: 0; background: var(--bg-elev-3); border: 1px solid var(--border);
    border-radius: 9px; padding: 6px; min-width: 130px; z-index: 20; box-shadow: 0 12px 30px rgba(0,0,0,0.4); text-align: left;
}
.gc-dropdown.show { display: block; }
.gc-dropdown a, .gc-dropdown button, .gc-dropdown form button {
    display: block; width: 100%; text-align: left; background: none; border: none; color: var(--text);
    padding: 7px 9px; border-radius: 6px; font-size: 12.5px; cursor: pointer; text-decoration: none; margin: 0; font-family: var(--font-body);
}
.gc-dropdown a:hover, .gc-dropdown button:hover { background: var(--bg-elev-2); }
.hidden { display: none !important; }

/* ---------- Stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 18px 0 28px; }
.stat-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; padding: 20px; display: flex; align-items: center; gap: 14px; }
.stat-card .stat-ico { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: rgba(212,166,80,0.12); color: var(--gold-bright); border: 1px solid rgba(212,166,80,0.25); }
.stat-num { font-family: var(--font-mono); font-size: 24px; font-weight: 600; color: var(--text); }
.stat-label { color: var(--text-dim); font-size: 12px; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.04em; }

.badge { background: var(--bg-elev-2); border: 1px solid var(--border); padding: 3px 9px; border-radius: 6px; font-size: 11.5px; font-family: var(--font-mono); }
.badge-admin { background: rgba(239,68,68,0.12); color: #fca5a5; border-color: rgba(239,68,68,0.3); }
.badge-active { background: rgba(34,197,94,0.12); color: #86efac; border-color: rgba(34,197,94,0.3); }
.badge-inactive { background: rgba(139,148,167,0.12); color: var(--text-dim); }

h2 { font-size: 20px; margin-bottom: 4px; }
.page-sub { color: var(--text-dim); font-size: 13.5px; margin-bottom: 20px; }

/* ---------- Toast notifications ---------- */
.toast-wrap { position: fixed; bottom: 22px; right: 22px; z-index: 80; display: flex; flex-direction: column; gap: 10px; }
.toast {
    background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px;
    font-size: 13px; color: var(--text); box-shadow: 0 10px 30px rgba(0,0,0,0.4); display: flex; align-items: center; gap: 10px;
    min-width: 240px; animation: toast-in .25s ease;
}
.toast.ok { border-left: 3px solid var(--green); }
.toast.err { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--blue); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================
   Public share / landing page (s.php) — the "sales" page
   ========================================================== */
.share-page { min-height: 100vh; display: flex; flex-direction: column; }
.share-topbar { padding: 20px 28px; }
.share-topbar .brand { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--text-dim); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.share-topbar .brand .mark { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--gold), #8a6a2f); display: inline-flex; align-items:center; justify-content:center; font-size: 11px; color: #14100a; font-weight: 700; }

.share-hero { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; }
.share-card {
    width: 100%; max-width: 560px; background: var(--bg-elev);
    border: 1px solid var(--border); border-radius: 20px; padding: 44px 40px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5); position: relative; overflow: hidden;
}

/* signature: quiet candlestick ticker strip */
.ticker-strip { display: flex; align-items: flex-end; gap: 3px; height: 34px; margin-bottom: 22px; opacity: 0.55; }
.ticker-strip .candle { width: 4px; border-radius: 2px; }
.ticker-strip .up { background: var(--green); }
.ticker-strip .down { background: var(--red); }

.file-icon-badge {
    width: 54px; height: 54px; border-radius: 14px; margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(212,166,80,0.18), rgba(212,166,80,0.05));
    border: 1px solid rgba(212,166,80,0.3);
    display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.share-card h1 { font-size: 25px; line-height: 1.3; margin-bottom: 10px; word-break: break-word; }
.share-desc { color: var(--text-dim); font-size: 14.5px; line-height: 1.6; margin-bottom: 22px; white-space: pre-line; }

.share-stats { display: flex; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.share-stat { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; }
.share-stat b { color: var(--text); font-weight: 600; }

.download-btn {
    display: block; width: 100%; text-align: center; padding: 16px; border-radius: 12px;
    background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: #16130b;
    font-weight: 700; font-size: 15.5px; text-decoration: none; border: none; cursor: pointer;
    font-family: var(--font-body); transition: transform .12s, box-shadow .12s;
}
.download-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(212,166,80,0.3); }

.cta-banner {
    margin-top: 22px; padding: 16px 18px; border-radius: 12px; background: var(--bg-elev-2);
    border: 1px dashed var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.cta-banner span { font-size: 13.5px; color: var(--text-dim); }
.cta-banner a { font-size: 13.5px; font-weight: 600; color: var(--gold-bright); text-decoration: none; white-space: nowrap; }
.cta-banner a:hover { text-decoration: underline; }

.share-footer { text-align: center; padding: 24px; color: var(--text-faint); font-size: 12px; }
.trust-row { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; color: var(--text-faint); font-size: 12px; }

.share-error-card { text-align: center; }
.share-error-card .icon { font-size: 40px; margin-bottom: 14px; }

/* ==========================================================
   Responsive
   ========================================================== */
@media (min-width: 900px) {
    .auth-side { display: flex; }
}
@media (max-width: 899px) {
    .sidebar-burger { display: flex; }
    .sidebar {
        position: fixed; left: 0; top: 0; transform: translateX(-100%);
        transition: transform .22s ease; box-shadow: 0 0 40px rgba(0,0,0,0.5);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.show { display: block; }
    .container { padding-top: 70px; }
}
@media (max-width: 480px) {
    .share-card { padding: 32px 24px; border-radius: 16px; }
    .field-row { grid-template-columns: 1fr; }
    .container { padding-left: 16px; padding-right: 16px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================
   Public homepage / landing page (index.php)
   ========================================================== */
.landing { min-height: 100vh; }
.landing-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 5%; position: sticky; top: 0; z-index: 40;
    background: rgba(11,14,19,0.82); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
.landing-nav .brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.landing-nav .brand .mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--gold-bright), var(--gold) 60%, #8a6a2f); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; color: #14100a; font-weight: 700; box-shadow: 0 4px 14px rgba(212,166,80,0.3); }
.landing-menu { display: flex; align-items: center; gap: 28px; }
.landing-menu a.nav-link { color: var(--text-dim); text-decoration: none; font-size: 13.5px; font-weight: 500; transition: color .15s; }
.landing-menu a.nav-link:hover { color: var(--text); }
.landing-actions { display: flex; align-items: center; gap: 14px; }
.landing-actions .lang-switch { max-width: 110px; margin: 0; }
.landing-actions a.btn-ghost { color: var(--text-dim); text-decoration: none; font-size: 13.5px; font-weight: 600; padding: 9px 6px; }
.landing-actions a.btn-ghost:hover { color: var(--text); }
.landing-actions a.btn { text-decoration: none; margin-top: 0; padding: 9px 16px; }
.nav-toggle { display: none; background: var(--bg-elev); border: 1px solid var(--border); color: var(--text); width: 38px; height: 38px; border-radius: 9px; align-items: center; justify-content: center; cursor: pointer; }

.landing-hero { max-width: 900px; margin: 0 auto; padding: 90px 5% 60px; text-align: center; position: relative; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 7px; background: var(--bg-elev); border: 1px solid rgba(212,166,80,0.3);
    color: var(--gold-bright); font-size: 12px; font-weight: 600; padding: 7px 14px; border-radius: 20px; margin-bottom: 22px;
}
.hero-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.landing-hero h1 { font-size: 42px; line-height: 1.22; max-width: 780px; margin: 0 auto 18px; }
.landing-hero .hero-sub { color: var(--text-dim); font-size: 16px; line-height: 1.6; max-width: 620px; margin: 0 auto 34px; }
.hero-cta-row { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.hero-cta-row a.btn { text-decoration: none; padding: 13px 26px; font-size: 15px; }
.hero-cta-row a.btn-secondary { text-decoration: none; padding: 13px 26px; font-size: 15px; margin-top: 0; }

.section { max-width: 1120px; margin: 0 auto; padding: 70px 5%; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 40px; }
.section-head h2 { font-size: 28px; margin-bottom: 10px; }
.section-head p { color: var(--text-dim); font-size: 14.5px; line-height: 1.6; }

.landing-stats-band { background: var(--bg-elev); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.landing-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; max-width: 1120px; margin: 0 auto; padding: 0 5%; }
.landing-stat { text-align: center; padding: 10px; }
.landing-stat .num { font-family: var(--font-mono); font-size: 30px; font-weight: 700; color: var(--gold-bright); }
.landing-stat .lbl { color: var(--text-dim); font-size: 12px; margin-top: 6px; text-transform: uppercase; letter-spacing: 0.05em; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.feature-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px; padding: 24px; transition: border-color .15s, transform .15s; }
.feature-card:hover { border-color: rgba(212,166,80,0.35); transform: translateY(-2px); }
.feature-card .f-ico { width: 42px; height: 42px; border-radius: 11px; background: rgba(212,166,80,0.12); border: 1px solid rgba(212,166,80,0.25); color: var(--gold-bright); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.feature-card h3 { font-size: 15.5px; margin-bottom: 8px; }
.feature-card p { color: var(--text-dim); font-size: 13.5px; line-height: 1.55; margin: 0; }

.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; counter-reset: step; }
.how-step { position: relative; padding: 26px 22px 22px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px; }
.how-step .step-num {
    width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--gold-bright), var(--gold));
    color: #16130b; font-family: var(--font-display); font-weight: 700; font-size: 15px;
    display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.how-step h3 { font-size: 15.5px; margin-bottom: 8px; }
.how-step p { color: var(--text-dim); font-size: 13.5px; line-height: 1.55; margin: 0; }

.landing-cta { text-align: center; background: linear-gradient(160deg, #171c2a, #0b0e13 70%); border: 1px solid var(--border); border-radius: 22px; max-width: 1120px; margin: 0 auto 70px; padding: 60px 5%; position: relative; overflow: hidden; }
.landing-cta::before { content: ''; position: absolute; width: 500px; height: 500px; border-radius: 50%; background: radial-gradient(circle, rgba(212,166,80,0.14), transparent 70%); top: -160px; right: -120px; }
.landing-cta h2 { font-size: 26px; margin-bottom: 10px; position: relative; }
.landing-cta p { color: var(--text-dim); font-size: 14.5px; margin: 0 0 26px; position: relative; }
.landing-cta a.btn { text-decoration: none; padding: 13px 28px; font-size: 15px; position: relative; }

.landing-footer { border-top: 1px solid var(--border); padding: 34px 5%; }
.landing-footer-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.landing-footer .brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text-dim); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 14.5px; }
.landing-footer .brand .mark { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--gold), #8a6a2f); display: inline-flex; align-items:center; justify-content:center; font-size: 11px; color: #14100a; font-weight: 700; }
.landing-footer p.tagline { color: var(--text-faint); font-size: 12.5px; margin: 6px 0 0; max-width: 320px; }
.landing-footer .copyright { color: var(--text-faint); font-size: 12.5px; }

@media (max-width: 860px) {
    .landing-menu { display: none; }
    .nav-toggle { display: flex; }
    .landing-hero h1 { font-size: 30px; }
    .landing-hero .hero-sub { font-size: 14.5px; }
}
