﻿:root {
    --bg: #f6f7f9;
    --panel: #fff;
    --border: #d9dce3;
    --text: #1b1f2a;
    --muted: #6b7380;
    --primary: #2563eb;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --sidebar-w: 232px;
    --sidebar-w-collapsed: 56px;
    --topbar-h: 40px;
    --stickyTop: 12px;
}

* {
    box-sizing: border-box
}

html, body {
    height: 100%
}

    body.erp-body {
        margin: 0;
        background: var(--bg);
        color: var(--text);
        font: 13px/1.25 "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial;
    }

/* Topbar */
.topbar {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

    .topbar .brand {
        font-weight: 600;
        letter-spacing: .2px;
        text-decoration: none;
        color: #2b3345
    }

.icon-btn {
    background: transparent;
    border: 0;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 16px
}

.topbar .top-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px
}

    .topbar .top-actions a {
        text-decoration: none;
        color: #2b3345;
        padding: 4px 6px;
        border-radius: 6px
    }

        .topbar .top-actions a.active {
            background: #eef2ff;
            color: #1d4ed8
        }

/* Shell grid */
.shell {
    min-height: calc(100vh - var(--topbar-h));
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    transition: grid-template-columns .18s ease;
}

/* Sidebar */
.sidebar {
    position: relative;
    background: #fff;
    border-right: 1px solid var(--border);
    overflow: hidden;
    will-change: width;
}

    .sidebar .sidebar-scroll {
        height: 100%;
        overflow: auto;
        padding: 8px 6px
    }

    .sidebar .section-title {
        color: var(--muted);
        font-size: 11px;
        text-transform: uppercase;
        margin: 6px 8px
    }

.side-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    margin: 2px 4px;
    color: #2b3345;
    text-decoration: none;
    border-radius: 6px;
}

    .side-link:hover {
        background: #f0f3f8
    }

    .side-link.is-active {
        background: #e9efff;
        color: #173e9b;
        font-weight: 600
    }

    .side-link .icon {
        width: 18px;
        text-align: center
    }

    .side-link .text {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

/* Collapsible subgroup */
.side-collapser {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    margin: 2px 4px;
    background: transparent;
    border: 0;
    color: #2b3345;
    text-align: left;
    border-radius: 6px;
    cursor: pointer;
}

    .side-collapser:hover {
        background: #f0f3f8
    }

    .side-collapser .icon {
        width: 18px;
        text-align: center
    }

    .side-collapser .chev {
        margin-left: auto;
        transition: transform .16s ease
    }

    .side-collapser[aria-expanded="true"] .chev {
        transform: rotate(90deg)
    }

.side-sub {
    display: none;
    margin: 2px 4px 6px 28px
}

    .side-sub.open {
        display: block
    }

.side-sublink {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    margin: 2px 0;
    color: #2b3345;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
}

    .side-sublink:hover, .side-sublink.is-active {
        background: #f5f7fb
    }

    .side-sublink .dot {
        width: 10px;
        text-align: center
    }

/* Collapsed state */
.sidebar.is-collapsed .section-title {
    display: none
}

.sidebar.is-collapsed .side-link .text,
.sidebar.is-collapsed .side-collapser .text,
.sidebar.is-collapsed .side-sub {
    display: none
}

.shell.sidebar-collapsed {
    grid-template-columns: var(--sidebar-w-collapsed) 1fr;
}

/* Mobile overlay (sidebar slides over content) */
.sidebar .sidebar-overlay {
    position: fixed;
    inset: var(--topbar-h) 0 0 0;
    background: rgba(0,0,0,.28);
    display: none;
    z-index: 20;
}

.sidebar.is-mobile-open .sidebar-overlay {
    display: block
}

@media (max-width: 900px) {
    .shell {
        grid-template-columns: 1fr
    }
    /* hide sidebar space */
    .sidebar {
        position: fixed;
        top: var(--topbar-h);
        left: 0;
        bottom: 0;
        z-index: 21;
        width: var(--sidebar-w);
        box-shadow: 0 8px 24px rgba(0,0,0,.1);
        transform: translateX(-100%);
        transition: transform .18s ease;
    }

        .sidebar.is-open {
            transform: translateX(0)
        }

    .shell.sidebar-collapsed {
        grid-template-columns: 1fr
    }
    /* no effect on mobile */
}

/* Content area */
.content {
    padding: 10px;
/*    overflow: auto;*/
    min-width: 0
}



/* Panel */
.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}

    .panel-header .title {
        font-weight: 600
    }

    .panel-header .actions {
        display: flex;
        gap: 6px
    }

