/* ===============================================================
   E-Room 2026 — VIP Hotel Booking Style (Redesign)
   PHP 8.4 + Bootstrap 5 | มหาวิทยาลัยนครพนม
   =============================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Luxury Palette */
    --npu-primary: #0b4582;
    --npu-primary-light: #1b6cb7;
    --npu-accent: #f5b041;
    /* Warm Vibrant Gold */
    --npu-accent-hover: #d68910;
    --npu-bg: #f8f9fa;
    --npu-card: rgba(255, 255, 255, 0.95);
    --npu-text: #2d3748;
    --npu-heading: #1a202c;
    --npu-muted: #718096;

    /* Layout & Box Settings */
    --npu-radius: 18px;
    --npu-shadow-soft: 0 10px 40px -10px rgba(11, 69, 130, 0.12);
    --npu-shadow-hover: 0 20px 50px -15px rgba(11, 69, 130, 0.22);

    /* Typography */
    --font-th: 'Noto Sans Thai', sans-serif;
    --font-en: 'Outfit', sans-serif;
}

/* ---- BASE ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-th);
    background: var(--npu-bg);
    color: var(--npu-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-main,
.fc-toolbar-title {
    font-family: var(--font-en);
    color: var(--npu-heading);
    letter-spacing: -0.02em;
}

/* ---- BRAND HEADER / HERO ---- */
.brand-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 480px;
    background: linear-gradient(145deg, var(--npu-primary) 0%, var(--npu-primary-light) 60%, rgba(212, 175, 55, 0.1) 100%);
    box-shadow: inset 0 -30px 80px rgba(0, 0, 0, 0.2);
    z-index: -1;
    overflow: hidden;
}

/* Subtle glow effect behind the header */
.brand-header::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    top: -200px;
    right: -100px;
    border-radius: 50%;
}

#pageWrapper {
    flex: 1;
    padding-bottom: 3rem;
    padding-top: 1.5rem;
    /* Removed z-index: 1; to prevent stacking context bug that traps transparent modal backdrops */
}

/* ---- NAVBAR ---- */
#mainNav {
    background: transparent;
    box-shadow: none;
    padding: 1.5rem 0;
    position: relative;
    z-index: 1030;
}

.navbar-logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--npu-accent), #f9d976);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--npu-primary);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

.brand-main {
    font-size: 1.45rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.brand-sub {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: -4px;
    font-weight: 300;
}

#mainNav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s ease;
    padding: 0.65rem 1.25rem;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.95rem;
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
    color: var(--npu-accent) !important;
    background: rgba(255, 255, 255, 0.1);
}

/* Luxury Login Button in Header */
#mainNav .btn-warning {
    background: linear-gradient(135deg, var(--npu-accent), #f9d976) !important;
    border: none !important;
    color: var(--npu-primary) !important;
    border-radius: 30px;
    padding: 0.65rem 1.75rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#mainNav .btn-warning:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.5);
    background: #f9d976 !important;
}

/* ---- GLASSMORPHISM CARDS ---- */
.card {
    background: var(--npu-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: var(--npu-radius);
    box-shadow: var(--npu-shadow-soft);
    margin-bottom: 2.5rem;
    transition: all 0.4s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--npu-shadow-hover);
    transform: translateY(-2px);
}

.card-header {
    border-radius: var(--npu-radius) var(--npu-radius) 0 0 !important;
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--npu-primary);
    padding: 1.5rem 2rem;
    font-family: var(--font-en);
    font-weight: 600;
    font-size: 1.15rem;
}

/* Form Controls */
.form-control,
.form-select {
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    transition: all 0.2s ease;
    font-family: var(--font-th);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--npu-accent);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
    background-color: #ffffff;
}

/* Buttons global override */
.btn {
    border-radius: 12px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--npu-primary);
    border-color: var(--npu-primary);
    box-shadow: 0 4px 12px rgba(10, 25, 47, 0.2);
}

