/* ===========================
   Custom Styles for AMS
   =========================== */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar Styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

    .navbar-nav .nav-link:hover {
        transform: translateY(-2px);
    }

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);
    }

.card-header {
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
}

/* Button Styles */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,.15);
    }

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

    .btn-primary:hover {
        background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    }

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    border: none;
}

    .btn-success:hover {
        background: linear-gradient(135deg, #a8e063 0%, #56ab2f 100%);
    }

/* Form Styles */
.form-control,
.form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

    .form-control:focus,
    .form-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
    }

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Input Group Styles */
.input-group-text {
    border-radius: 8px 0 0 8px;
    border: 2px solid #e9ecef;
    background-color: #f8f9fa;
}

/* Badge Styles */
.badge {
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    border-radius: 6px;
}

/* Table Styles */
.table {
    border-radius: 10px;
    overflow: hidden;
}

    .table thead {
        background-color: #f8f9fa;
    }

.table-hover tbody tr {
    transition: all 0.3s ease;
}

    .table-hover tbody tr:hover {
        background-color: #f1f3f5;
        transform: scale(1.01);
    }

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

/* Progress Bar Styles */
.progress {
    border-radius: 10px;
    background-color: #e9ecef;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Footer Styles */
.footer {
    padding: 1.5rem 0;
    margin-top: auto;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Dashboard Statistics Cards */
.card.text-white .card-body {
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
}

/* Responsive Table */
.table-responsive {
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

/* Animation Classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Validation Error Styles */
.text-danger {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.input-validation-error {
    border-color: #dc3545 !important;
}

.field-validation-error {
    color: #dc3545;
    font-size: 0.875rem;
}

.validation-summary-errors {
    color: #dc3545;
}

/* Dropdown Menu Styles */
.dropdown-menu {
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,.12);
}

.dropdown-item {
    border-radius: 6px;
    margin: 0.25rem;
    transition: all 0.3s ease;
}

    .dropdown-item:hover {
        background-color: var(--primary-color);
        color: white;
        transform: translateX(5px);
    }

/* Status Badge Colors */
.status-present {
    background-color: #28a745;
    color: white;
}

.status-absent {
    background-color: #dc3545;
    color: white;
}

.status-late {
    background-color: #ffc107;
    color: #212529;
}

/* Attendance Table Row Colors */
.table tbody tr.table-success {
    background-color: #d4edda !important;
}

/* Card Statistics Hover Effect */
.card.text-white:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,.2);
}

/* Home Page Hero Section */
.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Feature Cards */
.card.shadow-sm {
    border: 1px solid #e9ecef;
}

    .card.shadow-sm:hover {
        border-color: var(--primary-color);
    }

/* Responsive Design */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.25rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .alert {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }

    body {
        background-color: white !important;
    }
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
