* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* MCVRD-PL branding */
    --orange: #FF6D00;
    --blue: #5B7C99;

    /* Dark theme - default */
    --background: #080b10;
    --sidebar: #0b0f15;
    --surface: #10151d;
    --surface-hover: #151c26;
    --border: #222a35;

    --text: #f5f7fa;
    --muted: #9aa4b2;
    --subtle: #687383;

    --accent: var(--orange);
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
}

.app {
    min-height: 100vh;
}

/* =========================
   SIDEBAR
   ========================= */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 240px;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    padding: 28px 18px;
    display: flex;
    flex-direction: column;
}

.brand {
    color: var(--text);
    font-size: 23px;
    font-weight: 700;
    margin-bottom: 42px;
    padding-left: 10px;
}

.navigation {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-item {
    display: block;
    padding: 13px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
    transition: 0.2s ease;
}

.nav-item:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.nav-item.active {
    background: rgba(255, 109, 0, 0.16);
    color: var(--orange);
}

/* =========================
   MAIN CONTENT
   ========================= */

.main-content {
    margin-left: 240px;
    padding: 34px 40px;
    min-height: 100vh;
}

/* =========================
   TOP BAR
   ========================= */

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.page-label,
.section-label,
.welcome-label {
    display: block;
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.6px;
    margin-bottom: 7px;
}

.topbar h1 {
    font-size: 28px;
    font-weight: 600;
}

.account {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
}

/* =========================
   PROJECT WELCOME
   ========================= */

.welcome {
    margin-top: 34px;
    min-height: 180px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background:
        linear-gradient(
            90deg,
            #10151d 0%,
            #10151d 55%,
            #1a1510 100%
        );
    padding: 38px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.welcome::after {
    content: "";
    position: absolute;
    right: -100px;
    top: -100px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(255, 109, 0, 0.06);
}

.welcome-content {
    position: relative;
    z-index: 1;
}

.welcome h2 {
    font-size: 34px;
    font-weight: 600;
    margin-bottom: 18px;
}

.quote {
    color: #c5ccd5;
    font-size: 16px;
    font-style: italic;
}

/* =========================
   LAST VISIT
   ========================= */

.last-visit {
    margin-top: 30px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 17px;
}

.section-title h2 {
    font-size: 20px;
    font-weight: 600;
}

.last-login {
    color: var(--muted);
    font-size: 12px;
}

/* =========================
   STAT CARDS
   ========================= */

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
}

.stat-label {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    margin-bottom: 13px;
}

.stat-card strong {
    display: block;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 7px;
}

.stat-card p {
    color: var(--muted);
    font-size: 13px;
}

/* =========================
   CONTINUE
   ========================= */

.continue {
    margin-top: 25px;
    padding: 23px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.continue h2 {
    font-size: 19px;
    margin-bottom: 5px;
}

.continue p {
    color: var(--muted);
    font-size: 13px;
}

.continue-button {
    border: none;
    background: var(--orange);
    color: #ffffff;
    padding: 13px 21px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.continue-button:hover {
    opacity: 0.9;
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 900px) {

    .sidebar {
        width: 200px;
    }

    .main-content {
        margin-left: 200px;
        padding: 28px;
    }

    .stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {

    .sidebar {
        position: static;
        width: 100%;
        padding: 18px;
    }

    .brand {
        margin-bottom: 18px;
    }

    .navigation {
        flex-direction: row;
        overflow-x: auto;
    }

    .nav-item {
        white-space: nowrap;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .topbar h1 {
        font-size: 24px;
    }

    .welcome {
        padding: 27px;
    }

    .welcome h2 {
        font-size: 27px;
    }

    .section-title {
        display: block;
    }

    .last-login {
        display: block;
        margin-top: 9px;
    }

    .continue {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .continue-button {
        width: 100%;
    }
}
/* =========================
   APPEARANCE SWITCHER
   ========================= */

/* =========================
   SIDEBAR SUPPORT
   ========================= */

.sidebar-support {
    margin-top: auto;
    padding-bottom: 18px;

    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-support-button {
    width: 100%;
    padding: 9px 10px;

    border: none;
    border-radius: 7px;

    background: transparent;
    color: var(--muted);

    font-family: inherit;
    font-size: 12px;
    text-align: left;

    cursor: pointer;
}

.sidebar-support-button:hover {
    background: var(--surface-hover);
    color: var(--text);
}



.appearance {
    padding-top: 25px;
    border-top: 1px solid var(--border);
}

.appearance-title {
    display: block;
    color: var(--subtle);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.4px;
    margin-bottom: 9px;
    padding-left: 5px;
}

.theme-button {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    color: var(--muted);
    text-align: left;
    padding: 9px 10px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 12px;
    margin-bottom: 3px;
}

.theme-button:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.theme-button.active {
    background: rgba(255, 109, 0, 0.12);
    color: var(--accent);
}
/* =========================
   LIGHT THEME
   ========================= */

html[data-theme="light"] {
    --background: #f4f6f8;
    --sidebar: #ffffff;
    --surface: #ffffff;
    --surface-hover: #eef2f5;
    --border: #dce2e7;

    --text: #1f2933;
    --muted: #647484;
    --subtle: #8291a0;

    --accent: #5B7C99;
}

/* Light theme specific elements */

html[data-theme="light"] .welcome {
    background: linear-gradient(
        90deg,
        #ffffff 0%,
        #f7f9fb 55%,
        #eef3f7 100%
    );
}

html[data-theme="light"] .welcome::after {
    background: rgba(91, 124, 153, 0.08);
}

html[data-theme="light"] .quote {
    color: #647484;
}

html[data-theme="light"] .continue-button {
    background: #5B7C99;
}

html[data-theme="light"] .nav-item.active {
    background: rgba(91, 124, 153, 0.13);
    color: #5B7C99;
}

html[data-theme="light"] .theme-button.active {
    background: rgba(91, 124, 153, 0.12);
    color: #5B7C99;
}
/* =========================
   ADD ITEM MODAL
   ========================= */

.item-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;

    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.72);
    padding: 25px;
}

.item-modal.open {
    display: flex;
}

.item-modal-panel {
    width: min(800px, 100%);
    max-height: 90vh;
    overflow-y: auto;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;

    padding: 30px;
}

.item-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    margin-bottom: 28px;
}

.modal-label {
    display: block;
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 7px;
}

.item-modal-header h2 {
    font-size: 25px;
    font-weight: 600;
    margin-bottom: 5px;
}

.item-modal-header p {
    color: var(--muted);
    font-size: 13px;
}

.modal-close {
    width: 34px;
    height: 34px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: transparent;
    color: var(--muted);

    font-size: 22px;
    line-height: 1;

    cursor: pointer;
}

.modal-close:hover {
    color: var(--text);
    background: var(--surface-hover);
}

/* Form */

.form-group {
    margin-bottom: 20px;
}

.form-group > label {
    display: block;

    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;

    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: var(--background);
    color: var(--text);

    padding: 12px 13px;

    font-family: inherit;
    font-size: 14px;

    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
}

/* Currency */

.currency-input {
    display: flex;
    align-items: center;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: var(--background);
}

.currency-input span {
    padding-left: 13px;
    color: var(--muted);
}

.currency-input input {
    border: none !important;
    background: transparent !important;
}

/* Rating */

.rating {
    display: flex;
    gap: 5px;
}

.star {
    border: none;
    background: transparent;

    color: var(--subtle);

    font-size: 25px;
    cursor: pointer;

    padding: 2px;
}

.star:hover,
.star.selected {
    color: var(--orange);
}

/* Payment */

.payment-options {
    display: flex;
    gap: 12px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 10px 14px;

    border: 1px solid var(--border);
    border-radius: 8px;

    color: var(--muted);
    font-size: 13px;

    cursor: pointer;
}

.payment-option:has(input:checked) {
    border-color: var(--accent);
    color: var(--accent);
}

.payment-option input {
    accent-color: var(--accent);
}

.item-payment-row {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.item-payment-row > .form-group {
    margin: 0;
}

/* Buttons */

.item-modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;    
    margin-top: 28px;
}

.close-button,
.add-item-button {
    border-radius: 8px;
    padding: 12px 18px;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

.close-button {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
}

.close-button:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.add-item-button {
    border: none;
    background: var(--orange);
    color: white;
}

.add-item-button:hover {
    opacity: 0.9;
}

.cancel-button:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.add-item-button {
    border: none;
    background: var(--orange);
    color: white;
}

.add-item-button:hover {
    opacity: 0.9;
}

/* Light theme */

html[data-theme="light"] .add-item-button {
    background: var(--blue);
}

html[data-theme="light"] .star:hover,
html[data-theme="light"] .star.selected {
    color: var(--blue);
}

/* Mobile */

@media (max-width: 650px) {

    .item-modal {
        padding: 0;
        align-items: stretch;
    }

    .item-modal-panel {
        width: 100%;
        max-height: 100vh;

        border-radius: 0;
        border: none;

        padding: 24px 20px;
    }

    .item-modal-header {
        margin-bottom: 24px;
    }

    .item-modal-actions {
        position: sticky;
        bottom: 0;

        padding-top: 15px;

        background: var(--surface);
    }

    .cancel-button,
    .add-item-button {
        flex: 1;
    }
}
/* =========================
   WELCOME LOWER PANELS
   ========================= */

.welcome-panels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.welcome-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
}

.panel-label {
    display: block;
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    margin-bottom: 6px;
}

.panel-header h2 {
    color: var(--text);
    font-size: 17px;
    font-weight: 600;
}

.panel-toggle {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 16px;
}

.panel-toggle:hover {
    background: var(--surface-hover);
    color: var(--accent);
}

.panel-content {
    padding: 0 20px 20px;
}

/* Collapsing */

.welcome-panel.collapsed .panel-content {
    display: none;
}

.welcome-panel.collapsed .panel-toggle span {
    display: inline-block;
    transform: rotate(180deg);
}


/* Recent activity */

.activity-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 0;
    border-top: 1px solid var(--border);
}

.activity-icon,
.room-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.activity-info {
    min-width: 0;
    flex: 1;
}

.activity-info strong {
    display: block;
    font-size: 13px;
    color: var(--text);
}

.activity-info span {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: var(--muted);
}

.activity-row time {
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
}


/* Budget */

.budget-total {
    font-size: 29px;
    font-weight: 600;
    margin-bottom: 15px;
}

.budget-bar,
.room-progress {
    height: 6px;
    background: var(--border);
    border-radius: 20px;
    overflow: hidden;
}

.budget-fill,
.room-progress div {
    height: 100%;
    background: var(--accent);
    border-radius: 20px;
}

.budget-lines {
    margin-top: 15px;
}

.budget-lines div {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13px;
}

.budget-lines span {
    color: var(--muted);
}

.budget-lines strong {
    color: var(--text);
}

.breakdown-button,
.view-rooms-button {
    width: 100%;
    margin-top: 16px;
    padding: 11px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: transparent;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.breakdown-button:hover,
.view-rooms-button:hover {
    background: rgba(255, 109, 0, 0.10);
}

/* Circle Tracker */

.budget-circle {
    width: 150px;
    height: 150px;
    min-width: 150px;
    min-height: 150px;
    aspect-ratio: 1 / 1;
    flex: 0 0 150px;

    margin: 18px auto 0;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--border);
}

.budget-circle-inner {
    width: 118px;
    height: 118px;
    min-width: 118px;
    min-height: 118px;
    aspect-ratio: 1 / 1;
    flex: 0 0 118px;

    border-radius: 50%;
    background: var(--surface);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.budget-circle-inner strong {
    color: var(--text);
    font-size: 30px;
    font-weight: 700;
}

.budget-circle-inner span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}


/* Rooms */

.room-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
}

.room-info {
    min-width: 0;
    flex: 1;
}

.room-info strong {
    display: block;
    font-size: 13px;
    margin-bottom: 7px;
}

.room-value {
    font-size: 12px;
    white-space: nowrap;
}

.room-arrow {
    height: 26px;

    margin-top: 3px;
    margin-right: 5px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 8px;

    border: 1px solid var(--accent);
    border-radius: 6px;

    background: transparent;
    color: var(--accent);

    font-size: 10px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.room-arrow:hover {
    background: var(--accent);
    color: #fff;
}

.room-progress {
    height: 4px;
}

.orange {
    background: rgba(255, 109, 0, 0.16);
    color: #FF6D00;
}

.blue {
    background: rgba(91, 124, 153, 0.18);
    color: #5B7C99;
}

.green {
    background: rgba(80, 180, 90, 0.16);
    color: #55c45f;
}

.purple {
    background: rgba(130, 90, 210, 0.18);
    color: #9b7be8;
}


/* Light theme */

html[data-theme="light"] .breakdown-button:hover,
html[data-theme="light"] .view-rooms-button:hover {
    background: rgba(91, 124, 153, 0.10);
}


/* Responsive */

@media (max-width: 1700px) {
    .welcome-panels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .welcome-panels {
        grid-template-columns: 1fr;
    }

    .panel-header {
        padding: 17px;
    }

    .panel-content {
        padding: 0 17px 17px;
    }
}
/* =========================
   OVERALL PAGE
   ========================= */

.overall-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 30px;
}

.overall-header {
    margin-bottom: 24px;
}

.page-label {
    display: block;
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 7px;
}

.overall-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text);
}