.btn-primary:hover {
    background-color: var(--npu-primary-light);
    border-color: var(--npu-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(10, 25, 47, 0.3);
}

/* ---- FOOTER ---- */
.footer {
    background: transparent;
    color: var(--npu-muted);
    padding: 1.5rem 0;
    font-size: 0.9rem;
    margin-top: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ---- PAGE TITLE ---- */
.page-title {
    font-family: var(--font-en);
    font-size: 1.8rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 2rem !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.page-title-dark {
    color: var(--npu-heading);
    text-shadow: none;
}

/* ---- CALENDAR OVERRIDES ---- */
.calendar-card {
    border-radius: var(--npu-radius);
    padding: 1.5rem;
}

#calendar {
    min-height: 700px;
    font-family: var(--font-th);
}

.fc .fc-toolbar-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--npu-heading);
}

.fc .fc-button {
    border-radius: 10px !important;
    background: var(--npu-primary) !important;
    border-color: var(--npu-primary) !important;
    color: #fff;
    font-weight: 500;
    text-transform: capitalize;
    padding: 0.5rem 1rem;
    transition: all 0.3s;
}

.fc .fc-button:hover {
    background: var(--npu-primary-light) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 25, 47, 0.2);
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background-color: var(--npu-accent) !important;
    border-color: var(--npu-accent) !important;
    color: var(--npu-primary) !important;
}

.fc-event {
    cursor: pointer;
    border-radius: 8px !important;
    font-size: 0.85rem;
    padding: 2px 6px;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.fc-event:hover {
    transform: scale(1.02);
}

.fc-theme-standard td,
.fc-theme-standard th {
    border-color: rgba(0, 0, 0, 0.06);
}

.fc-col-header-cell {
    padding: 12px 0 !important;
    background: #f8fafc;
}

.fc-day-today {
    background-color: rgba(212, 175, 55, 0.05) !important;
}

/* ---- ROOM CARDS (Booking.com style) ---- */
.room-card {
    border-radius: var(--npu-radius);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
    box-shadow: var(--npu-shadow-soft);
}

.room-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--npu-shadow-hover) !important;
}

.room-card-header {
    height: 70px;
    border-radius: var(--npu-radius) var(--npu-radius) 0 0;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    background: var(--npu-primary);
}

.room-type-badge {
    background: var(--npu-accent);
    color: var(--npu-primary);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
}

.equipment-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.equip-chip {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    color: var(--npu-text);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

/* ---- ROOM DETAIL HERO ---- */
.room-detail-header {
    border-radius: var(--npu-radius) var(--npu-radius) 0 0;
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--npu-primary), var(--npu-primary-light));
    color: white;
}

.info-block {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 1rem;
    color: #4a5568;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 1rem;
}

/* ---- AUTH PAGE (Luxury login) ---- */
.auth-wrapper {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
}

.auth-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 60px -10px rgba(10, 25, 47, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.auth-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--npu-primary), var(--npu-accent));
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fff;
    margin: 0 auto 1.5rem auto;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

/* ---- ADMIN DASHBOARD ---- */
.stat-card {
    border-radius: var(--npu-radius);
    box-shadow: var(--npu-shadow-soft);
    background: white;
    border: none;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
}

.admin-menu-card {
    border-radius: var(--npu-radius);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    color: var(--npu-text) !important;
    border: 1px solid #e2e8f0;
    background: white;
    box-shadow: var(--npu-shadow-soft);
}

.admin-menu-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--npu-shadow-hover) !important;
    border-color: var(--npu-accent);
}

.admin-menu-icon {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    color: var(--npu-primary);
}

.admin-menu-card:hover .admin-menu-icon {
    transform: scale(1.2) rotate(5deg);
    color: var(--npu-accent);
}

/* Custom Table Styles for Admin */
.table {
    border-spacing: 0 10px;
    border-collapse: separate;
}

.table thead th {
    background-color: #f1f5f9;
    border: none;
    font-weight: 600;
    color: var(--npu-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
}

.table tbody tr {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    border-radius: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.table tbody td {
    padding: 16px;
    border-top: 1px solid #f1f5f9 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle;
}

.table tbody td:first-child {
    border-left: 1px solid #f1f5f9;
    border-radius: 10px 0 0 10px;
}

.table tbody td:last-child {
    border-right: 1px solid #f1f5f9;
    border-radius: 0 10px 10px 0;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 576px) {
    .auth-card {
        padding: 2rem;
    }

    .page-title {
        font-size: 1.4rem;
    }

    .brand-header {
        height: 350px;
    }
}