:root {
    --blue-900: #053220;
    --blue-700: #0b5a3b;
    --blue-600: #128050;
    --blue-100: #e8f5ee;
    --brand-green: #053220;
    --brand-gold: #ffc247;
    --brand-orange: #f36b21;
    --brand-cream: #fff8ed;
    --ink: #172033;
    --muted: #6f7b91;
    --line: #e4eaf4;
    --bg: #eef6fb;
    --panel: #ffffff;
    --danger: #d8394c;
    --success: #138f5b;
    --shadow: 0 18px 45px rgba(7, 59, 115, .14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: #f3f8f5;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    font-size: 14px;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 220px 1fr;
    transition: grid-template-columns .22s ease;
}

.app-shell.sidebar-collapsed {
    grid-template-columns: 68px 1fr;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #fff;
    border-right: 1px solid #dce7f1;
    overflow: hidden;
    transition: width .22s ease, border-color .18s ease;
    width: 220px;
}

.app-shell.sidebar-collapsed .sidebar {
    width: 68px;
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    margin-top: auto;
    padding: 0 18px;
    color: #0f2440;
    background: #fff;
    border: 0;
    border-top: 1px solid var(--line);
    cursor: pointer;
    font: inherit;
    font-weight: 850;
    white-space: nowrap;
    transition: background .18s ease, color .18s ease;
}

.sidebar-toggle-icon {
    display: inline-grid;
    place-items: center;
    width: 18px;
    min-width: 18px;
    font-size: 18px;
    font-weight: 950;
}

.sidebar-toggle:hover {
    color: #0b5a3b;
    background: #edf7f1;
}

.app-shell.sidebar-collapsed .brand {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.app-shell.sidebar-collapsed .brand div:last-child,
.app-shell.sidebar-collapsed nav p,
.app-shell.sidebar-collapsed .nav-label {
    display: none;
}

.app-shell.sidebar-collapsed .sidebar-toggle {
    justify-content: center;
    padding: 0;
}

.app-shell.sidebar-collapsed .sidebar-toggle-label {
    display: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    border-bottom: 1px solid var(--line);
}

.brand.center {
    justify-content: center;
    padding: 0;
    border: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-green), var(--blue-600));
    border: 3px solid #fff2c7;
    border-radius: 50%;
    font-weight: 800;
    overflow: hidden;
}

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

.brand strong,
.user-chip strong,
.topbar strong {
    display: block;
}

.brand span,
.user-chip span,
.topbar span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

nav p {
    margin: 18px 0 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 6px;
    color: #33415c;
    font-weight: 700;
}

.nav-icon {
    display: inline-grid;
    place-items: center;
    width: 18px;
    min-width: 18px;
    height: 18px;
}

.nav-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

nav a.active,
nav a:hover {
    color: #0b5a3b;
    background: #edf7f1;
    box-shadow: inset 3px 0 0 var(--blue-700);
}

.app-shell.sidebar-collapsed nav {
    padding: 12px 8px;
}

.app-shell.sidebar-collapsed nav a {
    justify-content: center;
    padding: 0;
}

.main {
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 66px;
    padding: 0 28px;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid #d7e9df;
    backdrop-filter: blur(12px);
}

.topbar-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu-button {
    display: none;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-button,
.top-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    background: #edf7f1;
    border-radius: 8px;
    color: #0b3d29;
    font-weight: 800;
}

.icon-button {
    width: 38px;
    padding: 0;
}

.icon-button svg,
.top-link svg,
.button-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.report-day-button svg,
.generate-contracts-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

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

.avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    background: #1d2a3f;
    border-radius: 50%;
    font-weight: 800;
    overflow: hidden;
}

.avatar img,
.user-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-photo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.user-photo.placeholder {
    display: grid;
    place-items: center;
    color: #fff;
    background: #1d2a3f;
    font-weight: 800;
}

.current-photo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.content {
    padding: 34px 42px;
}

.hero-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 190px;
    padding: 34px;
    color: #fff;
    background:
        radial-gradient(circle at 86% 18%, rgba(255, 255, 255, .18), transparent 18%),
        linear-gradient(135deg, #053220, #0b5a3b);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(7, 59, 115, .14);
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

.hero-panel::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .16) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
    content: "";
}

.hero-panel h1 {
    margin: 18px 0 8px;
    font-size: 30px;
}

.hero-panel p {
    max-width: 680px;
    margin: 0;
    line-height: 1.6;
}

.pill {
    display: inline-flex;
    padding: 7px 14px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .20);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.hero-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.light-button,
.outline-button,
.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 6px;
    font-weight: 850;
    cursor: pointer;
    gap: 8px;
}

.button-icon {
    display: inline-grid;
    place-items: center;
    width: 18px;
    min-width: 18px;
    height: 18px;
    font-weight: 950;
}

.light-button {
    color: #073b73;
    background: #fff;
}

.outline-button {
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .55);
}

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, #053220, #0b5a3b);
}

.primary-button.small,
.secondary-button {
    min-height: 34px;
    font-size: 13px;
}

.secondary-button {
    color: #2e3b52;
    background: #eef3fb;
}

.hero-total {
    min-width: 270px;
    padding: 26px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 10px;
}

.hero-total span,
.hero-total small {
    display: block;
    color: rgba(255, 255, 255, .82);
    font-weight: 800;
}

.hero-total strong {
    display: block;
    margin: 8px 0;
    font-size: 34px;
}

.hero-panel + .panel {
    margin-top: 22px;
}

.dashboard-page {
    display: grid;
    gap: 18px;
}

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 132px;
    padding: 24px 26px;
    color: #172033;
    background: #fff;
    border: 1px solid #dbe7df;
    border-left: 5px solid #0b5a3b;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(5, 50, 32, .08);
}

.dashboard-hero-copy span,
.dashboard-records-heading span {
    color: #637083;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-hero-copy h1 {
    margin: 8px 0;
    color: #061a2f;
    font-size: 28px;
    letter-spacing: 0;
}

.dashboard-hero-copy p {
    max-width: 640px;
    margin: 0;
    color: #607086;
    line-height: 1.55;
}

.dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.dashboard-hero-side {
    display: grid;
    justify-items: end;
    gap: 14px;
    min-width: 360px;
}