.overall-header p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
}


/* Financial summary */

.financial-summary {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.financial-card {
    min-width: 0;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.financial-card span {
    display: block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.financial-card strong {
    display: block;
    color: var(--text);
    font-size: 21px;
    font-weight: 600;
    white-space: nowrap;
}

.financial-card.highlight {
    border-color: var(--accent);
}

.financial-card.highlight strong {
    color: var(--accent);
}


/* Responsive */

@media (max-width: 1450px) {

    .financial-summary {
        grid-template-columns: repeat(4, 1fr);
    }

}

@media (max-width: 1050px) {

    .financial-summary {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 800px) {

    .overall-page {
        padding: 20px;
    }

    .financial-summary {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 500px) {

    .financial-summary {
        grid-template-columns: 1fr;
    }

}
/* =========================
   OVERALL — ROOMS
   ========================= */

.overall-section {
    margin-top: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.overall-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
}

.overall-section-header h2 {
    color: var(--text);
    font-size: 20px;
    font-weight: 600;
}

.overall-section-header p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
}

.section-toggle,
.room-toggle {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 16px;
}

.section-toggle:hover,
.room-toggle:hover {
    background: var(--surface-hover);
    color: var(--accent);
}


/* =========================
   ROOM CARD
   ========================= */

.rooms-content {
    padding: 0 24px 24px;
}

.room-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.room-card-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 130px;
    padding: 24px 24px 22px 24px;
}

.room-title {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.room-icon-large {
    width: 42px;
    height: 42px;
    border-radius: 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 109, 0, 0.14);
    color: var(--accent);
    font-size: 18px;
}

.room-label {
    display: block;
    color: var(--accent);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.3px;
    margin-bottom: 4px;
}

.room-title h3 {
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
}

.room-meta {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.room-item-count {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.room-budget-display {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.room-budget-display strong {
    margin-left: 4px;
    color: var(--text);
    font-size: 11px;
    letter-spacing: 0;
}

.room-header-total {
    margin-left: auto;
    margin-right: 48px;
    padding-top: 8px;
    text-align: right;
}

.room-header-total span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.room-header-total strong {
    display: block;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
}

.room-card-toggle {
    position: absolute;
    top: 20px;
    right: 20px;

    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    padding: 0;

    border: 1px solid var(--border);
    border-radius: 7px;

    background: transparent;
    color: var(--muted);

    cursor: pointer;
}

.room-card-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
}



.room-summary {
    display: flex;
    align-items: center;
    gap: 18px;
}

.room-summary div {
    text-align: right;
}

.room-summary span {
    display: block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.room-summary strong {
    color: var(--text);
    font-size: 20px;
    font-weight: 600;
}

/* =========================
   OVERALL ROOM SEARCH
   ========================= */

.overall-room-search {
    padding: 0 24px 18px;
    max-width: 420px;
}

.overall-room-search input {
    width: 100%;
    padding: 12px 14px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: var(--input-bg);
    color: var(--text);

    font-size: 14px;
    box-sizing: border-box;
}

.overall-room-search input:focus {
    outline: none;
    border-color: var(--accent);
}

@media (max-width: 1000px) {

    .rooms-content {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 550px) {

    .overall-room-search {
        padding: 0 18px 18px;
        max-width: none;
    }

}


/* =========================
   ROOM FINANCIALS
   ========================= */

.room-card-content {
    border-top: 1px solid var(--border);
    padding: 20px;
}

.room-financials {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.room-financials div {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--background);
}

.room-financials span {
    display: block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 7px;
}

.room-financials strong {
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
}


/* =========================
   ROOM ITEMS
   ========================= */

.room-items {
    margin-top: 20px;
}

.room-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 14px 0;
    border-top: 1px solid var(--border);
}

.room-item > div:first-child {
    min-width: 0;
}

.room-item strong {
    display: block;
    color: var(--text);
    font-size: 13px;
}

.room-item span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.room-item-cost {
    text-align: right;
    flex-shrink: 0;
}

.room-item-cost strong {
    font-size: 13px;
}

.status {
    display: inline-block !important;
    margin-top: 4px !important;
    font-size: 9px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.status.paid {
    color: #55c45f;
}

.status.unpaid {
    color: var(--orange);
}


/* =========================
   ROOM ACTIONS
   ========================= */

.room-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.room-actions button {
    padding: 10px 15px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: transparent;
    color: var(--muted);

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
}

.room-actions button:hover {
    background: var(--surface-hover);
    color: var(--accent);
}

.room-actions button:last-child {
    border-color: var(--accent);
    color: var(--accent);
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 800px) {

    .room-financials {
        grid-template-columns: repeat(2, 1fr);
    }

    .room-card-header {
        align-items: flex-start;
        gap: 15px;
    }

}

@media (max-width: 550px) {

    .overall-section-header {
        padding: 18px;
    }

    .rooms-content {
        padding: 0 18px 18px;
    }

    .room-card-header {
        padding: 16px;
    }

    .room-summary div {
        display: none;
    }

    .room-card-content {
        padding: 16px;
    }

    .room-financials {
        grid-template-columns: 1fr 1fr;
    }

    .room-item {
        align-items: flex-start;
        gap: 15px;
    }

    .room-actions {
        flex-direction: column;
    }

    .room-actions button {
        width: 100%;
    }

}
/* =========================
   OVERALL ROOM GRID
   ========================= */

.rooms-content {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 0 24px 24px;

    align-items: start;

    max-height: 680px;
    overflow-y: auto;
    overflow-x: hidden;
}

.overall-room-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.room-card {
    min-width: 0;
}

.room-card-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 125px;
    box-sizing: border-box;
    padding: 24px 24px 20px;
}


.overall-room-summary {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
    margin-top: 18px;
}

.overall-summary-item {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
}

.overall-summary-item span {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 6px;
}

.overall-summary-item strong {
    display: block;
    font-size: 16px;
    color: var(--text);
}



.room-title {
    align-items: flex-start;
}

.room-title h3 {
    line-height: 1.2;
}

.room-summary {
    gap: 8px;
    flex-direction: column;
    align-items: flex-end;
}

.room-summary div {
    text-align: right;
}

.room-card-content {
    padding: 16px;
}

.room-financials {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.room-financials div {
    padding: 11px;
}

.room-financials strong {
    font-size: 14px;
}




/* Room cards are read-only on Overall */

.room-actions {
    display: none;
}


/* Room item information */

.room-items {
    margin-top: 14px;
}


/* =========================
   OVERALL ROOM COLLAPSE
   ========================= */

.room-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.room-card-toggle {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.room-card-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
}

@media (max-width: 480px) {
    .room-card-toggle {
        display: none;
    }

    .room-card-header {
        cursor: pointer;
    }

    .room-header-budgets {
        margin-right: 0;
    }
}


.room-card-details {
    display: none;
}

.room-card-details.is-expanded {
    display: block;
}

.overall-room-summary {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    padding: 18px 24px 24px;
    border-top: 1px solid var(--border);
}

@media (max-width: 480px) {
    .overall-room-summary {
        grid-template-columns: 1fr 1fr;
    }
}

.overall-summary-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
}

.overall-summary-item span {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 6px;
}

.overall-summary-item strong {
    display: block;
    font-size: 16px;
    color: var(--text);
}

.room-card.is-collapsed .room-card-header {
    min-height: 0;
    padding-top: 14px;
    padding-bottom: 14px;
}


/* =========================
   OVERALL ROOM ITEMS
   ========================= */

.overall-room-items {
    border-top: 1px solid var(--border);
    margin-top: 18px;
    padding: 0 24px;
}

.overall-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.overall-payment-status {
    display: block;
    margin-top: 3px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.overall-payment-status.paid {
    color: #72c78a;
}

.overall-payment-status.unpaid {
    color: var(--accent);
}

.overall-payment-status.deposit {
    color: #d6a85f;
}

.overall-item-info {
    min-width: 0;
}

.overall-item-info strong {
    display: block;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 3px;
}

.overall-item-info span {
    display: block;
    font-size: 11px;
    color: var(--muted);
}

.overall-item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
    font-size: 11px;
    color: var(--muted);
}

.overall-item-price strong {
    font-size: 14px;
    color: var(--text);
    min-width: 90px;
    text-align: right;
}


/* =========================
   RESPONSIVE ROOM GRID
   ========================= */

@media (max-width: 1800px) {

    .rooms-content {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}


@media (max-width: 1600px) {

    .rooms-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 1200px) {

    .rooms-content {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 550px) {

    .rooms-content {
        grid-template-columns: 1fr;
        padding: 0 18px 18px;
    }

}


/* =========================
   ADD ROOM MODAL
   ========================= */

.room-create-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1001;

    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.72);
    padding: 25px;
}

.room-create-modal.open {
    display: flex;
}

.room-create-panel {
    width: min(520px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
}

.room-create-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
}

.room-create-header h2 {
    font-size: 25px;
    font-weight: 600;
    margin-bottom: 5px;
}

.room-create-header p {
    color: var(--muted);
    font-size: 13px;
}

.room-create-panel input {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 650px) {

    .room-create-modal {
        padding: 0;
        align-items: stretch;
    }

    .room-create-panel {
        width: 100%;
        min-height: 100vh;
        border-radius: 0;
        border: none;
        padding: 24px 20px;
    }

}

/* =====================
Room management buttons
======================== */

.room-management-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.room-management-buttons .view-rooms-button {
    width: 100%;
}

.remove-room-button {
    /* Uses the existing theme styling */
}

/* =========================
   REMOVE ROOM MODAL
   ========================= */

.room-remove-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1002;

    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.72);
    padding: 25px;
}

.room-remove-modal.open {
    display: flex;
}

.room-remove-panel {
    width: min(520px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
}

.room-remove-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.room-remove-header h2 {
    font-size: 25px;
    font-weight: 600;
    margin-bottom: 7px;
}

.room-remove-header p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    max-width: 420px;
}

.remove-warning {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}

@media (max-width: 650px) {

    .room-remove-modal {
        padding: 0;
        align-items: stretch;
    }

    .room-remove-panel {
        width: 100%;
        min-height: 100vh;
        border-radius: 0;
        border: none;
        padding: 24px 20px;
    }

}
/* =========================
   REMOVE ROOM SELECTION
   ========================= */

.room-selection-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1001;

    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.72);
    padding: 25px;
}

.room-selection-modal.open {
    display: flex;
}

.room-selection-panel {
    width: min(520px, 100%);
    max-height: 90vh;
    overflow-y: auto;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;

    padding: 30px;
}

.room-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    margin-bottom: 24px;
}

.room-selection-header h2 {
    font-size: 25px;
    font-weight: 600;
    margin-bottom: 5px;
}

.room-selection-header p {
    color: var(--muted);
    font-size: 13px;
}

.remove-room-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.remove-room-option {
    width: 100%;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 15px;

    border: 1px solid var(--border);
    border-radius: 9px;

    background: transparent;
    color: var(--text);

    font-family: inherit;
    font-size: 14px;
    text-align: left;

    cursor: pointer;

    transition: 0.2s ease;
}

.remove-room-option:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
}