.panel-body {
    padding: 14px 16px 16px;
}
/* Buttons (dense) */
.btn {
    border: 1px solid var(--border);
    background: #fff;
    color: #2b3345;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
}

    .btn:hover {
        border-color: #b8bfcc
    }

    .btn.primary {
        background: var(--primary);
        color: #fff;
        border-color: var(--primary)
    }

    .btn.xs {
        padding: 2px 6px;
        font-size: 12px
    }

/* KPIs */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 8px 10px
}

.kpi {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px
}

.kpi-title {
    color: var(--muted);
    font-size: 11px
}

.kpi-value {
    font-weight: 700;
    font-size: 18px;
    margin-top: 2px
}

.kpi-delta {
    font-size: 11px;
    color: var(--success)
}

/* Filters */
.filter-bar {
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
}

.filters {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap
}

    .filters label {
        display: flex;
        flex-direction: column;
        gap: 2px;
        font-size: 11px;
        color: var(--muted)
    }

    .filters input, .filters select {
        height: 28px;
        border: 1px solid var(--border);
        border-radius: 6px;
        padding: 0 8px;
        min-width: 130px;
        background: #fff;
        color: #2b3345
    }

    .filters .grow {
        flex: 1 1 auto
    }
.filter-bar .filters-actions {
    flex: 0 0 auto;
    margin-left: auto;
    align-self: flex-end;
    display: flex;
    gap: 8px;
    white-space: nowrap;
}
@media (max-width: 520px){
  .filter-bar{ flex-direction: column; }
  .filter-bar .filters-actions{ margin-left: 0; }
}
/* Table */
.table-wrap {
    padding: 8px 10px 12px;
    overflow: auto
}

.dense-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
/*    min-width: 900px*/
}

    .dense-table thead th {
        position: sticky;
        top: 0;
        background: #f5f7fb;
        z-index: 1;
        border-bottom: 1px solid var(--border);
        padding: 6px 8px;
        font-weight: 600;
        text-align: left;
        white-space: nowrap;
    }

    .dense-table tbody td {
        border-bottom: 1px solid #eef1f6;
        padding: 6px 8px;
        white-space: nowrap
    }

    .dense-table .min {
        width: 1%;
        white-space: nowrap
    }

/* Pills */
.pill {
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 11px;
    border: 1px solid var(--border);
    background: #fff
}

    .pill.open {
        color: var(--primary-ink);
        background: #e9efff;
        border-color: #d7e2ff
    }

    .pill.closed {
        color: #0f5132;
        background: #e8f4ec;
        border-color: #cfe9d6
    }

    .pill.onhold {
        color: #7f3b07;
        background: #fff2db;
        border-color: #ffe2b0
    }

.badge-high {
    background: #fee2e2;
    color: var(--danger);
    border-color: #fca5a5
}

.badge-medium {
    background: #fff1d6;
    color: var(--warning);
    border-color: #f7c66b
}

.badge-low {
    background: #e8f4ec;
    color: var(--success);
    border-color: #bfe7c8
}
.right{
    text-align:right !important;
}
@media (max-width:1200px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media (max-width:768px) {
    .kpi-grid {
        grid-template-columns: 1fr
    }

    .shell {
        grid-template-columns: 0 1fr
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 40px;
        bottom: 0;
        z-index: 10
    }
}
/* ===== Auth (ERP-dense) ===== */
.auth-wrap {
    min-height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.auth-card {
    width: 360px;
    max-width: 92vw;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(16,24,40,0.06);
}

.auth-head {
    padding: 12px 14px 6px;
    border-bottom: 1px solid var(--border);
}

.brand-mini {
    font-weight: 700;
    letter-spacing: .2px;
    margin-bottom: 4px;
    font-size: 14px
}

.auth-title {
    font-weight: 700;
    font-size: 18px;
}

.auth-sub {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px
}

.auth-form {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--muted)
}

    .auth-field input {
        height: 32px;
        border: 1px solid var(--border);
        border-radius: 6px;
        padding: 0 10px;
        font-size: 13px;
        color: var(--text);
        background: #fff;
    }

        .auth-field input:focus {
            outline: none;
            border-color: #b8bfcc;
            box-shadow: 0 0 0 2px #e6ecf8
        }

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
    margin-bottom: 2px;
}

.check {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #2b3345;
    font-size: 12px
}

