/**
 * Modern Online Meeting Room Booking System - Style System
 * Design: Modern SaaS, Colorful & Clean, Glassmorphism, Micro-interactions
 */

@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Brand & Accent Colors */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --primary-focus: rgba(79, 70, 229, 0.2);
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
    --primary-glow: 0 4px 14px 0 rgba(79, 70, 229, 0.35);

    --secondary: #64748b;
    --secondary-hover: #475569;
    --secondary-light: #f1f5f9;

    --success: #10b981;
    --success-hover: #059669;
    --success-light: #ecfdf5;
    --success-text: #065f46;
    --success-border: #a7f3d0;
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --success-glow: 0 4px 12px 0 rgba(16, 185, 129, 0.3);

    --warning: #f59e0b;
    --warning-hover: #d97706;
    --warning-light: #fffbeb;
    --warning-text: #92400e;
    --warning-border: #fde68a;
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);

    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: #fff1f2;
    --danger-text: #991b1b;
    --danger-border: #fecdd3;
    --danger-gradient: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);

    --info: #06b6d4;
    --info-light: #ecfeff;
    --purple: #8b5cf6;
    --purple-light: #f5f3ff;

    /* Background & Surfaces */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.9);
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --border-focus: #6366f1;

    /* Typography */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    /* Rounded Corners */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 25px -4px rgba(15, 23, 42, 0.06), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
    --shadow-xl: 0 20px 35px -5px rgba(15, 23, 42, 0.09), 0 8px 16px -6px rgba(15, 23, 42, 0.04);

    --font-thai: 'Prompt', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-en: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-thai);
    background-color: var(--bg-main);
    /* Subtle ambient mesh background with modern colorful glow */
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.07) 0px, transparent 45%),
        radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.06) 0px, transparent 45%),
        radial-gradient(at 50% 100%, rgba(236, 72, 153, 0.03) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
a:hover {
    color: var(--primary-hover);
}

/* Layout Container */
.container {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header & Navbar (Glassmorphic) */
.site-header {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.03);
    transition: all 0.3s ease;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* Brand Logo */
.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}
.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    color: #ffffff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    transition: transform 0.2s ease;
}
.brand:hover .brand-icon {
    transform: scale(1.05) rotate(-2deg);
}
.brand-text {
    display: flex;
    flex-direction: column;
}
.brand-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.brand-sub {
    font-size: 0.75rem;
    font-weight: 400;
    color: #64748b;
}

/* Nav Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    list-style: none;
}
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.95rem;
    border-radius: var(--radius-full);
    font-weight: 500;
    color: #475569;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    position: relative;
}
.nav-link:hover {
    color: var(--primary);
    background-color: var(--primary-light);
    transform: translateY(-1px);
}
.nav-link.active {
    color: #4338ca;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.12);
}

/* Notification Badges on Nav */
.badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.48rem;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    border-radius: var(--radius-full);
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
}
.pulse-badge {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .88; transform: scale(1.1); }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* User Profile Menu */
.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.85rem 0.35rem 0.45rem;
    background: #ffffff;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.user-menu-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}
.user-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #334155;
    cursor: pointer;
    padding: 0.5rem;
}

/* Main Content Area */
.main-wrapper {
    flex: 1;
    padding: 1.8rem 0 3.5rem;
}

/* Hero & Announcement Banner */
.announcement-banner {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 1rem 1.4rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: var(--shadow-xs);
}

/* Cards & Glass Containers */
.card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
}
.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
}
.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    line-height: 1.4;
    text-decoration: none;
    box-shadow: var(--shadow-xs);
}
.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff !important;
    box-shadow: var(--primary-glow);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #1d4ed8 100%);
    box-shadow: 0 6px 18px 0 rgba(79, 70, 229, 0.42);
    transform: translateY(-1.5px);
}
.btn-primary:active {
    transform: translateY(0);
}
.btn-success {
    background: var(--success-gradient);
    color: #ffffff !important;
    box-shadow: var(--success-glow);
}
.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    transform: translateY(-1.5px);
}
.btn-danger {
    background: var(--danger-gradient);
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
    transform: translateY(-1.5px);
}
.btn-secondary {
    background: #f8fafc;
    color: #475569;
    border-color: #cbd5e1;
    box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}