.remove-room-option-icon {
    width: 34px;
    height: 34px;

    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(255, 109, 0, 0.16);
    color: var(--orange);

    font-size: 15px;
}

.remove-room-option span:nth-child(2) {
    flex: 1;
    font-weight: 600;
}

.remove-room-option-arrow {
    color: var(--muted);
    font-size: 21px;
}

@media (max-width: 650px) {

    .room-selection-modal {
        padding: 0;
        align-items: stretch;
    }

    .room-selection-panel {
        width: 100%;
        min-height: 100vh;

        border-radius: 0;
        border: none;

        padding: 24px 20px;
    }

}
/* =========================
   Vat Options
   ========================= */

.vat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (min-width: 651px) {
    .vat-options {
        flex-wrap: nowrap;
    }
}


/* =========================
   NOTES + SNAG
   ========================= */

.notes-snag-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.snag-status-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

@media (max-width: 700px) {

    .notes-snag-row {
        grid-template-columns: 1fr;
    }

}

/* =========================
   ITEM DATES
   ========================= */

.item-date-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.item-date-row .form-group {
    flex: 0 0 auto;
}

.item-date-heading {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.item-datetime-field {
    display: flex;
    align-items: center;
    height: 38px;
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--background);
}

.item-datetime-field:focus-within {
    border-color: var(--accent);
}

