/* style.css — minimal, accessible, Georgian-friendly admin UI.
 *
 * No external fonts or CDN — everything ships with the page so we
 * don't have to relax CSP. System font stack picks Sylfaen/BPG on
 * Windows, .Helvetica/Geneva on macOS, Noto Sans Georgian on Linux. */

:root {
    --bg:        #f4f6fa;
    --panel:    #ffffff;
    --border:   #e1e5ec;
    --text:     #1d2330;
    --muted:    #6b7280;
    --primary:  #2563eb;
    --primary-dark: #1d4ed8;
    --danger:   #dc2626;
    --success:  #059669;
    --warning:  #d97706;
    --radius:   8px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow:   0 4px 12px rgba(0,0,0,.06);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Sylfaen", "BPG Nino Mtavruli", "Noto Sans Georgian",
                 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0 0 16px; font-weight: 600; color: var(--text); }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }

/* ─── Top navigation ─────────────────────────────────────────── */
.topnav {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    height: 56px;
}
.brand {
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
}
.nav-links {
    display: flex;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links a {
    padding: 6px 10px;
    border-radius: 6px;
    color: var(--text);
    font-weight: 500;
}
.nav-links a:hover {
    background: var(--bg);
    text-decoration: none;
}
.nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
}
.user-email { color: var(--muted); font-size: 14px; }
.logout-form { display: inline; margin: 0; }
.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font: inherit;
    cursor: pointer;
    padding: 0;
}
.btn-link:hover { text-decoration: underline; }

/* ─── Container ─────────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 32px auto;
    padding: 0 24px;
}

/* ─── Card / panel ──────────────────────────────────────────── */
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

/* ─── Centered narrow card (for login screens) ─────────────── */
.center-card-wrap {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.center-card {
    max-width: 420px;
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}
.center-card h1 {
    margin-top: 0;
    text-align: center;
    margin-bottom: 24px;
}

/* ─── Forms ─────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text);
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
    font-family: inherit;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-primary:disabled { background: var(--muted); cursor: not-allowed; }
.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: #e5e7eb; }
.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-block { display: block; width: 100%; }

/* ─── Alerts (flash messages) ───────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid transparent;
}
.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}
.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}
.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}
.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

/* ─── Tables ────────────────────────────────────────────────── */
table.data {
    width: 100%;
    border-collapse: collapse;
}
table.data th,
table.data td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
table.data th {
    background: var(--bg);
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .5px;
}
table.data tbody tr:hover { background: #fafbfc; }

/* ─── Footer ────────────────────────────────────────────────── */
.site-footer {
    text-align: center;
    padding: 24px;
    color: var(--muted);
    font-size: 13px;
}

/* ─── Helpers ───────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--muted); }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.form-aux {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
}
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-muted   { background: #e5e7eb; color: #374151; }
