* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-grey: #555555;
    --box-white: rgba(255, 255, 255, 0.09);
    --gold: #FCB900;
    --gold-hover: #fff200;
    --text-light: #ffffff;
    --error-red: #ff4757;
}

body, html {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-light);
}

/* Background with soft-focus hotel reception */
body {
    background-image: linear-gradient(135deg, rgba(85, 85, 85, 0.7) 0%, rgba(85, 85, 85, 0.6) 100%), 
                      url('../app/images/background.png');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
}

/* Dashboard-specific background gradient */
.main-content.dashboard-main {
    background: linear-gradient(135deg, #000000 0%, #808080 100%) !important;
    background-attachment: fixed !important;
}

/* Header Banner */
.header {
    background: rgba(85, 85, 85, 0.95);
    padding: 0.75rem 2rem;
    border-bottom: 2px solid var(--gold);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    width: 100%;
}

.header .logo {
    width: 180px;
    height: 101.25px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.header-center {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0 2rem;
}

.header h1 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--gold);
    font-weight: 300;
    letter-spacing: 1px;
    line-height: 1;
}

.header .dashboard-subtitle {
    margin: 0;
    font-size: 1.8rem;
    color: var(--text-light);
    text-align: left;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
    flex-shrink: 0;
}

.username {
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
}

.header-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    flex-shrink: 0;
}

.header-logout:hover {
    background: #ff4757;
    border-color: #ff4757;
    transform: scale(1.05);
}

.header-logout svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}


/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2rem;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.login-box {
    background: var(--box-white);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.5),
        inset 1px 1px 2px rgba(255, 255, 255, 0.3),
        inset -1px -1px 2px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gold);
}

/* Error Messages */
.error-box {
    background: rgba(255, 71, 87, 0.15);
    border: 1px solid var(--error-red);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 1.5rem;
}

.error-box ul {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.error-box li {
    color: #ff9999;
    font-size: 0.9rem;
    margin-bottom: 6px;
    list-style: none;
}

.error-box li:before {
    content: "⚠ ";
    margin-right: 5px;
}

/* Form Styling */
p { margin-bottom: 1.5rem; }

label { 
    display: block; 
    margin-bottom: 0.5rem; 
    font-size: 0.9rem; 
    opacity: 0.9;
    font-weight: 500;
}

input[type="text"], 
input[type="password"] {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255,255,255,0.15);
    box-shadow: 0 0 10px rgba(252, 185, 0, 0.2);
}

.login-remember {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    cursor: pointer;
    opacity: 0.9;
}

.login-remember input { 
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* Button Styling */
.button-primary {
    width: 100%;
    padding: 12px;
    background: #555;
    color: #aaa;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: not-allowed;
    transition: all 0.3s ease;
    margin-top: 1rem;
    opacity: 0.6;
}

.button-primary.enabled {
    background: var(--gold);
    color: var(--bg-grey);
    cursor: pointer;
    opacity: 1;
    box-shadow: 0 4px 15px rgba(252, 185, 0, 0.3);
}

.button-primary.enabled:hover {
    background: var(--gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(252, 185, 0, 0.4);
}

.button-primary.enabled:active {
    transform: translateY(0);
}

.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.toggle-eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.2s;
    z-index: 2;
    background: none;
    border: none;
    padding: 5px;
}

.toggle-eye:hover {
    opacity: 1;
}

input[type="password"], 
input[type="text"] {
    padding-right: 45px !important; 
}

/* ============================================
   Dashboard Styles
   ============================================ */

.dashboard-main {
    display: block !important;
    flex: 1;
    padding: 3rem 2rem;
    justify-content: flex-start !important;
    align-items: stretch !important;
}

.dashboard-title-section {
    margin-bottom: 2rem;
    text-align: center;
}

.dashboard-title {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--gold);
    font-size: 2rem;
}

.dashboard-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.dashboard-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.logout-btn {
    background: #ff4757;
    color: white;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #ff3838;
    text-decoration: none;
}

.menu {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    justify-content: center;
}

.menu a,
.menu button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.menu a.active {
    background: var(--gold);
    color: var(--bg-grey);
    border-color: var(--gold);
}

.menu a:hover,
.menu button:hover {
    background: rgba(255, 255, 255, 0.15);
}

.menu .advanced {
    display: flex;
    gap: 0.5rem;
}

.menu.extended .advanced {
    display: flex;
}

.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
}