.item-datetime-field input {
    height: 100%;
    border: 0 !important;
    border-radius: 0 !important;
    outline: none;
    background: transparent;
}

.item-datetime-field input[type="date"] {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    padding: 0 8px;
}

.item-date-row .form-group > label {
    height: 18px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.item-date-row .report-help-popup {
    top: auto;
    bottom: calc(100% + 20px);
}

.item-datetime-field .item-time-input {
    flex: 0 0 64px;
    width: 64px;
    min-width: 64px;
    padding: 0 5px;
    border-left: 1px solid var(--border) !important;
    text-align: center;
}

.item-date-row input[type="date"] {
    background: var(--background);
    color: var(--text);

    border: 1px solid var(--border);
    border-radius: 8px;

    padding: 10px 12px;

    font-family: inherit;
    font-size: 13px;

    outline: none;
}

.item-date-row input[type="date"]:focus {
    border-color: var(--accent);
}

html:not([data-theme="light"])
.item-date-row input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.7;
    cursor: pointer;
}



/* =========================
   SUPPLIER SIDE PANEL
   ========================= */

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

.supplier-input-row input {
    flex: 1;
}

.supplier-details-button {
    flex: 0 0 auto;

    padding: 0 15px;

    border: 1px solid var(--accent);
    border-radius: 8px;

    background: transparent;
    color: var(--accent);

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
}

