/* === Admin — shared base === */
.admin-body {
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 100vh;
}

/* scanline + chromatic from style.css carry over */

/* ── Login page ──────────────────────────────────────────────────────────── */
.admin-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.admin-login-box {
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(143, 186, 120, 0.4);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    background: rgba(143, 186, 120, 0.03);
}

.admin-login-header {
    font-family: 'Handjet', monospace;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 300;
    color: #cce8b0;
    letter-spacing: 0.1em;
    margin-bottom: 1.8rem;
}

.admin-cursor {
    animation: blink 1s step-end infinite;
    color: #8fba78;
}

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

.admin-error {
    font-family: 'Handjet', monospace;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 300;
    color: #c06060;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

.admin-login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ── Shared form elements ─────────────────────────────────────────────────── */
.admin-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.admin-field label {
    font-family: 'Handjet', monospace;
    font-size: clamp(0.8rem, 1.8vw, 0.95rem);
    font-weight: 300;
    color: rgba(143, 186, 120, 0.6);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.admin-hint {
    text-transform: none;
    font-size: 0.85em;
    color: rgba(143, 186, 120, 0.35);
}

.admin-field input:not([type="checkbox"]),
.admin-field select,
.admin-field textarea {
    font-family: 'Handjet', monospace;
    font-size: clamp(0.95rem, 2.2vw, 1.15rem);
    font-weight: 300;
    color: #cce8b0;
    background: rgba(204, 232, 176, 0.04);
    border: 1px solid rgba(143, 186, 120, 0.3);
    padding: 0.45em 0.7em;
    outline: none;
    letter-spacing: 0.06em;
    transition: border-color 200ms ease, background 200ms ease;
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.admin-field input:not([type="checkbox"]):focus,
.admin-field select:focus,
.admin-field textarea:focus {
    border-color: rgba(143, 186, 120, 0.75);
    background: rgba(204, 232, 176, 0.07);
}

.admin-field select {
    cursor: pointer;
}

.admin-field textarea {
    resize: vertical;
    min-height: 80px;
}

.admin-btn {
    font-family: 'Handjet', monospace;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 300;
    color: #8fba78;
    background: transparent;
    border: 1px solid rgba(143, 186, 120, 0.4);
    padding: 0.4em 1.2em;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 200ms ease, border-color 200ms ease, background 200ms ease;
    text-decoration: none;
    display: inline-block;
}

.admin-btn:hover {
    color: #cce8b0;
    border-color: rgba(143, 186, 120, 0.8);
    background: rgba(143, 186, 120, 0.07);
}

.admin-btn--ghost {
    color: rgba(143, 186, 120, 0.45);
    border-color: rgba(143, 186, 120, 0.2);
}

.admin-btn--ghost:hover {
    color: #8fba78;
    border-color: rgba(143, 186, 120, 0.5);
    background: transparent;
}

/* ── Dashboard header ─────────────────────────────────────────────────────── */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem clamp(1.5rem, 4vw, 3rem);
    border-bottom: 1px solid rgba(143, 186, 120, 0.2);
}

.admin-prompt {
    font-family: 'Handjet', monospace;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 300;
    color: #cce8b0;
    letter-spacing: 0.08em;
}

.admin-path {
    color: #8fba78;
}

.admin-header-nav {
    display: flex;
    gap: 1.5rem;
}

.admin-nav-link {
    font-family: 'Handjet', monospace;
    font-size: clamp(0.85rem, 2vw, 1.05rem);
    font-weight: 300;
    color: rgba(143, 186, 120, 0.55);
    text-decoration: none;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 200ms ease;
}

.admin-nav-link:hover {
    color: #8fba78;
}

.admin-nav-logout:hover {
    color: #c06060;
}

/* ── Dashboard body ───────────────────────────────────────────────────────── */
.admin-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3rem) 5rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.admin-flash {
    font-family: 'Handjet', monospace;
    font-size: clamp(0.9rem, 2vw, 1.05rem);
    font-weight: 300;
    letter-spacing: 0.07em;
    padding: 0.6em 1em;
    border-left: 2px solid;
    margin-bottom: -1rem;
}

.admin-flash--ok {
    color: #8fba78;
    border-color: #8fba78;
    background: rgba(143, 186, 120, 0.06);
}

.admin-flash--error {
    color: #c06060;
    border-color: #c06060;
    background: rgba(192, 96, 96, 0.06);
}

.admin-section-title {
    font-family: 'Handjet', monospace;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 300;
    color: rgba(143, 186, 120, 0.5);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0 0 1.2rem;
}

.admin-count {
    color: rgba(143, 186, 120, 0.3);
}

/* ── Add/Edit form grid ───────────────────────────────────────────────────── */
.admin-section {
    display: flex;
    flex-direction: column;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
}

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

.admin-form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1.2rem;
}

