/* =========================================================
   The Bangalore Hotel — Expense Manager
   Light theme, warm hospitality palette
   ========================================================= */

:root {
    --maroon: #7a2e3a;
    /* primary brand - deep maroon (hotel signage feel) */
    --maroon-dark: #5e2230;
    --gold: #c98a3e;
    /* accent - warm gold */
    --gold-light: #f3dcb4;
    --cream: #fbf7f0;
    /* page background */
    --card: #ffffff;
    --ink: #2b2420;
    /* primary text */
    --ink-soft: #6b5f56;
    --line: #e8ddcd;
    --green: #2f7a4f;
    --green-bg: #e7f4ec;
    --red: #b3422e;
    --red-bg: #fbe9e5;
    --blue: #2e6f8e;
    --blue-bg: #e7f1f5;
    --radius: 10px;
    --shadow: 0 2px 10px rgba(122, 46, 58, 0.07);
}

* {
    box-sizing: border-box;
}

body {
    background: var(--cream);
    color: var(--ink);
    font-family: "Segoe UI", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
}

a {
    color: var(--maroon);
    text-decoration: none;
}

a:hover {
    color: var(--maroon-dark);
}

/* ---------- Layout ---------- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: linear-gradient(180deg, var(--maroon) 0%, var(--maroon-dark) 100%);
    color: #fff;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.25s ease;
}

.sidebar .brand {
    padding: 15px 15px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar .brand-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.sidebar .brand-icon img {
    height: 55px;
    width: 55px;
}

.sidebar .brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar .brand h1 {
    font-size: 16px;
    font-weight: 900;
    margin: 0;
    letter-spacing: 0.2px;
    color: #ffffff;
    line-height: 1.2;
    white-space: nowrap;
    font-family: 'Georgia', serif;
}

.sidebar .brand small {
    color: var(--gold-light);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-weight: 500;
}

.sidebar nav {
    padding: 14px 0;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.85);
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.sidebar nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar nav a.active {
    background: rgba(255, 255, 255, 0.12);
    border-left-color: var(--gold);
    color: #fff;
}

.sidebar nav .nav-section-label {
    padding: 14px 20px 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.45);
}

.main-content {
    margin-left: 250px;
    flex: 1;
    min-width: 0;
    padding: 0;
}

.topbar {
    background: var(--card);
    border-bottom: 1px solid var(--line);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 900;
}

.topbar h2 {
    font-size: 19px;
    margin: 0;
    font-weight: 700;
    color: var(--maroon);
}

.topbar .user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.topbar .user-chip .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gold-light);
    color: var(--maroon-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.page-body {
    padding: 22px 24px 60px;
}

/* Show toggle on ALL screens */
.menu-toggle {
    display: inline-block;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--maroon);
    cursor: pointer;
}

#sidebarOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
}

#sidebarOverlay.show {
    display: block;
}

/* ---------- Cards ---------- */
.card-box {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.card-box .card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--maroon);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* Stat cards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 992px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    border-top: 3px solid var(--gold);
}

.stat-card.green {
    border-top-color: var(--green);
}

.stat-card.red {
    border-top-color: var(--red);
}

.stat-card.blue {
    border-top-color: var(--blue);
}

.stat-card .label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--ink-soft);
    font-weight: 600;
}

.stat-card .value {
    font-size: 24px;
    font-weight: 700;
    margin-top: 6px;
    color: var(--ink);
}

.stat-card .sub {
    font-size: 12.5px;
    color: var(--ink-soft);
    margin-top: 4px;
}

/* ---------- Buttons ---------- */
.btn {
    border-radius: 7px;
    font-weight: 600;
    font-size: 13.5px;
    padding: 7px 16px;
}

.btn-maroon {
    background: var(--maroon);
    border-color: var(--maroon);
    color: #fff;
}

.btn-maroon:hover {
    background: var(--maroon-dark);
    border-color: var(--maroon-dark);
    color: #fff;
}

.btn-gold {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
}

.btn-gold:hover {
    background: #b27933;
    border-color: #b27933;
    color: #fff;
}

.btn-outline-maroon {
    border: 1px solid var(--maroon);
    color: var(--maroon);
    background: transparent;
}