.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}
.btn-lg {
    padding: 0.85rem 1.65rem;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
}

/* Modern Status Badges (SaaS Pill Tags) */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    white-space: nowrap;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: transform 0.15s ease;
}
.status-badge:hover {
    transform: translateY(-0.5px);
}
.status-badge::before {
    display: none;
}
.status-badge i {
    font-size: 0.78rem;
}
.badge-pending {
    background-color: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}
.badge-approved {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.badge-rejected {
    background-color: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}
.badge-canceled {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* Room Legend Pill Badges on index.php */
.room-legend-pill {
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}
.room-legend-pill:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2) !important;
}
.room-legend-pill:active {
    transform: translateY(0) scale(0.98);
}

/* Room Cards Grid (rooms.php) */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}
.room-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(226, 232, 240, 0.85);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.room-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: #cbd5e1;
}
.room-image-wrap {
    height: 195px;
    position: relative;
    overflow: hidden;
    background: #f1f5f9;
}
.room-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.room-card:hover .room-image-wrap img {
    transform: scale(1.07);
}
.room-color-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.22);
}
.room-capacity-tag {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.8);
    color: #ffffff;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 500;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.room-card-content {
    padding: 1.35rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.room-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.4rem;
}
.room-location {
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.room-detail {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.55;
    margin-bottom: 1.2rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.room-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.25rem;
}
.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.45rem;
}
.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}
.form-control, .form-select {
    width: 100%;
    padding: 0.65rem 0.95rem;
    font-size: 0.92rem;
    font-family: inherit;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: #ffffff;
    color: #0f172a;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xs);
}
.form-control:focus, .form-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}
.form-control::placeholder {
    color: #94a3b8;
}
textarea.form-control {
    min-height: 90px;
    resize: vertical;
}

/* Custom Checkboxes */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 0.75rem;
}
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xs);
    user-select: none;
    font-size: 0.88rem;
    color: #334155;
}
.checkbox-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.checkbox-item:has(input:checked) {
    background: #f5f3ff;
    border-color: #a5b4fc;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
    color: #0f172a;
    font-weight: 500;
}
.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    border-radius: 4px;
}

/* Amenity Badges (rooms.php) */
.badge-amenity {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.65rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: #475569;
    font-weight: 500;
    transition: all 0.15s ease;
}
.badge-amenity:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Data Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    padding: 0.9rem 1.1rem;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}
.table td {
    padding: 0.95rem 1.1rem;
    border-bottom: 1px solid var(--border-color);
    color: #0f172a;
    vertical-align: middle;
}
.table tbody tr {
    transition: background-color 0.15s ease;
}
.table tbody tr:hover {
    background-color: #f8fafc;
}

/* Modern Segmented Tabs */
.tabs {
    display: inline-flex;
    gap: 0.35rem;
    background: #f1f5f9;
    padding: 0.3rem;
    border-radius: var(--radius-full);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    max-width: 100%;
}
.tab-btn {
    padding: 0.5rem 1.15rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    text-decoration: none;
}
.tab-btn:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.65);
}
.tab-btn.active {
    color: #ffffff !important;
    background: var(--primary-gradient);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28);
}
.tab-btn.active i {
    color: #ffffff !important;
}

/* FullCalendar Modern Theme */
#calendar {
    background: #ffffff;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
}
.fc .fc-toolbar {
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1.5rem !important;
}
.fc .fc-toolbar-title {
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    letter-spacing: -0.01em;
}
.fc .fc-button {
    font-family: inherit !important;
    font-size: 0.88rem !important;
    padding: 0.48rem 0.95rem !important;
    border-radius: var(--radius-md) !important;
    text-transform: capitalize !important;
    box-shadow: none !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}