.supplier-details-button:hover {
    background: rgba(255, 109, 0, 0.10);
}


/* Side panel */

.supplier-side-panel {
    position: fixed;

    top: 0;
    right: 0;
    bottom: 0;

    width: min(430px, 100%);

    z-index: 1100;

    background: var(--surface);

    border-left: 1px solid var(--border);

    padding: 30px;

    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.35);

    transform: translateX(100%);

    transition: transform 0.25s ease;

    overflow-y: auto;
}

.supplier-side-panel.open {
    transform: translateX(0);
}

.supplier-side-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    margin-bottom: 30px;
}

.supplier-side-header h2 {
    font-size: 25px;
    font-weight: 600;
    margin-bottom: 5px;
}

.supplier-side-header p {
    color: var(--muted);
    font-size: 13px;
}

.supplier-side-actions {
    display: flex;
    justify-content: space-between;

    margin-top: 30px;
}

@media (max-width: 650px) {

    .supplier-side-panel {
        width: 100%;
        border-left: none;
        padding: 24px 20px;
    }

    .supplier-input-row {
        flex-direction: column;
    }

    .supplier-details-button {
        width: 100%;
        padding: 12px;
    }

}

/* =========================
   ITEM MEASUREMENTS
   ========================= */

.item-measurement-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 12px;
}

.item-measurement-row .form-group {
    min-width: 0;
}

@media (max-width: 650px) {

    .item-measurement-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

}

/* =========================
   COMPACT SUPPLIER DETAILS
   ========================= */

#supplier {
    width: 65%;
}

/* Supplier address */

.form-group:has(#supplierAddress) {
    width: 100%;
}


/* Slightly shorter address field */

#supplierAddress {
    min-height: 65px;
}


