/* ============================================================
   Hotelman Web — Eclipse RCP Clone Theme
   ============================================================ */

/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 12px;
    color: #222;
    background: #f0f0f0;
}

/* ============================================================
   Layout: Sidebar + Content
   ============================================================ */
.app-layout {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 200px;
    min-width: 200px;
    background: #e8e8e8;
    border-right: 1px solid #b0b0b0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    padding: 10px 12px;
    background: #0066CC;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid #004c99;
}

.sidebar-nav {
    list-style: none;
    padding: 4px 0;
    flex: 1;
}

.sidebar-nav li {}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    color: #222;
    text-decoration: none;
    font-size: 12px;
    border-left: 3px solid transparent;
    transition: background 0.1s;
}

.sidebar-nav a:hover {
    background: #d4d4d4;
}

.sidebar-nav a.active {
    background: #cde0f7;
    border-left-color: #0066CC;
    font-weight: 600;
}

.sidebar-nav a .icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.sidebar-separator {
    height: 1px;
    background: #b0b0b0;
    margin: 4px 8px;
}

.sidebar-footer {
    padding: 8px 12px;
    border-top: 1px solid #b0b0b0;
    font-size: 11px;
    color: #666;
}

.sidebar-footer a {
    color: #0066CC;
    text-decoration: none;
}

/* Content Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-header {
    background: #0066CC;
    color: #fff;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 32px;
    border-bottom: 1px solid #004c99;
}

.content-header .header-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.content-body {
    flex: 1;
    overflow: auto;
    padding: 8px;
}

/* ============================================================
   Buttons — Windows Classic Style
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 12px;
    font-size: 12px;
    font-family: inherit;
    background: #f0f0f0;
    border: 1px solid #888;
    border-radius: 0;
    cursor: pointer;
    color: #222;
    min-height: 24px;
    white-space: nowrap;
}

.btn:hover {
    background: #e4e4e4;
}

.btn:active {
    background: #d0d0d0;
    border-color: #666;
}

.btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.btn-primary {
    background: #0066CC;
    color: #fff;
    border-color: #004c99;
}

.btn-primary:hover {
    background: #005bb5;
}

.btn-danger {
    background: #f0f0f0;
    color: #c00;
    border-color: #c00;
}

.btn-danger:hover {
    background: #fee;
}

.btn-sm {
    padding: 2px 8px;
    font-size: 11px;
    min-height: 20px;
}

.btn-header {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
    font-size: 11px;
}

.btn-header:hover {
    background: rgba(255,255,255,0.25);
}

/* ============================================================
   Forms
   ============================================================ */
.form-group {
    margin-bottom: 6px;
}

.form-group label {
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    color: #444;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 3px 6px;
    font-size: 12px;
    font-family: inherit;
    border: 1px solid #999;
    background: #fff;
    color: #222;
    min-height: 24px;
}

.form-control:focus {
    outline: none;
    border-color: #0066CC;
    box-shadow: 0 0 0 1px #0066CC;
}

select.form-control {
    padding: 2px 4px;
}

textarea.form-control {
    resize: vertical;
    min-height: 60px;
}

.form-row {
    display: flex;
    gap: 8px;
}

.form-row .form-group {
    flex: 1;
}