.btn-outline-maroon:hover {
    background: var(--maroon);
    color: #fff;
}

.btn-sm-icon {
    padding: 4px 9px;
    font-size: 12px;
}

/* ---------- Tables ---------- */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

table.hotel-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    font-size: 13.5px;
    border: 1px solid var(--line);
}

table.hotel-table thead th {
    background: var(--maroon);
    color: #fff;
    font-weight: 600;
    padding: 10px 12px;
    text-align: center;
    white-space: nowrap;
    position: sticky;
    top: 0;
}

table.hotel-table tbody td {
    padding: 6px 7px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    text-align: center;
}

table.hotel-table th,
table.hotel-table td {
    border: 1px solid var(--line);
    padding: 6px 8px;
    vertical-align: middle;
}

table.hotel-table tbody tr:hover {
    background: #fdf9f2;
}

table.hotel-table tbody tr.row-editing {
    background: #fff8e8;
}

table.hotel-table tfoot td {
    font-weight: 700;
    background: var(--gold-light);
    color: var(--maroon-dark);
    padding: 10px 12px;
    border-top: 2px solid var(--gold);
}

table.hotel-table input.cell-input,
table.hotel-table select.cell-input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 5px 7px;
    font-size: 13px;
    background: #fff;
}

table.hotel-table input.cell-input:focus,
table.hotel-table select.cell-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(201, 138, 62, 0.25);
}

/* Action column — prevent button wrap */
#expenseTable td:last-child,
#expenseTable th:last-child {
    width: 130px;
    min-width: 130px;
    white-space: nowrap;
}

/* Description column — make it smaller */
#expenseTable td:nth-child(3),
#expenseTable th:nth-child(3) {
    max-width: 140px;
    min-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Description input inside editing row */
.cell-input.new-description {
    width: 100%;
    min-width: 60px;
    font-size: 12px;
}

.badge-soft-green {
    background: var(--green-bg);
    color: var(--green);
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 5px;
    font-size: 12px;
}

.badge-soft-red {
    background: var(--red-bg);
    color: var(--red);
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 5px;
    font-size: 12px;
}

.badge-soft-blue {
    background: var(--blue-bg);
    color: var(--blue);
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 5px;
    font-size: 12px;
}

.badge-soft-gold {
    background: var(--gold-light);
    color: var(--maroon-dark);
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 5px;
    font-size: 12px;
}

/* Progress bar for budget usage */
.budget-bar {
    height: 8px;
    border-radius: 5px;
    background: var(--line);
    overflow: hidden;
}

.budget-bar>div {
    height: 100%;
    border-radius: 5px;
    background: var(--green);
}

.budget-bar>div.over {
    background: var(--red);
}

.budget-bar>div.warn {
    background: var(--gold);
}

/* Column toggle dropdown */
.col-toggle-menu {
    max-height: 260px;
    overflow-y: auto;
    min-width: 200px;
    padding: 10px 14px;
}

.col-toggle-menu label {
    display: block;
    font-size: 13px;
    padding: 4px 0;
    cursor: pointer;
}

/* ===== Login page — fully responsive ===== */
.login-wrapper {
    min-height: 100vh;
    width: 100%;
    display: flex;
    background-size: 100% 100%;
    justify-content: flex-end;
    /* push the login card to the right on desktop */
    background-image: url('../image/login4.png');

    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}



/* Left branding panel */
.login-left {
    min-height: 100vh;
    padding-top: 60px;

}

.login-title {
    font-size: clamp(28px, 3.5vw, 52px);

}

.login-brand {
    text-align: center;
}


/* Right card panel */
.login-right-panel {
    padding: 24px 16px;
}