.muted {
    color: var(--muted);
    text-decoration: none
}

    .muted:hover {
        text-decoration: underline
    }

.small {
    font-size: 12px
}

.btn.full {
    width: 100%;
    height: 32px;
    font-weight: 600
}
.sp-bedge {
    background-color: #eee;
    border-radius: 5px;
    padding: 0px 4px;
}
.auth-error {
    margin-top: 8px;
    padding: 6px 8px;
    border: 1px solid #fca5a5;
    background: #fee2e2;
    color: var(--danger);
    border-radius: 6px;
    font-size: 12px;
}

.auth-foot {
    padding: 8px 14px 12px;
    border-top: 1px dashed var(--border);
    text-align: center
}

/* Compact on small screens */
@media (max-width:420px) {
    .auth-card {
        width: 320px
    }
}
.no-shell .shell {
    display: none
}

.no-shell .top-actions a[href="/admin/users"],
.no-shell .top-actions a[href="/auth/login"],
.no-shell .top-actions form {
    display: none
}
/* Public layout */
.public-body {
    background: var(--bg);
}

.public-topbar {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.public-content {
    padding: 16px;
    max-width: 1100px;
    margin: 0 auto
}

.public-footer {
    padding: 10px 14px;
    color: var(--muted);
    text-align: center;
    font-size: 12px
}

.public-nav a {
    margin-left: 10px;
    color: #2b3345;
    text-decoration: none
}

.public-hero {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px
}

/* Login layout tweaks */
.no-shell .shell {
    display: none
}

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 48px);
}

/* (Your existing auth and ERP styles already defined earlier) */


/* Dense Modal */
/* ===== Modal base ===== */
.gp-modal{ position:fixed; inset:0; z-index:4000; display:none; }
.gp-modal.is-open{ display:flex; align-items:center; justify-content:center; }

/* Backdrop: darker + slight blur */
.gp-modal__backdrop{
  position:absolute; inset:0;
  background: rgba(15, 23, 42, .58);          /* darker overlay */
  backdrop-filter: blur(1px);
  z-index:4000;
}

/* Panel: centered, shadow, constrained height */
.gp-modal__panel{
  position:relative; z-index:4010;
  background:#fff; border:1px solid #d9dce3; border-radius:12px;
  box-shadow: 0 24px 60px rgba(10,20,60,.35), 0 2px 10px rgba(10,20,60,.1);
  width:560px; max-width:96vw; max-height:92vh;
  display:flex; flex-direction:column; overflow:hidden;

  /* enter animation */
  transform: translateY(8px) scale(.98); opacity:0;
  transition: transform .18s ease, opacity .18s ease;
}
.gp-modal.is-open .gp-modal__panel{ transform: translateY(0) scale(1); opacity:1; }

/* Header + content spacing */
.gp-modal__header{
  display:flex; align-items:center; justify-content:space-between;
  gap:8px; padding:10px 12px; border-bottom:1px solid #e5e7ef; background:#f9fafc;
}
.gp-modal__title{ margin:0; font-weight:700; font-size:14px; }
.gp-modal__close{ background:transparent; border:0; font-size:20px; line-height:1; color:#64748b; cursor:pointer; }
.gp-modal__content{ padding:12px; overflow:auto; flex:1 1 auto; }

/* Sizes (keep your attribute: data-modal-size="lg|xl") */
.gp-modal .gp-modal__panel.size-lg{ width:920px; }
.gp-modal .gp-modal__panel.size-xl{ width:1200px; }
@media (max-width:640px){ .gp-modal .gp-modal__panel{ width:96vw; } }

/* Prevent body scroll behind modal */
body.modal-open{ overflow:hidden; }

/* ==== Dense form layout ==== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
    /* ===== Dense form layout with proper gaps ===== */
    .form-grid.tight {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px 16px; /* row gap / column gap */
    }

@media (max-width:640px) {
    .form-grid.tight {
        grid-template-columns: 1fr;
    }
}

.form-grid.tight .span-2 {
    grid-column: 1 / -1; /* let a field span both columns on wide screens */
}
/* ----- Master Data grid: 4 columns, compact ----- */
.form-grid.master-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:12px 16px; /* row / column gap */
}

