:root {
    --app-blue: #2563eb;
    --app-blue-dark: #1d4ed8;
    --app-slate-900: #0f172a;
    --app-slate-700: #334155;
    --app-slate-600: #475569;
    --app-slate-500: #64748b;
    --app-slate-200: #e2e8f0;
    --app-slate-100: #f1f5f9;
    --app-surface: #ffffff;
    --app-background: #f8fafc;
}

html {
    min-height: 100%;
    background: var(--app-background);
}

body.app-body {
    height: auto;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    background: var(--app-background);
    color: var(--app-slate-700);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
    -webkit-font-smoothing: antialiased;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    width: 100%;
    background: var(--app-surface);
    box-shadow: 0 1px 3px rgb(15 23 42 / 7%);
}

.app-footer {
    width: 100%;
    max-width: none;
}

.app-header-inner,
.app-nav-inner,
.app-footer-inner {
    width: min(100% - 2rem, 80rem);
    margin-inline: auto;
}

.app-header .app-header-inner,
.app-header .app-nav-inner,
.app-footer .app-footer-inner {
    width: min(100% - 2rem, 80rem);
    max-width: 80rem;
}

.app-header-inner {
    min-height: 5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.app-brand img {
    display: block;
    width: 12rem;
    height: auto;
}

.app-account {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    color: var(--app-slate-600);
    font-size: 0.875rem;
}

.app-account-name strong {
    color: var(--app-slate-900);
}

.app-account a {
    color: var(--app-blue);
    font-weight: 600;
    text-decoration: none;
    transition: color 150ms ease;
}

.app-account a:hover {
    color: var(--app-blue-dark);
}

.app-nav-wrap {
    border-top: 1px solid var(--app-slate-100);
}

.app-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0;
    padding: 0.45rem 0;
    list-style: none;
}

.app-nav .nav-link {
    border-radius: 0.65rem;
    padding: 0.55rem 0.9rem;
    color: var(--app-slate-600);
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 150ms ease, background-color 150ms ease;
}

.app-nav .nav-link:hover {
    background: #eff6ff;
    color: var(--app-blue);
}

.app-nav .nav-link.active {
    background: #eff6ff;
    color: var(--app-blue-dark);
}

.app-main {
    flex: 1;
    width: 100%;
    padding-block: 2rem 3rem;
}

.app-content.container {
    width: min(100% - 2rem, 80rem);
    max-width: 80rem;
    margin-inline: auto;
    padding: 0;
}

.app-content h1,
.app-content h2,
.app-content h3,
.app-content h4,
.app-content h5,
.app-content h6 {
    color: var(--app-slate-900);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.app-content h1 {
    font-size: clamp(1.6rem, 3vw, 2.15rem);
}

.app-content h2 {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.app-content a:not(.btn):not(.nav-link) {
    color: var(--app-blue);
}

.app-content a:not(.btn):not(.nav-link):hover {
    color: var(--app-blue-dark);
}

.app-content hr {
    border-color: var(--app-slate-200);
    opacity: 1;
}

.app-content .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.65rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.app-content .btn-primary {
    border-color: var(--app-blue);
    background: var(--app-blue);
    box-shadow: 0 4px 10px rgb(37 99 235 / 16%);
    color: #fff;
}

.app-content .btn-primary:hover,
.app-content .btn-primary:focus {
    border-color: var(--app-blue-dark);
    background: var(--app-blue-dark);
    transform: translateY(-1px);
}

.app-content .btn-outline-primary {
    border-color: #bfdbfe;
    background: #fff;
    color: var(--app-blue);
}

.app-content .form-control,
.app-content .form-select {
    min-height: 2.7rem;
    border-color: #cbd5e1;
    border-radius: 0.6rem;
    color: var(--app-slate-700);
}

.app-content .form-control:focus,
.app-content .form-select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 0.22rem rgb(37 99 235 / 14%);
}

.app-content .table {
    --bs-table-striped-bg: #f8fafc;
    width: 100%;
    color: var(--app-slate-700);
    vertical-align: middle;
}

.app-content .table th,
.app-content .table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--app-slate-200);
}

