/* Plain-CSS port of the original React app's Tailwind classes. Values below
   are copied from frontend/tailwind.config.js (default palette, no custom
   theme) and the actual component markup in frontend/src/components/layout
   and frontend/src/pages — not approximated. Keep this file as the single
   source of shared styling; every module should reuse these classes rather
   than inventing new ones. */

* {
    box-sizing: border-box;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background: #f9fafb;
    color: #111827;
    font-size: 16px;
}

a {
    color: inherit;
}

/* ---------- Topbar (AppShell header, h-14 = 56px) ---------- */

.topbar {
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.topbar-brand {
    font-weight: 700;
    color: #1d4ed8;
    font-size: 18px;
    margin-right: auto;
}

.topbar-user {
    text-align: right;
    line-height: 1.2;
}

.topbar-user-name {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.topbar-user-role {
    font-size: 12px;
    color: #6b7280;
    text-transform: capitalize;
}

/* ---------- Layout shell ---------- */

.app-layout {
    display: flex;
    /* height (fixed) + overflow:hidden, not min-height — matches
       AppShell.jsx's `flex-1 overflow-hidden` row exactly: this pins the
       row to the viewport instead of letting it grow with content, so
       the sidebar and main can scroll independently below. */
    height: calc(100vh - 56px);
    overflow: hidden;
}

main {
    flex: 1;
    min-width: 0;
    padding: 24px;
    /* Matches AppShell.jsx's <main className="overflow-auto"> — page
       content scrolls independently while the sidebar stays put. */
    overflow-y: auto;
}

/* ---------- Sidebar (aside w-56 = 224px) ---------- */

.sidebar {
    width: 224px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    /* Matches AppShell.jsx's <nav className="overflow-y-auto"> inside the
       fixed-height <aside> — the nav list itself scrolls if it overflows,
       instead of pushing the whole page down. */
    overflow-y: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    transition: background-color .15s, color .15s;
}

.nav-link:hover {
    background: #f3f4f6;
}

.nav-link.active {
    background: #eff6ff;
    color: #1d4ed8;
}

.nav-icon {
    flex-shrink: 0;
}

.nav-label {
    flex: 1;
    text-align: left;
}

summary.nav-link {
    cursor: pointer;
    list-style: none;
}

summary.nav-link::-webkit-details-marker {
    display: none;
}

.nav-chevron {
    margin-left: auto;
    display: inline-flex;
    transition: transform .2s ease;
}

details[open] > summary .nav-chevron {
    transform: rotate(90deg);
}

.nav-subitems {
    margin-top: 2px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-sublink {
    display: flex;
    align-items: center;
    padding: 6px 12px 6px 40px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
}

.nav-sublink:hover {
    background: #f3f4f6;
}

.nav-sublink.active {
    background: #eff6ff;
    color: #1d4ed8;
}

/* ---------- Flash banner ---------- */

.flash {
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
}

.flash-success {
    background: #dcfce7;
    color: #166534;
}

.flash-error {
    background: #fee2e2;
    color: #991b1b;
}

/* ---------- Page header row ---------- */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.page-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 2px 0 0;
}

/* ---------- Buttons ----------
   Three sizes, matching the three button shapes used throughout the
   original app: .btn (px-4 py-2, rounded-lg — "+ Add X", Save, Search),
   .btn-compact (px-3 py-1.5, rounded-lg — card-header add buttons, Logout),
   .btn-xs (px-2 py-1, rounded — row actions: View/Edit/Delete). */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color .15s;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
}

.btn-compact {
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 8px;
}

.btn-xs {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
}

.btn-page {
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 4px;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-danger {
    background: #fef2f2;
    color: #dc2626;
}

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

.btn[disabled] {
    opacity: .4;
    cursor: not-allowed;
}

/* ---------- Search bar + filters ---------- */

.search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
}

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

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

.search-input-wrap.grow {
    flex: 1;
    max-width: 320px;
}

.search-input-wrap.grow .search-input {
    width: 100%;
}

.search-input {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 32px 8px 12px;
    font-size: 14px;
    font-family: inherit;
}

.search-input.fixed-width {
    width: 224px;
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    font-size: 13px;
}

.search-clear:hover {
    color: #4b5563;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #3b82f6;
    border-color: transparent;
}

.status-filter {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}

.status-filter:focus {
    outline: none;
    box-shadow: 0 0 0 2px #3b82f6;
    border-color: transparent;
}

/* ---------- Forms (create/edit pages) ---------- */

.stacked-form label {
    display: block;
    margin-top: 12px;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    max-width: 480px;
}

.stacked-form input[type="text"],
.stacked-form input[type="email"],
.stacked-form input[type="number"],
.stacked-form input[type="password"],
.stacked-form select,
.stacked-form textarea {
    width: 100%;
    max-width: 480px;
    padding: 8px 12px;
    margin-top: 8px;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    display: block;
}

.stacked-form input:focus,
.stacked-form select:focus,
.stacked-form textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px #3b82f6;
    border-color: transparent;
}

