/* ========================================
   MANAGER INTERFACE STYLES
   Exam Management System
   ======================================== */

/* ===== VARIABLES ===== */
:root {
    --primary: #0998b5;
    --primary-dark: #0998b5;
    --secondary: #00bcd4;
    --white: #ffffff;
    --danger: #ff4444;
    --gray: #6c757d;
    --magenta: #b7038a;
}

/* ===== HEADER STYLES ===== */
.main-header {
    background: #ffffff;
    color: var(--magenta);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 4px solid var(--magenta);
    height: 80px; /* Fixed header height */
}

/* Main content area - adjusted for fixed header */
.manager-main {
    flex: 1;
    padding: 30px;
    margin-top: 80px; /* Same as header height */
    background: #f5f7fa;
    min-height: calc(100vh - 80px);
}

/* Header text colors */
.title-area h1 {
    color: var(--secondary);
    font-size: 28px;
    margin: 0 0 5px;
    font-weight: bold;
}

.institution-name {
    color: var(--magenta);
    font-size: 16px;
    margin: 0;
    font-style: italic;
}

.user-greeting {
    color: var(--magenta);
}

.header-logo {
    background: white;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ===== PAGE HEADERS ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--secondary);
}

.page-header h1 {
    color: var(--primary);
    font-size: 28px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header h1 span {
    font-size: 32px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* ===== INFO CARDS ===== */
.info-card {
    background: linear-gradient(135deg, #8214e8 0%, #ea02b4 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.info-card.blue {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.info-icon {
    font-size: 48px;
}

.info-content h3 {
    margin: 0 0 5px;
    font-size: 18px;
    opacity: 0.9;
}

/* ===== DATA TABLES ===== */
.table-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    background: var(--primary);
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

/* ===== ACTION BUTTONS ===== */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-icon {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.btn-view {
    background: var(--secondary);
    color: white;
}

.btn-edit {
    background: #ffc107;
    color: #000;
}

.btn-delete {
    background: var(--danger);
    color: white;
}

.btn-register {
    background: #28a745;
    color: white;
}

.btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* ===== FORMS ===== */
.form-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
}

.form-control:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,188,212,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* ===== STATS CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.subject-card {
    background: rgb(248, 232, 254);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s;
}

.stat-card {
    background: rgb(198, 237, 244);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    font-size: 14px;
    color: #cf15cc;
    text-transform: uppercase;
}

/* ===== ALERTS ===== */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid transparent;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: var(--danger);
}

/* ===== EMPTY STATES ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .main-header {
        height: auto;
        min-height: 60px;
        position: relative;
    }
    
    .manager-main {
        margin-top: 0;
        padding: 20px;
    }
    
    .page-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .header-actions,
    .btn-icon {
        display: none !important;
    }
    
    .manager-main {
        margin: 0;
        padding: 20px;
    }
}
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
