:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --background: #f9fafb;
    --card-bg: #ffffff;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --border-color: #e5e7eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    background-color: var(--background);
    color: var(--text-primary);
    position: relative;
    overflow-x: hidden;
}

/* Mobile: smooth jump to in-page sections via anchor/button links */
@media (max-width: 768px) {
    html {
        scroll-behavior: smooth;
    }

    /* Keeps anchored sections visible below sticky/top bars */
    [id] {
        scroll-margin-top: 88px;
    }
}

/* Blurred logos background (applies across the site) */
body::before,
body::after {
    content: '';
    position: fixed;
    z-index: -1;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    filter: blur(26px);
    opacity: 0.06;
}

body::before {
    top: -120px;
    left: -80px;
    width: 380px;
    height: 380px;
    background-image: url('/images/brtilogo.png');
}

body::after {
    bottom: -140px;
    right: -120px;
    width: 460px;
    height: 460px;
    background-image: url('/images/logo.png');
}

/* Navigation Styles */
.navbar {
    background-color: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-title {
    font-size: 1.5rem;
    margin: 0;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: var(--background);
}

.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.1);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Form Layout */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group.half {
    flex: 1;
    margin-bottom: 0;
}

/* Events Table Styles */
.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-box {
    flex: 1;
}

.search-box input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.filter-options {
    display: flex;
    gap: 1rem;
}

.filter-options select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 150px;
}