.fc .fc-button-primary {
    background-color: #ffffff !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
}
.fc .fc-button-primary:hover {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
    transform: translateY(-1px);
}
.fc .fc-button-primary:disabled {
    background-color: #f8fafc !important;
    color: #94a3b8 !important;
    border-color: #e2e8f0 !important;
    transform: none !important;
}
.fc .fc-button-active {
    background: var(--primary-gradient) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.3) !important;
}

/* Calendar Grid & Days - Modern Subtle Backgrounds & Colors */
.fc .fc-scrollgrid {
    border-radius: var(--radius-md) !important;
    overflow: hidden;
    border: 1px solid #e2e8f0 !important;
}
.fc-theme-standard th {
    background: #f8fafc !important;
    padding: 10px 0 !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    color: #475569 !important;
    border-color: #e2e8f0 !important;
}
.fc .fc-col-header-cell.fc-day-sun {
    color: #e11d48 !important;
    background: #fff1f2 !important;
}
.fc .fc-col-header-cell.fc-day-sat {
    color: #7c3aed !important;
    background: #f5f3ff !important;
}

.fc-theme-standard td {
    border-color: #e2e8f0 !important;
}

/* Day cell base background (สีพื้นหลังจางๆ สไตล์โมเดิร์น) */
.fc .fc-daygrid-day {
    background-color: #f8fafc;
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.fc .fc-daygrid-day-frame {
    background: transparent !important;
}

/* Weekday Cells (วันจันทร์ - วันศุกร์: พื้นสีจางสะอาดตา) */
.fc .fc-daygrid-day.fc-day-mon,
.fc .fc-daygrid-day.fc-day-tue,
.fc .fc-daygrid-day.fc-day-wed,
.fc .fc-daygrid-day.fc-day-thu,
.fc .fc-daygrid-day.fc-day-fri {
    background-color: #fbfcfe;
}
.fc .fc-daygrid-day.fc-day-mon:hover,
.fc .fc-daygrid-day.fc-day-tue:hover,
.fc .fc-daygrid-day.fc-day-wed:hover,
.fc .fc-daygrid-day.fc-day-thu:hover,
.fc .fc-daygrid-day.fc-day-fri:hover {
    background-color: #eef2ff !important;
}

/* Sunday Cell (วันอาทิตย์: สีชมพู/แดงพาสเทลจางๆ) */
.fc .fc-daygrid-day.fc-day-sun {
    background-color: rgba(254, 242, 242, 0.5) !important;
}
.fc .fc-daygrid-day.fc-day-sun:hover {
    background-color: rgba(254, 226, 226, 0.75) !important;
}
.fc .fc-daygrid-day.fc-day-sun .fc-daygrid-day-number {
    color: #e11d48 !important;
}

/* Saturday Cell (วันเสาร์: สีม่วงพาสเทลจางๆ) */
.fc .fc-daygrid-day.fc-day-sat {
    background-color: rgba(245, 243, 255, 0.5) !important;
}
.fc .fc-daygrid-day.fc-day-sat:hover {
    background-color: rgba(237, 233, 254, 0.75) !important;
}
.fc .fc-daygrid-day.fc-day-sat .fc-daygrid-day-number {
    color: #7c3aed !important;
}

/* Today Cell (วันปัจจุบัน: ไฮไลท์เรืองแสงสี Indigo) */
.fc .fc-daygrid-day.fc-day-today {
    background: linear-gradient(135deg, rgba(238, 242, 255, 0.95) 0%, rgba(224, 231, 255, 0.7) 100%) !important;
    box-shadow: inset 0 0 0 1.5px #818cf8;
}
.fc .fc-daygrid-day.fc-day-today:hover {
    background: linear-gradient(135deg, rgba(224, 231, 255, 0.95) 0%, rgba(199, 210, 254, 0.8) 100%) !important;
}
.fc .fc-day-today .fc-daygrid-day-number {
    background: #4f46e5 !important;
    color: #ffffff !important;
    border-radius: 9999px;
    min-width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700 !important;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35);
    margin: 3px 5px;
    padding: 0 6px !important;
}

