/* Customer-facing FTP portal — light, unbranded, minimum-viable admin look. */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-size: 14px;
    color: #1f2328;
    background: #f6f8fa;
    line-height: 1.5;
}
a       { color: #0969da; text-decoration: none; }
a:hover { text-decoration: underline; }
code    { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; background: #eef1f4; padding: 1px 5px; border-radius: 4px; }

h1 { margin: 0 0 12px; font-size: 1.4em; }
.muted { color: #57606a; }
.muted.small { font-size: 0.86em; }
.error { background: #ffebe9; border: 1px solid #ff8182; color: #82061e; padding: 8px 12px; border-radius: 6px; margin: 8px 0; }
.status { margin-top: 12px; }
.status.error { color: #82061e; }

/* Topbar */
.topbar {
    background: #1f2328; color: #fff;
    padding: 10px 20px;
    display: flex; align-items: center; justify-content: space-between;
}
.topbar .brand { color: #fff; font-weight: 600; letter-spacing: 0.02em; }
.topbar nav    { display: flex; gap: 12px; align-items: center; }
.topbar nav .user { color: #8b949e; font-size: 0.92em; }
.topbar nav a { color: #c9d1d9; }
.btn-mini {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.86em;
    background: #f6f8fa; color: #1f2328 !important;
    border: 1px solid #d0d7de; border-radius: 5px;
    text-decoration: none;
}
.btn-mini:hover { background: #eaecef; text-decoration: none; }

.container { max-width: 960px; margin: 24px auto; padding: 0 20px; }

/* Landing card */
.landing { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.landing-card {
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    padding: 32px 28px;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 3px 10px rgba(0,0,0,0.04);
}
.landing-card h1 { margin-top: 0; text-align: center; }
.landing-card p  { color: #57606a; }
#g-btn { margin: 20px 0 12px; display: flex; justify-content: center; }

/* Root switcher tabs (Uploads / Public assets) — only rendered when the
   current grant has allow_assets=1. */
.root-switcher {
    display: flex;
    gap: 4px;
    margin: 10px 0 6px;
    border-bottom: 2px solid #d0d7de;
}
.root-tab {
    padding: 8px 16px;
    background: transparent;
    color: #57606a;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    margin-bottom: -2px;
    font-weight: 500;
    text-decoration: none;
}
.root-tab:hover { background: #eaecef; color: #1f2328; text-decoration: none; }
.root-tab.active {
    background: #fff;
    color: #1f2328;
    border-color: #d0d7de;
    border-bottom: 2px solid #fff;
}

/* WhatsApp CTA on the landing page. Brand green (#25D366).
   Centered under the allowlist explainer: width:fit-content + margin auto
   makes the flex box shrink-wrap and horizontally center in the card. */
.wa-cta {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #25D366;
    color: #fff !important;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    margin: 12px auto 0;
}
.wa-cta:hover { background: #1ebe5a; text-decoration: none; }
.wa-cta svg { width: 20px; height: 20px; fill: currentColor; }

/* Site picker */
.site-picker { list-style: none; padding: 0; margin: 16px 0; }
.site-picker li { margin: 8px 0; }
.site-picker a {
    display: block;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
}
.site-picker a:hover { background: #f6f8fa; text-decoration: none; }

/* File browser (shared idiom with the dashboard File Manager) */
.ftp-fm {
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}
.fm-breadcrumb {
    padding: 6px 0 10px;
    border-bottom: 1px solid #eaecef;
    margin-bottom: 10px;
    font-size: 0.95em;
}
.fm-breadcrumb a { color: #0969da; }
.fm-list { min-height: 60px; }
.fm-table { width: 100%; border-collapse: collapse; font-size: 0.94em; }
.fm-table th, .fm-table td {
    text-align: left;
    padding: 6px 8px;
    border-bottom: 1px solid #eaecef;
    vertical-align: top;
}
.fm-table th { color: #57606a; font-weight: 500; }
.fm-table tr.up td { background: #f6f8fa; }
.fm-name  { width: 60%; word-break: break-all; }
.fm-size  { width: 12%; font-variant-numeric: tabular-nums; }
.fm-time  { width: 18%; font-variant-numeric: tabular-nums; color: #57606a; }
.fm-act   { width: 10%; text-align: right; }

.fm-drop {
    margin-top: 14px;
    border: 2px dashed #d0d7de;
    border-radius: 8px;
    padding: 18px;
    text-align: center;
    color: #57606a;
    transition: border-color 120ms, background 120ms;
}
.fm-drop.over { border-color: #0969da; background: #f0f7ff; }
.fm-drop label.fm-pick { color: #0969da; cursor: pointer; text-decoration: underline; }

.fm-uploads { margin-top: 10px; text-align: left; }
.fm-up-row {
    display: flex; gap: 10px; align-items: center;
    padding: 4px 0;
    font-size: 0.9em;
}
.fm-up-name { flex: 0 0 40%; word-break: break-all; }
.fm-up-bar  {
    flex: 1;
    height: 8px;
    background: #eaecef;
    border-radius: 4px;
    overflow: hidden;
}
.fm-up-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: #0969da;
    transition: width 120ms;
}
.fm-up-pct { flex: 0 0 3em; text-align: right; font-variant-numeric: tabular-nums; }
