/* ============================================================
   Chieftain Archive — Stylesheet
   Military museum aesthetic, dark greens and khaki
   ============================================================ */

:root {
    --green-dark:   #1F4E2C;
    --green-mid:    #2E7D32;
    --green-light:  #E8F5E9;
    --green-accent: #4CAF50;
    --khaki:        #8B8B4F;
    --khaki-light:  #F5F5DC;
    --bg:           #F8F8F4;
    --surface:      #FFFFFF;
    --border:       #DCDCCC;
    --text:         #222222;
    --text-muted:   #666655;
    --confirmed:    #2E7D32;
    --possible:     #F57F17;
    --unknown:      #1565C0;
    --scrapped:     #B71C1C;
    --disposed:     #880E4F;
    --nav-height:   64px;
    --radius:       6px;
    --shadow:       0 2px 8px rgba(0,0,0,0.08);
}

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

body {
    font-family: 'Arial', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
}

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

/* ============================================================
   NAVIGATION
   ============================================================ */
.archive-nav {
    background: var(--green-dark);
    height: var(--nav-height);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
}
.nav-icon { font-size: 20px; opacity: 0.8; }
.nav-title { font-size: 18px; font-weight: bold; letter-spacing: 0.5px; }
.nav-sub { font-size: 12px; opacity: 0.7; display: none; }
@media (min-width: 700px) { .nav-sub { display: block; } }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
    color: rgba(255,255,255,0.85);
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    transition: background 0.15s;
}
.nav-links a:hover { background: rgba(255,255,255,0.15); text-decoration: none; }
.nav-admin { opacity: 0.6; font-size: 13px !important; }

/* ============================================================
   HERO
   ============================================================ */
.archive-hero {
    background: linear-gradient(135deg, var(--green-dark) 0%, #2d5a3d 60%, #3a6b4a 100%);
    color: white;
    padding: 48px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.archive-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; }
.archive-hero h1 { font-size: 2.2rem; font-weight: bold; letter-spacing: 1px; margin-bottom: 8px; }
.archive-hero p { font-size: 1.05rem; opacity: 0.85; margin-bottom: 4px; }
.hero-sub { font-size: 0.9rem; opacity: 0.65; margin-top: 8px; }

/* ============================================================
   CONTAINER
   ============================================================ */
.archive-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 24px;
}
.stat-item {
    flex: 1;
    min-width: 120px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    border-top: 4px solid var(--border);
}
.stat-item.confirmed { border-top-color: var(--confirmed); }
.stat-item.possible  { border-top-color: var(--possible); }
.stat-item.unknown   { border-top-color: var(--unknown); }
.stat-item.scrapped  { border-top-color: var(--scrapped); }
.stat-item.disposed  { border-top-color: var(--disposed); }
.stat-num { display: block; font-size: 2rem; font-weight: bold; color: var(--green-dark); line-height: 1; }
.stat-label { display: block; font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   FILTER PANEL
   ============================================================ */
.filter-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.filter-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-search { flex: 2; min-width: 200px; }
.filter-group label { font-size: 12px; font-weight: bold; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.filter-group input,
.filter-group select {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
}
.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--green-mid);
    box-shadow: 0 0 0 2px rgba(46,125,50,0.15);
}
.btn-search {
    background: var(--green-mid);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}
