/* dashboard/static/style.css */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: system-ui, -apple-system, sans-serif;
    margin: 0;
    background: #f1f5f9;
    color: #1e293b;
    font-size: 0.95rem;
}

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Nav ---- */
.nav {
    background: #0f172a;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 52px;
}
.nav-brand { color: #fff; font-weight: 700; font-size: 1rem; }
.nav-brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 1.25rem; }
.nav-links a { color: #94a3b8; font-size: 0.875rem; }
.nav-links a:hover { color: #fff; text-decoration: none; }

/* ---- Main ---- */
.main { max-width: 1100px; margin: 0 auto; padding: 1.75rem 1.5rem; }

/* ---- Flash messages ---- */
.flash {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #3b82f6;
    border-radius: 4px;
    padding: 0.7rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}
.flash-error {
    background: #fef2f2;
    border-color: #fecaca;
    border-left-color: #ef4444;
}
.flash-warn {
    background: #fffbeb;
    border-color: #fde68a;
    border-left-color: #f59e0b;
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 0.45rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: inherit;
    line-height: 1.4;
    transition: background 0.1s;
}
.btn:hover { background: #f8fafc; text-decoration: none; }
.btn-primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-danger { border-color: #fca5a5; color: #dc2626; }
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: 0.2rem 0.6rem; font-size: 0.8rem; }
.btn-link {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: inherit;
    padding: 0;
}
.btn-link:hover { color: #fff; }

/* ---- Page header ---- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.page-header h1 { margin: 0; font-size: 1.4rem; }
.actions { display: flex; gap: 0.5rem; align-items: center; }

/* ---- Table ---- */
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.table th, .table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.table th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafafa; }
.row-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }

/* ---- Status badges ---- */
.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.badge-pending    { background: #f1f5f9; color: #64748b; }
.badge-processing { background: #dbeafe; color: #1d4ed8; }
.badge-processed  { background: #dcfce7; color: #16a34a; }
.badge-partial    { background: #fef9c3; color: #b45309; }
.badge-failed     { background: #fee2e2; color: #dc2626; }

/* ---- Login ---- */
.login-box {
    max-width: 380px;
    margin: 4rem auto;
    background: #fff;
    padding: 2.25rem;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
.login-box h1 { margin-top: 0; font-size: 1.3rem; }

/* ---- Form ---- */
.field { margin-bottom: 1rem; }
.field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
}
.field .hint { font-weight: 400; color: #94a3b8; font-size: 0.8rem; }
.field input,
.field textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.15s;
}
.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.field textarea { resize: vertical; line-height: 1.5; }

/* ---- Empty state ---- */
.empty { color: #94a3b8; font-style: italic; }

/* ---- Responses ---- */
.question-text {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.responses-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
@media (max-width: 700px) {
    .responses-grid { grid-template-columns: 1fr; }
}
.response-col h2 {
    margin-top: 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #64748b;
    font-weight: 700;
}
.response-body {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    min-height: 220px;
    white-space: pre-wrap;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #374151;
}
.no-response { color: #94a3b8; font-style: italic; }
