:root {
    --bg: #0b0f0c;
    --bg-soft: #10160f;
    --panel: #131a12;
    --panel-border: #2a3a26;
    --text: #a8c4a4;
    --text-dim: #6b8567;
    --text-bright: #d8ecd2;
    --amber: #ffb000;
    --amber-dark: #c98a00;
    --green: #57ff8a;
    --danger: #ff5f56;
    --mono: 'IBM Plex Mono', 'JetBrains Mono', 'Courier New', monospace;
    --sans: 'IBM Plex Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--sans);
    background:
        radial-gradient(ellipse at 20% 0%, rgba(87, 255, 138, 0.05), transparent 55%),
        linear-gradient(160deg, #0b0f0c 0%, #0d120c 60%, #0b0f0c 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--amber);
    text-decoration: none;
}

a:hover {
    color: var(--green);
    text-decoration: underline;
}

.navbar {
    background: var(--panel);
    padding: 0.85rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--panel-border);
    box-shadow: 0 0 24px rgba(87, 255, 138, 0.08);
    gap: 1rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.navbar .logo {
    font-family: var(--mono);
    font-size: clamp(0.95rem, 1.4vw, 1.2rem);
    font-weight: 700;
    color: var(--green);
    letter-spacing: 1px;
    text-shadow: 0 0 12px rgba(87, 255, 138, 0.45);
}

.navbar .logo .logo-sep {
    color: var(--text-dim);
    text-shadow: none;
}

.navbar .menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.navbar .menu a {
    color: var(--text-dim);
    font-family: var(--mono);
    font-size: 0.9rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid transparent;
    border-radius: 4px;
    white-space: nowrap;
}

.navbar .menu a:hover {
    color: var(--green);
    border-color: var(--panel-border);
    text-decoration: none;
    background: var(--bg-soft);
}

.container {
    flex: 1;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 1.5rem clamp(1.25rem, 4vw, 3.5rem) 2.5rem;
}

footer {
    background: var(--panel);
    padding: 0.85rem 2rem;
    text-align: center;
    color: var(--text-dim);
    font-family: var(--mono);
    font-size: 0.78rem;
    border-top: 1px solid var(--panel-border);
    flex-shrink: 0;
}

.page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.crt-header {
    background: linear-gradient(135deg, #0a0f0a 0%, #101a0e 70%, #1a2410 100%);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 1.5rem 1.75rem;
    box-shadow: inset 0 0 40px rgba(87, 255, 138, 0.05);
}

.crt-title {
    font-family: var(--mono);
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
    font-weight: 700;
    color: var(--green);
    text-shadow: 0 0 14px rgba(87, 255, 138, 0.5);
    letter-spacing: 1px;
}

.crt-title .cursor {
    animation: blink 1.1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.crt-subtitle {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 0.35rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
    align-items: start;
}

.auth-page {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0;
}

.auth-page .card {
    width: 100%;
    max-width: 380px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 1.25rem 1.4rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

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

.card h2 {
    font-family: var(--mono);
    font-size: 1.05rem;
    color: var(--amber);
    margin-bottom: 0.9rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px dashed var(--panel-border);
    letter-spacing: 0.5px;
}

.hint {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    margin: -0.4rem 0 0.75rem;
}

.table-scroll {
    max-height: 480px;
    overflow-y: auto;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
}

.table-scroll .data-table {
    border: none;
}

.table-scroll thead th {
    position: sticky;
    top: 0;
    background: var(--panel);
    z-index: 1;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.data-table th {
    font-family: var(--mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    text-align: left;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--panel-border);
}

.data-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid rgba(42, 58, 38, 0.5);
    color: var(--text);
}

.data-table tbody tr:hover td {
    background: rgba(87, 255, 138, 0.04);
    color: var(--text-bright);
}

.data-table th.sortable-col {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.data-table th.sortable-col:hover {
    color: var(--green);
}

.data-table th.sortable-col::after {
    content: " ⇅";
    color: var(--text-dim);
    font-size: 0.75rem;
}

.data-table th.sortable-col.sorted {
    color: var(--amber);
}

.badge-clearance {
    font-family: var(--mono);
    color: var(--green);
    background: rgba(87, 255, 138, 0.08);
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    padding: 0.1rem 0.5rem;
    font-size: 0.85rem;
}

.error {
    font-family: var(--mono);
    background: rgba(255, 95, 86, 0.08);
    color: var(--danger);
    border: 1px solid rgba(255, 95, 86, 0.4);
    padding: 0.7rem 0.9rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.88rem;
}

.logged-in {
    margin-bottom: 0.9rem;
}

.logged-in strong {
    color: var(--green);
    font-family: var(--mono);
}

.auth-form .form-group {
    margin-bottom: 0.9rem;
}

.auth-form label {
    display: block;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-form input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    background: var(--bg);
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    color: var(--green);
    font-family: var(--mono);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(87, 255, 138, 0.12);
}

.auth-form button,
.btn {
    display: inline-block;
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    color: var(--amber);
    border: 1px solid var(--amber-dark);
    border-radius: 6px;
    font-family: var(--mono);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

.auth-form button:hover,
.btn:hover {
    background: var(--amber);
    color: #141005;
    text-decoration: none;
    box-shadow: 0 0 18px rgba(255, 176, 0, 0.35);
}

.export-list {
    list-style: none;
}

.export-list li {
    padding: 0.45rem 0;
    border-bottom: 1px dashed rgba(42, 58, 38, 0.6);
}

.export-list a {
    font-family: var(--mono);
    font-size: 0.92rem;
}

.note {
    font-family: var(--mono);
    font-size: 0.88rem;
    color: var(--text-dim);
    font-style: italic;
}

.note code {
    font-style: normal;
    color: var(--green);
    background: rgba(87, 255, 138, 0.08);
    border-radius: 3px;
    padding: 0.05rem 0.35rem;
}

.quick-links {
    list-style: none;
    display: grid;
    gap: 0.6rem;
}

.quick-links li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    background: var(--bg-soft);
    font-family: var(--mono);
    font-size: 0.88rem;
    color: var(--text);
}

.quick-links li a:hover {
    border-color: var(--green);
    color: var(--green);
    text-decoration: none;
}

.quick-links li a .arrow {
    color: var(--text-dim);
}

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.alert-item {
    border: 1px solid var(--panel-border);
    border-left: 3px solid var(--amber-dark);
    border-radius: 6px;
    padding: 0.8rem 1rem;
    background: var(--bg-soft);
}

.alert-item.alert-note {
    border-left-color: var(--green);
}

.alert-item .alert-date {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alert-item h3 {
    font-size: 0.98rem;
    color: var(--text-bright);
    margin: 0.2rem 0 0.35rem;
}

.alert-item p {
    font-size: 0.9rem;
    color: var(--text);
    margin: 0;
}

.support-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1.4fr);
    gap: 1.25rem;
    align-items: start;
}

.support-grid dl {
    display: grid;
    gap: 0.6rem;
}

.support-grid dt {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.support-grid dd {
    margin: 0.1rem 0 0;
    color: var(--text-bright);
}

@media (max-width: 860px) {
    .support-grid {
        grid-template-columns: 1fr;
    }
}

.support-form {
    max-width: 640px;
}

.support-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.support-form select,
.support-form textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    background: var(--bg);
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    color: var(--green);
    font-family: var(--mono);
    font-size: 0.95rem;
    resize: vertical;
}

.support-form select:focus,
.support-form textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(87, 255, 138, 0.12);
}

.support-form button {
    width: auto;
    padding: 0.75rem 1.75rem;
}

.support-form-status {
    display: none;
    font-family: var(--mono);
    font-size: 0.88rem;
    color: var(--green);
    background: rgba(87, 255, 138, 0.08);
    border: 1px solid rgba(87, 255, 138, 0.35);
    border-radius: 6px;
    padding: 0.65rem 0.9rem;
    margin-bottom: 1rem;
}

.support-form-status.show {
    display: block;
}

@media (max-width: 640px) {
    .support-form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .navbar {
        justify-content: center;
    }

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