/* ATIS Tracker - Stylesheet */

:root {
    --bg:        #0e1116;
    --panel:     #161b22;
    --panel-2:   #1c232c;
    --border:    #2a3340;
    --text:      #e6edf3;
    --muted:     #8b949e;
    --accent:    #58a6ff;
    --accent-2:  #79c0ff;
    --good:      #3fb950;
    --warn:      #d29922;
    --bad:       #f85149;
    --mono:      ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
}

header.site {
    border-bottom: 1px solid var(--border);
    background: var(--panel);
    padding: 18px 0;
}

header.site .container {
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

header.site h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

header.site h1 .logo {
    color: var(--accent);
    font-family: var(--mono);
    margin-right: 8px;
}

.subtitle {
    color: var(--muted);
    font-size: 13px;
}

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 14px 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.filter-bar label {
    font-size: 13px;
    color: var(--muted);
}

.filter-bar select,
.filter-bar input {
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 14px;
    font-family: inherit;
}

.filter-bar select:focus,
.filter-bar input:focus {
    outline: none;
    border-color: var(--accent);
}

.filter-bar .spacer { flex: 1; }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
}

.stat-card .label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .value {
    font-size: 22px;
    font-weight: 600;
    margin-top: 4px;
    font-family: var(--mono);
}

table.atis {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

table.atis th,
table.atis td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: top;
}

table.atis th {
    background: var(--panel-2);
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

table.atis tbody tr:hover {
    background: rgba(88, 166, 255, 0.06);
}

table.atis tbody tr:last-child td {
    border-bottom: none;
}

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

.letter {
    display: inline-block;
    background: var(--accent);
    color: #061018;
    font-weight: 700;
    font-family: var(--mono);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    min-width: 24px;
    text-align: center;
}

.icao {
    display: inline-block;
    font-family: var(--mono);
    font-weight: 600;
    color: var(--accent-2);
}

.empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}

/* Detail page */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.detail-grid .field {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
}

.detail-grid .field .label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.detail-grid .field .value {
    font-family: var(--mono);
    font-size: 15px;
    word-break: break-word;
}

.raw-block {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 20px;
}

.raw-block h2 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.raw-block pre {
    margin: 0;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text);
}

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 13px;
}

.btn {
    display: inline-block;
    padding: 6px 12px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text);
}

.btn:hover {
    border-color: var(--accent);
    text-decoration: none;
}

footer.site {
    border-top: 1px solid var(--border);
    margin-top: 40px;
    padding: 20px 0 30px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

footer.site .container { padding-top: 0; }

footer.site h3 {
    color: var(--text);
    margin: 0 0 8px 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

footer.site p { margin: 6px 0; }

footer.site .disclaimer {
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--warn);
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 12px;
}

@media (max-width: 700px) {
    table.atis th:nth-child(n+5),
    table.atis td:nth-child(n+5) {
        display: none;
    }
    .container { padding: 16px 12px; }
}
