/* Main Styles for Dormitory Booking System */
/* Boromarajonani College of Nursing, Nakhon Si Thammarat */

: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;
}

body {
    font-family: 'Sarabun', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Header Styles */
.navbar-brand img {
    max-height: 50px;
}

.navbar.bg-primary {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Card Styles */
.card {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.card.shadow-sm:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

/* Button Styles */
.btn {
    border-radius: 5px;
    padding: 8px 16px;
    transition: all 0.3s;
}

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

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

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

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 5px;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    transition: border-color 0.3s;
}

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

.form-floating label {
    padding: 1rem 1.25rem;
}

.form-floating > .form-control, .form-floating > .form-select {
    height: calc(3.5rem + 2px);
    padding: 1rem 0.75rem;
}

/* Table Styles */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    vertical-align: middle;
    border-color: #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.table th {
    font-weight: 600;
    padding: 12px;
}

.table td {
    padding: 12px;
}

/* Badge Styles */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
}

/* Dormitory Room and Bed Styles */
.room-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.room-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.room-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.bed-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.bed-item {
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
}

.bed-item.available {
    border-color: var(--success-color);
    background-color: rgba(25, 135, 84, 0.1);
}

.bed-item.occupied {
    border-color: var(--danger-color);
    background-color: rgba(220, 53, 69, 0.1);
}

.bed-item.maintenance {
    border-color: var(--warning-color);
    background-color: rgba(255, 193, 7, 0.1);
}

.bed-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* Admin Dashboard Styles */
.admin-sidebar {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
}

.admin-sidebar .nav-link {
    color: #333;
    padding: 10px 20px;
    border-radius: 0;
    transition: all 0.3s;
}

.admin-sidebar .nav-link:hover {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
}

.admin-sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.admin-sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.stats-card {
    border-radius: 10px;
    overflow: hidden;
    padding: 20px;
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s;
}

.stats-card:hover {
    transform: translateY(-5px);
}

.stats-card .stats-icon {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 3rem;
    opacity: 0.3;
}

/* Footer Styles */
footer {
    background-color: #343a40;
    color: white;
    padding: 30px 0;
    margin-top: 40px;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

footer a:hover {
    color: white;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .room-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .bed-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .room-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .bed-container {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
    
    .stats-card {
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .room-list, .bed-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .admin-sidebar {
        margin-bottom: 20px;
    }
}

/* Utility Classes */
.border-0 {
    border: 0 !important;
}

.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;
}

.shadow {
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
}

.rounded-lg {
    border-radius: 0.5rem !important;
}

/* Thai Font Specifics */
.th-font {
    font-family: 'Sarabun', sans-serif !important;
}

/* Special animations */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}