.form-inline {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============================================================
   Section Panels (Eclipse RCP style)
   ============================================================ */
.panel {
    background: #fff;
    border: 1px solid #b0b0b0;
    margin-bottom: 8px;
}

.panel-header {
    background: #0066CC;
    color: #fff;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-body {
    padding: 8px;
}

/* ============================================================
   Tables
   ============================================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table th {
    background: #e8e8e8;
    border: 1px solid #b0b0b0;
    padding: 4px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    white-space: nowrap;
}

.data-table td {
    border: 1px solid #d0d0d0;
    padding: 3px 8px;
}

.data-table tr:hover {
    background: #eef5ff;
}

.data-table tr.selected {
    background: #cde0f7;
}

.data-table .text-right {
    text-align: right;
}

.data-table .text-center {
    text-align: center;
}

/* ============================================================
   Tabs (Eclipse RCP style)
   ============================================================ */
.tab-bar {
    display: flex;
    border-bottom: 1px solid #b0b0b0;
    background: #e8e8e8;
}

.tab-bar .tab {
    padding: 5px 16px;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -1px;
    color: #444;
    background: transparent;
}

.tab-bar .tab:hover {
    background: #d8d8d8;
}

.tab-bar .tab.active {
    background: #fff;
    border-color: #b0b0b0;
    color: #222;
    font-weight: 600;
}

.tab-content {
    display: none;
    padding: 8px;
    background: #fff;
    border: 1px solid #b0b0b0;
    border-top: none;
}

.tab-content.active {
    display: block;
}

/* ============================================================
   Status Badges
   ============================================================ */
.status-badge {
    display: inline-block;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 2px;
    color: #fff;
}

.status-badge.not-confirmed { background: #FFA500; }
.status-badge.confirmed     { background: #4CAF50; }
.status-badge.occupied      { background: #2E7D32; }
.status-badge.vacated       { background: #9E9E9E; }
.status-badge.cancelled     { background: #F44336; }
.status-badge.no-show       { background: #8B0000; }

/* ============================================================
   Flash Messages
   ============================================================ */
.flash {
    padding: 6px 12px;
    margin-bottom: 8px;
    border: 1px solid;
    font-size: 12px;
}

.flash-success {
    background: #dff0d8;
    border-color: #3c763d;
    color: #3c763d;
}

.flash-error {
    background: #f2dede;
    border-color: #a94442;
    color: #a94442;
}

.flash-info {
    background: #d9edf7;
    border-color: #31708f;
    color: #31708f;
}

/* ============================================================
   Login Page
   ============================================================ */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: #d8d8d8;
}

.login-box {
    width: 320px;
    background: #f0f0f0;
    border: 1px solid #888;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
}

.login-box .login-header {
    background: #0066CC;
    color: #fff;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: bold;
}

.login-box .login-body {
    padding: 16px;
}

.login-box .login-body .form-group {
    margin-bottom: 10px;
}

.login-box .login-footer {
    padding: 8px 16px;
    border-top: 1px solid #ccc;
    text-align: right;
}

/* ============================================================
   Toolbar
   ============================================================ */
.toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #e8e8e8;
    border-bottom: 1px solid #b0b0b0;
}

.toolbar-separator {
    width: 1px;
    height: 20px;
    background: #b0b0b0;
    margin: 0 4px;
}

/* ============================================================
   Two-column layout for booking form
   ============================================================ */
.cols-2 {
    display: flex;
    gap: 8px;
}

.cols-2 > .col {
    flex: 1;
}

/* ============================================================
   Utility Classes
   ============================================================ */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: #888; }
.text-danger { color: #c00; }
.text-success { color: #2E7D32; }
.bold { font-weight: bold; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.p-8 { padding: 8px; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }

/* Price display */
.price { font-weight: 600; }
.price-due { color: #c00; font-weight: 600; }
.price-paid { color: #2E7D32; font-weight: 600; }

/* ============================================================
   Modal / Dialog (Windows style)
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-dialog {
    background: #f0f0f0;
    border: 1px solid #888;
    box-shadow: 3px 3px 12px rgba(0,0,0,0.3);
    min-width: 300px;
    max-width: 600px;
}

.modal-header {
    background: #0066CC;
    color: #fff;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header .close-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
}

.modal-body {
    padding: 12px;
}

.modal-footer {
    padding: 8px 12px;
    border-top: 1px solid #ccc;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

/* ============================================================
   Autocomplete
   ============================================================ */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #888;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
}

.autocomplete-item {
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background: #cde0f7;
}

/* ============================================================
   Tooltip
   ============================================================ */
.tooltip {
    position: absolute;
    background: #fff;
    border: 1px solid #888;
    padding: 8px;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
    font-size: 11px;
    z-index: 500;
    min-width: 200px;
    max-width: 300px;
}

.tooltip .tooltip-header {
    font-weight: bold;
    margin-bottom: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid #ddd;
}

/* ============================================================
   Status badges
   ============================================================ */
.status-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 2px;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge.not-confirmed { background: #FFA500; }
.status-badge.confirmed { background: #4CAF50; }
.status-badge.occupied { background: #2E7D32; }
.status-badge.vacated { background: #9E9E9E; }
.status-badge.cancelled { background: #F44336; }
.status-badge.no-show { background: #8B0000; }

/* ============================================================
   Scrollbar styling
   ============================================================ */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #e8e8e8;
}

::-webkit-scrollbar-thumb {
    background: #b0b0b0;
    border: 1px solid #999;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}