.dashboard-hero-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.dashboard-hero-meta div {
    min-height: 58px;
    padding: 10px 12px;
    background: #f6faf8;
    border: 1px solid #dbe7df;
    border-radius: 8px;
}

.dashboard-hero-meta span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-hero-meta strong {
    display: block;
    margin-top: 5px;
    color: #053220;
    font-size: 14px;
}

.dashboard-hero .light-button {
    color: #fff;
    background: linear-gradient(135deg, #053220, #0b5a3b);
}

.dashboard-hero .outline-button {
    color: #0b5a3b;
    background: #edf7f1;
    border: 1px solid #cfe5d8;
}

.dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-kpi,
.dashboard-records {
    background: #fff;
    border: 1px solid #dbe7df;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(5, 50, 32, .08);
}

.dashboard-kpi {
    min-height: 126px;
    padding: 20px;
    border-top: 0;
    border-left: 4px solid #d7a930;
    position: relative;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}

.dashboard-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(5, 50, 32, .12);
}

.dashboard-kpi.primary {
    color: #172033;
    background: #fff;
    border-color: #dbe7df;
    border-left-color: #0b5a3b;
}

.dashboard-kpi:nth-child(2) {
    border-left-color: #0b5a3b;
}

.dashboard-kpi:nth-child(3) {
    border-left-color: #128050;
}

.dashboard-kpi:nth-child(4) {
    border-left-color: var(--brand-orange);
}

.dashboard-kpi span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-kpi-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: #0b5a3b;
    background: #edf7f1;
    border-radius: 8px;
}

.dashboard-kpi.primary .dashboard-kpi-icon {
    color: #0b5a3b;
    background: #edf7f1;
}

.dashboard-kpi-icon svg,
.dashboard-wide-link svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.dashboard-kpi.primary span,
.dashboard-kpi.primary small {
    color: var(--muted);
}

.dashboard-kpi strong {
    display: block;
    margin: 12px 0 4px;
    color: #053220;
    font-size: 32px;
    line-height: 1;
}

.dashboard-kpi.primary strong {
    color: #053220;
}

.dashboard-kpi small {
    color: var(--muted);
    font-weight: 800;
}

.dashboard-insights {
    display: grid;
    grid-template-columns: 1.2fr .85fr 1fr;
    gap: 14px;
}

.dashboard-insight-card {
    min-height: 190px;
    padding: 18px;
    background: #fff;
    border: 1px solid #dde8f2;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(5, 50, 32, .08);
}

.dashboard-insight-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.dashboard-insight-heading span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-insight-heading a {
    color: #0b5a3b;
    font-size: 12px;
    font-weight: 900;
}

.dashboard-insight-card > strong {
    display: block;
    margin-bottom: 14px;
    color: #061a2f;
    font-size: 20px;
}

.dashboard-insight-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.dashboard-insight-card dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-insight-card dd {
    margin: 4px 0 0;
    color: #172033;
    font-weight: 800;
}

.dashboard-today-card {
    display: grid;
    place-items: center;
    min-height: 92px;
    margin-bottom: 14px;
    color: #fff;
    background: linear-gradient(135deg, #053220, #0b5a3b);
    border-radius: 8px;
    text-align: center;
}

.dashboard-today-card strong {
    font-size: 36px;
    line-height: 1;
}

.dashboard-today-card span {
    color: rgba(255, 255, 255, .82);
    font-weight: 800;
}

.dashboard-wide-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 12px;
    color: #0b5a3b;
    background: #edf7f1;
    border: 1px solid #cfe5d8;
    border-radius: 6px;
    font-weight: 900;
}

.dashboard-service-bars {
    display: grid;
    gap: 12px;
}

.dashboard-service-bar div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.dashboard-service-bar span {
    min-width: 0;
    overflow: hidden;
    color: #172033;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-service-bar strong {
    color: #0b5a3b;
}

.dashboard-service-bar i {
    display: block;
    height: 8px;
    background: linear-gradient(135deg, #053220, #0b5a3b);
    border-radius: 999px;
}

.dashboard-empty-note {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.dashboard-records {
    overflow: hidden;
    border-top: 0;
}

.dashboard-status-row {
    display: grid;
    grid-template-columns: minmax(160px, 210px) minmax(220px, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: #f6faf8;
    border-bottom: 1px solid var(--line);
}

.dashboard-status-row span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-status-row strong {
    display: block;
    margin-top: 4px;
    color: #053220;
    font-size: 16px;
}

.dashboard-status-row a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    color: #0b5a3b;
    background: #fff;
    border: 1px solid #cfe5d8;
    border-radius: 6px;
    font-weight: 900;
}

.dashboard-records-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
}

.dashboard-records-heading span {
    color: var(--muted);
}

.dashboard-records-heading h2 {
    margin: 5px 0;
    color: #061a2f;
    font-size: 19px;
}

.dashboard-records-heading p {
    margin: 0;
    color: var(--muted);
}

.dashboard-table-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--line);
    background: #fbfdfc;
}

.dashboard-table-tools button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    color: #fff;
    background: #26352d;
    border: 0;
    border-radius: 6px;
    font-weight: 850;
    cursor: pointer;
}

.dashboard-table-tools input {
    max-width: 360px;
}

.dashboard-records .table-wrap {
    padding: 0;
}

.dashboard-records table {
    min-width: 980px;
}

.dashboard-records thead {
    background: #f6faf8;
}

.dashboard-records tbody tr:nth-child(even) {
    background: #fbfdfc;
}

.dashboard-passenger {
    display: grid;
    gap: 3px;
}

.dashboard-passenger strong {
    color: #061a2f;
    font-size: 14px;
}

.dashboard-passenger span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.dashboard-records td:first-child,
.dashboard-records th:first-child {
    padding-left: 24px;
}

.dashboard-records td:last-child,
.dashboard-records th:last-child {
    padding-right: 24px;
    text-align: right;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 22px 0;
}

.stat-card,
.panel {
    background: var(--panel);
    border: 1px solid #dde8f2;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(7, 59, 115, .08);
}