.btn-search:hover { background: var(--green-dark); }
.btn-clear {
    display: inline-block;
    background: #f5f5f5;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

/* ============================================================
   RESULTS HEADER
   ============================================================ */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 12px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ============================================================
   VEHICLE GRID
   ============================================================ */
.vehicle-grid { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.grid-header {
    display: grid;
    grid-template-columns: 100px 1fr 80px 70px 200px 160px;
    background: var(--green-dark);
    color: white;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.grid-row {
    display: grid;
    grid-template-columns: 100px 1fr 80px 70px 200px 160px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    background: var(--surface);
    color: var(--text);
    transition: background 0.1s;
    border-left: 4px solid transparent;
}
.grid-row:last-child { border-bottom: none; }
.grid-row:hover { background: var(--green-light); text-decoration: none; }
.grid-row.status-confirmed_survivor { border-left-color: var(--confirmed); }
.grid-row.status-possible_survivor  { border-left-color: var(--possible); }
.grid-row.status-unknown            { border-left-color: var(--unknown); }
.grid-row.status-likely_scrapped    { border-left-color: var(--scrapped); }
.grid-row.status-confirmed_disposed { border-left-color: var(--disposed); }
.col-erm  { font-weight: bold; font-family: monospace; font-size: 14px; }
.col-desc { font-size: 13px; }
.col-dis  { font-size: 13px; color: var(--text-muted); }
.col-unit { font-size: 12px; color: var(--text-muted); }

@media (max-width: 900px) {
    .grid-header, .grid-row {
        grid-template-columns: 90px 1fr 140px;
    }
    .grid-header span:nth-child(3),
    .grid-header span:nth-child(4),
    .grid-header span:nth-child(5),
    .grid-row .col-type,
    .grid-row .col-dis,
    .grid-row .col-unit { display: none; }
}

/* ============================================================
   STATUS & TYPE BADGES
   ============================================================ */
.status-badge, .type-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}
.badge-confirmed { background: #E8F5E9; color: var(--confirmed); border: 1px solid #A5D6A7; }
.badge-possible  { background: #FFF8E1; color: #E65100; border: 1px solid #FFE082; }
.badge-unknown   { background: #E3F2FD; color: #0D47A1; border: 1px solid #90CAF9; }
.badge-scrapped  { background: #FFEBEE; color: #B71C1C; border: 1px solid #FFCDD2; }
.badge-disposed  { background: #FCE4EC; color: #880E4F; border: 1px solid #F48FB1; }
.type-mbt  { background: #E8EAF6; color: #283593; border: 1px solid #9FA8DA; }
.type-arrv { background: #FFF3E0; color: #E65100; border: 1px solid #FFCC80; }
.type-avlb { background: #F3E5F5; color: #4A148C; border: 1px solid #CE93D8; }
.type-avre { background: #E0F2F1; color: #004D40; border: 1px solid #80CBC4; }
.type-other { background: #F5F5F5; color: #424242; border: 1px solid #BDBDBD; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 24px 0; flex-wrap: wrap; }
.page-btn {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--surface);
    color: var(--text);
    transition: all 0.15s;
}
.page-btn:hover { background: var(--green-light); border-color: var(--green-mid); text-decoration: none; }
.page-btn.active { background: var(--green-mid); color: white; border-color: var(--green-mid); }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    padding: 0 0 20px;
}
.breadcrumb a { color: var(--green-mid); }

/* ============================================================
   VEHICLE PROFILE
   ============================================================ */
.vehicle-header {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    box-shadow: var(--shadow);
    border-top: 6px solid var(--green-mid);
}
.vehicle-header.status-bg-confirmed_survivor { border-top-color: var(--confirmed); }
.vehicle-header.status-bg-possible_survivor  { border-top-color: var(--possible); }
.vehicle-header.status-bg-unknown            { border-top-color: var(--unknown); }
.vehicle-header.status-bg-likely_scrapped    { border-top-color: var(--scrapped); }
.vehicle-header.status-bg-confirmed_disposed { border-top-color: var(--disposed); }
.vh-main { flex: 1; min-width: 200px; }
.vh-main h1 { font-size: 2rem; font-family: monospace; color: var(--green-dark); margin-bottom: 8px; }
.vh-desc { font-size: 1rem; color: var(--text-muted); margin-bottom: 12px; }
.vh-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.vh-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; min-width: 300px; }
.meta-item { background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 10px 12px; }
.meta-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-weight: bold; margin-bottom: 2px; }
.meta-val { display: block; font-size: 14px; font-weight: bold; color: var(--text); }

.vehicle-notes {
    background: var(--khaki-light);
    border: 1px solid #d4c97a;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}
.vehicle-notes h3 { color: var(--khaki); font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }

/* ============================================================
   SECTION CARDS
   ============================================================ */
.section-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.section-card h2 { color: var(--green-dark); font-size: 1.2rem; margin-bottom: 6px; }
.section-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.section-header h2 { margin-bottom: 0; }

/* ============================================================
   PHOTO GALLERY
   ============================================================ */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.photo-item { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #111; }
.photo-link { display: block; }
.photo-link img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}
.photo-link:hover img { opacity: 0.9; }
.photo-meta { padding: 10px; background: var(--surface); }
.photo-caption { font-size: 13px; margin-bottom: 4px; }
.photo-info { font-size: 11px; color: var(--text-muted); }
.no-photos { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.no-photos p { margin-bottom: 16px; }
.pending-note { margin-top: 12px; font-size: 13px; color: var(--text-muted); font-style: italic; }

.btn-submit-photo {
    background: var(--green-mid);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: bold;
}
.btn-submit-photo:hover { background: var(--green-dark); text-decoration: none; }
.btn-submit-photo-lg {
    display: inline-block;
    background: var(--green-mid);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: bold;
}

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline { padding: 8px 0; }
.timeline-item {
    display: grid;
    grid-template-columns: 140px 24px 1fr;
    gap: 0 16px;
    align-items: start;
    min-height: 40px;
}
.tl-date {
    text-align: right;
    font-size: 13px;
    color: var(--text-muted);
    padding-top: 2px;
    font-weight: bold;
}
.tl-connector { display: flex; flex-direction: column; align-items: center; }
.tl-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--green-mid);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--green-mid);
    flex-shrink: 0;
    margin-top: 2px;
}
.timeline-item.last .tl-dot { background: var(--green-dark); box-shadow: 0 0 0 2px var(--green-dark); }
.tl-line { flex: 1; width: 2px; background: #ccc; min-height: 28px; }
.tl-content { padding: 0 0 20px; font-size: 14px; }
.tl-content strong { display: block; color: var(--text); }
.tl-receipt { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.back-link { padding: 8px 0 24px; }
.back-link a { color: var(--green-mid); font-size: 14px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 760px;
    box-shadow: var(--shadow);
}
.form-card h1 { color: var(--green-dark); font-size: 1.4rem; margin-bottom: 8px; }
.form-card > p { color: var(--text-muted); margin-bottom: 28px; font-size: 14px; }
.submit-form { margin-top: 24px; }
.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-group label { display: block; font-size: 13px; font-weight: bold; margin-bottom: 6px; color: var(--text); }
.form-group input[type=text],
.form-group input[type=email],
.form-group input[type=file] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
}
.form-group input:focus {
    outline: none;
    border-color: var(--green-mid);
    box-shadow: 0 0 0 2px rgba(46,125,50,0.15);
}
.form-group input[readonly] { background: #f0f0f0; color: var(--text-muted); }
.form-hint { display: block; font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-consent label { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.form-consent input { margin-top: 2px; flex-shrink: 0; }
.required { color: var(--scrapped); }
.form-actions { display: flex; gap: 12px; padding-top: 8px; }
.btn-primary {
    background: var(--green-mid);
    color: white;
    border: none;
    padding: 11px 28px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary {
    display: inline-block;
    background: #f5f5f5;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 11px 24px;
    border-radius: var(--radius);
    font-size: 15px;
    cursor: pointer;
}

.alert {
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
}
.alert-success { background: #E8F5E9; border: 1px solid #A5D6A7; color: var(--confirmed); }
.alert-error   { background: #FFEBEE; border: 1px solid #FFCDD2; color: var(--scrapped); }

/* ============================================================
   ADMIN
   ============================================================ */
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-header h1 { color: var(--green-dark); font-size: 1.4rem; }
.btn-logout {
    background: #f5f5f5;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 13px;
}
.admin-tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 2px solid var(--border); }
.admin-tabs .tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    color: var(--text-muted);
    border-radius: var(--radius) var(--radius) 0 0;
    border: 1px solid transparent;
    margin-bottom: -2px;
}
.admin-tabs .tab.active {
    background: var(--surface);
    color: var(--green-dark);
    border-color: var(--border);
    border-bottom-color: var(--surface);
}
.badge {
    display: inline-block;
    background: var(--text-muted);
    color: white;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    margin-left: 4px;
}
.badge.approved { background: var(--confirmed); }
.badge.rejected { background: var(--scrapped); }
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
.admin-photo-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.admin-photo-img { background: #111; height: 200px; overflow: hidden; }
.admin-photo-img img { width: 100%; height: 100%; object-fit: cover; }
.admin-photo-info { padding: 14px; border-bottom: 1px solid var(--border); }
.admin-photo-info p { margin-bottom: 4px; font-size: 14px; }
.admin-photo-info .small { font-size: 12px; color: var(--text-muted); }
.admin-photo-actions { padding: 12px 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.btn-approve { background: var(--confirmed); color: white; border: none; padding: 7px 14px; border-radius: var(--radius); font-size: 13px; font-weight: bold; cursor: pointer; }
.btn-reject  { background: var(--scrapped); color: white; border: none; padding: 7px 14px; border-radius: var(--radius); font-size: 13px; font-weight: bold; cursor: pointer; }
.btn-primary-sm { background: var(--unknown); color: white; border: none; padding: 7px 14px; border-radius: var(--radius); font-size: 13px; cursor: pointer; }
.btn-view { display: inline-block; background: #f5f5f5; color: var(--text); border: 1px solid var(--border); padding: 7px 14px; border-radius: var(--radius); font-size: 13px; }
.admin-empty { text-align: center; padding: 48px; color: var(--text-muted); }

.login-card {
    max-width: 400px;
    margin: 60px auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}
.login-card h1 { color: var(--green-dark); font-size: 1.3rem; margin-bottom: 24px; }
.login-form { margin-top: 20px; }

/* ============================================================
   FOOTER
   ============================================================ */
.archive-footer {
    background: var(--green-dark);
    color: rgba(255,255,255,0.75);
    padding: 40px 24px 0;
    margin-top: 48px;
}
.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    padding-bottom: 32px;
}
.footer-col strong { display: block; color: white; margin-bottom: 8px; font-size: 14px; }
.footer-col p { font-size: 13px; line-height: 1.6; margin-bottom: 6px; }
.footer-col a { color: rgba(255,255,255,0.75); }
.footer-col a:hover { color: white; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 16px 0;
    text-align: center;
    max-width: 1400px;
    margin: 0 auto;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

/* ============================================================
   VEHICLE EDIT PAGE
   ============================================================ */
.edit-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}
@media (max-width: 900px) {
    .edit-layout { grid-template-columns: 1fr; }
}
.edit-main {}
.edit-sidebar {}
.edit-sidebar h3 { color: var(--green-dark); font-size: 1rem; margin-bottom: 16px; }
.edit-select, .edit-input, .edit-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, sans-serif;
}
.edit-select:focus, .edit-input:focus, .edit-textarea:focus {
    outline: none;
    border-color: var(--green-mid);
    box-shadow: 0 0 0 2px rgba(46,125,50,0.15);
}
.edit-textarea { resize: vertical; min-height: 120px; }

.sidebar-field {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sidebar-field:last-child { border-bottom: none; }
.sidebar-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-weight: bold; }
.sidebar-val { font-size: 14px; }
.sidebar-val.small { font-size: 12px; color: var(--text-muted); }
.mono { font-family: monospace; font-size: 15px !important; }

.status-guide { display: flex; flex-direction: column; gap: 12px; }
.guide-item { display: flex; flex-direction: column; gap: 4px; }
.guide-item p { font-size: 12px; color: var(--text-muted); margin-left: 4px; }

/* Edit button on vehicle page */
.admin-edit-link {
    color: var(--green-mid);
    font-size: 13px;
    font-weight: bold;
}
.badge-edit {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    background: #E8EAF6;
    color: #283593;
    border: 1px solid #9FA8DA;
    text-decoration: none;
}
.badge-edit:hover { background: #C5CAE9; text-decoration: none; }

/* Edit button in vehicle grid (admin tab) */
.btn-edit-sm {
    display: inline-block;
    background: var(--green-mid);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: bold;
}
.btn-edit-sm:hover { background: var(--green-dark); text-decoration: none; }

/* ============================================================
   HOME PAGE PANELS
   ============================================================ */
.home-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
@media (max-width: 800px) { .home-panels { grid-template-columns: 1fr; } }
.home-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.panel-header {
    background: var(--green-dark);
    padding: 14px 18px;
}
.panel-header h2 { color: white; font-size: 1rem; margin: 0 0 2px; }
.panel-sub { color: rgba(255,255,255,0.65); font-size: 12px; }
.panel-list { padding: 4px 0; }
.panel-item {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    color: var(--text);
    transition: background 0.1s;
}
.panel-item:last-child { border-bottom: none; }
.panel-item:hover { background: var(--green-light); text-decoration: none; }
.pi-erm { font-family: monospace; font-size: 13px; font-weight: bold; color: var(--green-dark); }
.pi-desc { font-size: 12px; color: var(--text-muted); }
.pi-status { justify-self: end; }
.pi-date { font-size: 11px; color: var(--text-muted); grid-column: 1 / -1; }
.pi-loc { font-size: 11px; color: var(--text-muted); grid-column: 2 / -1; }
.panel-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.panel-footer a { font-size: 13px; color: var(--green-mid); font-weight: bold; }

/* ============================================================
   CORRECTION FORM / CARD
   ============================================================ */
.correction-card {
    background: var(--khaki-light) !important;
    border-color: #c8b96a !important;
}
.correction-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.correction-inner h3 { color: var(--khaki); font-size: 1rem; margin-bottom: 6px; }
.correction-inner p { font-size: 13px; color: var(--text-muted); }
.btn-correction {
    display: inline-block;
    background: var(--khaki);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-correction:hover { background: #6b6b2e; text-decoration: none; }

/* ============================================================
   CHANGELOG TABLE
   ============================================================ */
.changelog-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.changelog-table th {
    background: var(--green-dark);
    color: white;
    padding: 8px 12px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.changelog-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.changelog-table tr:last-child td { border-bottom: none; }
.changelog-table tr:nth-child(even) td { background: var(--bg); }
.cl-date { color: var(--text-muted); white-space: nowrap; width: 100px; }
.cl-field { font-weight: bold; white-space: nowrap; width: 140px; }
.cl-old { color: var(--scrapped); }
.cl-new { color: var(--confirmed); }

/* ============================================================
   ADMIN CORRECTIONS
   ============================================================ */
.corrections-list { display: flex; flex-direction: column; gap: 16px; }
.correction-card-admin {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--possible);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
}
.correction-card-admin.accepted { border-left-color: var(--confirmed); opacity: 0.8; }
.corr-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.corr-erm { font-family: monospace; font-size: 16px; font-weight: bold; color: var(--green-dark); }
.corr-type {
    background: #E8EAF6;
    color: #283593;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}
.corr-date { font-size: 12px; color: var(--text-muted); margin-left: auto; }
.corr-desc { color: var(--text-muted); margin-bottom: 8px; }
.corr-details { font-size: 14px; margin: 8px 0; line-height: 1.6; }
.corr-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; align-items: center; }

/* Export tab styling */
.tab-export {
    margin-left: auto;
    background: var(--green-light);
    color: var(--green-dark) !important;
    border: 1px solid var(--green-mid);
    font-weight: bold;
}

/* ============================================================
   PROVENANCE & DATA SOURCE NOTES
   ============================================================ */
.provenance-banner {
    background: #EEF2FF;
    border: 1px solid #C7D2FE;
    border-radius: var(--radius);
    margin-bottom: 20px;
    padding: 14px 18px;
}
.prov-inner {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    max-width: 100%;
}
.prov-icon {
    font-size: 18px;
    color: #4338CA;
    flex-shrink: 0;
    margin-top: 2px;
}
.prov-text {
    font-size: 13px;
    color: #312E81;
    line-height: 1.6;
}
.prov-text strong { color: #1E1B4B; }
.prov-text a { color: #4338CA; font-weight: bold; }

.data-source-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #F0F9FF;
    border: 1px solid #BAE6FD;
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #0C4A6E;
    line-height: 1.6;
}
.dsn-icon {
    font-size: 16px;
    color: #0284C7;
    flex-shrink: 0;
    margin-top: 2px;
}
.dsn-text strong { color: #082F49; }
.dsn-text a { color: #0284C7; font-weight: bold; }

/* ============================================================
   PHOTO GRID — two column static gallery
   ============================================================ */
.photo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 640px) {
    .photo-grid { grid-template-columns: 1fr; }
}
.photo-tile {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: #111;
}
.photo-tile img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}
.photo-tile-meta {
    background: var(--surface);
    padding: 10px 12px;
}
.pt-caption {
    font-size: 13px;
    font-style: italic;
    color: var(--text);
    margin: 0 0 3px;
}
.pt-info {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

/* ============================================================
   HOME PAGE PANELS
   ============================================================ */
.home-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
@media (max-width: 800px) { .home-panels { grid-template-columns: 1fr; } }
.home-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.panel-header {
    background: var(--green-dark);
    padding: 14px 18px;
}
.panel-header h2 { color: white; font-size: 1rem; margin: 0 0 2px; }
.panel-sub { color: rgba(255,255,255,0.65); font-size: 12px; }
.panel-list { padding: 4px 0; }
.panel-item {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    color: var(--text);
    transition: background 0.1s;
}
.panel-item:last-child { border-bottom: none; }
.panel-item:hover { background: var(--green-light); text-decoration: none; }
.pi-erm { font-family: monospace; font-size: 13px; font-weight: bold; color: var(--green-dark); }
.pi-desc { font-size: 12px; color: var(--text-muted); }
.pi-status { justify-self: end; }
.pi-date { font-size: 11px; color: var(--text-muted); grid-column: 1 / -1; }
.pi-loc { font-size: 11px; color: var(--text-muted); grid-column: 2 / -1; }
.panel-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.panel-footer a { font-size: 13px; color: var(--green-mid); font-weight: bold; }

/* ============================================================
   CORRECTION FORM / CARD
   ============================================================ */
.correction-card {
    background: var(--khaki-light) !important;
    border-color: #c8b96a !important;
}
.correction-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.correction-inner h3 { color: var(--khaki); font-size: 1rem; margin-bottom: 6px; }
.correction-inner p { font-size: 13px; color: var(--text-muted); }
.btn-correction {
    display: inline-block;
    background: var(--khaki);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-correction:hover { background: #6b6b2e; text-decoration: none; }

/* ============================================================
   CHANGELOG TABLE
   ============================================================ */
.changelog-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.changelog-table th {
    background: var(--green-dark);
    color: white;
    padding: 8px 12px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.changelog-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.changelog-table tr:last-child td { border-bottom: none; }
.changelog-table tr:nth-child(even) td { background: var(--bg); }
.cl-date { color: var(--text-muted); white-space: nowrap; width: 100px; }
.cl-field { font-weight: bold; white-space: nowrap; width: 140px; }
.cl-old { color: var(--scrapped); }
.cl-new { color: var(--confirmed); }

/* ============================================================
   ADMIN CORRECTIONS
   ============================================================ */
.corrections-list { display: flex; flex-direction: column; gap: 16px; }
.correction-card-admin {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--possible);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
}
.correction-card-admin.accepted { border-left-color: var(--confirmed); opacity: 0.8; }
.corr-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.corr-erm { font-family: monospace; font-size: 16px; font-weight: bold; color: var(--green-dark); }
.corr-type {
    background: #E8EAF6;
    color: #283593;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}
.corr-date { font-size: 12px; color: var(--text-muted); margin-left: auto; }
.corr-desc { color: var(--text-muted); margin-bottom: 8px; }
.corr-details { font-size: 14px; margin: 8px 0; line-height: 1.6; }
.corr-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; align-items: center; }

/* Export tab styling */
.tab-export {
    margin-left: auto;
    background: var(--green-light);
    color: var(--green-dark) !important;
    border: 1px solid var(--green-mid);
    font-weight: bold;
}

/* ============================================================
   PROVENANCE & DATA SOURCE NOTES
   ============================================================ */
.provenance-banner {
    background: #EEF2FF;
    border: 1px solid #C7D2FE;
    border-radius: var(--radius);
    margin-bottom: 20px;
    padding: 14px 18px;
}
.prov-inner {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    max-width: 100%;
}
.prov-icon {
    font-size: 18px;
    color: #4338CA;
    flex-shrink: 0;
    margin-top: 2px;
}
.prov-text {
    font-size: 13px;
    color: #312E81;
    line-height: 1.6;
}
.prov-text strong { color: #1E1B4B; }
.prov-text a { color: #4338CA; font-weight: bold; }

.data-source-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #F0F9FF;
    border: 1px solid #BAE6FD;
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #0C4A6E;
    line-height: 1.6;
}
.dsn-icon {
    font-size: 16px;
    color: #0284C7;
    flex-shrink: 0;
    margin-top: 2px;
}
.dsn-text strong { color: #082F49; }
.dsn-text a { color: #0284C7; font-weight: bold; }

/* ============================================================
   INTERACTIVE PHOTO GALLERY
   ============================================================ */
.gallery-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Main image — full width of card, fixed height, dark bg */
.gallery-main {
    position: relative;
    background: #111;
    border-radius: var(--radius);
    overflow: hidden;
    width: 100%;
    line-height: 0; /* removes gap under img */
}
.gallery-main-img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
    transition: opacity 0.15s ease;
}

/* Nav arrows */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 44px;
    height: 64px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.gallery-nav:hover { background: rgba(0,0,0,0.85); }
.gallery-prev { left: 0; border-radius: 0 4px 4px 0; }
.gallery-next { right: 0; border-radius: 4px 0 0 4px; }

/* Counter */
.gallery-counter {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(0,0,0,0.5);
    color: rgba(255,255,255,0.9);
    font-size: 12px;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 10px;
    pointer-events: none;
    line-height: 1.4;
}

/* Caption & info below main image */
.gallery-meta {
    padding: 6px 2px 2px;
    min-height: 2.4em;
}
.gallery-caption {
    font-size: 14px;
    font-style: italic;
    color: var(--text);
    margin: 0 0 3px;
}
.gallery-info {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

/* Thumbnail strip */
.gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.gallery-thumbs::-webkit-scrollbar { height: 4px; }
.gallery-thumbs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.gallery-thumb {
    flex-shrink: 0;
    width: 100px;
    height: 75px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.15s, opacity 0.15s;
    opacity: 0.6;
    background: #111;
}
.gallery-thumb:hover  { opacity: 0.85; border-color: var(--green-mid); }
.gallery-thumb.active { opacity: 1;    border-color: var(--green-mid); box-shadow: 0 0 0 1px var(--green-mid); }
.gallery-thumb img {
    width: 100px;
    height: 75px;
    object-fit: cover;
    display: block;
    pointer-events: none;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .gallery-main-img { max-height: 280px; }
    .gallery-thumb { width: 75px; height: 56px; }
    .gallery-nav { width: 36px; height: 50px; font-size: 16px; }
}

/* ============================================================
   HOME PAGE PANELS
   ============================================================ */
.home-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
@media (max-width: 800px) { .home-panels { grid-template-columns: 1fr; } }
.home-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.panel-header {
    background: var(--green-dark);
    padding: 14px 18px;
}
.panel-header h2 { color: white; font-size: 1rem; margin: 0 0 2px; }
.panel-sub { color: rgba(255,255,255,0.65); font-size: 12px; }
.panel-list { padding: 4px 0; }
.panel-item {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    color: var(--text);
    transition: background 0.1s;
}
.panel-item:last-child { border-bottom: none; }
.panel-item:hover { background: var(--green-light); text-decoration: none; }
.pi-erm { font-family: monospace; font-size: 13px; font-weight: bold; color: var(--green-dark); }
.pi-desc { font-size: 12px; color: var(--text-muted); }
.pi-status { justify-self: end; }
.pi-date { font-size: 11px; color: var(--text-muted); grid-column: 1 / -1; }
.pi-loc { font-size: 11px; color: var(--text-muted); grid-column: 2 / -1; }
.panel-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.panel-footer a { font-size: 13px; color: var(--green-mid); font-weight: bold; }

/* ============================================================
   CORRECTION FORM / CARD
   ============================================================ */
.correction-card {
    background: var(--khaki-light) !important;
    border-color: #c8b96a !important;
}
.correction-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.correction-inner h3 { color: var(--khaki); font-size: 1rem; margin-bottom: 6px; }
.correction-inner p { font-size: 13px; color: var(--text-muted); }
.btn-correction {
    display: inline-block;
    background: var(--khaki);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-correction:hover { background: #6b6b2e; text-decoration: none; }

/* ============================================================
   CHANGELOG TABLE
   ============================================================ */
.changelog-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.changelog-table th {
    background: var(--green-dark);
    color: white;
    padding: 8px 12px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.changelog-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.changelog-table tr:last-child td { border-bottom: none; }
.changelog-table tr:nth-child(even) td { background: var(--bg); }
.cl-date { color: var(--text-muted); white-space: nowrap; width: 100px; }
.cl-field { font-weight: bold; white-space: nowrap; width: 140px; }
.cl-old { color: var(--scrapped); }
.cl-new { color: var(--confirmed); }

/* ============================================================
   ADMIN CORRECTIONS
   ============================================================ */
.corrections-list { display: flex; flex-direction: column; gap: 16px; }
.correction-card-admin {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--possible);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
}
.correction-card-admin.accepted { border-left-color: var(--confirmed); opacity: 0.8; }
.corr-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.corr-erm { font-family: monospace; font-size: 16px; font-weight: bold; color: var(--green-dark); }
.corr-type {
    background: #E8EAF6;
    color: #283593;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}
.corr-date { font-size: 12px; color: var(--text-muted); margin-left: auto; }
.corr-desc { color: var(--text-muted); margin-bottom: 8px; }
.corr-details { font-size: 14px; margin: 8px 0; line-height: 1.6; }
.corr-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; align-items: center; }

/* Export tab styling */
.tab-export {
    margin-left: auto;
    background: var(--green-light);
    color: var(--green-dark) !important;
    border: 1px solid var(--green-mid);
    font-weight: bold;
}

/* ============================================================
   PROVENANCE & DATA SOURCE NOTES
   ============================================================ */
.provenance-banner {
    background: #EEF2FF;
    border: 1px solid #C7D2FE;
    border-radius: var(--radius);
    margin-bottom: 20px;
    padding: 14px 18px;
}
.prov-inner {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    max-width: 100%;
}
.prov-icon {
    font-size: 18px;
    color: #4338CA;
    flex-shrink: 0;
    margin-top: 2px;
}
.prov-text {
    font-size: 13px;
    color: #312E81;
    line-height: 1.6;
}
.prov-text strong { color: #1E1B4B; }
.prov-text a { color: #4338CA; font-weight: bold; }

.data-source-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #F0F9FF;
    border: 1px solid #BAE6FD;
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #0C4A6E;
    line-height: 1.6;
}
.dsn-icon {
    font-size: 16px;
    color: #0284C7;
    flex-shrink: 0;
    margin-top: 2px;
}
.dsn-text strong { color: #082F49; }
.dsn-text a { color: #0284C7; font-weight: bold; }

/* ============================================================
   INTERACTIVE PHOTO GALLERY
   ============================================================ */
.gallery-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Main image area */
.gallery-main {
    position: relative;
    background: #0a0a0a;
    border-radius: var(--radius);
    overflow: hidden;
    max-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-main-link {
    display: block;
    width: 100%;
    position: relative;
}
.gallery-main-img {
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    display: block;
    transition: opacity 0.15s ease;
    cursor: zoom-in;
}
.gallery-zoom-hint {
    position: absolute;
    bottom: 10px;
    right: 12px;
    background: rgba(0,0,0,0.55);
    color: rgba(255,255,255,0.8);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}
.gallery-main:hover .gallery-zoom-hint { opacity: 1; }

/* Navigation arrows */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 44px;
    height: 60px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 4px;
    z-index: 10;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-nav:hover { background: rgba(0,0,0,0.8); }
.gallery-prev { left: 0; border-radius: 0 4px 4px 0; }
.gallery-next { right: 0; border-radius: 4px 0 0 4px; }

/* Counter badge */
.gallery-counter {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(0,0,0,0.55);
    color: rgba(255,255,255,0.9);
    font-size: 12px;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 10px;
    pointer-events: none;
}

/* Caption & info below main image */
.gallery-main-meta {
    padding: 10px 4px 4px;
}
.gallery-caption {
    font-size: 14px;
    color: var(--text);
    margin-bottom: 4px;
    min-height: 1.4em;
    font-style: italic;
}
.gallery-info {
    font-size: 12px;
    color: var(--text-muted);
    min-height: 1.2em;
}

/* Thumbnail strip */
.gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.gallery-thumbs::-webkit-scrollbar { height: 4px; }
.gallery-thumbs::-webkit-scrollbar-track { background: transparent; }
.gallery-thumbs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.gallery-thumb {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.15s, opacity 0.15s;
    opacity: 0.65;
}
.gallery-thumb:hover { opacity: 0.9; border-color: var(--green-mid); }
.gallery-thumb.active {
    border-color: var(--green-mid);
    opacity: 1;
    box-shadow: 0 0 0 1px var(--green-mid);
}
.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

@media (max-width: 600px) {
    .gallery-main-img { max-height: 300px; }
    .gallery-thumb { width: 70px; height: 52px; }
    .gallery-nav { width: 36px; height: 48px; font-size: 16px; }
}

.btn-delete {
    background: #7f1d1d;
    color: white;
    border: none;
    padding: 7px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}
.btn-delete:hover { background: #450a0a; }
