/* Allotment System Styling */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-bg: #f8f9fa;
}

body {
    background-color: var(--light-bg);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    color: #2c3e50;
    font-weight: 600;
}

.container-fluid {
    background-color: white;
    border-radius: 8px;
}

/* Card Styling */
.card {
    border: 1px solid #dee2e6;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.card-header {
    border-bottom: 2px solid #dee2e6;
    padding: 1rem;
    font-weight: 600;
    border-radius: 8px 8px 0 0 !important;
}

.card-body {
    padding: 1.5rem;
}

/* Form Styling */
.form-control,
.form-select {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Button Styling */
.btn {
    border-radius: 6px;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
}

/* Table Styling */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: #2c3e50;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Badge Styling */
.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Alert Styling */
.alert {
    border: none;
    border-radius: 8px;
    padding: 1.25rem;
    font-weight: 500;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

.alert-info {
    background-color: #cfe2ff;
    color: #084298;
}

/* Seat Grid Styling */
.seat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 0.75rem;
    padding: 1.5rem;
    background-color: var(--light-bg);
    border-radius: 8px;
}

.seat {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    user-select: none;
    border: 2px solid transparent;
}

.seat-available {
    background-color: #d4edda;
    color: #155724;
    border-color: #28a745;
}

.seat-available:hover {
    background-color: #c3e6cb;
    transform: scale(1.05);
}

.seat-occupied {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
    cursor: not-allowed;
    opacity: 0.7;
}

.seat-occupied:hover {
    opacity: 0.8;
}

.seat-indicator {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.seat-indicator.seat-available {
    background-color: #d4edda;
    border: 2px solid #28a745;
}

.seat-indicator.seat-occupied {
    background-color: #f8d7da;
    border: 2px solid #dc3545;
}

/* Tab Styling */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    transition: all 0.15s ease-in-out;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: #dee2e6;
    color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    background-color: transparent;
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-content {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
}

/* Background utilities */
.bg-light-success {
    background-color: #d1e7dd !important;
}

.bg-light-danger {
    background-color: #f8d7da !important;
}

/* Text utilities */
.text-white-50 {
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding: 1rem;
    }

    .seat-grid {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    }

    .card {
        margin-bottom: 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .table {
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Loading animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Print styles */
@media print {
    .btn,
    .nav-tabs,
    .form-control {
        display: none;
    }

    .card {
        page-break-inside: avoid;
    }
}