.login-card-box {
    width: 100%;
    max-width: 420px;
    min-height: auto;
    padding: 2.5rem;
    background-color: bisque;
    border: 2px solid #c9a328;
    border-radius: var(--radius);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        /* subtle top highlight for depth */
        0 45px 80px -15px rgba(60, 20, 28, 0.55),
        /* large dark far shadow */
        0 18px 30px rgba(60, 20, 28, 0.4),
        /* mid shadow */
        0 6px 10px rgba(60, 20, 28, 0.3);
    /* tight contact shadow */
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.login-card-box:hover {
    transform: translateY(-3px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 55px 90px -15px rgba(60, 20, 28, 0.6),
        0 20px 35px rgba(60, 20, 28, 0.45),
        0 8px 14px rgba(60, 20, 28, 0.32);
}

/* Tablet: ≤992px — card becomes full width, centered */
@media (max-width: 992px) {
    .login-wrapper {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        background-size: 100% 100%;
        background-image: url('../image/login1.png');

        background-position: center;
        background-repeat: no-repeat;
        background-attachment: fixed;
    }

    /* Show a compact header strip instead of the hidden left panel */
    .login-wrapper::before {
        content: '';
        display: block;
        width: 100%;
        height: 8px;
        background: #882424;
    }

    .login-right-panel {
        width: 100%;
        flex: 1;
        padding: 32px 20px 48px;
    }

    .login-card-box {
        max-width: 480px;
    }
}

/* Mobile: ≤576px — tighten padding, smaller card */
@media (max-width: 576px) {
    .login-right-panel {
        padding: 20px 12px 40px;
        align-items: stretch;
    }

    .login-card-box {
        padding: 1.25rem !important;
        max-width: 100%;
        box-shadow: none !important;
    }

    .login-card-box h2 {
        font-size: 20px;
    }

    .login-card-box img {
        width: 72px !important;
        height: 72px !important;
    }
}

/* Very small screens: ≤360px */
@media (max-width: 360px) {
    .login-card-box {
        padding: 1rem !important;
    }
}

.form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(201, 138, 62, 0.2);
}

.denom-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 6px;
}
.denom-label {
  font-weight: 600;
  font-size: 13px;
  min-width: 42px;
  color: var(--maroon);
}
.denom-times {
  color: #aaa;
  font-size: 13px;
}
.denom-sub {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  min-width: 70px;
  text-align: right;
  margin-left: auto;
}

/* Filters bar */
.filter-bar {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 18px;
}

/* Mobile: sidebar hidden by default */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
    }
}

/* Desktop: sidebar open by default, hidden when .closed */
@media (min-width: 901px) {
    .sidebar {
        transform: translateX(0);
    }

    .sidebar.closed {
        transform: translateX(-250px);
    }

    .main-content {
        transition: margin-left 0.25s ease;
    }

    .main-content.expanded {
        margin-left: 0;
    }
}

.text-maroon {
    color: var(--maroon);
}

.text-soft {
    color: var(--ink-soft);
}

.fw-700 {
    font-weight: 700;
}

/* ── Tally Sheet Modal ─────────────────────────────── */
.closing-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--maroon);
    border-bottom: 1px solid var(--maroon);
    padding-bottom: 4px;
    margin-bottom: 10px;
}

.tally-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.tally-row label {
    flex: 1;
    font-size: 13.5px;
    margin: 0;
    color: #333;
}

.tally-row .tally-input {
    width: 140px;
    text-align: right;
    font-size: 13px;
    padding: 4px 8px;
    height: 34px;
}

.tally-calc {
    font-size: 14px;
    font-weight: 600;
    color: var(--blue, #1565c0);
    min-width: 110px;
    text-align: right;
}

.tally-calc-row {
    background: #f8f6ff;
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 8px;
}

/* ── Closing Sheet Card ────────────────────────────── */
.closing-sheet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .closing-sheet-grid {
        grid-template-columns: 1fr;
    }
}

.cs-section {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px 14px;
}

.cs-section h6 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--maroon);
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px dashed var(--maroon);
}

.cs-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 3px 0;
}

.cs-row.total-row {
    border-top: 1px solid #ddd;
    margin-top: 5px;
    padding-top: 6px;
    font-weight: 700;
    font-size: 14px;
}

.cs-row .label {
    color: #555;
}

.cs-row .val {
    font-weight: 600;
}

/* Denomination table inside card */
.denom-display-table {
    width: 100%;
    font-size: 13px;
}

.denom-display-table td {
    padding: 3px 6px;
}

.denom-display-table tr:last-child td {
    font-weight: 700;
    border-top: 1px solid #ccc;
}