.reset-btn {
    padding: 0.5rem 1rem;
    background-color: var(--text-secondary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.reset-btn:hover {
    background-color: var(--text-primary);
}

.events-table-container {
    background-color: var(--card-bg);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

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

.events-table th,
.events-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.events-table th {
    background-color: var(--background);
    font-weight: 500;
    color: var(--text-secondary);
}

.events-table tr:last-child td {
    border-bottom: none;
}

.events-table tbody tr:hover {
    background-color: var(--background);
}

h1 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.booking-form {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

input[type="text"],
input[type="date"],
input[type="time"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: var(--background);
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    width: 100%;
    transition: all 0.2s ease;
}

.submit-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(0);
}

.recent-bookings {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.bookings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.booking-card {
    background-color: var(--background);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.booking-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.booking-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.booking-card p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.booking-card p strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .container {
        margin: 1rem auto;
        padding: 0 1rem;
    }
    
    .booking-form,
    .recent-bookings {
        padding: 1rem;
    }
    
    .bookings-grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    /* Navigation */
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .nav-link {
        text-align: center;
        padding: 0.75rem;
    }
    
    /* Form Layout */
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group.half {
        margin-bottom: 1.5rem;
    }
    
    /* Equipment Options */
    .equipment-options {
        flex-direction: column;
        gap: 1rem;
    }
    
    .equipment-group {
        margin-bottom: 1rem;
    }
    
    /* Radio Group */
    .radio-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Search and Filters */
    .search-filters {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-options {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-options select {
        width: 100%;
    }
    
    /* Events Header */
    .events-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Tables */
    .events-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .events-table {
        min-width: 600px;
    }
    
    .events-table th,
    .events-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Admin Actions */
    .admin-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Modal */
    .modal-content {
        width: 95%;
        margin: 1rem auto;
        padding: 1.5rem;
        max-height: 95vh;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    /* Dashboard Navigation */
    .dashboard-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .dashboard-nav-item {
        text-align: center;
        padding: 1rem;
    }
    
    /* Inventory Grid */
    .inventory-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .inventory-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    /* Quick Actions */
    .quick-actions-panel {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .quick-action-card {
        padding: 1rem;
    }
    
    .quick-action-card i {
        font-size: 1.5rem;
    }
    
    /* Activity Items */
    .activity-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .activity-icon {
        align-self: center;
    }
    
    .activity-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    /* Search Filter Section */
    .search-filter-section {
        padding: 0.75rem;
    }
    
    .search-box {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-btn {
        width: 100%;
    }
    
    .clear-filters-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    .booking-form,
    .recent-bookings {
        padding: 0.75rem;
    }
    
    .nav-title {
        font-size: 1.1rem;
    }
    
    .nav-logo {
        height: 25px;
    }
    
    .events-table th,
    .events-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
    
    .modal-content {
        width: 98%;
        margin: 0.5rem auto;
        padding: 1rem;
    }
    
    .quick-actions-panel {
        grid-template-columns: 1fr;
    }
    
    .inventory-card {
        padding: 1rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .equipment-group h4 {
        font-size: 0.9rem;
    }
    
    .checkbox-label {
        font-size: 0.875rem;
    }
    
    .calendar-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .export-btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .action-btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .nav-links {
        flex-direction: row;
        gap: 1rem;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
    }
    
    .modal-content {
        max-height: 90vh;
    }
    
    .dashboard-nav {
        flex-direction: row;
        gap: 1rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .nav-link,
    .action-btn,
    .submit-btn,
    .calendar-btn,
    .export-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .checkbox-label,
    .radio-label {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .events-table-container {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
}

.message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.message.success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.close-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.close-btn:hover {
    opacity: 1;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.export-dropdown {
    position: relative;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.dropdown-arrow {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s ease;
}

.export-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 10;
    min-width: 180px;
}

.export-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.export-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.export-option:first-child {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.export-option:last-child {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.export-option:hover {
    background-color: var(--background);
}

.format-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-secondary);
}

.export-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.events-section {
    margin-bottom: 2rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    overflow: hidden;
}

.events-section h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}

.events-section table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.events-section th,
.events-section td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.events-section th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.events-section tr:hover {
    background-color: #f8f9fa;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .events-section {
        padding: 1rem;
    }

    .events-section table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .events-section th,
    .events-section td {
        min-width: 120px;
    }

    .events-section th:first-child,
    .events-section td:first-child {
        position: sticky;
        left: 0;
        background: white;
        z-index: 1;
    }

    .events-section th:first-child {
        background: #f8f9fa;
    }

    /* Add visual indicator for scrollable content */
    .events-section::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 30px;
        background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.1));
        pointer-events: none;
    }

    /* Adjust header actions for mobile */
    .header-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .search-filters {
        width: 100%;
    }

    .filter-options {
        flex-direction: column;
    }

    .filter-options select {
        width: 100%;
    }

    .export-dropdown {
        width: 100%;
    }

    .export-btn {
        width: 100%;
    }
}

/* Add smooth scrolling for touch devices */
@media (hover: none) {
    .events-section table {
        scroll-behavior: smooth;
    }
}

/* Add some spacing between the tables */
.events-section + .events-section {
    margin-top: 2rem;
}

/* Style past events with slightly muted colors */
#pastEventsTableBody tr {
    color: #6b7280;
}

#pastEventsTableBody tr:hover {
    background-color: #f9fafb;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

#dateRangeInput {
    display: none;
    margin-top: 1rem;
}

#dateRangeInput .form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
}

#dateRangeInput .form-group.half {
    flex: 1;
    margin-bottom: 0;
}

#dateRangeInput input[type="date"] {
    width: 100%;
}

#dateRangeInput .form-group:last-child {
    margin-bottom: 0;
}

.equipment-options {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.equipment-group {
    flex: 1;
}

.equipment-group h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1rem;
}

.checkbox-label {
    display: block;
    margin-bottom: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Update form validation for checkboxes */
.form-group:has(.equipment-options) input:invalid {
    border-color: #dc3545;
}

.form-group:has(.equipment-options) input:valid {
    border-color: #28a745;
}

/* Sidebar user block: icon + first / last name (user + admin sidebars) */
.sidebar-user-header {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    color: #fff;
}
.sidebar-user-icon {
    font-size: 1.85rem;
    line-height: 1;
    opacity: 0.95;
    flex-shrink: 0;
}
.sidebar-user-names {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
    line-height: 1.25;
}
.sidebar-user-first {
    font-size: 1rem;
    font-weight: 800;
    opacity: 0.98;
    word-break: break-word;
}
.sidebar-user-last {
    font-size: 0.92rem;
    font-weight: 600;
    opacity: 0.88;
    word-break: break-word;
}
.sidebar-user-fallback {
    font-weight: 800;
}
.sidebar-brand {
    margin-bottom: 1.25rem;
}
.user-sidebar .sidebar-brand {
    margin-bottom: 1.25rem;
}
.dashboard-nav-user {
    margin-bottom: 0.85rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    flex-shrink: 0;
} 