.stat-card {
    min-height: 120px;
    padding: 22px;
    position: relative;
    overflow: hidden;
    border-top: 3px solid var(--brand-orange);
    transition: transform .18s ease, box-shadow .18s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(7, 59, 115, .12);
}

.stat-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-orange), var(--brand-gold));
    border-radius: 8px;
    font-weight: 900;
}

.stat-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.stat-icon.today {
    background: linear-gradient(135deg, var(--blue-700), var(--blue-600));
}

.stat-icon.month {
    background: linear-gradient(135deg, var(--brand-green), #67c75f);
}

.stat-icon.tours {
    color: #073b73;
    background: linear-gradient(135deg, var(--brand-gold), #ffe08a);
}

.stat-card:nth-child(2) {
    border-top-color: var(--blue-600);
}

.stat-card:nth-child(3) {
    border-top-color: var(--brand-green);
}

.stat-card:nth-child(4) {
    border-top-color: var(--brand-gold);
}

.stat-card::after {
    position: absolute;
    top: -28px;
    right: -22px;
    width: 86px;
    height: 86px;
    background: rgba(17, 165, 217, .10);
    border-radius: 50%;
    content: "";
}

.stat-card span {
    color: #073b73;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.stat-card strong {
    display: block;
    margin-top: 12px;
    font-size: 28px;
    color: #061a2f;
}

.panel {
    padding: 22px;
    border-top: 3px solid var(--blue-600);
}

.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 220px));
    gap: 12px;
    margin-bottom: 18px;
}

.dashboard-summary div {
    padding: 14px 16px;
    background: #f6f9fc;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.dashboard-summary span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-summary strong {
    display: block;
    margin-top: 6px;
    color: #073b73;
    font-size: 24px;
}

.report-page {
    display: grid;
    gap: 18px;
}

.report-header {
    display: grid;
    grid-template-columns: 1fr 230px;
    align-items: stretch;
    gap: 18px;
}

.report-title,
.report-total-card,
.report-toolbar,
.report-metrics div,
.report-table-card {
    background: #fff;
    border: 1px solid #dde8f2;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(7, 59, 115, .08);
}

.report-title {
    padding: 24px 26px;
    border-left: 4px solid var(--blue-700);
}

.report-title span,
.report-total-card span,
.report-metrics span,
.report-table-heading span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.report-title h1 {
    margin: 8px 0 8px;
    color: #061a2f;
    font-size: 28px;
    letter-spacing: 0;
}

.report-title p {
    margin: 0;
    color: #40516c;
    font-size: 15px;
}

.report-total-card {
    display: grid;
    align-content: center;
    padding: 22px;
    color: #fff;
    background: linear-gradient(135deg, #053220, #0b5a3b);
    border-color: transparent;
}

.report-total-card span,
.report-total-card small {
    color: rgba(255, 255, 255, .82);
    font-weight: 850;
}

.report-total-card strong {
    margin: 8px 0 2px;
    font-size: 44px;
    line-height: 1;
}

.report-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
}

.report-date-control,
.report-toolbar-actions {
    display: flex;
    align-items: end;
    gap: 10px;
}

.report-date-control label {
    min-width: 230px;
}

.report-toolbar-actions {
    flex: 1;
    justify-content: flex-end;
}

.report-toolbar-actions input {
    max-width: 260px;
}

.report-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.report-metrics div {
    padding: 16px;
    border-top: 3px solid var(--blue-600);
}

.report-metrics div:nth-child(2) {
    border-top-color: var(--brand-orange);
}

.report-metrics div:nth-child(3) {
    border-top-color: var(--brand-green);
}

.report-metrics strong {
    display: block;
    margin-top: 8px;
    color: #073b73;
    font-size: 26px;
}

.report-table-card {
    overflow: hidden;
}

.report-table-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.report-table-heading h2 {
    margin: 0;
    font-size: 18px;
}

.report-page .table-wrap {
    overflow: auto;
}

.report-page table {
    min-width: 980px;
}

.report-page thead {
    background: #eef6fb;
}

.report-page th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eef6fb;
}

.report-page tbody tr:nth-child(even) {
    background: #fbfdff;
}

.report-page td:first-child,
.report-page th:first-child {
    padding-left: 20px;
}

.report-page td:last-child,
.report-page th:last-child {
    padding-right: 20px;
    text-align: right;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-heading h2 {
    margin: 0 0 5px;
    font-size: 20px;
}

.panel-heading p {
    margin: 0;
    color: var(--muted);
}

.report-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.report-service-item,
.report-service-empty {
    display: flex;
    align-items: center;
    min-height: 58px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(7, 59, 115, .06);
    color: #33415c;
    font-weight: 800;
    gap: 12px;
}

.report-service-item strong {
    display: inline-grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    color: #fff;
    background: #073b73;
    border-radius: 8px;
    font-size: 18px;
}

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

.table-tools {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.table-tools button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 32px;
    padding: 0 14px;
    color: #fff;
    background: #334155;
    border: 0;
    border-radius: 6px;
    font-weight: 800;
}

.table-tools input,
input,
textarea {
    width: 100%;
    min-height: 40px;
    padding: 10px 12px;
    border: 1px solid #ccd6e6;
    border-radius: 4px;
    font: inherit;
}

.table-tools input {
    max-width: 240px;
}

.report-filter {
    align-items: end;
    justify-content: flex-start;
}

.report-day-button {
    display: inline-grid;
    place-items: center;
    width: 40px;
    min-width: 40px;
    padding: 0;
}

.report-filter label {
    min-width: 210px;
    max-width: 260px;
}

.report-filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.report-filter-actions input {
    margin-left: auto;
}

.report-filter.is-loading {
    opacity: .72;
    pointer-events: none;
}

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

thead {
    background: #f6f9fc;
}

th,
td {
    padding: 15px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

.date-badge,
.service-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
}

.date-badge {
    color: #075985;
    background: #e8f4fb;
    border: 1px solid #cce7f4;
}

.service-badge {
    color: #176043;
    background: #e9f6ef;
    border: 1px solid #cce8d5;
}

tbody tr:hover {
    background: #f7fbff;
}

th {
    color: #073b73;
    font-size: 11px;
    text-transform: uppercase;
}

.row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    gap: 5px;
    padding: 7px 10px;
    color: #fff;
    background: var(--blue-700);
    border-radius: 6px;
    font-weight: 800;
}

