/* public/admin.css */
:root {
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
}

.admin-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.view { display: none; }
.view.active { display: block; }

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.login-card {
    max-width: 400px;
    margin: 10vh auto;
}

.login-card h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h2 { font-size: 1.5rem; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

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

.btn-primary:hover { background: var(--primary-hover); }

.btn-danger {
    background: transparent;
    color: var(--danger);
    width: auto;
    padding: 0.5rem 1rem;
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.stats { display: flex; gap: 1rem; }
.stat-box {
    flex: 1;
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
}
.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 600;
}
.error-text {
    color: var(--danger);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* Questionnaire Builder */
.qb-row {
    display: flex;
    gap: 10px;
    align-items: center;
    background: #f8fafc;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
}
.qb-row input, .qb-row select {
    flex: 1;
    margin: 0;
    padding: 0.5rem;
}
.qb-row select {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
}
.btn-remove {
    background: transparent;
    color: var(--danger);
    border: none;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 10px;
}
.btn-remove:hover {
    color: #b91c1c;
}