.app-content .table thead th {
    background: var(--app-slate-100);
    color: var(--app-slate-700);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.app-content .card,
.app-content .accordion-item {
    border-color: var(--app-slate-200);
    border-radius: 0.85rem;
    box-shadow: 0 4px 16px rgb(15 23 42 / 4%);
}

.app-content .accordion-button {
    display: inline-flex;
    width: 100%;
    min-height: 2.5rem;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    border: 1px solid var(--app-slate-200);
    border-radius: 0.85rem;
    background: #fff;
    color: var(--app-slate-900);
    cursor: pointer;
    font-weight: 600;
}

.app-content .accordion-button::after {
    width: auto;
    height: auto;
    background-image: none;
    content: "+";
    font-size: 1.25rem;
    line-height: 1;
}

.app-content .accordion-button:not(.collapsed)::after {
    content: "\2212";
}

.app-content .accordion-collapse:not(.show) {
    display: none;
}

.app-content .accordion-collapse.show {
    display: block;
}

.trip-course-table {
    width: 100%;
    border-collapse: collapse;
}

.trip-course-table thead th {
    background: var(--app-slate-100);
    color: var(--app-slate-700);
    font-size: 0.8rem;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
}

.course-details {
    width: 100%;
    padding: 0.75rem;
}

.course-details-parties {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: start;
    gap: 1.25rem;
}

.course-details-party {
    min-width: 0;
    overflow-wrap: anywhere;
}

.course-details-party.borderGrey {
    border-left: 3px solid #94a3b8;
    padding-left: 0.75rem;
}

.course-details-party.borderOrange {
    border-left: 3px solid #f59e0b;
    padding-left: 0.75rem;
}

.course-details-party.borderBlue {
    border-left: 3px solid #3b82f6;
    padding-left: 0.75rem;
}

.course-details-actions {
    display: flex;
    min-width: 2.5rem;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
}

.course-details-actions br {
    display: none;
}

.course-details-actions img {
    display: block;
}

.course-details-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.course-details-meta > :last-child {
    text-align: right;
}

.course-details-info {
    overflow-wrap: anywhere;
}

.trip-navigation {
    margin-bottom: 1.5rem;
}

.trip-navigation-title {
    margin: 1rem 0 0;
    color: var(--app-slate-900);
    font-size: clamp(1.45rem, 2.8vw, 2rem);
    font-weight: 750;
    letter-spacing: -0.035em;
}

.trip-navigation-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.35rem;
    border: 1px solid var(--app-slate-200);
    border-radius: 0.9rem;
    background: var(--app-surface);
    box-shadow: 0 4px 16px rgb(15 23 42 / 4%);
}

.trip-navigation-link {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.65rem 0.9rem;
    border-radius: 0.65rem;
    color: var(--app-slate-600) !important;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-decoration: none;
    transition: color 150ms ease, background-color 150ms ease;
}

.trip-navigation-link img {
    display: block;
    flex: 0 0 auto;
    opacity: 0.78;
}

.trip-navigation-link:hover,
.trip-navigation-link.active {
    background: #eff6ff;
    color: var(--app-blue-dark) !important;
}

.trip-navigation-link.active img,
.trip-navigation-link:hover img {
    opacity: 1;
}

.course-edit-form {
    width: 100%;
    min-width: 0;
}

.course-edit-form > .row {
    --bs-gutter-y: 1rem;
}

.course-edit-form input[type="text"],
.course-edit-form input[type="url"],
.course-edit-form textarea {
    box-sizing: border-box;
    max-width: 100%;
}

.course-edit-form .form-control {
    width: 100%;
}

.course-party-card,
.detail-card {
    min-width: 0;
    height: 100%;
    padding: 1.25rem;
    border: 1px solid var(--app-slate-200);
    border-radius: 0.9rem;
    background: var(--app-surface);
    box-shadow: 0 4px 16px rgb(15 23 42 / 4%);
}

.course-party-card.borderGrey {
    border-color: #94a3b8;
}

.course-party-card.borderOrange {
    border-color: #f59e0b;
}

.course-party-card.borderBlue {
    border-color: #3b82f6;
}

.course-party-card h5 {
    margin-bottom: 1rem;
}

.course-party-card .form-check-inline {
    margin-right: 0.65rem;
}

.course-party-card > .form-control,
.course-party-card > input.form-control {
    margin-bottom: 0.65rem;
}

.course-party-card .row > [class*="col-"] {
    min-width: 0;
}