/* Responsive fallbacks */
@media (max-width:1200px){ .form-grid.master-grid{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width:900px) { .form-grid.master-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width:600px) { .form-grid.master-grid{ grid-template-columns: 1fr; } }

/* Spans for fields inside this grid */
.form-grid.master-grid .span-2  { grid-column: span 2; }
.form-grid.master-grid .span-all{ grid-column: 1 / -1; }
.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--muted)
}

    .field > span:first-child {
        font-size: 12px;
        color: var(--muted, #6b7380);
    }
    .field input, .field select {
        height: 30px;
        border: 1px solid var(--border);
        border-radius: 6px;
        padding: 0 8px;
        color: #2b3345;
    }

        .field input:focus, .field select:focus {
            outline: none;
            border-color: #b8bfcc;
            box-shadow: 0 0 0 2px #e6ecf8
        }

.err {
    color: var(--danger);
    font-size: 11px;
    min-height: 14px
}

.form-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    justify-content: flex-end
}

@media (max-width:640px) {
    .form-grid {
        grid-template-columns: 1fr
    }
}

.input-validation-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px #fee2e2
}

.field-validation-error, .err {
    color: #dc2626;
    font-size: 11px
}

.val-summary {
    display: none;
    margin-bottom: 8px;
    padding: 6px 8px;
    border: 1px solid #fca5a5;
    background: #fee2e2;
    color: #7f1d1d;
    border-radius: 6px;
    font-size: 12px
}

.validation-summary-errors .val-summary {
    display: block
}

.gp-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap
}

.gp-pager__summary {
    font-size: 12px;
    color: #6b7380
}

.gp-pager__nav .pagination {
    display: flex;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0
}

.gp-pager .btn.xs.current {
    font-weight: 700;
    cursor: default;
    background: #eef2ff;
    border-color: #c7d2fe
}

.gp-pager .btn.xs.disabled {
    opacity: .55;
    cursor: default
}

.gp-pager .btn.xs.muted {
    color: #6b7380;
    border-color: transparent;
    background: transparent;
    cursor: default
}

.gp-pager__size {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7380
}

/* ===== Alerts (TempData) ===== */
.alert {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    border: 1px solid transparent;
}

.alert-success {
    background: #ecfdf5;
    border-color: #10b98133;
    color: #065f46;
}

.alert-danger {
    background: #fef2f2;
    border-color: #ef444433;
    color: #7f1d1d;
}

