/*
 * School Management System - Custom Styles
 * Professional Modern Design
 */

/* ============================================
   BASE STYLES
   ============================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
    line-height: 1.5;
}

a {
    text-decoration: none;
}

/* ============================================
   LAYOUT
   ============================================ */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .page-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.page-title h1,
.page-title h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.page-title p {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
}

@media (min-width: 640px) {
    .page-title h1,
    .page-title h2 {
        font-size: 2rem;
    }
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.table-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.table-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid #f1f5f9;
}

/* Filter Card */
.filter-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid #e2e8f0;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-green {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-green:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-2px);
}

.btn-red {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    color: white;
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.3);
}

.btn-red:hover {
    background: linear-gradient(135deg, #e11d48, #be123c);
    transform: translateY(-2px);
}

.btn-purple {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    color: white;
}

.btn-purple:hover {
    background: linear-gradient(135deg, #9333ea, #7e22ce);
}

.btn-amber {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.btn-amber:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
}

.btn-sm {
    height: 40px;
    padding: 0 1rem;
    font-size: 0.875rem;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ============================================
   FORMS & FILTERS
   ============================================ */
.filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .filter-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.filter-item {
    display: flex;
    flex-direction: column;
}

.filter-label,
.form-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.5rem;
}

.filter-input,
.filter-select,
.form-input,
.form-select {
    width: 100%;
    height: 48px;
    padding: 0 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    background: #f8fafc;
    color: #1e293b;
    transition: all 0.2s ease;
}

.filter-input:focus,
.filter-select:focus,
.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

textarea.form-input {
    height: auto;
    min-height: 100px;
    padding: 1rem;
}

/* ============================================
   TABLES
   ============================================ */
.overflow-x-auto {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: linear-gradient(135deg, #1e293b, #334155);
}

.data-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    text-align: left;
    font-size: 0.95rem;
    color: #374151;
}

.data-table tbody tr {
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef9c3;
    color: #854d0e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-gray {
    background: #f3f4f6;
    color: #6b7280;
}

.badge-green { background: #dcfce7; color: #166534; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-great { background: #dcfce7; color: #166534; }
.badge-good { background: #dbeafe; color: #1e40af; }
.badge-normal { background: #fef9c3; color: #854d0e; }
.badge-bad { background: #fee2e2; color: #991b1b; }

/* ============================================
   ACTION LINKS
   ============================================ */
.action-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.action-link {
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.action-link-edit {
    color: #2563eb;
    background: #dbeafe;
}

.action-link-edit:hover {
    background: #bfdbfe;
}

.action-link-delete {
    color: #dc2626;
    background: #fee2e2;
    border: none;
}

.action-link-delete:hover {
    background: #fecaca;
}

.action-link-view {
    color: #059669;
    background: #d1fae5;
}

.action-link-view:hover {
    background: #a7f3d0;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border: 1px solid #86efac;
    color: #166534;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.alert-warning {
    background: linear-gradient(135deg, #fef9c3, #fef08a);
    border: 1px solid #fde047;
    color: #854d0e;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border: 1px solid #93c5fd;
    color: #1e40af;
}

/* ============================================
   STATS CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.stat-card {
    text-align: center;
    padding: 1.25rem;
    border-radius: 12px;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-total { background: linear-gradient(135deg, #dbeafe, #bfdbfe); border: 2px solid #93c5fd; }
.stat-present { background: linear-gradient(135deg, #dcfce7, #bbf7d0); border: 2px solid #86efac; }
.stat-absent { background: linear-gradient(135deg, #fee2e2, #fecaca); border: 2px solid #fca5a5; }
.stat-leave { background: linear-gradient(135deg, #fef9c3, #fef08a); border: 2px solid #fde047; }
.stat-unmarked { background: linear-gradient(135deg, #f3f4f6, #e5e7eb); border: 2px solid #d1d5db; }
.stat-green { background: linear-gradient(135deg, #dcfce7, #bbf7d0); border: 2px solid #86efac; }
.stat-red { background: linear-gradient(135deg, #fee2e2, #fecaca); border: 2px solid #fca5a5; }
.stat-blue { background: linear-gradient(135deg, #dbeafe, #bfdbfe); border: 2px solid #93c5fd; }
.stat-yellow { background: linear-gradient(135deg, #fef9c3, #fef08a); border: 2px solid #fde047; }

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
    color: #374151;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

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

.empty-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.empty-desc {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* ============================================
   BANNER
   ============================================ */
.date-banner {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    color: white;
    margin-bottom: 1.5rem;
}

.date-banner h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.date-banner p {
    opacity: 0.9;
    font-size: 1rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 1.5rem;
    margin-top: 3rem;
    text-align: center;
}

.footer p {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }

.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-900 { color: #111827; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
    .data-table th,
    .data-table td {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .action-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .action-link {
        width: 100%;
        text-align: center;
    }
    
    .page-title h1,
    .page-title h2 {
        font-size: 1.5rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body {
        background: #fff;
    }
    
    .no-print {
        display: none !important;
    }
    
    .card,
    .table-card,
    .filter-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}