.course-time-input {
    display: inline-block !important;
    width: 4.4rem !important;
    min-height: 2.1rem !important;
    margin-inline: 0.2rem;
    vertical-align: middle;
}

.course-status-cell {
    width: 7rem;
    text-align: center;
}

.course-status-indicator {
    display: inline-flex;
    min-width: 5.5rem;
    min-height: 1.6rem;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.course-status-pending {
    background: #64748b;
}

.course-status-qualified {
    background: #334155;
}

.course-status-progress {
    background: #d97706;
}

.course-status-delivered {
    background: #2563eb;
}

.course-status-paid {
    background: #16a34a;
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.detail-card h2 {
    margin-bottom: 1rem;
    font-size: 1.15rem;
}

.home-dashboard {
    display: grid;
    gap: 1.5rem;
}

.dashboard-heading h1 {
    margin-bottom: 0.35rem;
}

.dashboard-heading .btn,
.dashboard-section-heading .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.dashboard-heading .btn img,
.dashboard-section-heading .btn img {
    filter: brightness(0) invert(1);
}

.dashboard-section-heading .btn-outline-primary img {
    filter: none;
}

.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-summary-card {
    display: flex;
    min-height: 5.25rem;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    border: 1px solid var(--app-slate-200);
    border-radius: 0.9rem;
    background: var(--app-surface);
    box-shadow: 0 4px 16px rgb(15 23 42 / 4%);
}

.dashboard-summary-icon {
    display: inline-flex;
    width: 2.65rem;
    height: 2.65rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: #eff6ff;
}

.dashboard-summary-icon img {
    filter: invert(26%) sepia(89%) saturate(2077%) hue-rotate(214deg) brightness(96%) contrast(94%);
}

.dashboard-summary-card > span:last-child {
    display: grid;
    line-height: 1.3;
}

.dashboard-summary-card strong {
    color: var(--app-slate-900);
    font-size: 1.2rem;
}

.dashboard-summary-card > span:last-child > span {
    color: var(--app-slate-500);
    font-size: 0.8rem;
}

.dashboard-section {
    overflow: hidden;
    border: 1px solid var(--app-slate-200);
    border-radius: 0.9rem;
    background: var(--app-surface);
    box-shadow: 0 4px 16px rgb(15 23 42 / 4%);
}

.dashboard-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
}

.dashboard-section-heading h2 {
    margin: 0;
    font-size: 1.15rem;
}

.dashboard-section-heading p {
    margin: 0.25rem 0 0;
    color: var(--app-slate-500);
    font-size: 0.85rem;
}

.dashboard-table-wrap {
    border-top: 1px solid var(--app-slate-200);
}

.dashboard-table {
    margin: 0;
}

.dashboard-table thead th {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--app-slate-200);
    white-space: nowrap;
}

.dashboard-table tbody td {
    padding: 0.8rem 1rem;
}

.dashboard-table tbody tr:last-child td {
    border-bottom: 0;
}

.dashboard-primary-cell,
.dashboard-revenue {
    color: var(--app-slate-900);
    font-weight: 600;
}

.dashboard-trip-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 600;
    text-decoration: none;
}

.dashboard-trip-link img {
    opacity: 0.65;
}

.dashboard-volume {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--app-slate-100);
    color: var(--app-slate-600);
    font-size: 0.8rem;
    white-space: nowrap;
}

.dashboard-actions {
    text-align: right;
    white-space: nowrap;
}

.run-page {
    display: grid;
    gap: 1.25rem;
}

.run-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.run-heading h2 {
    margin: 0;
    color: var(--app-slate-900);
    font-size: 1.5rem;
}

.run-heading p {
    margin: 0.25rem 0 0;
    color: var(--app-slate-500);
}

.run-print-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.run-day-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--app-slate-200);
    border-radius: 0.75rem;
    background: var(--app-surface);
}

.run-day-navigation a {
    padding: 0.3rem 0.65rem;
    border-radius: 0.5rem;
    background: var(--app-slate-100);
    color: var(--app-blue-dark);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.run-day-section {
    display: grid;
    gap: 0.85rem;
    scroll-margin-top: 9rem;
}

.run-day-section > h2 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--app-slate-200);
    color: var(--app-slate-900);
    font-size: 1.2rem;
}