.stacked-form textarea {
    min-height: 80px;
}

.stacked-form .btn {
    margin-top: 16px;
}

/* ---------- Table card (list pages) ---------- */

.table-card {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.table-card table {
    width: 100%;
    font-size: 14px;
    text-align: left;
    border-collapse: collapse;
}

.table-card thead {
    background: #f9fafb;
    color: #6b7280;
    text-transform: uppercase;
    font-size: 12px;
}

.table-card th,
.table-card td {
    padding: 12px 16px;
}

.table-card th {
    font-weight: 500;
}

.table-card tbody tr {
    border-top: 1px solid #f3f4f6;
}

.table-card tbody tr:hover {
    background: #f9fafb;
}

.table-card tbody tr.row-inactive {
    opacity: .6;
}

.table-card .empty-row td {
    padding: 40px 16px;
    text-align: center;
    color: #9ca3af;
}

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

.row-actions form.inline-form {
    display: contents;
}

form.inline-form {
    margin: 0;
}

.truncate-cell {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-muted {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
}

/* ---------- Pagination (Prev/Next + "Showing X-Y of Z") ---------- */

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    font-size: 14px;
    color: #4b5563;
}

.pagination-buttons {
    display: flex;
    gap: 8px;
}

/* ---------- Detail pages ---------- */

.detail-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 896px;
    margin: 0 auto;
}

/* Narrow, non-flex max-width wrapper — for list-style pages that source
   constrains to a max-w container (e.g. ItineraryTemplatesPage's
   max-w-4xl) but that aren't a .detail-stack flex column. */
.page-narrow {
    max-width: 896px;
    margin: 0 auto;
}

/* Settings page — source's max-w-3xl (48rem). */
.page-narrow-sm {
    max-width: 768px;
    margin: 0 auto;
}

.back-link {
    font-size: 14px;
    color: #2563eb;
    text-decoration: none;
    display: inline-block;
}

.back-link:hover {
    text-decoration: underline;
}

.card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.empty-hint {
    font-size: 14px;
    color: #9ca3af;
    text-align: center;
    padding: 24px 0;
}

/* Hotel info card */

.entity-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.entity-head h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.entity-meta-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.entity-meta-line .meta-text {
    font-size: 14px;
    color: #6b7280;
}

.entity-desc {
    font-size: 14px;
    color: #4b5563;
    margin-top: 8px;
    max-width: 576px;
}

.entity-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
    font-size: 14px;
    color: #6b7280;
}

.status-active-text {
    color: #16a34a;
    font-weight: 500;
}

.status-inactive-text {
    color: #9ca3af;
}

.badge-amber {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    background: #fef3c7;
    color: #b45309;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* Compact table used inside detail-page cards (Room Types etc.) */

.table-compact table {
    width: 100%;
    font-size: 14px;
    border-collapse: collapse;
}

.table-compact thead {
    background: #f9fafb;
    color: #6b7280;
    text-transform: uppercase;
    font-size: 12px;
}

.table-compact th,
.table-compact td {
    padding: 8px 12px;
    text-align: left;
}

.table-compact th {
    font-weight: 500;
}

.table-compact th.text-right,
.table-compact td.text-right {
    text-align: right;
}

.table-compact tbody tr {
    border-top: 1px solid #f3f4f6;
}

.table-compact .row-actions {
    justify-content: flex-end;
}

/* Image gallery (Images card) */

.image-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 640px) {
    .image-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .image-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
}

.image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    aspect-ratio: 16 / 9;
    background: #f3f4f6;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 9999px;
    background: #ef4444;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s, background-color .15s;
}

.image-item:hover .image-delete-btn {
    opacity: 1;
}

.image-delete-btn:hover {
    background: #dc2626;
}

/* ---------- Icon buttons (row actions: reorder, remove) ---------- */

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: none;
    background: transparent;
    border-radius: 6px;
    color: #9ca3af;
    cursor: pointer;
    transition: color .15s, background-color .15s;
}