/* Keep mobile layout clean */

@media (max-width: 650px) {

    #supplier {
        width: 100%;
    }

    .form-group:has(.rating),
    .form-group:has(#supplierPhone) {
        display: block;
        width: 100%;
        margin-right: 0;
    }

}



/* =========================
   SUPPLIER INFO ROW
   ========================= */

.supplier-info-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.supplier-info-row input {
    width: 100%;
    box-sizing: border-box;
}

.supplier-info-row label {
    white-space: nowrap;
}

.supplier-info-row .form-group {
    margin-bottom: 20px;
}


/* Mobile */

@media (max-width: 650px) {

    .supplier-info-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

}

@media (max-width: 700px) {

    .item-date-row {
        grid-template-columns;
    }

}

/* =========================
   ROOM ITEMS PANEL
   ========================= */

.room-items-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;

    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.72);
    padding: 25px;
}

.room-items-modal.open {
    display: flex;
}

.room-items-panel {
    width: min(700px, 100%);
    max-height: 90vh;
    overflow-y: auto;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;

    padding: 30px;
}

/* =========================
   ADD ITEM + ITEM LIST LAYOUT
   ========================= */

@media (min-width: 1200px) {

    .item-modal-panel {
        transition: transform 0.4s ease;
    }

    .item-modal.items-open .item-modal-panel {
        transform: translateX(-360px);
    }


    .room-items-modal.open {
        background: transparent;
        pointer-events: none;
    }

    .room-items-modal.open .room-items-panel {
        transform: translateX(410px);
        pointer-events: auto;

        animation: roomItemsSlideIn 0.4s ease-out;
    }

}


@keyframes roomItemsSlideIn {

    from {
        opacity: 0;
        transform: translateX(450px);
    }

    to {
        opacity: 1;
        transform: translateX(410px);
    }

}

.room-panel-description #roomPanelName {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.room-items-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    margin-bottom: 24px;
}

.room-items-header h2 {
    font-size: 25px;
    font-weight: 600;
    margin-bottom: 5px;
}

.room-items-header p {
    color: var(--muted);
    font-size: 13px;
}


/* Item list */

.room-items-list {
    max-height: 55vh;
    overflow-y: auto;
    border-top: 1px solid var(--border);
}

.room-item-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr 125px auto;
    gap: 12px;

    align-items: center;

    padding: 8px 0;

    border-bottom: 1px solid var(--border);
}

.room-item-row strong {
    color: var(--text);
    font-size: 13px;
}

.room-item-row span {
    color: var(--muted);
    font-size: 12px;
}

.room-item-price {
    color: var(--text) !important;
    font-weight: 600;
    
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    text-align: right;
    white-space: nowrap;

}

.room-item-actions {
    display: flex;
    gap: 6px;
}

.room-item-actions button {
    padding: 5px 9px;

    border: 1px solid var(--border);
    border-radius: 5px;

    background: transparent;
    color: var(--muted);

    font-size: 11px;
    line-height: 1;
    cursor: pointer;
}

.room-item-actions button:hover {
    background: var(--surface-hover);
    color: var(--accent);
}

.room-item-actions .delete-item-button:hover {
    color: #ff6d6d;
    border-color: #ff6d6d;
}


/* Bottom actions */

.room-items-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-top: 24px;
}


/* Mobile */

@media (max-width: 650px) {

    .room-items-modal {
        padding: 0;
        align-items: stretch;
    }

    .room-items-panel {
        width: 100%;
        max-height: 100vh;

        border-radius: 0;
        border: none;

        padding: 24px 20px;
    }

    .room-item-row {
        grid-template-columns: 1fr auto;
        gap: 6px 12px;
    }

    .room-item-row .item-supplier,
    .room-item-row .room-item-price {
        grid-column: 1;
    }

    .room-item-actions {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

}

/* =========================
   SUPPLIER CHANGE MODAL
   ========================= */

.supplier-change-modal {
    display: none;

    position: fixed;
    inset: 0;

    z-index: 1200;

    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.72);

    padding: 25px;
}

.supplier-change-modal.open {
    display: flex;
}

.supplier-change-panel {
    width: min(520px, 100%);

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 16px;

    padding: 30px;
}

.supplier-change-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    margin-bottom: 25px;
}

.supplier-change-header h2 {
    font-size: 23px;
    font-weight: 600;

    margin-bottom: 6px;
}

.supplier-change-header p {
    color: var(--muted);

    font-size: 13px;

    line-height: 1.5;
}


/* Options */

.supplier-change-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.supplier-change-option {
    width: 100%;

    display: flex;
    flex-direction: column;

    gap: 6px;

    padding: 16px;

    border: 1px solid var(--border);

    border-radius: 9px;

    background: transparent;

    color: var(--text);

    text-align: left;

    cursor: pointer;

    transition: 0.2s ease;
}

.supplier-change-option:hover {
    background: var(--surface-hover);

    border-color: var(--accent);
}

.supplier-change-option strong {
    font-size: 14px;

    font-weight: 600;
}

.supplier-change-option span {
    color: var(--muted);

    font-size: 12px;

    line-height: 1.5;
}


/* Mobile */

@media (max-width: 650px) {

    .supplier-change-modal {
        padding: 0;

        align-items: stretch;
    }

    .supplier-change-panel {
        width: 100%;

        min-height: 100vh;

        border-radius: 0;

        border: none;

        padding: 24px 20px;
    }

}

.view-items-button {
    padding: 10px 18px;

    min-height: 40px;

    border: 1px solid var(--accent);
    border-radius: 8px;

    background: transparent;

    color: var(--text);

    font-size: 13px;
    font-weight: 500;

    cursor: pointer;

    transition: 0.2s ease;
}

.view-items-button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* =========================
   CONTACTS PAGE
   ========================= */

.contacts-list {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;

    margin-top: 28px;
}

