/* ============================================================================
   Stil pagina publica - clean, minimal, responsive
   ============================================================================ */

:root {
    --bg: #fafaf7;
    --surface: #ffffff;
    --border: #e8e6df;
    --border-strong: #d4d1c7;
    --text: #1c1c1a;
    --text-muted: #333333;
    --text-faint: #555555;
    --accent: #2d6e58;
    --accent-bg: #e7f1ec;
    --accent-strong: #1f5644;
    --warn: #b85c1f;
    --warn-bg: #fbeee2;
    --shadow: 0 1px 2px rgba(20, 18, 12, 0.04);
    --radius: 14px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #15140f;
        --surface: #1f1d18;
        --border: #2f2c25;
        --border-strong: #3f3c33;
        --text: #ecebe5;
        --text-muted: #95938a;
        --text-faint: #6e6c64;
        --accent: #4ea689;
        --accent-bg: #1d3a2f;
        --accent-strong: #76c0a4;
        --warn: #d68842;
        --warn-bg: #3a2a18;
    }
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

/* Card principal */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    box-shadow: var(--shadow);
    width: 100%;
    text-align: center;
}

.card-narrow {
    max-width: 440px;
}

.brand {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 24px;
    letter-spacing: -0.01em;
}

.card h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.lead {
    color: var(--text-muted);
    margin: 0 0 16px;
}

.muted {
    color: var(--text-muted);
    font-size: 14px;
}

.hint {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 700;
    margin: 16px 0 0;
}

/* ===== Logo ===== */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 18px;
    margin: 0 0 24px;
    user-select: none;
}

.logo-badge {
    background: var(--accent);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    line-height: 1;
}

.logo-text {
    color: var(--text);
    font-weight: 500;
    letter-spacing: -0.01em;
}

.logo-domain {
    color: var(--text-muted);
    font-weight: 400;
}

/* ===== Folder page (public) ===== */
.card-folder {
    max-width: 600px;
    text-align: left;
}

.folder-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 20px;
}

.folder-card-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    background: var(--accent-bg);
    color: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-card-meta h1 {
    font-size: 20px;
    margin: 0 0 4px;
    text-align: left;
}

.folder-card-meta p {
    margin: 0;
    font-size: 14px;
}

.folder-files-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0 12px;
}

.folder-file-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.folder-file-info {
    flex: 1;
    min-width: 0;
}

.folder-file-name {
    margin: 0 0 2px;
    font-weight: 500;
    color: var(--text);
    word-break: break-all;
}

.folder-file-meta {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.btn-folder-dl {
    width: auto;
    padding: 9px 16px;
    font-size: 14px;
    flex-shrink: 0;
}

@media (max-width: 540px) {
    .folder-file-row { flex-direction: column; align-items: stretch; }
    .btn-folder-dl { width: 100%; }
}

/* Iconita central de status */
.icon-wrap {
    width: 64px;
    height: 64px;
    background: var(--accent-bg);
    color: var(--accent);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.icon-warn {
    background: var(--warn-bg);
    color: var(--warn);
}

/* File card - varianta cu fisier descarcabil */
.file-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: left;
    margin-bottom: 18px;
}

.file-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: var(--accent-bg);
    color: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    margin: 0 0 2px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* State "deja descarcat" */
.state-info {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    text-align: left;
}

.state-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: var(--accent-bg);
    color: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.state-title {
    font-weight: 500;
    margin: 0;
    font-size: 16px;
}

.state-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin: 2px 0 0;
}

/* Butoane */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    border-radius: 10px;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.985);
}

.btn-primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border-strong);
}

.btn-secondary:hover {
    background: var(--bg);
    border-color: var(--text-muted);
}

.btn[disabled] {
    opacity: 0.6;
    pointer-events: none;
}

/* Status download */
.dl-status {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--accent-bg);
    color: var(--accent-strong);
    border-radius: 10px;
    font-size: 14px;
    text-align: left;
}

.dl-status.err {
    background: var(--warn-bg);
    color: var(--warn);
}

/* Responsive */
@media (max-width: 480px) {
    .page { padding: 16px 12px; }
    .card { padding: 24px 20px; }
    .card h1 { font-size: 20px; }
    .file-card { padding: 12px; }
    .file-icon, .state-icon { width: 44px; height: 44px; }
}