.run-day-section > h2 span {
    color: var(--app-slate-500);
    font-size: 0.9rem;
    font-weight: 500;
}

.run-course-list {
    display: grid;
    gap: 0.85rem;
}

.run-course-card {
    position: relative;
    padding: 1rem 1.15rem;
    border: 1px solid var(--app-slate-200);
    border-radius: 0.85rem;
    background: var(--app-surface);
    box-shadow: 0 4px 16px rgb(15 23 42 / 4%);
    break-inside: avoid;
}

.run-course-number {
    display: inline-flex;
    width: 1.65rem;
    height: 1.65rem;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--app-blue);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    position: absolute;
    top: -0.45rem;
    left: -0.45rem;
    z-index: 1;
}

.run-course-heading,
.run-course-title,
.run-stop-heading {
    display: flex;
    align-items: center;
}

.run-course-heading {
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.run-course-title {
    min-width: 0;
    gap: 0.65rem;
}

.run-course-title img {
    flex: 0 0 auto;
    opacity: 0.75;
}

.run-course-title h3 {
    overflow-wrap: anywhere;
    margin: 0;
    color: var(--app-slate-900);
    font-size: 1.05rem;
}

.run-operation,
.run-stop-heading > span {
    border-radius: 999px;
    background: #eff6ff;
    color: var(--app-blue-dark);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    white-space: nowrap;
}

.run-stop-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.65rem;
}

.run-stop-card {
    min-width: 0;
    padding: 0.85rem;
    border: 1px solid var(--app-slate-200);
    border-radius: 0.65rem;
}

.run-stop-card.is-current {
    border-color: #93c5fd;
    background: #f8fbff;
}

.run-stop-heading {
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.run-stop-heading h4 {
    margin: 0;
    color: var(--app-slate-700);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.run-stop-contact {
    margin: 0 0 0.25rem;
    color: var(--app-slate-900);
    font-weight: 600;
}

.run-stop-card address {
    display: grid;
    margin: 0;
    font-style: normal;
}

.run-stop-card address strong {
    color: var(--app-slate-900);
}

.run-missing {
    color: var(--app-slate-500);
    font-style: italic;
}

.run-phone {
    display: inline-block;
    margin-top: 0.35rem;
    color: var(--app-blue-dark);
    text-decoration: none;
}

.run-action-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    gap: 0.5rem;
}

.run-action-button {
    display: inline-flex;
    min-height: 3rem;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--app-slate-200);
    border-radius: 0.65rem;
    background: var(--app-surface);
    color: var(--app-slate-700);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.run-action-button:hover,
.run-action-button:focus-visible {
    border-color: #93c5fd;
    background: #eff6ff;
    color: var(--app-blue-dark);
}

.run-action-button img {
    flex: 0 0 auto;
    object-fit: contain;
}

.run-action-secondary {
    border-style: dashed;
    color: var(--app-slate-600);
}

.run-action-disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.run-map-actions,
.run-other-actions {
    width: 100%;
}

.run-current-actions {
    margin-top: 0.75rem;
}

.run-map-actions .run-action-button,
.run-other-actions .run-action-button,
.run-current-actions .run-action-button {
    justify-content: center;
}

.run-time {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.6rem 0 0;
    color: #b91c1c;
    font-size: 0.85rem;
    font-weight: 600;
}

.run-course-notes {
    margin: 0.8rem 0 0;
    padding-top: 0.7rem;
    border-top: 1px solid var(--app-slate-200);
    white-space: normal;
}

.run-empty {
    margin: 0;
    padding: 1rem;
    border: 1px dashed var(--app-slate-200);
    border-radius: 0.75rem;
    color: var(--app-slate-500);
}

.run-print-heading {
    display: none;
}

.dashboard-actions .dashboard-icon-link + .dashboard-icon-link {
    margin-left: 0.3rem;
}

.dashboard-icon-link {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.55rem;
    transition: background-color 150ms ease, color 150ms ease;
}

.dashboard-icon-link:hover {
    background: #eff6ff;
}

.dashboard-delete-link {
    color: #b91c1c !important;
}

.dashboard-delete-link:hover {
    background: #fef2f2;
    color: #991b1b !important;
}

.dashboard-empty {
    display: flex;
    min-height: 11rem;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1.5rem;
    border-top: 1px solid var(--app-slate-200);
    color: var(--app-slate-500);
    text-align: center;
}

.dashboard-empty > img {
    margin-bottom: 0.35rem;
    opacity: 0.55;
}

.dashboard-empty strong {
    color: var(--app-slate-900);
}

.dashboard-empty span {
    font-size: 0.875rem;
}

.profile-form {
    width: 100%;
}

.profile-section h2 {
    margin-bottom: 1.25rem;
}

.profile-section-note {
    color: var(--app-slate-500);
    font-size: 0.8em;
    font-weight: 500;
    letter-spacing: normal;
}

.profile-section .form-label {
    margin-bottom: 0.4rem;
    color: var(--app-slate-600);
    font-size: 0.875rem;
    font-weight: 600;
}

.profile-section .input-group-text {
    border-color: #cbd5e1;
    border-radius: 0.6rem;
    background: var(--app-slate-100);
    color: var(--app-slate-600);
}

.profile-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 1.25rem;
}