/* Quotes responsive grid */
@media (max-width: 1220px) {
    #quotesList {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    #quotesList {
        grid-template-columns: 1fr;
    }
}

/* Snag List responsive grid */
@media (max-width: 1350px) {
    #snagList {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1050px) {
    #snagList {
        grid-template-columns: 1fr;
    }
}

/* Suppliers responsive grid */
@media (max-width: 750px) {
    #contactsList {
        grid-template-columns: 1fr;
    }
}


.contact-card {
    padding: 14px 16px;

    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);

    border-radius: 10px;

    background: var(--surface);

    min-height: 0px;

    display: flex;
    flex-direction: column;

    box-sizing: border-box;
}

.contact-card-top {
    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 15px;
}


.contact-card-top strong {
    font-size: 16px;

    font-weight: 600;

    line-height: 1.3;
}


.contact-rating {
    white-space: nowrap;

    font-size: 15px;

    letter-spacing: 1px;

    flex-shrink: 0;
}


.contact-address {
    margin-top: 6px;

    font-size: 13px;

    line-height: 1.5;

    color: var(--muted);
}


.contact-name {
    color: var(--text);
}


.contact-details {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 12px;

    margin-top: 10px;
}


.contact-detail {
    display: flex;
    flex-direction: column;

    gap: 4px;

    font-size: 14px;
}


.contact-detail-label {
    display: block;

    margin-bottom: 3px;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.8px;

    color: var(--accent);
}


.contact-address {
    margin-top: 10px;

    padding-top: 8px;

    border-top: 1px solid var(--border);

    display: flex;
    flex-direction: column;

    gap: 4px;

    font-size: 13px;
    line-height: 1.5;

    color: var(--muted);
}

.stars-filled {
    color: #f5b301;
}

.stars-empty {
    color: var(--muted);
}

/* =========================
   SUPPLIER SEARCH
   ========================= */

.supplier-search {
    margin: 22px 0;
    max-width: 420px;
}

.supplier-search input {
    width: 100%;
    padding: 12px 14px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: var(--input-bg);
    color: var(--text);

    font-size: 14px;

    box-sizing: border-box;
}

.supplier-search input:focus {
    outline: none;
    border-color: var(--accent);
}


/* Smaller screens */

@media (max-width: 1100px) {

    .contacts-list {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* Mobile */

@media (max-width: 700px) {

    .contacts-list {
        grid-template-columns: 1fr;
    }

}

/* =========================
   ROOM BUDGET DISPLAY
   ========================= */

.room-budget-display {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.room-budget-display strong {
    margin-left: 4px;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
}

.room-budget-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.room-budget-value {
    font-size: 13px;
    line-height: 1.2;
}

.room-budget-status {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.2;
}

/* =========================
   WELCOME ROOM BUDGET
   ========================= */

#welcomeRoomList .room-budget-display {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 130px;
}

#welcomeRoomList .room-budget-status {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    text-transform: none;
}

/* =========================
   Deposit Tick and Input
   ========================= */

.deposit-row {
    display: flex;
    align-items: flex-end;
    gap: 24px;
}

.deposit-amount-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.deposit-amount-inline label {
    margin: 0;
    white-space: nowrap;
    font-size: 12px;
}

/* =========================
   Budget header on overall
   ========================= */

.room-header-budgets {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    margin-left: auto;
    margin-right: 14px;
    text-align: right;
}

.room-header-budgets span {
    display: block;
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.room-header-budgets strong {
    display: block;
    color: var(--text);
    font-size: 12px;
    margin-top: 2px;
}

.room-header-budgets {
    margin-right: 45px;
}

@media (max-width: 480px) {
    .room-header-budgets {
        margin-right: 0;
    }
}

/* =========================
   Adding Quote to Item List
   ========================= */

.quote-item-label {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 7px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--orange);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.7px;
    vertical-align: middle;
}

/* =========================
   Adding Deposit to Item List
   ========================= */

   .deposit-item-label {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 7px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.7px;
    vertical-align: middle;
}



/* =========================
   QUOTES PAGE
   ========================= */

.quote-card {
    padding: 14px 16px;

    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);

    border-radius: 12px;

    background: var(--surface);

    min-height: 0px;

    box-sizing: border-box;
}


.quote-card-top {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;
}


.quote-badge {
    display: block;

    margin-bottom: 8px;

    color: var(--accent);

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.9px;
}


.quote-item-name {
    display: block;

    color: var(--text);

    font-size: 16px;
    font-weight: 600;

    line-height: 1.3;

    cursor: default;
}


.quote-total {
    color: var(--accent);

    font-size: 18px;
    font-weight: 700;

    white-space: nowrap;
}


.quote-location {
    margin-top: 8px;

    color: var(--muted);

    font-size: 12px;

    text-transform: uppercase;
    letter-spacing: 0.6px;
}


.quote-supplier {
    margin-top: 5px;

    color: var(--text);

    font-size: 14px;
    font-weight: 500;
}


.quote-financials {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 10px;

    margin-top: 12px;
    padding-top: 10px;

    border-top: 1px solid var(--border);
}


.quote-financials div {
    min-width: 0;
}


.quote-financials span {
    display: block;

    margin-bottom: 5px;

    color: var(--muted);

    font-size: 9px;
    font-weight: 600;

    letter-spacing: 0.6px;
}


.quote-financials strong {
    display: block;

    color: var(--text);

    font-size: 13px;
    font-weight: 600;
}


@media (max-width: 700px) {

    .quote-card-top {
        gap: 12px;
    }

    .quote-total {
        font-size: 15px;
    }

    .quote-financials {
        grid-template-columns: 1fr;
    }

}

.quote-note-hover {
    position: relative;
    display: inline-block;
}

