:root {
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --text: #1a1a1a;
    --text-muted: #4b5563;
    --border: #d1d5db;
    --accent: #ea580c;
    --on-time: #16a34a;
    --delayed: #f97316;
    --cancelled: #dc2626;
    --shadow: 0 8px 20px rgba(0, 0, 0, .12);
    --alert: #dc2626;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f0f0f;
        --card-bg: #1a1a1a;
        --text: #ffffff;
        --text-muted: #b3b3b3;
        --border: #333333;
        --accent: #ffffff;
        --on-time: #22c55e;
        --delayed: #fb923c;
        --cancelled: #f87171;
        --shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
        --alert: #f87171;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
}

.header-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 800;
    color: var(--accent);
    text-align: center;
    margin: 1.8rem 0 1.8rem;
}

.schedule-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    overflow: hidden;
    width: 100%;

}

.table-wrapper {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    overflow-x: hidden;
}

.table {
    margin: 0;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.table thead,
.table tbody,
.table td {
    background-color: var(--card-bg) !important;
    color: var(--text) !important;
}

.table th {
    border-bottom: none;
}

.table tbody tr:first-child td {
    border-top: none;
}

.table th {
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: clamp(1rem, 2.8vh, 1.4rem);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.9rem 1.2rem;
    border-bottom: 2px solid var(--border);
    text-align: center;
}

.table th:nth-child(1),
.table td:nth-child(1) {
    width: 22%;
}

.table th:nth-child(2),
.table td:nth-child(2) {
    width: 53%;
}

.table th:nth-child(3),
.table td:nth-child(3) {
    width: 25%;
}

@media (max-width: 768px) {
    .footer-box {
        flex-direction: column;
        text-align: center;
    }

    .table th:nth-child(1),
    .table td:nth-child(1) {
        width: 25%;
    }

    .table th:nth-child(2),
    .table td:nth-child(2) {
        width: 50%;
    }

    .table th:nth-child(3),
    .table td:nth-child(3) {
        width: 25%;
    }
}

.table td {
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-size: clamp(1rem, 2.8vh, 1.4rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.time-col {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.boat-name {
    font-weight: 700;
    font-size: clamp(1.1rem, 3.2vh, 1.6rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    max-width: 140px;
    width: fit-content;
    padding: 0.35rem 0.8rem;
    margin: 0 auto;
    border-radius: 2rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid;
    background: rgba(0, 0, 0, .05);
    white-space: nowrap;
}

.status-ontime {
    color: var(--on-time);
    border-color: var(--on-time);
    background: rgba(34, 197, 94, .1);
}

.status-delayed {
    color: var(--delayed);
    border-color: var(--delayed);
    background: rgba(245, 158, 11, .1);
}

.status-cancelled {
    color: var(--cancelled);
    border-color: var(--cancelled);
    background: rgba(239, 68, 68, .1);
}

.table td:nth-child(3) {
    text-align: center;
    padding: 0.9rem 0.5rem;
}

.no-schedule {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 1.6rem;
}

.footer-box {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 1rem;
    padding: 1.2rem 1.5rem;
    margin: 1rem 1.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: var(--shadow);
    font-family: 'Inter', sans-serif;
}

.footer-left {
    flex: 1;
    min-width: 280px;
    text-align: center;
}

.footer-left strong {
    color: var(--alert);
    font-size: 1.4rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-left p {
    margin: 0.4rem 0 0;
    font-size: 1.05rem;
    line-height: 1.4;
    color: var(--text);
}

.footer-right {
    text-align: center;
    min-width: 200px;
}

.footer-right small {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.footer-time-big {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 800;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
}