.detail-subtitle {
    margin-top: 1.5rem;
    font-size: 0.95rem;
}

.detail-label {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--app-slate-500);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.option-state {
    display: inline-flex;
    width: 1.35rem;
    height: 1.35rem;
    align-items: center;
    justify-content: center;
    margin-right: 0.35rem;
    border-radius: 50%;
    background: var(--app-slate-100);
    color: var(--app-slate-500);
    font-weight: 700;
}

.option-state.selected {
    background: #dcfce7;
    color: #15803d;
}

.form-check-label.borderGrey,
.form-check-label.borderBlack,
.form-check-label.borderOrange,
.form-check-label.borderBlue,
.form-check-label.borderGreen {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-weight: 700;
}

.form-check-label.borderGrey {
    color: #64748b;
}

.form-check-label.borderBlack {
    color: #334155;
}

.form-check-label.borderOrange {
    color: #d97706;
}

.form-check-label.borderBlue {
    color: #2563eb;
}

.form-check-label.borderGreen {
    color: #16a34a;
}

.app-footer {
    border-top: 1px solid var(--app-slate-200);
    background: var(--app-surface);
    color: var(--app-slate-500);
    font-size: 0.8rem;
}

.app-footer-top {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr;
    gap: 2.5rem;
    padding-block: 2.5rem;
    border-bottom: 1px solid var(--app-slate-100);
}

.app-footer-about img {
    width: 10rem;
    height: auto;
    margin-bottom: 0.75rem;
}

.app-footer p {
    margin: 0;
}