.icon-btn:hover:not(:disabled) {
    color: #374151;
    background: #e5e7eb;
}

.icon-btn:disabled {
    opacity: .3;
    cursor: not-allowed;
}

.icon-btn-danger {
    color: #f87171;
}

.icon-btn-danger:hover:not(:disabled) {
    color: #dc2626;
    background: #fee2e2;
}

/* ---------- Settings-style section cards ---------- */

.section-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 20px;
    margin-bottom: 16px;
}

.section-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 8px;
    margin: 0 0 4px;
}

.stacked-form .form-row-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px 16px;
    max-width: 480px;
}

@media (min-width: 640px) {
    .stacked-form .form-row-2 {
        grid-template-columns: 1fr 1fr;
        max-width: none;
    }
}

.stacked-form .form-row-2 label {
    margin-top: 12px;
    max-width: none;
}

.hidden-form {
    display: none;
}

.file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Login page ---------- */

.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    padding: 0 16px;
}

.login-box {
    width: 100%;
    max-width: 384px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
    padding: 32px;
}

.login-box h1 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    text-align: center;
    margin: 0 0 4px;
}

.login-box .login-subtitle {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin: 0 0 24px;
}

.login-box label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-top: 16px;
    margin-bottom: 4px;
}

.login-box label:first-of-type {
    margin-top: 0;
}

.login-box input[type="text"],
.login-box input[type="email"],
.login-box input[type="password"] {
    width: 100%;
    padding: 8px 12px;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
}

.login-box input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #3b82f6;
    border-color: transparent;
}

.login-box .remember-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 14px;
    color: #4b5563;
}

.login-box button[type="submit"] {
    margin-top: 24px;
    width: 100%;
    padding: 8px;
    background: #2563eb;
    color: #fff;
    font-weight: 500;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.login-box button[type="submit"]:hover {
    background: #1d4ed8;
}

.hero-thumb {
    width: 56px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

.template-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #f3f4f6;
}

.template-thumb-empty {
    background: #f3f4f6;
}

.thumb-col {
    width: 56px;
}

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

.text-muted-xs {
    color: #d1d5db;
    font-size: 12px;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
}

.row-actions-end {
    justify-content: flex-end;
}

.link-edit,
.link-delete {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}

.link-edit {
    color: #2563eb;
}

.link-edit:hover {
    color: #1e40af;
    background: #eff6ff;
}

.link-delete {
    color: #ef4444;
}

.link-delete:hover {
    color: #dc2626;
    background: #fef2f2;
}

.activity-tags {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
    margin-bottom: 8px;
    max-width: 480px;
}

.activity-tag {
    display: flex;
    align-items: center;
    gap: 8px;
}

.activity-tag span {
    flex: 1;
    font-size: 14px;
    color: #374151;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 4px 8px;
}

.activity-tag button {
    background: none;
    border: none;
    color: #f87171;
    cursor: pointer;
    font-size: 12px;
    padding: 0 4px;
}

.activity-tag button:hover {
    color: #dc2626;
}

.activity-add-row {
    display: flex;
    gap: 8px;
    max-width: 480px;
}

.activity-add-row input[type="text"] {
    flex: 1;
}

.form-image-preview {
    display: block;
    width: 100%;
    max-width: 300px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    margin: 4px 0 8px;
    border: 1px solid #e5e7eb;
}

.form-image-preview-sm {
    display: block;
    width: 96px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    margin: 4px 0 8px;
    border: 1px solid #e5e7eb;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #4b5563;
    margin-bottom: 8px;
}

.error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
}