.columns {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.col {
    flex: 1 1 0;
    min-width: 0;
}

.col-2 {
    flex: 2 1 0;
}

.col-1 {
    flex: 1 1 0;
}

.panel {
    background: var(--box-white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

/* Panels earlier in DOM must outrank later panels so dropdowns overflow correctly */
.col-1 .panel:nth-child(1) { z-index: 3; }
.col-1 .panel:nth-child(2) { z-index: 2; }
.col-1 .panel:nth-child(3) { z-index: 1; }

.panel-title {
    color: var(--gold);
    padding: 0.5rem 0.75rem;
    font-size: 1.0rem;
    display: inline-block;
    margin-bottom: 1rem;
    font-weight: 600;
}

.panel h3 {
    color: var(--text-light);
    margin-top: 0;
}

select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

select:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.15);
}

select option {
    background: #555555;
    color: var(--text-light);
}

select option:hover {
    background: #666666;
    color: var(--text-light);
}

select option:checked {
    background: #333333;
    color: var(--text-light);
}

.panel-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 0;
}

.panel-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-light);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, border-color 0.2s;
    margin-bottom: -1px;
}

.panel-tab:hover {
    opacity: 1;
}

.panel-tab.active {
    opacity: 1;
    border-bottom-color: var(--gold);
    color: var(--gold);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Bookings table */
.bookings-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.25rem;
    font-size: 0.9rem;
}

.bookings-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    color: var(--gold);
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.bookings-table td {
    padding: 0.6rem 0.75rem;
    color: var(--text-light);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bookings-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

.bookings-table .bookings-empty {
    text-align: center;
    opacity: 0.5;
    font-style: italic;
    padding: 1.5rem;
}

.bookings-table td:last-child {
    width: 3rem;
    text-align: center;
}

.edit-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--text-light);
    opacity: 0.5;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, color 0.2s;
}

.edit-icon-btn:hover {
    opacity: 1;
    color: var(--gold);
}

.cancel-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--text-light);
    opacity: 0.5;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, color 0.2s;
}

.cancel-icon-btn:hover {
    opacity: 1;
    color: var(--gold);
}

/* Date picker */
.datepicker-container {
    position: relative;
}

.datepicker-toggle {
    width: 100%;
    max-width: 25%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.datepicker-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--gold);
}

.datepicker-popup {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
    z-index: 1000;
    width: 260px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.datepicker-popup.open {
    display: block;
}

.datepicker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.datepicker-month-label {
    color: var(--gold);
    font-weight: 600;
    font-size: 0.9rem;
}

.datepicker-nav {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 0.4rem;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.datepicker-nav:hover {
    opacity: 1;
}

.datepicker-grid,
.datepicker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.dp-dow {
    text-align: center;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
    padding: 0.2rem 0;
}

.dp-day {
    background: none;
    border: none;
    color: var(--text-light);
    border-radius: 4px;
    padding: 0.3rem;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s;
}

.dp-day:hover {
    background: rgba(255, 255, 255, 0.15);
}

.dp-day.today {
    border: 1px solid var(--gold);
    color: var(--gold);
}

.dp-day.selected {
    background: var(--gold);
    color: #000;
    font-weight: 600;
}

/* Dropdown container and toggle */
.dropdown-container {
    position: relative;
}

.dropdown-toggle {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.dropdown-toggle:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.15);
}

/* Dropdown list styling */
.dropdown-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
}

.dropdown-list.open {
    display: block;
}

.dropdown-list li {
    padding: 0.75rem;
    color: var(--text-light);
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1001;
}

.dropdown-list li:last-child {
    border-bottom: none;
}

.dropdown-list li.placeholder {
    cursor: default;
    background: rgba(255, 255, 255, 1.00);
    font-style: italic;
}

.dropdown-list li:not(.placeholder):hover {
    background: #413f3f;
}

/* Z-index layering for dropdowns */
#signage-select {
    z-index: 100 !important;
}

#room-select {
    z-index: 101 !important;
}

.panel-title {
    color: var(--gold);
    margin-top: 0;
}

.center {
    text-align: center;
}

.muted {
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
    }

    .dashboard-meta {
        flex-direction: column;
    }

    .col-2,
    .col-1 {
        flex: 1 1 100%;
    }
}

.toggle-eye svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Footer */
.footer {
    background: rgba(85, 85, 85, 0.95);
    padding: 1.5rem 2rem;
    border-top: 2px solid var(--gold);
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.8;
}

.footer p {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        display: none;
    }

    .login-box {
        max-width: 90%;
    }

    .main-content {
        padding: 2rem 1rem;
    }
}
