/* style.css — operator panel UI.
 * Tone is slightly different from admin: more compact (operators spend
 * all day in this), dialer-friendly (larger buttons), but uses the
 * same color palette and font stack. */

: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; }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }

code { background: #f1f3f5; padding: 1px 5px; border-radius: 4px; font-size: 90%; }

/* ─── Top nav ─────────────────────────────────────────────────── */
.topnav {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.nav-inner {
    max-width: none;
    margin: 0;
    padding: 0 32px;
    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-info { color: var(--muted); font-size: 14px; display: flex; gap: 8px; align-items: center; }
.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 ──────────────────────────────────────────────── */
/* Full-width: spans the whole viewport (minus phone-panel when shown).
 * Keep 32px side padding so text doesn't kiss the edges. */
.container {
    max-width: none;
    margin: 24px 0;
    padding: 0 32px;
}

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

/* ─── Stats grid ─────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}
.stat-label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 32px; font-weight: 700; margin: 6px 0 2px; }
.stat-foot  { color: var(--muted); font-size: 13px; }

/* ─── Centered login card ────────────────────────────────────── */
.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: 8px; }

/* ─── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
}
.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;
}
.form-group input: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;
    text-decoration: none;
    font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-block     { display: block; width: 100%; }

/* ─── Alerts ─────────────────────────────────────────────────── */
.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;
}

/* ─── Site 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; }
.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; }

/* ─── Dialer (Phase 2) — placeholder styles ──────────────────── */
.dialer {
    max-width: 360px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin: 0 auto;
}
.dialer-display {
    text-align: center;
    font-size: 22px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 16px;
    font-family: ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
}
.dial-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.dial-btn {
    aspect-ratio: 1;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-size: 22px;
    font-weight: 500;
    cursor: pointer;
}
.dial-btn:hover { background: var(--bg); }
.dial-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.dial-call {
    flex: 1;
    background: var(--success);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
}
.dial-call:disabled { background: var(--muted); cursor: not-allowed; }
.dial-hangup {
    background: var(--danger);
    color: #fff;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
}