.row-action.icon-only {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
}

.row-action svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.row-action:hover,
.primary-button:hover,
.light-button:hover {
    filter: brightness(.96);
}

.row-actions {
    display: inline-flex;
    gap: 6px;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.row-action.danger {
    border: 0;
    background: var(--danger);
    cursor: pointer;
    font: inherit;
}

.row-action.pdf {
    background: #176043;
}

.empty {
    color: var(--muted);
    text-align: center;
}

.contract-layout {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(420px, .9fr);
    gap: 22px;
}

.users-layout {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(520px, 1fr);
    gap: 22px;
    margin-top: 22px;
}

.pdf-panel iframe {
    width: 100%;
    min-height: 760px;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.contract-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

label {
    display: grid;
    gap: 7px;
    color: #40516c;
    font-weight: 800;
}

.wide {
    grid-column: 1 / -1;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.45;
}

.check-row input {
    width: auto;
    min-height: auto;
    margin-top: 4px;
}

.form-actions {
    display: flex;
    gap: 10px;
}

.detail-list {
    display: grid;
    gap: 12px;
    margin: 0 0 20px;
}

.detail-list div {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.detail-list dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.detail-list dd {
    margin: 5px 0 0;
    font-weight: 750;
}

.alert {
    margin-bottom: 16px;
    padding: 13px 16px;
    border-radius: 6px;
    font-weight: 800;
}

.alert.error {
    color: #8d1d2a;
    background: #fff0f2;
    border: 1px solid #ffd5dc;
}

.alert.success {
    color: #09643e;
    background: #e9fbf3;
    border: 1px solid #bcebd8;
}

.alert-link {
    display: inline-flex;
    margin-left: 10px;
    color: #0754c9;
    font-weight: 900;
    text-decoration: underline;
}

.login-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(rgba(23, 63, 127, .80), rgba(23, 63, 127, .88)),
        url('../img/login-bg.svg');
    background-size: cover;
}

.public-page {
    background: #ededed;
}

.contract-fill-only .pdf-like-contract,
.contract-fill-only .document-actions-outside {
    user-select: none;
    -webkit-user-select: none;
}

.contract-fill-only input,
.contract-fill-only select,
.contract-fill-only textarea,
.contract-fill-only button,
.contract-fill-only label {
    user-select: auto;
    -webkit-user-select: auto;
}

.public-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 34px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.public-header .brand {
    padding: 0;
    border: 0;
}

.public-content {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 24px 32px 42px;
    /* background: #000; */
}

.public-hero {
    min-height: 170px;
    margin-bottom: 22px;
}

.document-form {
    width: min(980px, 100%);
    margin: 0 auto;
}

.passenger-count-panel {
    width: 210mm;
    max-width: 100%;
    margin: 0 auto 18px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #d8e0ed;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(15, 36, 62, 0.08);
    display: flex;
    align-items: flex-end;
    gap: 12px;
    font-family: Arial, sans-serif;
}

.passenger-count-panel label,
.passenger-stepper-field {
    flex: 1;
    color: #0b2545;
    font-size: 13px;
    font-weight: 800;
}

.passenger-stepper-field > span {
    display: block;
    margin-bottom: 7px;
}

.passenger-count-panel input,
.passenger-count-panel select {
    width: 100%;
    margin-top: 7px;
    padding: 10px 12px;
    border: 1px solid #c8d5e6;
    border-radius: 7px;
    color: #0b2545;
    font: inherit;
}

.passenger-stepper {
    width: fit-content;
    min-width: 170px;
    display: grid;
    grid-template-columns: 44px minmax(54px, 1fr) 44px;
    align-items: center;
    overflow: hidden;
    border: 1px solid #c8d5e6;
    border-radius: 9px;
    background: #f8fbff;
}

.passenger-stepper strong {
    min-height: 42px;
    display: grid;
    place-items: center;
    color: #0b2545;
    font-size: 18px;
    font-weight: 900;
    border-left: 1px solid #c8d5e6;
    border-right: 1px solid #c8d5e6;
}

.stepper-button {
    width: 44px;
    height: 42px;
    border: 0;
    background: #fff;
    color: #0b5c94;
    cursor: pointer;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}

.stepper-button:hover {
    background: #eaf5ff;
}

.generate-contracts-button {
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(135deg, #053220, #0b5a3b);
    box-shadow: 0 12px 24px rgba(5, 50, 32, 0.24);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.generate-contracts-button span {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 16px;
}

.generate-contracts-button:hover {
    box-shadow: 0 16px 30px rgba(5, 50, 32, 0.34);
    filter: saturate(1.08);
    transform: translateY(-1px);
}

.generate-contracts-button:active {
    transform: translateY(0);
}

.send-contracts-button {
    border: 0;
    background: linear-gradient(135deg, #053220, #0b5a3b) !important;
    box-shadow: 0 12px 24px rgba(5, 50, 32, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.send-contracts-button:hover {
    box-shadow: 0 16px 30px rgba(5, 50, 32, 0.34);
    filter: saturate(1.08);
    transform: translateY(-1px);
}

.send-contracts-button:active {
    transform: translateY(0);
}

.contract-passenger-label {
    margin: 0 0 12px;
    color: #0b5c94;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.document-form .pdf-like-contract + .pdf-like-contract {
    margin-top: 22px;
}

.contract-document {
    background: #fff;
    border: 1px solid #d8e0ed;
    border-radius: 8px;
    box-shadow: var(--shadow);
    color: #162238;
    padding: 34px;
}

.document-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 2px solid #173f7f;
}

.document-head strong {
    display: block;
    color: var(--blue-900);
    font-size: 24px;
}

.document-head span,
.document-code {
    color: #59687f;
    font-weight: 800;
}

.document-code {
    padding: 8px 12px;
    background: #eef4ff;
    border-radius: 6px;
    text-align: right;
}

.document-intro {
    margin: 18px 0;
    padding: 14px 16px;
    background: #f7f9fd;
    border-left: 4px solid var(--blue-700);
    line-height: 1.6;
}

.document-section {
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.document-section:first-of-type {
    border-top: 0;
}

.document-section h2 {
    margin: 0 0 14px;
    color: var(--blue-900);
    font-size: 17px;
}

.document-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.document-grid .span-2 {
    grid-column: 1 / -1;
}

.terms-box {
    line-height: 1.65;
}

.terms-box p {
    margin: 0 0 10px;
}

.document-check {
    margin-top: 14px;
    padding: 12px;
    background: #f7f9fd;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.signature-area {
    display: grid;
    grid-template-columns: 1fr 220px;
    align-items: end;
    gap: 18px;
}

.signature-area span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.signature-area strong {
    display: block;
    min-height: 40px;
    padding: 10px 12px;
    border-bottom: 1px solid #aeb9c9;
}

.document-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px;
    border-top: 2px solid #173f7f;
}

.lang-en,
.lang-en-active .lang-es {
    display: none;
}

.lang-en-active .lang-en {
    display: inline;
}

.lang-en-active .legal-intro .lang-en,
.lang-en-active .closing-text .lang-en,
.lang-en-active .document-check .lang-en,
.lang-en-active .terms-list .lang-en,
.lang-en-active h1 .lang-en,
.lang-en-active h2 .lang-en,
.lang-en-active .document-footer .lang-en {
    display: inline;
}

.pdf-like-contract {
    position: relative;
    width: 210mm;
    max-width: 100%;
    min-height: 297mm;
    margin: 0 auto;
    padding: 16mm 17mm 15mm;
    background: #fff;
    border: 1px solid #b9b9b9;
    /* border-top: 0; */
    box-shadow: none;
    color: #111;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 15px;
    line-height: 1.42;
    overflow: visible;
}

.pdf-like-contract > *:not(.document-watermark) {
    position: relative;
    z-index: 1;
}

.document-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 0;
    width: min(300px, 46%);
    height: auto;
    opacity: .055;
    transform: translate(-50%, -50%);
    pointer-events: none;
    user-select: none;
}

.pdf-like-contract::after {
    display: none;
    content: none;
}

.pdf-contract-header {
    display: grid;
    grid-template-columns: clamp(72px, 15%, 118px) 1fr;
    align-items: center;
    gap: clamp(12px, 3vw, 24px);
    margin: -16mm -17mm 3mm;
    padding: 3mm 14mm 3mm;
    color: #111;
    background: #fff;
    border-bottom: 0;
    text-align: center;
}

.contract-logo-box {
    display: grid;
    place-items: center;
    width: clamp(64px, 10vw, 92px);
    height: clamp(64px, 10vw, 92px);
    min-height: 0;
    padding: 4px;
    background: #fff;
    border: 1px solid #d6d6d6;
    border-radius: 50%;
    box-shadow: none;
    overflow: hidden;
}

.contract-logo-box img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 50%;
    object-fit: cover;
}

.contract-title-box {
    min-width: 0;
}

.pdf-contract-header h1 {
    max-width: min(500px, 100%);
    margin: 0 auto 10px;
    font-family: Arial, sans-serif;
    font-size: clamp(14px, 2vw, 18px);
    line-height: 1.28;
    letter-spacing: 0;
}

.pdf-contract-header p {
    margin: 0;
    color: #111;
    font-family: Arial, sans-serif;
    font-size: clamp(10px, 1.5vw, 13px);
    font-weight: 700;
}

.document-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8mm;
    padding: 8px 0;
    border-top: 1px solid #cfcfcf;
    border-bottom: 1px solid #cfcfcf;
    color: #333;
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.legal-intro {
    margin: 0 0 16px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    text-align: justify;
}

.legal-intro em,
.closing-text em,
.contract-line label em,
.bilingual-terms em {
    display: block;
    color: #555;
    font-style: italic;
}

.legal-intro em,
.closing-text em {
    margin-top: 4px;
}

.contract-line label em {
    margin-top: 1px;
    font-size: 12px;
    font-weight: 400;
}

.pdf-like-contract h2 {
    margin: 17px 0 10px;
    padding: 0 0 6px;
    color: #103760;
    background: transparent;
    border-bottom: 1px solid #b8b8b8;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 800;
}

.contract-fields-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 32px;
    margin: 0 0 14px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.contract-line {
    display: grid;
    gap: 5px;
}

.contract-line.field-full {
    grid-column: 1 / -1;
}

.contract-line label {
    display: block;
    color: #111;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: none;
}

.contract-line input,
.contract-line select,
.signature-block input,
.contract-date-line input,
.contract-date-line select {
    width: 100%;
    min-height: 27px;
    padding: 4px 2px;
    color: #111;
    background: transparent;
    border: 0;
    border-bottom: 1.5px solid #8a8a8a;
    border-radius: 0;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 14px;
}

.readonly-value {
    min-height: 30px;
    padding: 4px 2px;
    border-bottom: 1.5px solid #8a8a8a;
    color: #111;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 14px;
}

.contract-line input:focus,
.contract-line select:focus,
.signature-block input:focus,
.contract-date-line input:focus,
.contract-date-line select:focus {
    border-color: var(--brand-gold);
    box-shadow: none;
    outline: 0;
}

.terms-list {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: justify;
}

.terms-list li {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 10px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-weight: 400;
}

.terms-list li div {
    font-weight: 400;
}

.terms-list li {
    line-height: 1.34;
}

.bilingual-terms em {
    margin-top: 1px;
    font-size: 12px;
    line-height: 1.2;
}

.terms-list span {
    color: #000000;
    /* font-weight: 800; */
}

.closing-text {
    margin: 18px 0 12px;
    text-align: justify;
}

.pdf-like-contract .document-check {
    align-items: center;
    margin-top: 0;
    padding: 0;
    background: transparent;
    border: 0;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 14px;
    color: #111;
}

.acceptance-row {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #d7d7d7;
}

.inline-date {
    display: grid;
    min-width: 138px;
    min-height: 42px;
    align-content: center;
    padding: 0;
    background: transparent;
    border: 0;
    border-bottom: 1.5px solid #8a8a8a;
    border-radius: 0;
    font-family: "Times New Roman", Georgia, serif;
    text-align: center;
}

.inline-date strong {
    color: #111;
    font-size: 14px;
    text-transform: none;
}

.inline-date span {
    margin-top: 3px;
    color: #111;
    font-size: 16px;
    font-weight: 800;
}

.pdf-signatures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin: 68px 28px 46px;
}

.signature-block {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    text-align: center;
}

.signature-block input {
    width: 100%;
    margin-bottom: 12px;
    text-align: center;
}

.signature-name-display {
    display: flex;
    align-items: end;
    justify-content: center;
    min-height: 30px;
    margin-bottom: 12px;
    padding: 4px 2px;
    border-bottom: 1.5px solid #8a8a8a;
    color: #555;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 16px;
    text-align: center;
}

.signature-line {
    position: relative;
    height: 30px;
    margin-bottom: 10px;
    border-bottom: 1.5px solid #111;
}

.company-signature-img {
    position: absolute;
    left: 50%;
    bottom: -40px;
    display: block;
    width: min(245px, 105%);
    max-height: 120px;
    transform: translateX(-50%) rotate(-3deg);
    object-fit: contain;
    z-index: 2;
    pointer-events: none;
}

.date-on-signature {
    position: absolute;
    right: 0;
    top: -46px;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.signature-block strong,
.signature-block span {
    display: block;
}

.signature-block strong {
    font-size: 13px;
}

.signature-block span {
    margin-top: 3px;
    color: #333;
    font-size: 14px;
}

.document-footer {
    position: absolute;
    bottom: .8mm;
    left: 50%;
    width: calc(100% - 34mm);
    padding-top: 5px;
    border-top: 1px solid #d0d0d0;
    color: #555;
    font-family: Arial, sans-serif;
    font-size: 10px;
    text-align: center;
    text-transform: uppercase;
    transform: translateX(-50%);
}

.contract-date-line {
    display: flex;
    align-items: end;
    gap: 12px;
    margin-top: 8px;
    padding: 16px;
    background: var(--brand-cream);
    border: 1px solid #f1dfbd;
    border-radius: 8px;
    font-family: Arial, sans-serif;
}

.contract-date-line strong {
    padding-bottom: 12px;
    color: #244322;
}

.contract-date-line label {
    display: grid;
    gap: 6px;
    color: #244322;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.contract-date-line input {
    width: 76px;
    text-align: center;
}

.contract-date-line select {
    width: 190px;
}

.pdf-like-contract .document-actions,
.document-actions-outside {
    margin-top: 24px;
    border-top-color: #d9d9d9;
    font-family: Arial, sans-serif;
}

.document-actions-outside {
    width: 210mm;
    max-width: 100%;
    margin: 18px auto 0;
    padding-top: 16px;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
    padding: 4px;
    background: #f6f8fa;
    border: 1px solid #dde5ed;
    border-radius: 8px;
}

.language-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 10px;
    color: #1c2b3a;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 800;
    cursor: pointer;
}

.language-option.active {
    color: #fff;
    background: #12628f;
    border-color: #12628f;
}

.language-option .flag {
    display: inline-block;
    width: 22px;
    height: 15px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .14);
    overflow: hidden;
}

.flag-es {
    background: linear-gradient(#c60b1e 0 25%, #ffc400 25% 75%, #c60b1e 75%);
}

.flag-us {
    position: relative;
    background: repeating-linear-gradient(
        to bottom,
        #b22234 0 1.15px,
        #fff 1.15px 2.3px
    );
}

.flag-us::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 9px;
    height: 8px;
    background: #3c3b6e;
    content: "";
}

.pdf-like-contract .primary-button {
    background: linear-gradient(135deg, #053220, #0b5a3b);
}

.login-card {
    width: min(430px, 100%);
    padding: 34px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}

.login-card h1 {
    margin: 28px 0 8px;
}

.login-card p,
.login-card small {
    color: var(--muted);
}

.form-stack {
    display: grid;
    gap: 16px;
    margin: 24px 0 16px;
}

@media (max-width: 1100px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-shell.sidebar-collapsed {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        width: auto;
        transform: none;
    }

    .sidebar .brand {
        gap: 10px;
        padding: 12px 14px;
    }

    .sidebar .brand-mark {
        width: 34px;
        height: 34px;
    }

    .sidebar .brand strong {
        font-size: 12px;
    }

    .sidebar .brand span {
        font-size: 9px;
    }

    .app-shell.sidebar-collapsed .sidebar {
        opacity: 1;
        pointer-events: auto;
        transform: none;
        border-right-color: #dce7f1;
    }

    .app-shell.sidebar-collapsed .brand,
    .app-shell.sidebar-collapsed nav {
        opacity: 1;
        pointer-events: auto;
    }

    .app-shell.sidebar-collapsed .brand div:last-child,
    .app-shell.sidebar-collapsed .nav-label {
        display: inline;
    }

    .sidebar-toggle {
        display: none;
    }

    nav {
        display: flex;
        flex: initial;
        gap: 8px;
        overflow-x: auto;
        padding: 10px 12px;
        border-bottom: 1px solid var(--line);
        scrollbar-width: thin;
    }

    nav p {
        display: none;
    }

    nav a {
        flex: 0 0 auto;
        gap: 8px;
        min-height: 36px;
        padding: 0 12px;
        font-size: 12px;
    }

    .contract-layout,
    .users-layout,
    .dashboard-summary,
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-kpis,
    .dashboard-insights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-services-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .content,
    .topbar {
        padding-left: 16px;
        padding-right: 16px;
    }

    .topbar {
        height: auto;
        min-height: 66px;
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .topbar-title {
        min-width: 0;
    }

    .topbar-title span {
        display: none;
    }

    .topbar-title strong {
        overflow: hidden;
        max-width: 145px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-menu-button {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        width: 40px;
        height: 40px;
        padding: 0 10px;
        background: #eaf7ff;
        border: 1px solid #cfe2f0;
        border-radius: 8px;
        cursor: pointer;
    }

    .mobile-menu-button span {
        display: block;
        width: 18px;
        height: 2px;
        background: #073b73;
        border-radius: 999px;
    }

    .top-actions {
        width: auto;
        align-items: center;
        flex-wrap: nowrap;
    }

    .icon-button {
        flex: 0 0 38px;
        padding: 0;
    }

    .top-link {
        display: none;
    }

    .user-chip {
        flex: 0 0 auto;
        margin-left: 0;
    }

    .user-chip div:last-child {
        display: none;
    }

    .sidebar {
        position: fixed;
        top: 68px;
        left: 12px;
        right: 12px;
        z-index: 40;
        max-height: calc(100vh - 86px);
        background: #fff;
        border: 1px solid #dce7f1;
        border-radius: 10px;
        box-shadow: 0 18px 45px rgba(7, 59, 115, .18);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: opacity .18s ease, transform .18s ease;
    }

    .app-shell.mobile-menu-open .sidebar {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .sidebar .brand {
        border-bottom: 1px solid var(--line);
    }

    nav {
        display: grid;
        gap: 6px;
        max-height: calc(100vh - 170px);
        overflow-y: auto;
        padding: 10px;
        border-bottom: 0;
    }

    nav a {
        width: 100%;
        min-height: 42px;
        font-size: 13px;
    }

    .content {
        padding-top: 18px;
    }

    .panel {
        padding: 16px;
    }

    .hero-panel,
    .panel-heading,
    .table-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-panel {
        min-height: 0;
        padding: 18px;
    }

    .hero-panel h1 {
        margin-top: 14px;
        font-size: 22px;
    }

    .hero-panel p {
        font-size: 12px;
        line-height: 1.45;
    }

    .pill {
        padding: 6px 10px;
        font-size: 10px;
    }

    .hero-actions,
    .form-actions {
        flex-direction: column;
    }

    .hero-actions {
        gap: 8px;
        margin-top: 16px;
    }

    .hero-actions a {
        width: 100%;
        min-height: 36px;
        font-size: 12px;
    }

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

    .dashboard-hero,
    .dashboard-records-heading,
    .dashboard-table-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-hero {
        min-height: 0;
        padding: 18px;
    }

    .dashboard-hero-side {
        justify-items: stretch;
        min-width: 0;
    }

    .dashboard-hero-meta {
        grid-template-columns: 1fr;
    }

    .dashboard-hero-copy h1 {
        font-size: 24px;
    }

    .dashboard-hero-actions {
        justify-content: stretch;
    }

    .dashboard-hero-actions a {
        width: 100%;
    }

    .dashboard-kpis {
        grid-template-columns: 1fr;
    }

    .dashboard-status-row {
        grid-template-columns: 1fr;
        padding: 14px 16px;
    }

    .dashboard-status-row a {
        width: 100%;
    }

    .dashboard-insights {
        grid-template-columns: 1fr;
    }

    .dashboard-services-card {
        grid-column: auto;
    }

    .dashboard-insight-card dl {
        grid-template-columns: 1fr;
    }

    .dashboard-table-tools input {
        max-width: none;
    }

    .dashboard-table-tools button {
        width: 100%;
    }

    .report-header,
    .report-metrics {
        grid-template-columns: 1fr;
    }

    .report-title {
        padding: 18px;
    }

    .report-title h1 {
        font-size: 22px;
    }

    .report-total-card strong {
        font-size: 36px;
    }

    .report-toolbar,
    .report-date-control,
    .report-toolbar-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .report-date-control label,
    .report-toolbar-actions input {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .report-toolbar-actions .secondary-button,
    .report-toolbar-actions .primary-button {
        width: 100%;
    }

    .report-services {
        grid-template-columns: 1fr;
    }

    .report-table-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .table-tools input {
        max-width: none;
    }

    .report-filter label,
    .report-filter-actions,
    .report-filter-actions input {
        width: 100%;
        max-width: none;
    }

    .report-filter-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .report-filter-actions input {
        margin-left: 0;
    }

    .report-day-button {
        width: 100%;
    }

    #recordsTable,
    #usersTable {
        min-width: 0;
    }

    #recordsTable thead,
    #usersTable thead {
        display: none;
    }

    #recordsTable,
    #recordsTable tbody,
    #recordsTable tr,
    #recordsTable td,
    #usersTable,
    #usersTable tbody,
    #usersTable tr,
    #usersTable td {
        display: block;
        width: 100%;
    }

    #recordsTable tr,
    #usersTable tr {
        margin-bottom: 12px;
        padding: 12px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 8px;
    }

    #recordsTable td,
    #usersTable td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 10px 0;
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: right;
    }

    #recordsTable td::before,
    #usersTable td::before {
        flex: 0 0 112px;
        color: #073b73;
        font-size: 11px;
        font-weight: 900;
        text-align: left;
        text-transform: uppercase;
    }

    #recordsTable .row-actions,
    #usersTable .row-actions {
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    #recordsTable td:nth-child(1)::before { content: "Fecha tour"; }
    #recordsTable td:nth-child(2)::before { content: "Pasajero"; }
    #recordsTable td:nth-child(3)::before { content: "Documento"; }
    #recordsTable td:nth-child(4)::before { content: "Nacionalidad"; }
    #recordsTable td:nth-child(5)::before { content: "Cuatrimoto"; }
    #recordsTable td:nth-child(6)::before { content: "Servicio"; }
    #recordsTable td:nth-child(7)::before { content: "Firma"; }
    #recordsTable td:nth-child(8)::before { content: "Acciones"; }

    #usersTable td:nth-child(1)::before { content: "Foto"; }
    #usersTable td:nth-child(2)::before { content: "Nombre"; }
    #usersTable td:nth-child(3)::before { content: "Usuario"; }
    #usersTable td:nth-child(4)::before { content: "Email"; }
    #usersTable td:nth-child(5)::before { content: "Creado"; }
    #usersTable td:nth-child(6)::before { content: "Acciones"; }

    .hero-total {
        min-width: 0;
        margin-top: 14px;
        padding: 16px;
    }

    .hero-total strong {
        font-size: 28px;
    }

    .stats-grid,
    .contract-layout,
    .users-layout,
    .dashboard-summary,
    .contract-form,
    .document-grid,
    .signature-area {
        grid-template-columns: 1fr;
    }

    .contract-document {
        padding: 20px;
    }

    .document-head,
    .document-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .passenger-count-panel {
        align-items: stretch;
        flex-direction: column;
        padding: 14px;
    }

    .passenger-stepper {
        width: 100%;
        grid-template-columns: 52px 1fr 52px;
    }

    .stepper-button {
        width: 52px;
    }

    .generate-contracts-button {
        width: 100%;
    }

    .document-form .pdf-like-contract + .pdf-like-contract {
        margin-top: 34px;
    }

    .pdf-like-contract {
        min-height: auto;
        height: auto;
        padding: 28px 18px;
        font-size: 15px;
    }

    .pdf-like-contract::after {
        inset: 8px;
    }

    .pdf-contract-header {
        grid-template-columns: 1fr;
        margin: -28px -18px 22px;
        padding: 26px 18px 22px;
    }

    .contract-logo-box {
        width: min(92px, 34vw);
        height: min(92px, 34vw);
        min-height: 0;
        margin: 0 auto;
    }

    .pdf-contract-header h1 {
        font-size: clamp(16px, 5vw, 18px);
    }

    .pdf-like-contract h2 {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .contract-fields-box,
    .pdf-signatures {
        grid-template-columns: 1fr;
    }

    .contract-line,
    .contract-line.field-full {
        grid-template-columns: 1fr;
    }

    .terms-list li {
        grid-template-columns: 40px 1fr;
    }

    .pdf-signatures {
        gap: 30px;
        margin: 56px 0 44px;
    }

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

    .contract-date-line {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .pdf-panel iframe {
        min-height: 520px;
    }

    .public-header,
    .public-content {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media print {
    @page {
        size: A4;
        margin: 0;
    }

    body:not(.public-page) {
        background: #fff;
    }

    body:not(.public-page) .sidebar,
    body:not(.public-page) .topbar,
    body:not(.public-page) .report-toolbar {
        display: none !important;
    }

    body:not(.public-page) .app-shell {
        display: block;
    }

    body:not(.public-page) .content {
        padding: 16px;
    }

    body:not(.public-page) .report-title,
    body:not(.public-page) .report-total-card,
    body:not(.public-page) .report-metrics div,
    body:not(.public-page) .report-table-card,
    body:not(.public-page) .report-service-item,
    body:not(.public-page) .report-service-empty {
        box-shadow: none;
    }

    body:not(.public-page) .report-header,
    body:not(.public-page) .report-metrics {
        grid-template-columns: 1fr 160px;
    }

    body:not(.public-page) .report-metrics {
        grid-template-columns: repeat(3, 1fr);
    }

    body:not(.public-page) .report-page table {
        min-width: 0;
        font-size: 11px;
    }

    body:not(.public-page) .report-page th,
    body:not(.public-page) .report-page td {
        padding: 8px 6px;
    }

    body,
    .public-page {
        background: #fff;
    }

    .public-header,
    .public-hero,
    .alert,
    .document-actions {
        display: none !important;
    }

    .public-content {
        padding: 0;
    }

    .pdf-like-contract {
        width: 210mm;
        max-width: none;
        min-height: 297mm;
        height: 297mm;
        padding: 10mm 13mm 9mm;
        border: 0;
        border-top: 0;
        box-shadow: none;
        overflow: hidden;
        font-size: 13.7px;
        line-height: 1.58;
    }

    .document-watermark {
        width: 72mm;
        opacity: .05;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .pdf-contract-header {
        grid-template-columns: 62px 1fr;
        gap: 12px;
        margin: -10mm -13mm 4mm;
        padding: 7mm 11mm 4mm;
    }

    .document-meta {
        margin-bottom: 5mm;
        padding: 4px 0;
        font-size: 9.5px;
    }

    .contract-logo-box {
        width: 58px;
        height: 58px;
        padding: 2px;
    }

    .pdf-contract-header h1 {
        max-width: 440px;
        margin-bottom: 5px;
        font-size: 14px;
        line-height: 1.22;
    }

    .pdf-contract-header p {
        font-size: 10px;
    }

    .legal-intro {
        margin-bottom: 17px;
    }

    .pdf-like-contract h2 {
        margin: 17px 0 10px;
        padding-bottom: 6px;
        font-size: 12.5px;
    }

    .contract-fields-box {
        gap: 15px 30px;
        margin-bottom: 16px;
    }

    .contract-line {
        gap: 3px;
    }

    .contract-line label {
        font-size: 12.5px;
    }

    .contract-line input,
    .contract-line select,
    .readonly-value,
    .signature-block input {
        min-height: 19px;
        padding: 2px;
        font-size: 12.5px;
    }

    .terms-list {
        gap: 10px;
    }

    .terms-list li {
        grid-template-columns: 34px 1fr;
        gap: 12px;
        line-height: 1.56;
        font-weight: 400;
    }

    .terms-list li div {
        font-weight: 400;
    }

    .legal-intro em,
    .closing-text em,
    .bilingual-terms em {
        margin-top: 0;
        font-size: 10.5px;
        line-height: 1.18;
    }

    .contract-line label em {
        font-size: 10px;
    }

    .pdf-signatures {
        align-items: end;
        gap: 42px;
        margin: 76px 24px 42px;
    }

    .closing-text {
        margin-top: 20px;
        margin-bottom: 13px;
    }

    .acceptance-row {
        margin-top: 15px;
        padding-top: 12px;
    }

    .pdf-like-contract .document-check {
        font-size: 12.5px;
    }

    .signature-line {
        height: 64px;
        margin-bottom: 14px;
    }

    .company-signature-img {
        bottom: 8px;
        width: min(205px, 100%);
        max-height: 76px;
        transform: translateX(-50%) rotate(-3deg);
    }

    .signature-block input {
        margin-bottom: 7px;
    }

    .signature-name-display {
        min-height: 24px;
        margin-bottom: 7px;
        padding: 2px;
        font-size: 12.5px;
    }

    .signature-block strong {
        font-size: 12px;
    }

    .signature-block span {
        font-size: 12px;
    }

    .pdf-like-contract h2 {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .document-footer {
        bottom: .8mm;
        left: 50%;
        width: calc(100% - 24mm);
        font-size: 8px;
        transform: translateX(-50%);
    }
}