/* ── Projects table ───────────────────────────────────────────────────────── */
.admin-empty {
    font-family: 'Handjet', monospace;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    font-weight: 300;
    color: rgba(143, 186, 120, 0.35);
    letter-spacing: 0.08em;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Handjet', monospace;
    font-size: clamp(0.85rem, 1.9vw, 1rem);
    font-weight: 300;
    letter-spacing: 0.06em;
}

.admin-table thead th {
    text-align: left;
    color: rgba(143, 186, 120, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.85em;
    padding: 0.4em 0.8em;
    border-bottom: 1px solid rgba(143, 186, 120, 0.2);
}

.admin-table tbody tr {
    border-bottom: 1px solid rgba(143, 186, 120, 0.08);
    transition: background 150ms ease;
}

.admin-table tbody tr:hover,
.admin-row--active {
    background: rgba(143, 186, 120, 0.05);
}

.admin-table td {
    padding: 0.55em 0.8em;
    color: rgba(204, 232, 176, 0.75);
    vertical-align: middle;
}

.admin-cell-index {
    color: rgba(143, 186, 120, 0.35) !important;
    width: 2.5rem;
}

.admin-cell-name {
    color: #cce8b0 !important;
    font-size: 1.05em;
    white-space: nowrap;
}

.admin-cell-tags {
    color: rgba(143, 186, 120, 0.45) !important;
    font-size: 0.9em;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-status {
    padding: 0.1em 0.45em;
    border: 1px solid;
    font-size: 0.88em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.admin-status--live     { color: #8fba78; border-color: rgba(143,186,120,0.4); }
.admin-status--wip      { color: #b8a060; border-color: rgba(184,160,96,0.4); }
.admin-status--archived { color: rgba(143,186,120,0.3); border-color: rgba(143,186,120,0.15); }

.admin-cell-links {
    display: flex;
    gap: 0.6rem;
}

.admin-ext-link {
    font-family: 'Handjet', monospace;
    font-size: 0.9em;
    color: rgba(143, 186, 120, 0.5);
    text-decoration: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 150ms ease;
}

.admin-ext-link:hover {
    color: #8fba78;
}

.admin-cell-actions {
    display: flex;
    gap: 0.8rem;
    white-space: nowrap;
}

.admin-action-link {
    font-family: 'Handjet', monospace;
    font-size: 0.95em;
    color: rgba(143, 186, 120, 0.55);
    text-decoration: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 150ms ease;
}

.admin-action-link:hover { color: #8fba78; }
.admin-action-link--danger:hover { color: #c06060; }

.admin-inline-form {
    display: inline;
}

/* ── Info panel (clock + weather) ────────────────────────────────────────── */
.info-panel-wrap {
    display: flex;
    justify-content: center;
}

.info-panel {
    width: 260px;
    height: 260px;
    border: 1px solid rgba(143, 186, 120, 0.3);
    background: rgba(143, 186, 120, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 1.6rem;
    box-sizing: border-box;
    text-align: center;
}

.info-panel-time {
    font-family: 'Handjet', monospace;
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 300;
    color: #cce8b0;
    letter-spacing: 0.12em;
    line-height: 1;
}

.info-panel-date {
    font-family: 'Handjet', monospace;
    font-size: clamp(0.8rem, 1.8vw, 0.95rem);
    font-weight: 300;
    color: rgba(143, 186, 120, 0.5);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.info-panel-divider {
    width: 40%;
    height: 1px;
    background: rgba(143, 186, 120, 0.2);
    margin: 0.5rem 0 0.3rem;
}

.info-panel-weather {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.info-panel-weather-val {
    font-family: 'Handjet', monospace;
    font-size: clamp(1.4rem, 3.5vw, 1.9rem);
    font-weight: 300;
    color: #8fba78;
    letter-spacing: 0.08em;
    line-height: 1;
}

.info-panel-weather-cond {
    font-family: 'Handjet', monospace;
    font-size: clamp(0.78rem, 1.6vw, 0.9rem);
    font-weight: 300;
    color: rgba(143, 186, 120, 0.55);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.info-panel-weather-row {
    font-family: 'Handjet', monospace;
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
    font-weight: 300;
    color: rgba(143, 186, 120, 0.35);
    letter-spacing: 0.07em;
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.info-panel-weather-sep {
    color: rgba(143, 186, 120, 0.2);
}

/* ── Home panel ───────────────────────────────────────────────────────────── */
.admin-home-sub {
    font-family: 'Handjet', monospace;
    font-size: clamp(0.9rem, 2vw, 1.05rem);
    font-weight: 300;
    color: rgba(143, 186, 120, 0.35);
    letter-spacing: 0.08em;
    margin: 0;
}

.admin-modules {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.admin-module-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    border: 1px solid rgba(143, 186, 120, 0.25);
    padding: 1.4rem 1.6rem;
    background: rgba(143, 186, 120, 0.03);
    text-decoration: none;
    transition: border-color 200ms ease, background 200ms ease;
    position: relative;
}

.admin-module-card:hover {
    border-color: rgba(143, 186, 120, 0.6);
    background: rgba(143, 186, 120, 0.07);
}

.admin-module-title {
    font-family: 'Handjet', monospace;
    font-size: clamp(1.1rem, 2.8vw, 1.4rem);
    font-weight: 300;
    color: #cce8b0;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.admin-module-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-module-stat {
    font-family: 'Handjet', monospace;
    font-size: clamp(0.8rem, 1.8vw, 0.95rem);
    font-weight: 300;
    color: rgba(143, 186, 120, 0.45);
    letter-spacing: 0.08em;
}

.admin-module-stat--live { color: #8fba78; }
.admin-module-stat--wip  { color: #b8a060; }

.admin-module-arrow {
    font-family: 'Handjet', monospace;
    font-size: 1.2rem;
    color: rgba(143, 186, 120, 0.3);
    position: absolute;
    bottom: 1.2rem;
    right: 1.4rem;
    transition: color 200ms ease, transform 200ms ease;
}

.admin-module-card:hover .admin-module-arrow {
    color: #8fba78;
    transform: translateX(4px);
}

/* ── Checkbox field ───────────────────────────────────────────────────────── */
.admin-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-family: 'Handjet', monospace;
    font-size: clamp(0.95rem, 2.2vw, 1.1rem);
    font-weight: 300;
    color: rgba(204, 232, 176, 0.75);
    letter-spacing: 0.06em;
    cursor: pointer;
    padding: 0.45em 0;
}

.admin-checkbox-label input[type="checkbox"] {
    width: auto;
    accent-color: #8fba78;
    cursor: pointer;
}

/* ── Quote text cell ──────────────────────────────────────────────────────── */
.admin-cell-quote-text {
    max-width: 340px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── School stats ─────────────────────────────────────────────────────────── */
.school-group-label {
    font-family: 'Handjet', monospace;
    font-size: clamp(0.8rem, 1.8vw, 0.95rem);
    font-weight: 300;
    color: rgba(143, 186, 120, 0.35);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0 0 1rem;
}

.school-group-label-note {
    font-size: 0.85em;
    color: rgba(143, 186, 120, 0.22);
    letter-spacing: 0.08em;
    text-transform: none;
}

.school-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.school-stat-card {
    border: 1px solid rgba(143, 186, 120, 0.2);
    padding: 1.2rem 1.4rem;
    background: rgba(143, 186, 120, 0.02);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

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

.school-stat-card--done {
    border-color: rgba(143, 186, 120, 0.1);
    opacity: 0.5;
}

.school-stat-label {
    font-family: 'Handjet', monospace;
    font-size: clamp(0.72rem, 1.5vw, 0.85rem);
    font-weight: 300;
    color: rgba(143, 186, 120, 0.4);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.school-stat-value {
    font-family: 'Handjet', monospace;
    font-size: clamp(1.3rem, 3.2vw, 1.8rem);
    font-weight: 300;
    color: #cce8b0;
    letter-spacing: 0.05em;
    line-height: 1.1;
}

.school-stat-value--accent { color: #8fba78; }
.school-stat-value--done   { color: rgba(143, 186, 120, 0.3); }

.school-stat-sub {
    font-family: 'Handjet', monospace;
    font-size: clamp(0.75rem, 1.6vw, 0.88rem);
    font-weight: 300;
    color: rgba(143, 186, 120, 0.35);
    letter-spacing: 0.07em;
}

.school-progress-track {
    width: 100%;
    height: 5px;
    background: rgba(143, 186, 120, 0.08);
    border: 1px solid rgba(143, 186, 120, 0.15);
    margin: 0.4rem 0;
    overflow: hidden;
}

.school-progress-fill {
    height: 100%;
    background: #8fba78;
}

.school-progress-meta {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

/* ── Lease tracker ────────────────────────────────────────────────────────── */
.lease-over {
    color: #c06060;
}

.school-progress-track {
    position: relative;
}

.lease-progress-ideal {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(143, 186, 120, 0.4);
    transform: translateX(-50%);
    pointer-events: none;
}

.lease-progress-over {
    background: #c06060;
}

/* ── Fuel dashboard ───────────────────────────────────────────────────────── */
.fuel-search-form {
    grid-template-columns: 1fr 1fr 1fr auto;
    align-items: end;
}

.fuel-search-action {
    align-self: end;
}

.fuel-price {
    font-family: 'Handjet', monospace;
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    font-weight: 300;
    color: rgba(204, 232, 176, 0.7);
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.fuel-price--best {
    color: #8fba78;
}

.admin-table-td-addr {
    display: flex;
    flex-direction: column;
    gap: 0.1em;
    color: rgba(204, 232, 176, 0.75);
}

/* ── Responsive tweaks ────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .admin-form-grid {
        grid-template-columns: 1fr;
    }
    .admin-field--full {
        grid-column: 1;
    }
    .fuel-search-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .fuel-search-form {
        grid-template-columns: 1fr 1fr;
    }
}