/* Days of Other Months (วันที่ของเดือนอื่น: สีเทาจางนุ่มนวล) */
.fc .fc-daygrid-day.fc-day-other {
    background-color: #f1f5f9 !important;
    opacity: 0.5;
}
.fc .fc-daygrid-day.fc-day-other .fc-daygrid-day-number {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}
.fc .fc-daygrid-day.fc-day-other:hover {
    background-color: #e2e8f0 !important;
    opacity: 0.75;
}

/* Day Numbers & Top bar */
.fc .fc-daygrid-day-top {
    padding: 4px 6px 2px !important;
}
.fc .fc-daygrid-day-number {
    font-size: 0.86rem !important;
    font-weight: 600 !important;
    color: #334155;
    padding: 2px 6px !important;
    border-radius: 6px;
    line-height: 1.4;
}

/* TimeGrid (สัปดาห์ / วัน) subtle tints */
.fc .fc-timegrid-col.fc-day-sun {
    background-color: rgba(254, 242, 242, 0.25) !important;
}
.fc .fc-timegrid-col.fc-day-sat {
    background-color: rgba(245, 243, 255, 0.25) !important;
}
.fc .fc-timegrid-col.fc-day-today {
    background-color: rgba(238, 242, 255, 0.45) !important;
}

/* FullCalendar Events Styling */
.fc-event {
    cursor: pointer;
    font-size: 0.82rem !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fc-event:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Solid Full-day Block Events (แถบสีเต็มทั้งวัน) */
.fc .fc-daygrid-block-event {
    margin: 2px 0 !important;
    padding: 3.5px 7px !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    border: none !important;
    line-height: 1.35 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.fc .fc-daygrid-block-event .fc-event-title {
    font-weight: 500 !important;
}

/* Partial day Timed Dot Events (รายการจุดเวลา) */
.fc .fc-daygrid-dot-event {
    margin: 1.5px 0 !important;
    padding: 2.5px 5px !important;
    border-radius: 5px !important;
}
.fc .fc-daygrid-dot-event:hover {
    background-color: #f1f5f9 !important;
}
.fc .fc-daygrid-dot-event .fc-event-time {
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-right: 5px !important;
}
.fc .fc-daygrid-dot-event .fc-event-title {
    color: #334155 !important;
}

/* Conflict Alert Box */
.conflict-alert {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #991b1b;
    padding: 1rem 1.3rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    display: none;
    align-items: flex-start;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.modal-overlay.active {
    display: flex;
    opacity: 1;
}
.modal-box {
    background: #ffffff;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-overlay.active .modal-box {
    transform: translateY(0) scale(1);
}
.modal-header {
    padding: 1.35rem 1.6rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 10;
}
.modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
}
.modal-close {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}
.modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}
.modal-body {
    padding: 1.6rem;
}
.modal-footer {
    padding: 1.1rem 1.6rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #f8fafc;
}

/* Footer */
.site-footer {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 1.8rem 0;
    margin-top: auto;
    font-size: 0.88rem;
    color: #64748b;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.02);
}
.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Printable Voucher */
@media print {
    .site-header, .site-footer, .btn, .no-print {
        display: none !important;
    }
    body {
        background: #ffffff !important;
        font-size: 13pt;
        color: #000000;
    }
    .print-voucher {
        border: 1px solid #000000;
        padding: 2cm;
        margin: 0;
        width: 100%;
    }
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .navbar {
        height: 64px;
    }
    .mobile-toggle {
        display: block;
    }
    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 1rem 1.25rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-xl);
        display: none;
        gap: 0.5rem;
    }
    .nav-menu.show {
        display: flex;
    }
    .nav-link {
        width: 100%;
        padding: 0.75rem 1rem;
    }
    .brand-title {
        font-size: 0.95rem;
    }
    .brand-sub {
        display: none;
    }
}