.app-footer h2 {
    margin: 0 0 0.75rem;
    color: var(--app-slate-900);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-footer ul {
    display: grid;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.app-footer a {
    color: var(--app-slate-500);
    text-decoration: none;
    transition: color 150ms ease;
}

.app-footer a:hover {
    color: var(--app-blue);
}

.app-footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 1rem;
}

.app-footer-bottom p:last-child a {
    color: var(--app-blue);
    font-weight: 600;
}

@media (max-width: 640px) {
    .app-header-inner {
        min-height: 4.25rem;
    }

    .app-brand img {
        width: 9.5rem;
    }

    .app-account {
        gap: 0.65rem;
        font-size: 0.75rem;
    }

    .app-nav-inner,
    .app-header-inner,
    .app-footer-inner {
        width: min(100% - 1.25rem, 80rem);
    }

    .app-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .app-nav .nav-link {
        white-space: nowrap;
    }

    .trip-navigation-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trip-navigation-link {
        justify-content: flex-start;
        padding-inline: 0.65rem;
        font-size: 0.72rem;
    }

    .app-main {
        padding-block: 1.25rem 2rem;
    }

    .app-content.container {
        width: min(100% - 1.25rem, 80rem);
    }

    .app-footer-top {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding-block: 2rem;
    }

    .app-footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .course-party-card,
    .detail-card {
        padding: 1rem;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .dashboard-summary-card {
        gap: 0.5rem;
        min-width: 0;
        padding: 0.75rem;
    }

    .dashboard-summary-icon {
        width: 2.25rem;
        height: 2.25rem;
    }

    .dashboard-summary-card > span:last-child > span {
        font-size: 0.72rem;
    }

    .dashboard-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .run-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .run-stop-grid {
        grid-template-columns: 1fr;
    }

    .course-details-parties {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.85rem;
    }

    .course-details-actions {
        flex-direction: row;
        justify-content: flex-start;
        min-width: 0;
    }

    .course-details-meta {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.5rem;
    }

    .course-details-meta > :last-child {
        text-align: left;
    }

    .run-map-actions,
    .run-other-actions,
    .run-current-actions {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.4rem;
    }

    .run-map-actions .run-action-button,
    .run-other-actions .run-action-button,
    .run-current-actions .run-action-button {
        min-width: 0;
        flex: 1 1 0;
        justify-content: center;
        gap: 0.35rem;
        padding-inline: 0.4rem;
        font-size: 0.75rem;
        text-align: center;
    }

    .run-map-actions .run-action-button img {
        width: 20px;
        height: 20px;
    }

    .run-other-actions .run-action-button img,
    .run-current-actions .run-action-button img {
        width: 18px;
        height: 18px;
    }

    .dashboard-table {
        min-width: 42rem;
    }
}

@media print {
    @page {
        margin: 8mm;
    }

    body.app-body {
        display: block;
        min-height: 0;
        background: #fff;
        color: #111827;
        font-size: 7.5pt;
    }

    .app-header,
    .app-footer,
    .trip-navigation,
    .run-heading,
    .run-day-navigation {
        display: none !important;
    }

    .app-main {
        padding: 0;
    }

    .app-content.container {
        display: block;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        font-size: 7.5pt;
    }

    .run-page {
        display: block;
    }

    .run-print-heading {
        display: block;
        margin-bottom: 3mm;
    }

    .run-print-heading h1 {
        margin: 0;
        color: #111827;
        font-size: 11pt;
    }

    .run-print-heading p {
        margin: 0;
        font-size: 8pt;
    }

    .run-day-section {
        display: block;
        margin: 0 0 3mm;
        scroll-margin: 0;
    }

    .run-day-section > h2 {
        gap: 2mm;
        margin: 0 0 2mm;
        padding-bottom: 1mm;
        font-size: 9pt;
    }

    .run-day-section > h2 span {
        font-size: 7.5pt;
    }

    .run-course-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2mm;
        align-items: start;
    }

    .run-course-card,
    .run-stop-card {
        border-color: #9ca3af;
        box-shadow: none;
    }

    .run-course-card {
        padding: 2mm 2mm 2mm 6mm;
        border-radius: 2mm;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .run-course-number {
        top: 1.5mm;
        left: 1.5mm;
        width: 4mm;
        height: 4mm;
        border: 0;
        background: #111827;
        color: #fff;
        font-size: 6pt;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .run-course-heading {
        gap: 1mm;
        margin-bottom: 1mm;
    }

    .run-course-title {
        gap: 1mm;
    }

    .run-course-title img {
        width: 12px;
        height: 12px;
    }

    .run-course-title h3 {
        font-size: 8pt;
        line-height: 1.15;
    }

    .run-operation {
        padding: 0;
        background: transparent;
        font-size: 6.5pt;
    }

    .run-stop-grid {
        display: block;
    }

    .run-action-bar {
        display: none !important;
    }

    .run-stop-card.is-current {
        padding: 1.5mm 2mm;
        border-radius: 1mm;
    }

    .run-stop-heading {
        gap: 1mm;
        margin-bottom: 0.5mm;
    }

    .run-stop-heading h4,
    .run-stop-heading > span {
        font-size: 6.5pt;
    }

    .run-stop-heading > span {
        padding: 0;
        background: transparent;
    }

    .run-stop-contact,
    .run-stop-card address,
    .run-phone {
        margin-top: 0;
        margin-bottom: 0;
        font-size: 7pt;
        line-height: 1.2;
    }

    .run-time {
        gap: 1mm;
        margin: 1mm 0 0;
        font-size: 6.5pt;
        line-height: 1.15;
    }

    .run-time img {
        width: 10px;
        height: 10px;
    }

    .run-stop-card.is-current {
        background: #fff;
    }

    .run-course-notes {
        margin: 1.5mm 0 0;
        padding-top: 1mm;
        border-top: 0.2mm solid #d1d5db;
        font-size: 7pt;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .run-course-notes strong {
        font-size: 6.5pt;
    }

    .run-empty {
        padding: 2mm;
    }

    a {
        color: inherit !important;
        text-decoration: none !important;
    }
}
