/* ISM School Color Scheme */
:root {
    --ism-blue: #1e3a8a;
    --ism-light-blue: #3b82f6;
    --ism-gold: #d97706;
    --ism-light-gold: #f59e0b;
    --ism-dark: #1f2937;
    --ism-light: #f8fafc;
    --ism-success: #10b981;
    --ism-warning: #f59e0b;
    --ism-error: #ef4444;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--ism-light) 0%, #e0f2fe 100%);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.1);
    border: 1px solid #e1e5e9;
}

/* Header & Navigation */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--ism-light);
}

.admin-login {
    text-align: right;
    margin-bottom: 20px;
}

/* Logo & Branding */
.logo-container {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #e2e3ff 100%);
    border-radius: 12px;
    color: var(--ism-blue);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.3);
}

.logo-image {
    max-width: 200px;
    height: auto;
    margin-bottom: 10px;
}

.logo-domain {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.logo-tagline {
    font-style: italic;
    opacity: 0.8;
    font-size: 0.9em;
}

/* Messages & Status */
.message {
    text-align: center;
    padding: 25px;
    border-radius: 10px;
    margin: 25px 0;
    border: 2px solid transparent;
}

.open-status {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-color: #10b981;
}

.closed-status {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #7f1d1d;
    border-color: #ef4444;
}

/* Buttons */
.btn {
    background: linear-gradient(135deg, var(--ism-blue) 0%, var(--ism-light-blue) 100%);
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    display: inline-block;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--ism-success) 0%, #34d399 100%);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, var(--ism-gold) 0%, var(--ism-light-gold) 100%);
}

.btn-warning:hover {
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--ism-error) 0%, #f87171 100%);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9em;
}

/* Forms */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--ism-dark);
}

input[type="text"],
input[type="date"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--ism-light-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Checkboxes */
.checkbox {
    display: flex;
    align-items: center;
}

.checkbox input {
    margin-right: 10px;
    transform: scale(1.2);
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

th {
    background: linear-gradient(135deg, var(--ism-blue) 0%, var(--ism-light-blue) 100%);
    color: white;
    font-weight: 600;
}

tr:hover {
    background-color: #f8fafc;
}

.student-link {
    color: var(--ism-blue);
    text-decoration: none;
    font-weight: 600;
}

.student-link:hover {
    text-decoration: underline;
}

/* Stats Grid */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    margin: 0 0 15px 0;
    color: var(--ism-dark);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card p {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
    color: var(--ism-blue);
}

/* Cards */
.card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    border: 1px solid #e1e5e9;
}

.card h2 {
    color: var(--ism-blue);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--ism-light);
    padding-bottom: 10px;
}

/* Registration Link */
.registration-link {
    text-align: center;
    margin: 30px 0;
}

/* Counter */
.counter {
    text-align: center;
    color: var(--ism-blue);
    margin: 15px 0;
    font-weight: bold;
    font-size: 18px;
}

/* Status Indicators */
.status-open {
    color: var(--ism-success);
    font-weight: bold;
}

.status-closed {
    color: var(--ism-error);
    font-weight: bold;
}

/* Messages */
.error {
    color: var(--ism-error);
    margin-bottom: 20px;
    padding: 15px;
    background: #fef2f2;
    border-radius: 8px;
    border: 1px solid var(--ism-error);
}

.success {
    color: var(--ism-success);
    margin-bottom: 20px;
    padding: 15px;
    background: #f0fdf4;
    border-radius: 8px;
    border: 1px solid var(--ism-success);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.modal h2 {
    color: var(--ism-blue);
    margin-bottom: 20px;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 30px;
    color: #6b7280;
    font-size: 12px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Reset Confirmation */
.reset-confirm {
    background: #fef3c7;
    border: 1px solid var(--ism-warning);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
}

.reset-confirm p {
    margin: 0 0 15px 0;
    color: var(--ism-dark);
}

/* Student ID Card */
.id-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
    border: 3px solid var(--ism-blue);
}

.id-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--ism-light);
}

.id-logo {
    max-width: 150px;
    margin-bottom: 15px;
}

.id-title {
    color: var(--ism-blue);
    margin: 0;
    font-size: 1.8em;
}

.id-subtitle {
    color: var(--ism-dark);
    margin: 5px 0 0 0;
    font-size: 1.1em;
}

.id-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 30px;
}

.id-photo {
    text-align: center;
}

.id-photo img {
    width: 150px;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--ism-blue);
}

.id-details {
    display: grid;
    gap: 10px;
}

.detail-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
}

.detail-label {
    font-weight: bold;
    color: var(--ism-blue);
}

.detail-value {
    color: var(--ism-dark);
}

.id-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--ism-light);
    color: #666;
    font-size: 0.9em;
}

/* Print Styles for ID Card */
@media print {
    body * {
        visibility: hidden;
    }
    .id-card, .id-card * {
        visibility: visible;
    }
    .id-card {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        border: none;
    }
    .no-print {
        display: none !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .id-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .id-photo img {
        width: 120px;
        height: 150px;
    }
}

/* Small screen adjustments */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-card p {
        font-size: 24px;
    }
    
    .logo-image {
        max-width: 150px;
    }
}