/* ══════════════════════════════════════════════
   HOTEL ERP — Main Stylesheet
   Based on NetBill Pro design system
   ══════════════════════════════════════════════ */

:root {
    --h-primary:        #1B5E20;
    --h-primary-dark:   #0A3D0A;
    --h-primary-light:  #E8F5E9;
    --h-accent:         #FF8F00;
    --h-accent-light:   #FFF8E1;
    --h-success:        #2E7D32;
    --h-warning:        #F57F17;
    --h-danger:         #C62828;
    --h-info:           #0277BD;
    --h-purple:         #6A1B9A;

    --h-sidebar-width:  265px;
    --h-topbar-height:  62px;

    --h-bg:             #F3F6F9;
    --h-surface:        #FFFFFF;
    --h-border:         #E0E7EF;
    --h-text:           #1A2232;
    --h-text-muted:     #6B7280;
    --h-sidebar-bg:     #0D2B0D;
    --h-sidebar-text:   #B8CDBA;
    --h-sidebar-active: #1B5E20;

    --h-radius:         10px;
    --h-radius-sm:      6px;
    --h-shadow:         0 2px 12px rgba(0,0,0,0.07);
    --h-shadow-md:      0 4px 20px rgba(0,0,0,0.11);

    font-family: 'Nunito', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Nunito', sans-serif; font-size: 14px; color: var(--h-text); }
a { text-decoration: none; }

/* ── App Layout ── */
.h-body { background: var(--h-bg); min-height: 100vh; display: flex; }

/* ── Sidebar ── */
.h-sidebar {
    width: var(--h-sidebar-width);
    background: var(--h-sidebar-bg);
    height: 100vh;
    position: fixed;
    top: 0; left: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}

@media (max-width: 991px) {
    .h-sidebar { transform: translateX(-100%); }
    .h-sidebar.open { transform: translateX(0); box-shadow: 4px 0 30px rgba(0,0,0,0.3); }
}

.h-sidebar-brand {
    padding: 0 18px;
    height: var(--h-topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}

.h-logo { display: flex; align-items: center; gap: 10px; color: #fff; }
.h-logo-icon {
    width: 36px; height: 36px;
    background: var(--h-primary);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff;
}
.h-logo-text { font-size: 17px; font-weight: 700; letter-spacing: 0.2px; }
.h-logo-text strong { color: var(--h-accent); }

.h-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 10px 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.h-nav-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.35);
    padding: 14px 10px 5px;
    text-transform: uppercase;
}

.h-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--h-radius-sm);
    color: var(--h-sidebar-text);
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.18s;
    margin-bottom: 2px;
    cursor: pointer;
}
.h-nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.h-nav-item.active { background: var(--h-primary); color: #fff; font-weight: 600; }
.h-nav-item i { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

.h-nav-group { margin-bottom: 2px; }
.h-nav-group-toggle {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--h-radius-sm);
    color: var(--h-sidebar-text); font-size: 13.5px; font-weight: 500;
    cursor: pointer; transition: all 0.18s; justify-content: space-between; width: 100%;
    background: none; border: none;
}
.h-nav-group-toggle:hover { background: rgba(255,255,255,0.07); color: #fff; }
.h-nav-group-toggle .h-toggle-left { display: flex; align-items: center; gap: 10px; }
.h-nav-group-body { padding-left: 28px; }
.h-nav-group-body .h-nav-item { font-size: 13px; padding: 8px 10px; }
.h-nav-group-body .h-nav-item i { font-size: 14px; }

.h-sidebar-footer {
    padding: 14px 18px;
    border-top: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}
.h-hotel-badge { display: flex; align-items: center; gap: 9px; }
.h-hotel-icon {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--h-primary);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 14px; flex-shrink: 0;
}
.h-hotel-name { font-size: 12.5px; font-weight: 700; color: #fff; line-height: 1.2; }
.h-hotel-role { font-size: 11px; color: var(--h-sidebar-text); }

.h-sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 999;
}
.h-sidebar-overlay.show { display: block; }

/* ── Main ── */
.h-main {
    margin-left: var(--h-sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s;
}

@media (max-width: 991px) { .h-main { margin-left: 0; } }

/* ── Topbar ── */
.h-topbar {
    height: var(--h-topbar-height);
    background: var(--h-surface);
    border-bottom: 1px solid var(--h-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0; z-index: 100;
    box-shadow: var(--h-shadow);
}

.h-topbar-left { display: flex; align-items: center; gap: 16px; }
.h-hamburger {
    background: none; border: none; padding: 6px 8px; cursor: pointer;
    color: var(--h-text-muted); font-size: 20px; border-radius: 6px;
    transition: background 0.15s;
}
.h-hamburger:hover { background: var(--h-bg); color: var(--h-text); }

.h-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.h-breadcrumb-root { color: var(--h-text-muted); }
.h-breadcrumb-sep { color: var(--h-border); font-size: 10px; }
.h-breadcrumb-current { color: var(--h-text); font-weight: 600; }

.h-topbar-right { display: flex; align-items: center; gap: 10px; }

.h-btn-new { display: flex; align-items: center; gap: 6px; padding: 8px 16px; background: var(--h-primary); color: #fff; border-radius: var(--h-radius-sm); font-size: 13px; font-weight: 600; border: none; cursor: pointer; transition: background 0.15s; }
.h-btn-new:hover { background: var(--h-primary-dark); color: #fff; }

.h-topbar-icon {
    width: 36px; height: 36px; border-radius: 8px; display: flex;
    align-items: center; justify-content: center; cursor: pointer;
    color: var(--h-text-muted); font-size: 17px;
    position: relative; transition: background 0.15s;
}
.h-topbar-icon:hover { background: var(--h-bg); color: var(--h-text); }
.h-alert-dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; background: var(--h-danger); border-radius: 50%; border: 1.5px solid #fff; }

.h-user-btn {
    display: flex; align-items: center; gap: 8px; padding: 5px 10px;
    background: var(--h-bg); border: 1px solid var(--h-border);
    border-radius: 30px; cursor: pointer; transition: box-shadow 0.15s;
    font-size: 13px; font-weight: 600;
}
.h-user-btn:hover { box-shadow: var(--h-shadow); }
.h-user-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--h-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
}

/* ── Content ── */
.h-content { flex: 1; padding: 24px; }

.h-alert {
    border-radius: var(--h-radius-sm); border: none;
    padding: 12px 16px; font-size: 13.5px; font-weight: 500;
}

/* ── Page Header ── */
.h-page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}
.h-page-title { font-size: 22px; font-weight: 800; color: var(--h-text); }
.h-page-sub { font-size: 13px; color: var(--h-text-muted); margin-top: 2px; }

/* ── Stat Cards ── */
.h-stat-card {
    background: var(--h-surface);
    border-radius: var(--h-radius);
    padding: 20px;
    box-shadow: var(--h-shadow);
    border: 1px solid var(--h-border);
    height: 100%;
    transition: box-shadow 0.2s, transform 0.15s;
}
.h-stat-card:hover { box-shadow: var(--h-shadow-md); transform: translateY(-1px); }
.h-stat-icon {
    width: 46px; height: 46px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; margin-bottom: 12px;
}
.h-stat-value { font-size: 28px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.h-stat-label { font-size: 12.5px; color: var(--h-text-muted); font-weight: 500; }
.h-stat-change { font-size: 11.5px; margin-top: 6px; }

.icon-green { background: var(--h-primary-light); color: var(--h-primary); }
.icon-blue  { background: #E3F2FD; color: #1565C0; }
.icon-amber { background: #FFF8E1; color: #F57F17; }
.icon-red   { background: #FFEBEE; color: var(--h-danger); }
.icon-purple{ background: #F3E5F5; color: var(--h-purple); }
.icon-teal  { background: #E0F2F1; color: #00695C; }
.icon-orange{ background: #FBE9E7; color: #BF360C; }
.icon-indigo{ background: #E8EAF6; color: #283593; }

/* ── Card ── */
.h-card {
    background: var(--h-surface);
    border-radius: var(--h-radius);
    box-shadow: var(--h-shadow);
    border: 1px solid var(--h-border);
    overflow: hidden;
}
.h-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--h-border);
    display: flex; align-items: center; justify-content: space-between;
}
.h-card-title { font-size: 15px; font-weight: 700; }
.h-card-body { padding: 20px; }

/* ── Table ── */
.h-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.h-table th { background: var(--h-bg); padding: 11px 14px; text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--h-text-muted); border-bottom: 2px solid var(--h-border); white-space: nowrap; }
.h-table td { padding: 13px 14px; border-bottom: 1px solid var(--h-border); vertical-align: middle; }
.h-table tbody tr:hover { background: var(--h-bg); }
.h-table-wrap { overflow-x: auto; }

/* ── Badges ── */
.h-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 20px;
    font-size: 11.5px; font-weight: 600;
}
.badge-available  { background: #E8F5E9; color: #2E7D32; }
.badge-occupied   { background: #FFEBEE; color: #C62828; }
.badge-reserved   { background: #E3F2FD; color: #1565C0; }
.badge-cleaning   { background: #FFF8E1; color: #F57F17; }
.badge-maintenance{ background: #FBE9E7; color: #BF360C; }
.badge-out_of_service { background: #ECEFF1; color: #546E7A; }
.badge-pending    { background: #FFF8E1; color: #F57F17; }
.badge-confirmed  { background: #E8F5E9; color: #2E7D32; }
.badge-checked_in { background: #E3F2FD; color: #1565C0; }
.badge-checked_out{ background: #F3E5F5; color: #6A1B9A; }
.badge-cancelled  { background: #FFEBEE; color: #C62828; }
.badge-no_show    { background: #ECEFF1; color: #546E7A; }
.badge-draft      { background: #ECEFF1; color: #546E7A; }
.badge-finalized  { background: #E8F5E9; color: #2E7D32; }
.badge-paid       { background: #E8F5E9; color: #2E7D32; }
.badge-partially_paid { background: #FFF8E1; color: #F57F17; }
.badge-low        { background: #E8F5E9; color: #2E7D32; }
.badge-medium     { background: #E3F2FD; color: #1565C0; }
.badge-high       { background: #FFF8E1; color: #F57F17; }
.badge-urgent     { background: #FFEBEE; color: #C62828; }
.badge-open       { background: #FFEBEE; color: #C62828; }
.badge-in_progress{ background: #E3F2FD; color: #1565C0; }
.badge-resolved   { background: #E8F5E9; color: #2E7D32; }
.badge-closed     { background: #ECEFF1; color: #546E7A; }
.badge-received   { background: #E3F2FD; color: #1565C0; }
.badge-processing { background: #FFF8E1; color: #F57F17; }
.badge-ready      { background: #F3E5F5; color: #6A1B9A; }
.badge-delivered  { background: #E8F5E9; color: #2E7D32; }
.badge-preparing  { background: #FFF8E1; color: #F57F17; }

/* ── Buttons ── */
.h-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: var(--h-radius-sm); font-size: 13.5px; font-weight: 600; border: none; cursor: pointer; transition: all 0.15s; text-decoration: none; }
.h-btn-primary { background: var(--h-primary); color: #fff; }
.h-btn-primary:hover { background: var(--h-primary-dark); color: #fff; }
.h-btn-accent  { background: var(--h-accent); color: #fff; }
.h-btn-accent:hover { background: #E65100; color: #fff; }
.h-btn-outline { background: #fff; color: var(--h-text); border: 1.5px solid var(--h-border); }
.h-btn-outline:hover { background: var(--h-bg); }
.h-btn-danger  { background: var(--h-danger); color: #fff; }
.h-btn-danger:hover { background: #B71C1C; color: #fff; }
.h-btn-sm { padding: 5px 12px; font-size: 12.5px; }
.h-btn-icon { padding: 7px 9px; }

/* ── Form — NetBillPro v1 style ── */
.h-form-group { margin-bottom: 16px; }

.h-form-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--h-text);
    margin-bottom: 6px;
}

.h-input-wrap { position: relative; }

.h-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--h-text-muted);
    font-size: 15px;
    pointer-events: none;
    z-index: 1;
}

.h-form-control {
    width: 100%;
    height: 42px;
    padding: 0 13px 0 38px;
    border: 1.5px solid var(--h-border);
    border-radius: var(--h-radius-sm);
    font-size: 14px;
    font-family: 'Nunito', sans-serif;
    color: var(--h-text);
    background: var(--h-surface);
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    -webkit-appearance: none;
}
.h-form-control:focus {
    border-color: var(--h-primary);
    box-shadow: 0 0 0 3px rgba(27,94,32,0.12);
}
.h-form-control.is-invalid { border-color: var(--h-danger); }
.h-form-control::placeholder { color: #adb5bd; }

/* no icon variant */
.h-form-control.no-icon { padding-left: 13px; }

/* textarea */
textarea.h-form-control {
    height: auto;
    padding: 10px 13px 10px 38px;
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}
textarea.h-form-control.no-icon { padding-left: 13px; }

/* select — custom arrow, no default OS arrow */
select.h-form-control {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* form layout helpers */
.h-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.h-form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 640px) {
    .h-form-row, .h-form-row-3 { grid-template-columns: 1fr; }
}

.h-form-two-col {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
    align-items: start;
}
@media (max-width: 900px) { .h-form-two-col { grid-template-columns: 1fr; } }

/* checkbox / toggle */
.h-form-check { display: flex; align-items: center; gap: 8px; }
.h-form-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--h-primary); cursor: pointer; }
.h-form-check label { font-size: 13px; color: var(--h-text-muted); cursor: pointer; font-weight: 500; }

/* form section divider */
.h-form-section {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--h-text-muted);
    padding-bottom: 8px;
    border-bottom: 1.5px solid var(--h-border);
    margin-bottom: 16px;
    margin-top: 4px;
}

/* input group (prefix/suffix) */
.h-input-group { display: flex; }
.h-input-group .h-form-control { border-radius: 0 var(--h-radius-sm) var(--h-radius-sm) 0; }
.h-input-group-prefix {
    display: flex; align-items: center; padding: 0 12px;
    background: var(--h-bg); border: 1.5px solid var(--h-border);
    border-right: none; border-radius: var(--h-radius-sm) 0 0 var(--h-radius-sm);
    font-size: 13px; color: var(--h-text-muted); font-weight: 600; white-space: nowrap;
}

/* ── Auth ── */
.h-auth-body { background: linear-gradient(135deg, #0D2B0D 0%, #1B5E20 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.h-auth-wrapper { display: flex; width: 100%; max-width: 1000px; background: var(--h-surface); border-radius: 20px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.h-auth-left { flex: 1; background: linear-gradient(160deg, #0D2B0D 0%, #1B5E20 60%, #2E7D32 100%); padding: 50px; display: flex; flex-direction: column; justify-content: center; }
.h-auth-right { width: 420px; padding: 50px 40px; display: flex; flex-direction: column; justify-content: center; flex-shrink: 0; }
.h-auth-tagline { font-size: 32px; font-weight: 800; color: #fff; line-height: 1.25; margin-bottom: 12px; }
.h-auth-sub { color: rgba(255,255,255,0.7); font-size: 14.5px; margin-bottom: 28px; }
.h-auth-feature { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.85); font-size: 14px; margin-bottom: 10px; }
.h-auth-feature i { color: var(--h-accent); font-size: 16px; }
.h-auth-form-title { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.h-auth-form-sub { color: var(--h-text-muted); font-size: 13.5px; margin-bottom: 28px; }

/* ── Room Status Board ── */
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.room-card {
    background: var(--h-surface); border-radius: var(--h-radius);
    padding: 16px; border: 2px solid var(--h-border);
    cursor: pointer; transition: all 0.15s; text-align: center;
}
.room-card:hover { transform: translateY(-2px); box-shadow: var(--h-shadow-md); }
.room-card.status-available  { border-color: #A5D6A7; }
.room-card.status-occupied   { border-color: #EF9A9A; }
.room-card.status-reserved   { border-color: #90CAF9; }
.room-card.status-cleaning   { border-color: #FFE082; }
.room-card.status-maintenance{ border-color: #FFAB91; }
.room-number-big { font-size: 26px; font-weight: 800; margin-bottom: 5px; }
.room-cat-label  { font-size: 11px; color: var(--h-text-muted); margin-bottom: 8px; }

/* ── Sidebar close btn ── */
.h-sidebar-close { background: none; border: none; color: rgba(255,255,255,0.5); font-size: 18px; cursor: pointer; padding: 4px 6px; border-radius: 4px; }
.h-sidebar-close:hover { color: #fff; }

/* ── Dropdown ── */
.h-dropdown { border: 1px solid var(--h-border); border-radius: var(--h-radius); box-shadow: var(--h-shadow-md); padding: 6px 0; min-width: 180px; }
.h-dropdown .dropdown-item { font-size: 13.5px; padding: 9px 16px; display: flex; align-items: center; gap: 8px; }
.h-dropdown .dropdown-item:hover { background: var(--h-bg); }
.h-dropdown-header { padding: 10px 16px 6px; }
.h-dropdown-header strong { display: block; font-size: 13.5px; }
.h-dropdown-header small { color: var(--h-text-muted); font-size: 12px; }

/* ── Mobile ── */
@media (max-width: 767px) {
    .h-content { padding: 16px; }
    .h-topbar { padding: 0 16px; }
    .h-auth-right { width: 100%; padding: 30px 24px; }
    .h-auth-left { display: none; }
    .h-page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
}
