/* ===== NEET Mock Platform - Styles ===== */
:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #818cf8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --sidebar: #0f172a;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* ===== Layout ===== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-header {
    padding: 32px 0 24px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2.2rem;
}

.main-header h1 {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text);
}

.tagline {
    color: var(--text-muted);
    margin-top: 6px;
    font-size: 1rem;
}

.breadcrumb {
    margin-top: 16px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.breadcrumb a { color: var(--primary); }
.breadcrumb .current { color: var(--text); font-weight: 500; }
.breadcrumb span { margin: 0 6px; }

.main-footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: auto;
}

/* ===== Subjects Grid ===== */
.section-title {
    font-size: 1.35rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.subject-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    display: block;
}

.subject-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
    text-decoration: none;
}

.subject-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.subject-card h3 {
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.mock-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Mocks List ===== */
.mocks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mock-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
}

.mock-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}

.mock-info h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.mock-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    gap: 16px;
}

.btn-start {
    background: var(--primary);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.mock-card:hover .btn-start {
    background: var(--primary-dark);
}

.back-link {
    margin-top: 24px;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.empty-state h2, .empty-state h3 {
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}

.btn:hover { text-decoration: none; }

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; }

.btn-secondary {
    background: #e2e8f0;
    color: var(--text);
}
.btn-secondary:hover { background: #cbd5e1; color: var(--text); }

.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-danger:hover { background: #dc2626; color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn-block { width: 100%; text-align: center; }

/* ===== Alerts ===== */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ===== Login Page ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: var(--card);
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4);
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-header .logo-icon {
    font-size: 2.5rem;
}

.login-header h1 {
    font-size: 1.5rem;
    margin: 8px 0 4px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.login-form .form-group {
    margin-bottom: 18px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-group textarea {
    resize: vertical;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.form-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.form-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--border);
}

.form-divider span {
    background: var(--bg);
    padding: 0 12px;
    position: relative;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.form-narrow {
    max-width: 400px;
}

.inline-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.inline-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
}

/* ===== Admin Layout ===== */
.admin-page {
    background: #f1f5f9;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    background: var(--sidebar);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.nav-item {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 4px;
    font-size: 0.95rem;
    transition: all 0.15s;
}

.nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    text-decoration: none;
}

.nav-item.active {
    background: var(--primary);
    color: #fff;
}

.nav-item.logout {
    color: #f87171;
}

.nav-item.logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.85rem;
    color: #94a3b8;
}

.admin-main {
    flex: 1;
    padding: 28px 32px;
    overflow-x: auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.admin-header h1 {
    font-size: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.admin-section {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.admin-section h2 {
    font-size: 1.15rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: #f8fafc;
}

.text-muted {
    color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
    }
    .sidebar-nav {
        display: flex;
        gap: 4px;
        padding: 8px;
    }
    .nav-item {
        flex: 1;
        text-align: center;
        margin-bottom: 0;
    }
    .sidebar-footer { display: none; }
    .admin-main {
        padding: 20px 16px;
    }
    .mock-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .subjects-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .subjects-grid {
        grid-template-columns: 1fr;
    }
}
