/* ==================== SHARED STYLES — Question Bank Site ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
    background: #f4f7fc;
    color: #1e293b;
    padding: 2rem 1.5rem;
    min-height: 100vh;
}
.container { max-width: 1100px; width: 100%; margin: 0 auto; }
.card {
    background: #fff;
    border-radius: 20px;
    padding: 1.8rem 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.05);
    margin-bottom: 1.6rem;
}

/* ---- Top nav ---- */
.topnav {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
    background: #fff; padding: 1.1rem 1.8rem; border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.05); margin-bottom: 1.8rem; gap: 10px;
}
.topnav h1 { font-size: 1.4rem; font-weight: 700; color: #0f172a; }
.topnav h1 i { color: #3b82f6; margin-right: 8px; }
.topnav .nav-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topnav .who { font-size: 0.9rem; color: #475569; font-weight: 600; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 0.6rem 1.3rem; border-radius: 30px; border: none;
    font-weight: 600; font-size: 0.9rem; cursor: pointer; text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary { background: #3b82f6; color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(59,130,246,0.35); }
.btn-secondary { background: #eef2ff; color: #4f46e5; }
.btn-secondary:hover { background: #e0e7ff; }
.btn-danger { background: #fef2f2; color: #dc2626; }
.btn-danger:hover { background: #fee2e2; }
.btn-outline { background: #fff; color: #3b82f6; border: 1.5px solid #93c5fd; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Forms ---- */
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: #475569; margin-bottom: 0.4rem; }
input[type="text"], input[type="password"], input[type="number"], select, textarea {
    width: 100%; padding: 0.7rem 1rem; border: 1.5px solid #e2e8f0; border-radius: 12px;
    font-size: 0.95rem; font-family: inherit; background: #f8fafc;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #3b82f6; background: #fff; }

/* ---- Alerts ---- */
.alert { padding: 0.8rem 1.1rem; border-radius: 12px; font-size: 0.88rem; margin-bottom: 1rem; }
.alert-error { background: #fef2f2; color: #b91c1c; }
.alert-success { background: #f0fdf4; color: #15803d; }

/* ---- Misc ---- */
.badge { background: #eef2ff; color: #4f46e5; padding: 0.25rem 0.9rem; border-radius: 30px; font-size: 0.78rem; font-weight: 700; }
.muted { color: #94a3b8; font-size: 0.85rem; }
.center { text-align: center; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.grid-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; }
.loading { text-align: center; padding: 3rem 1rem; color: #94a3b8; }
.loading i { font-size: 2rem; margin-bottom: 0.6rem; display: block; }

@media (max-width: 640px) {
    body { padding: 1rem; }
    .card { padding: 1.2rem 1.3rem; }
}