/* ---------- Leads: filter row, status badges, checkbox list, detail grid, timeline ---------- */

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.badge-status-new { background: #f3f4f6; color: #374151; }
.badge-status-contacted { background: #dbeafe; color: #1d4ed8; }
.badge-status-quoted { background: #fef3c7; color: #b45309; }
.badge-status-confirmed { background: #dcfce7; color: #15803d; }
.badge-status-lost { background: #fee2e2; color: #dc2626; }

.checkbox-list {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px;
    max-height: 128px;
    overflow-y: auto;
    max-width: 480px;
}

.checkbox-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
    padding: 2px 0;
}

.field-hint {
    font-size: 12px;
    color: #9ca3af;
    margin: 2px 0 0;
}

.field-preview {
    font-size: 13px;
    color: #6b7280;
    margin: 4px 0 0;
}

.field-preview a {
    color: #2563eb;
    text-decoration: none;
    margin-left: 8px;
}

.field-preview a:hover {
    text-decoration: underline;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .detail-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.detail-grid-full {
    grid-column: 1 / -1;
}

.field-label {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 500;
    color: #6b7280;
    margin: 0 0 2px;
}

.field-value {
    font-size: 14px;
    color: #374151;
    margin: 0;
    white-space: pre-wrap;
}

.inline-control-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 12px;
    border-left: 1px solid #e5e7eb;
}

.timeline li {
    position: relative;
    margin-left: 16px;
    margin-bottom: 16px;
}

.timeline li:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -21px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 9999px;
    border: 2px solid #fff;
    background: #60a5fa;
}

.timeline-desc {
    font-size: 14px;
    color: #374151;
    margin: 0;
}

.timeline-meta {
    font-size: 12px;
    color: #9ca3af;
    margin: 2px 0 0;
}

/* ---------- Package wizard ---------- */

.wizard-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

.wizard-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    color: #6b7280;
    cursor: pointer;
    text-decoration: none;
}

.wizard-tab:hover {
    color: #374151;
}

.wizard-tab.active {
    border-bottom-color: #2563eb;
    color: #2563eb;
}

.tab-icon-ok {
    color: #16a34a;
}

.tab-icon-warn {
    color: #f59e0b;
}

.wizard-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
}

.lead-info-box {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.lead-info-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 16px;
    font-size: 14px;
    color: #374151;
}

.lead-info-grid .k {
    color: #6b7280;
}

.warn-box {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 12px;
    color: #92400e;
}

.warn-box a {
    color: #92400e;
    font-weight: 600;
    text-decoration: underline;
}

.day-card,
.hotel-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.day-card-head,
.hotel-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.card-actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.card-actions button {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    border-radius: 4px;
}

.card-actions button:hover {
    color: #2563eb;
    background: #eff6ff;
}

.card-actions button.danger:hover {
    color: #dc2626;
    background: #fef2f2;
}

.price-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 12px 0;
}

.price-box .amount {
    font-size: 18px;
    font-weight: 700;
    color: #166534;
    margin: 2px 0 0;
}

.hotel-pick-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    text-align: left;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
}

.hotel-pick-btn:hover:not(:disabled) {
    border-color: #93c5fd;
    background: #eff6ff;
}

.hotel-pick-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    background: #f9fafb;
}

.btn-link-back {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    display: block;
    margin-bottom: 4px;
}

.btn-link-back:hover {
    text-decoration: underline;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 16px;
}

.modal-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .15);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
}

.modal-close:hover {
    color: #4b5563;
}

.modal-body {
    padding: 16px 20px;
}

.modal-body .stacked-form label {
    max-width: 100%;
}

.modal-body .stacked-form input,
.modal-body .stacked-form select,
.modal-body .stacked-form textarea {
    max-width: 100%;
}

/* ---------- Date picker popup (assets/js/date-mask.js) ---------- */

.date-picker-popup {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1);
    padding: 8px;
    width: 240px;
    z-index: 300;
    font-size: 13px;
}

.date-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    padding: 0 4px;
}

.date-picker-label {
    font-weight: 600;
    color: #1f2937;
    font-size: 13px;
}

.date-picker-nav {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 16px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: inherit;
}

.date-picker-nav:hover {
    background: #f3f4f6;
    color: #374151;
}

.date-picker-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.date-picker-weekday {
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
    font-weight: 600;
    padding: 4px 0;
}

.date-picker-day {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 0;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    font-family: inherit;
}

.date-picker-day:hover {
    background: #eff6ff;
}

.date-picker-day.today {
    font-weight: 700;
    color: #2563eb;
}

.date-picker-day.selected {
    background: #2563eb;
    color: #fff;
}

.date-picker-day.selected:hover {
    background: #1d4ed8;
}

/* ---------- Dashboard ---------- */

.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.dash-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #d1d5db;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: box-shadow .15s;
}

.dash-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .08);
}

.dash-card-blue { border-left-color: #3b82f6; }
.dash-card-amber { border-left-color: #f59e0b; }
.dash-card-green { border-left-color: #10b981; }
.dash-card-purple { border-left-color: #8b5cf6; }

.dash-value {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}

.dash-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-top: 4px;
}

.dash-sub {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
}

.dash-chart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
}

@media (max-width: 800px) {
    .dash-chart-grid {
        grid-template-columns: 1fr;
    }
}