/* Put toasts above modal + datepicker */
.gp-toast-wrap{ z-index: 12080 !important; position:fixed; right:12px; top:12px; }
.gp-toast{min-width:220px;max-width:380px;background:#fff;border:1px solid #d9dce3;border-left:4px solid #16a34a;border-radius:10px;padding:10px 12px;
  box-shadow:0 8px 28px rgba(0,0,0,.08);font:13px/1.4 "Inter",system-ui;color:#1b1f2a}
.gp-toast.error{border-left-color:#dc2626}
.gp-toast .t-title{font-weight:600;margin-bottom:2px}
.gp-toast .t-msg{color:#334155}
.text-danger { color:#dc2626; }
.text-danger:hover { color:#b91c1c; text-decoration:underline; }

/* Ensure datepicker stays above modal body */
.air-datepicker-global-container{ z-index: 10060 !important; }
/* Layout for the form to match your screenshot */
.invdate-toolbar{
  display:grid;
  grid-template-columns: 1fr 520px; /* left: range + clear, right: 2 controls */
  gap:12px; align-items:center; margin-bottom:8px;
}
.invdate-toolbar .controls{
  display:grid; grid-template-columns: 1fr 1fr; gap:12px;
}

.dates-grid{ display:grid; grid-template-columns: 340px 1fr; gap:16px; align-items:start; }
#invdateCalendarWrap{
  border:1px solid #e6e9f2; border-radius:10px; padding:8px; width:100%; max-width:340px;
}
.air-datepicker{ font-size:12px; }
.air-datepicker--content{ padding:6px; }

/* Fares card header look */
.fares-card legend{ font-size:12px; color:#64748b; }

/* List panel (scrollable) */
.invdate-panel{ margin-top:10px; }
.invdate-head{
  display:flex; align-items:center; justify-content:space-between;
  font-weight:600; padding:8px 10px; border:1px solid #e6e9f2; border-bottom:none; border-radius:10px 10px 0 0; background:#f8fafc;
}
.invdate-body{
  border:1px solid #e6e9f2; border-radius:0 0 10px 10px; max-height:340px; overflow:auto;
}
.inv-tbl{ width:100%; border-collapse:collapse; font-size:13px; }
.inv-tbl th, .inv-tbl td{ padding:8px 10px; border-bottom:1px solid #f0f2f6; white-space:nowrap; }
.inv-tbl th{ position:sticky; top:0; background:#fff; z-index:1; }
.inv-row-empty{ padding:16px; color:#64748b; }
    .gp-dp-foot{padding:8px;border-top:1px solid #e6e9f2;display:flex;gap:12px;align-items:center;justify-content:space-between}
.gp-dp-foot .lbl{display:flex;align-items:center;gap:8px;font-size:12px;color:#334155}
/* tiny emoji buttons */
.btn-emoji{
  display:inline-flex; align-items:center; justify-content:center;
  height:28px; min-width:28px; padding:0 6px;
  border-radius:8px; border:1px solid transparent;
  background:transparent; color:#475569; font-size:16px; line-height:1; cursor:pointer;
}
.btn-emoji:hover{ background:#f1f5f9; }
.btn-emoji.danger{ color:#dc2626; }
.btn-emoji.danger:hover{ background:#fee2e2; color:#b91c1c; }
.td-actions{ white-space:nowrap; }
.td-actions .btn-emoji + .btn-emoji{ margin-left:6px; }

tr.is-loading{ opacity:.55; }
tr.is-editing{ animation: invflash 1.2s ease-out 1; }
@keyframes invflash{
  0%{ background:#fff8c5; } 100%{ background:transparent; }
}
.db-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 980px) {
    .db-grid {
        grid-template-columns: 1fr;
    }
}
.card-title { font-weight: 700; color: #111827; }
.card-sub { font-size: 12px; color: #6b7280; }
.badges{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.badge{background:#eef6ee;color:#16803c;border-radius:999px;padding:2px 8px;font-size:12px}
.badge.no{background:#fee2e2;color:#b91c1c}
.pill.ok      { background:#ecfdf5; border-color:#a7f3d0; color:#065f46; }
.pill.soon    { background:#fffbeb; border-color:#fde68a; color:#92400e; }
.pill.urgent  { background:#fef2f2; border-color:#fecaca; color:#991b1b; }
/* container */
.flist{ display:flex; flex-direction:column; gap:10px; }



  .wrap{display:grid;grid-template-columns:1fr 340px;gap:14px;align-items:start;}
  .card{background:#fff;border:1px solid #e5e7eb;border-radius:10px}
  .card-h{background: #f9fafb;padding:12px 16px;border-bottom:1px solid #e5e7eb;font-weight:700;display:flex;justify-content:space-between;align-items:center}
  .card-b{padding:12px 14px}
  .sidebar.sticky{ position: sticky; top: var(--stickyTop); }
  .sidebar.sticky .card-b{
    max-height: calc(100vh - var(--stickyTop) - 56px); /* 56 ~ card header height */
    overflow:auto;
  }
  .k { color:#6b7280; font-size:12px; } /* tiny caption */
.nowrap { white-space: nowrap; }
.wide { width: 100%; }
  /* turn off sticky on narrow screens */
  @media (max-width: 1024px){
    .wrap{ grid-template-columns: 1fr; }
    .sidebar.sticky{ position: static; top:auto; }
    .sidebar.sticky .card-b{ max-height:none; overflow:visible; }
  }
  .muted{color:#6b7280}
  .itn-item{border:1px solid #eef2f7;border-radius:10px;padding:10px 12px;margin-bottom:10px}
  .itn-airline{font-size:13px;color:#374151;margin-bottom:6px;font-weight:600}
  .itn-airline{display:flex;align-items:center;gap:8px}
  .airline-logo{width:22px;height:22px;object-fit:contain;vertical-align:middle}
  .itn-grid{display:grid;grid-template-columns:180px 1fr 180px;gap:10px;align-items:center}
  .bk-code{font-size:22px;font-weight:800;letter-spacing:1px}
  .bk-city{color:#111827;font-weight:600}
  .bk-apt{color:#6b7280;font-size:12px}
  .bk-time{margin-top:4px;color:#111827}
  .bk-term{font-size:12px;color:#6b7280}
  .airrow{height:1px;background:repeating-linear-gradient(90deg,#9ca3af,#9ca3af 8px,transparent 8px,transparent 16px);position:relative;margin:6px 0}
  .airrow:after{content:"✈";position:absolute;top:-10px;left:50%;transform:translateX(-50%);font-size:12px;color:#1f2937}
  .dur{font-size:12px;text-align:center;color:#4b5563}
  .chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
  .chip{background:#f3f4f6;border:1px solid #e5e7eb;border-radius:999px;padding:3px 8px;font-size:12px;color:#374151}
  .lay{display:flex;justify-content:center;margin:10px 0}
  .lay > div{background:#eef2ff;color:#3730a3;border:1px solid #c7d2fe;border-radius:999px;padding:6px 12px;font-weight:700}

  .muted{color:#6b7280}
  .grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
  .grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
  .grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
  .row{display:flex;gap:10px;align-items:center}
  .tbl{width:100%;border-collapse:collapse;font-size:14px}
  .tbl th,.tbl td{border-bottom:1px dashed #e5e7eb;padding:6px 4px;text-align:left}
  .badge{background:#eef2ff;color:#4338ca;border-radius:6px;padding:2px 8px;font-size:12px}
  .dot{width:7px;height:7px;border-radius:50%;background:#9ca3af;display:inline-block;margin:0 6px}
  .airrow{height:1px;background:repeating-linear-gradient(90deg,#9ca3af,#9ca3af 8px,transparent 8px,transparent 16px);position:relative}
  .airrow:after{content:"✈";position:absolute;top:-10px;left:50%;transform:translateX(-50%);font-size:12px;color:#1f2937}
  .sec-title{font-weight:700;margin:8px 0 2px}
  .input, select{width:100%;padding:7px 8px;border:1px solid #d1d5db;border-radius:8px;font-size:14px}
  .note{background:#f1f5f9;border:1px solid #e2e8f0;border-radius:8px;padding:8px 10px;font-size:13px}
  .discounts button{padding:6px 10px;border:1px solid #d1d5db;border-radius:999px;background:#fff;cursor:pointer}
  .discounts button.active{border-color:#1d4ed8;color:#1d4ed8;font-weight:700}
  .discounts .active { outline: 1px solid #2563eb; }
  .btn-primary{background:#1d4ed8;border:0;color:#fff;padding:10px 14px;border-radius:8px;cursor:pointer}
  .btn-ghost{background:#fff;border:1px solid #d1d5db;color:#111827;padding:10px 14px;border-radius:8px;cursor:pointer}
  .sidebar h4{margin:0 0 6px}
  .right-kv{display:flex;justify-content:space-between;margin:6px 0}
  .total{font-size:20px;font-weight:800}
  .warn{color:#b45309}
  .layover{background:#eef2ff;color:#3730a3;border-radius:8px;padding:6px 8px;margin:8px 0;font-size:13px}
  .sectag{font-weight:700}
 .auto-dd .item{padding:8px 10px;cursor:pointer;border-bottom:1px dashed #eef2f7;font-size:14px}
.auto-dd .item:hover{background:#f9fafb}
.auto-dd .hint{font-size:12px;color:#6b7280;padding:6px 10px}

/* popover */
.cal-pop{position:absolute;z-index:60;width:330px;background:#fff;border:1px solid #e5e7eb;border-radius:10px;
  box-shadow:0 10px 30px rgba(0,0,0,.08);padding:6px}
.cal-head{display:flex;align-items:center;justify-content:space-between;padding:4px 6px}
.cal-head .m{font-weight:700}
.cal-nav{display:flex;gap:6px}
.cal-nav button{border:1px solid #e5e7eb;background:#f9fafb;border-radius:8px;padding:4px 8px;cursor:pointer}
.cal-dow,.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.cal-dow div{font-size:11px;color:#6b7280;text-align:center;padding:2px 0}
.cal-cell{height:38px;border-radius:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;
  font-size:12px;cursor:pointer;position:relative;border:1px dashed transparent}
.cal-cell.muted{color:#9ca3af;cursor:default}
.cal-cell.inv{background:#e5fcea}
.cal-cell .fare{position:absolute;bottom:2px;font-size:10px;color:#374151}
.cal-cell.today{border-color:#c7d2fe}
.cal-cell.sel-start,.cal-cell.sel-end{background:#dbeafe;border-color:#93c5fd}
.cal-cell.in-range{background:#eff6ff}
.cal-foot{display:flex;justify-content:space-between;align-items:center;padding:6px}
.cal-foot .hint{font-size:11px;color:#6b7280}
.cal-actions{display:flex;gap:6px}
.cal-actions .btn{padding:6px 10px;border:1px solid #d1d5db;border-radius:8px;background:#fff;cursor:pointer}
.cal-actions .btnp{background:#1d4ed8;color:#fff;border-color:#1d4ed8}

.readonly-select {
    pointer-events: none;
    background-color: #e9ecef;
}