﻿/* ============================================
   BONGO STUDY ROOMS - MODERN RESPONSIVE THEME
   ============================================ */

/* ===== ROOT VARIABLES ===== */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ===== GLOBAL STYLES ===== */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-primary);
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== NAVBAR STYLES ===== */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.brand-text {
    background: linear-gradient(45deg, #fff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.9) !important;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    color: #fff !important;
}

/* ===== CARD STYLES ===== */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    background: white;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    padding: 1.5rem;
    border: none;
}

.card-body {
    padding: 2rem;
}

/* ===== BUTTON STYLES ===== */
.btn {
    border-radius: 0.5rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
}

/* ===== TABLE STYLES ===== */
.table {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.table thead th {
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem;
    font-size: 0.875rem;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
    transform: scale(1.01);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-color: var(--border-color);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(99, 102, 241, 0.02);
}

/* ===== FORM STYLES ===== */
.form-control {
    border-radius: 0.5rem;
    border: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.form-group {
    margin-bottom: 1.5rem;
}

.control-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: block;
}

/* ===== HEADING STYLES ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-primary);
}

.display-4 {
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.text-info {
    color: var(--primary-color) !important;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* ===== FOOTER STYLES ===== */
.footer {
    background: white;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
}

.footer a {
    transition: all 0.3s ease;
}

.footer a:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* ===== UTILITY CLASSES ===== */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

.bg-gradient {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.backgroundWhite {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Mobile First - Extra Small devices (portrait phones) */
@media (max-width: 575.98px) {
    html { font-size: 14px; }
    
    .navbar-brand { font-size: 1.25rem; }
    
    .card-header { 
        font-size: 1.25rem;
        padding: 1rem;
    }
    
    .card-body { padding: 1rem; }
    
    .btn { 
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .table { font-size: 0.875rem; }
    
    .table thead th,
    .table tbody td {
        padding: 0.5rem;
    }
    
    .display-4 { font-size: 2rem; }
    
    .container-fluid { padding-left: 1rem; padding-right: 1rem; }
}

/* Small devices (landscape phones) */
@media (min-width: 576px) and (max-width: 767.98px) {
    html { font-size: 15px; }
    
    .table { font-size: 0.9rem; }
    
    .btn { width: auto; }
}

/* Medium devices (tablets) */
@media (min-width: 768px) and (max-width: 991.98px) {
    html { font-size: 16px; }
    
    .card-body { padding: 1.5rem; }
}

/* Large devices (desktops) */
@media (min-width: 992px) {
    html { font-size: 16px; }
    
    .container-fluid {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* Extra large devices (large desktops) */
@media (min-width: 1200px) {
    .container-fluid {
        max-width: 1600px;
    }
}

/* ===== TABLE RESPONSIVE WRAPPER ===== */
.table-responsive {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* Mobile table optimization */
@media (max-width: 767.98px) {
    .table-responsive {
        border: none;
        box-shadow: none;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border-radius: 0.5rem;
        box-shadow: var(--shadow-sm);
        background: white;
    }
    
    .table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        border: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .table tbody td:last-child {
        border-bottom: none;
    }
    
    .table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-primary);
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card, .table, form {
    animation: fadeIn 0.5s ease-out;
}

/* ===== ACCESSIBILITY ===== */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar, .footer, .btn { display: none; }
    body { background: white; }
    .card, .table { box-shadow: none; }
}

/* ===== TEXT UTILITIES ===== */
.text-danger { color: var(--danger-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-muted { color: var(--text-secondary) !important; }
