/* ===== Login Page ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--secondary) 100%);
    padding: 24px;
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

.login-header {
    text-align: center;
    padding: 32px 32px 24px;
    background: var(--primary-bg);
    border-bottom: 1px solid var(--border);
}

.login-logo {
    width: 64px;
    height: 64px;
    background: var(--primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: #fff;
}

.login-header h1 {
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--text);
    margin: 0 0 4px;
}

.login-header p {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin: 0;
}

.login-body {
    padding: 32px;
}

.login-tabs {
    display: flex;
    background: var(--bg-stripe);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 24px;
}

.login-tab {
    flex: 1;
    padding: 8px;
    text-align: center;
    font-size: var(--font-size-sm);
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    background: none;
    color: var(--text-muted);
}

.login-tab.active {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow);
}

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

.login-form .btn {
    width: 100%;
    padding: 12px;
    font-size: var(--font-size-lg);
}

.login-error {
    background: #fde8e8;
    color: var(--danger);
    padding: 10px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: var(--font-size-sm);
    text-align: center;
}

/* ===== Dashboard ===== */
.dashboard-welcome {
    margin-bottom: 24px;
}

.dashboard-welcome h2 {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    margin: 0 0 4px;
}

.dashboard-welcome p {
    color: var(--text-muted);
    margin: 0;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
}

.quick-action:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--text);
}

.quick-action-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.quick-action-text,
.quick-action span {
    font-weight: 600;
    font-size: var(--font-size);
}

/* ── Dashboard Sections ── */
.dash-section {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
}

.dash-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.dash-section-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

/* ── Two Columns Layout ── */
.dash-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .dash-two-cols {
        grid-template-columns: 1fr;
    }
}

/* ── Mini List (competitions/courses) ── */
.dash-mini-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-mini-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--bg-light, #f9fafb);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
    gap: 10px;
}

.dash-mini-item:hover {
    background: var(--bg-hover, #f3f4f6);
}

.dash-mini-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.dash-mini-info strong {
    font-size: 14px;
    color: var(--text, #1f2937);
}

.dash-mini-info span {
    font-size: 12px;
    color: var(--text-muted, #6b7280);
}

.dash-mini-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
}

.dash-badge-active,
.dash-badge-upcoming,
.dash-badge-registration_open {
    background: #dcfce7;
    color: #166534;
}

.dash-badge-ended,
.dash-badge-completed {
    background: #e0e7ff;
    color: #3730a3;
}

/* ── Stat card colors ── */
.stat-card-icon.pink { background: #fce7f3; color: #db2777; }
.stat-card-icon.indigo { background: #e0e7ff; color: #4f46e5; }
.stat-card-icon.amber { background: #fef3c7; color: #d97706; }

.stat-card-sub {
    font-size: 12px;
    color: var(--text-muted, #6b7280);
    font-weight: 400;
}

/* ===== Change Password Page ===== */
.change-pwd-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.change-pwd-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 440px;
    padding: 32px;
}

.change-pwd-card h2 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin: 0 0 8px;
    text-align: center;
}

.change-pwd-card .info-text {
    text-align: center;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    margin-bottom: 24px;
}

/* ===== Parent Portal ===== */
.parent-layout {
    min-height: 100vh;
    background: var(--bg);
}

.parent-header {
    background: var(--primary);
    color: #fff;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.parent-header h1 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin: 0;
}

.parent-nav {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    padding: 8px 24px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.parent-nav a {
    padding: 8px 16px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius);
    white-space: nowrap;
    transition: all var(--transition);
}

.parent-nav a:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.parent-nav a.active {
    background: var(--primary-bg);
    color: var(--primary);
}

.parent-content {
    padding: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.student-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.student-info-avatar {
    width: 56px;
    height: 56px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.student-info-details h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin: 0;
}

.student-info-meta {
    display: flex;
    gap: 16px;
    margin-top: 4px;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}