.quote-note-tooltip {
    position: absolute;

    left: calc(100% + 10px);
    top: 50%;
  
    transform: translateY(-50%);

    min-width: 220px;
    max-width: 320px;

    padding: 10px 12px;

    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;

    color: var(--text);

    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    z-index: 100;
}

.quote-note-hover:hover .quote-note-tooltip {
    opacity: 1;
    visibility: visible;
}


/* Quote card theme labels */

.quote-location-label {
    color: var(--accent);
}

.quote-financials span {
    color: var(--accent);
}

.quote-badge {
    display: inline-block;

    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.8px;

    color: var(--accent);

    padding-bottom: 4px;
    margin-bottom: 7px;

    border-bottom: 2px solid var(--accent);
}

/* =========================
   SNAG LIST
   ========================= */

.snag-card {
    background: var(--surface);

    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);

    border-radius: 10px;

    padding: 14px 16px;
    margin-bottom: 10px;
}

.snag-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.snag-card-top strong {
    font-size: 16px;
}

.snag-badge {
    display: inline-block;
    padding: 3px 8px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.7px;
}

.snag-description {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    line-height: 1.5;
}

.snag-item-label {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 7px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.7px;
    vertical-align: middle;
}

/* =========================================
   Welcome - Snags / Quotes Summary
========================================= */

.welcome-action-card {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    align-items: center;
    gap: 20px;
}

.welcome-action-stat {
    min-width: 0;
}

.welcome-action-divider {
    width: 1px;
    height: 58px;
    background: var(--border);
    opacity: 0.8;
}

/* =========================
   BUG REPORT MODAL
   ========================= */

.bug-report-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 24px;
    background: rgba(0, 0, 0, 0.65);
}

.bug-report-modal.open {
    display: flex;
}

.bug-report-panel {
    width: 100%;
    max-width: 520px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;

    overflow: hidden;
}

.bug-report-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--border);
}

.bug-report-header h2 {
    margin: 0 0 6px;
    font-size: 20px;
    color: var(--text);
}

.bug-report-header p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}

.bug-report-close {
    flex: 0 0 auto;

    border: none;
    background: transparent;
    color: var(--muted);

    font-size: 26px;
    line-height: 1;

    cursor: pointer;
}

.bug-report-close:hover {
    color: var(--text);
}

.bug-report-body {
    padding: 22px 24px;
}

.bug-report-field + .bug-report-field {
    margin-top: 18px;
}

.bug-report-field label {
    display: block;
    margin-bottom: 7px;

    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.bug-report-field label span {
    font-weight: 400;
    color: var(--muted);
}

.bug-report-field input,
.bug-report-field textarea {
    width: 100%;
    box-sizing: border-box;

    padding: 11px 12px;

    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;

    color: var(--text);
    font-family: inherit;
    font-size: 14px;
}

.bug-report-field textarea {
    resize: vertical;
    min-height: 130px;
}

.bug-report-field input:focus,
.bug-report-field textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.bug-report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    padding: 16px 24px 22px;
}

.bug-report-cancel,
.bug-report-send {
    padding: 9px 16px;

    border-radius: 8px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

.bug-report-cancel {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.bug-report-send {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
}

/* =========================
   WHAT'S NEW MODAL
   ========================= */

.whats-new-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 24px;
    background: rgba(0, 0, 0, 0.65);
}

.whats-new-modal.open {
    display: flex;
}

.whats-new-panel {
    width: 100%;
    max-width: 560px;
    max-height: 80vh;

    display: flex;
    flex-direction: column;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;

    overflow: hidden;
}

.whats-new-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--border);
}

.whats-new-header h2 {
    margin: 0 0 6px;
    font-size: 20px;
    color: var(--text);
}

.whats-new-header p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}

.whats-new-close {
    flex: 0 0 auto;

    border: none;
    background: transparent;
    color: var(--muted);

    font-size: 26px;
    line-height: 1;

    cursor: pointer;
}

.whats-new-close:hover {
    color: var(--text);
}

.whats-new-body {
    padding: 22px 24px;
    overflow-y: auto;
}

.whats-new-loading,
.whats-new-empty {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
}

.whats-new-entry {
    padding: 0 0 20px;
}

.whats-new-entry + .whats-new-entry {
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.whats-new-entry:last-child {
    padding-bottom: 0;
}

.whats-new-date {
    margin-bottom: 5px;

    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.whats-new-title {
    margin: 0 0 8px;

    font-size: 16px;
    color: var(--text);
}

.whats-new-message {
    margin: 0;

    font-size: 14px;
    line-height: 1.6;
    color: var(--text);

    white-space: pre-wrap;
}

.whats-new-actions {
    display: flex;
    justify-content: flex-end;

    padding: 16px 24px 22px;
    border-top: 1px solid var(--border);
}

.whats-new-done {
    padding: 9px 16px;

    border: 1px solid var(--accent);
    border-radius: 8px;

    background: var(--accent);
    color: #fff;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

/* =========================
   WHAT'S NEW ADMIN
   ========================= */

.whats-new-admin {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--background);
}

.whats-new-admin[hidden] {
    display: none;
}

.whats-new-admin-field + .whats-new-admin-field {
    margin-top: 14px;
}

.whats-new-admin-field label {
    display: block;
    margin-bottom: 7px;

    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.whats-new-admin-field input,
.whats-new-admin-field textarea {
    width: 100%;
    box-sizing: border-box;

    padding: 10px 12px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;

    color: var(--text);
    font-family: inherit;
    font-size: 14px;
}

.whats-new-admin-field textarea {
    resize: vertical;
    min-height: 90px;
}

.whats-new-admin-field input:focus,
.whats-new-admin-field textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.whats-new-admin-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.whats-new-publish {
    padding: 9px 16px;

    border: 1px solid var(--accent);
    border-radius: 8px;

    background: var(--accent);
    color: #fff;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

.whats-new-publish:disabled {
    opacity: 0.6;
    cursor: default;
}
