/* ─── RESET & BASE ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

/* ─── DESIGN TOKENS ─────────────────────────────────────────────────────────── */
:root {
    /* Background layers */
    --bg-base:      #0d0f12;
    --bg-surface:   #13161b;
    --bg-elevated:  #1a1e26;
    --bg-input:     #1f242e;
    --bg-hover:     #242933;

    /* Borders */
    --border:       #2a3040;
    --border-light: #333d50;

    /* Text */
    --text-primary:   #e8eaf0;
    --text-secondary: #8a96a8;
    --text-muted:     #5a6478;
    --text-link:      #7eb8e8;

    /* Status colors */
    --accepted:       #3ec97a;
    --accepted-dim:   #1a3d2d;
    --accepted-glow:  rgba(62, 201, 122, 0.12);
    --pending:        #e8aa44;
    --pending-dim:    #3d2e10;
    --pending-glow:   rgba(232, 170, 68, 0.10);
    --declined:       #e85858;
    --declined-dim:   #3d1a1a;
    --declined-glow:  rgba(232, 88, 88, 0.10);

    /* Brand accent */
    --accent:         #7eb8e8;
    --accent-dim:     #1a2d40;

    /* Type */
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body:    'DM Sans', system-ui, sans-serif;

    /* Radii */
    --r-sm:  6px;
    --r-md:  10px;
    --r-lg:  16px;

    /* Shadows */
    --shadow-sm:  0 1px 3px rgba(0,0,0,.4);
    --shadow-md:  0 4px 16px rgba(0,0,0,.5);
    --shadow-lg:  0 8px 32px rgba(0,0,0,.6);
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    line-height: 1.6;
    min-height: 100vh;
    /* subtle grain overlay */
    background-image:
        radial-gradient(ellipse 80% 40% at 50% -10%, rgba(126,184,232,0.05) 0%, transparent 70%);
}

/* ─── NAV ───────────────────────────────────────────────────────────────────── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13,15,18,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.nav-logo:hover { color: var(--accent); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: var(--r-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s, background 0.15s;
}
.nav-link:hover  { color: var(--text-primary); background: var(--bg-elevated); }
.nav-link.active { color: var(--accent); background: var(--accent-dim); }

/* ─── LAYOUT ────────────────────────────────────────────────────────────────── */
.main-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

/* ─── FLASH ─────────────────────────────────────────────────────────────────── */
.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    border-radius: var(--r-md);
    margin-bottom: 24px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid;
}
.flash--success { background: var(--accepted-dim); border-color: var(--accepted); color: var(--accepted); }
.flash--error   { background: var(--declined-dim); border-color: var(--declined); color: var(--declined); }
.flash-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.7;
    flex-shrink: 0;
}
.flash-close:hover { opacity: 1; }

/* ─── HERO ──────────────────────────────────────────────────────────────────── */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 40px 40px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 80% at 0% 50%, rgba(126,184,232,0.06), transparent 70%);
    pointer-events: none;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 2.4rem;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.hero-title em { color: var(--accent); font-style: italic; }

.hero-sub {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    max-width: 420px;
}

/* ─── STATS BAR ─────────────────────────────────────────────────────────────── */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 36px;
}

.stat {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}
.stat-num {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--text-primary);
    line-height: 1;
}
.stat-lbl {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ─── SECTION HEADINGS ──────────────────────────────────────────────────────── */
.section { margin-bottom: 40px; }

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

.section-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dot--accepted { background: var(--accepted); box-shadow: 0 0 8px var(--accepted); }
.dot--pending  { background: var(--pending);  box-shadow: 0 0 8px var(--pending); }
.dot--declined { background: var(--declined); box-shadow: 0 0 8px var(--declined); }

.section-title--accepted { color: var(--accepted); }
.section-title--pending  { color: var(--pending); }
.section-title--declined { color: var(--declined); }

/* ─── CARD GRID ─────────────────────────────────────────────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

/* ─── CARD ──────────────────────────────────────────────────────────────────── */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    position: relative;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.card--accepted {
    border-color: rgba(62, 201, 122, 0.25);
    background: linear-gradient(145deg, var(--bg-surface) 0%, rgba(26,61,45,0.4) 100%);
}
.card--accepted:hover { border-color: rgba(62,201,122,0.5); box-shadow: 0 8px 32px var(--accepted-glow); }

.card--pending {
    border-color: rgba(232, 170, 68, 0.2);
}
.card--pending:hover { border-color: rgba(232,170,68,0.4); box-shadow: 0 8px 32px var(--pending-glow); }

.card--declined {
    border-color: rgba(232, 88, 88, 0.2);
    opacity: 0.8;
}
.card--declined:hover { opacity: 1; border-color: rgba(232,88,88,0.35); box-shadow: 0 8px 32px var(--declined-glow); }

.card--archived { opacity: 0.65; }
.card--archived:hover { opacity: 0.85; }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.card-header-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.card-edit-btn {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1rem;
    line-height: 1;
    padding: 4px 6px;
    border-radius: var(--r-sm);
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.card-edit-btn:hover { color: var(--accent); background: var(--bg-elevated); }

.card-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.card-subtitle {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: -4px;
}

.card-venue {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.card-location {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.map-link {
    color: var(--text-link);
    text-decoration: none;
    font-size: 0.8125rem;
}
.map-link:hover { color: var(--accent); text-decoration: underline; }

.card-dates {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.date-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}
.date-row--highlight { color: var(--accepted); font-weight: 500; }
.date-lbl {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    min-width: 70px;
}

.card-website {
    font-size: 0.8125rem;
    color: var(--text-link);
    text-decoration: none;
    align-self: flex-start;
}
.card-website:hover { color: var(--accent); text-decoration: underline; }

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.img-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 2px 7px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

/* ─── BADGES ────────────────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 9px;
    border-radius: 20px;
    border: 1px solid;
}
.badge--accepted { color: var(--accepted); background: var(--accepted-dim); border-color: rgba(62,201,122,0.3); }
.badge--pending  { color: var(--pending);  background: var(--pending-dim);  border-color: rgba(232,170,68,0.3); }
.badge--declined { color: var(--declined); background: var(--declined-dim); border-color: rgba(232,88,88,0.3); }
.badge--archived { color: var(--text-muted); background: var(--bg-elevated); border-color: var(--border); }

/* ─── BUTTONS ───────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: var(--r-sm);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
    white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn--primary {
    background: var(--accent);
    color: #0d1520;
    border-color: var(--accent);
}
.btn--primary:hover { background: #9ecdef; border-color: #9ecdef; }

.btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-light);
}
.btn--ghost:hover { color: var(--text-primary); background: var(--bg-elevated); border-color: var(--border-light); }

.btn--danger {
    background: transparent;
    color: var(--declined);
    border-color: rgba(232,88,88,0.35);
}
.btn--danger:hover { background: var(--declined-dim); border-color: var(--declined); }

.btn--sm { padding: 5px 12px; font-size: 0.8125rem; }
.btn--lg { padding: 12px 28px; font-size: 1rem; }

.btn-icon { font-size: 1.1em; line-height: 1; }

/* ─── PAGE HEADER ───────────────────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
}

.page-title {
    font-family: var(--font-display);
    font-size: 1.9rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.page-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

/* ─── FORM ──────────────────────────────────────────────────────────────────── */
.show-form { display: flex; flex-direction: column; gap: 0; }

.form-section {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px 28px;
    margin-bottom: 16px;
}

.form-section-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group--full  { grid-column: 1 / -1; }
.form-group--sm    { grid-column: span 1; max-width: 140px; }

.form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.req { color: var(--declined); }

.form-input {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--r-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    padding: 9px 13px;
    transition: border-color 0.15s, background 0.15s;
    width: 100%;
    outline: none;
}
.form-input:focus {
    border-color: var(--accent);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px rgba(126,184,232,0.1);
}
.form-input::placeholder { color: var(--text-muted); }

.form-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a6478' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.form-textarea { resize: vertical; min-height: 100px; }

.form-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.accepted-dates-panel { margin-top: 16px; }

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 8px;
}

/* ─── UPLOAD AREA ───────────────────────────────────────────────────────────── */
.upload-area {
    border: 2px dashed var(--border-light);
    border-radius: var(--r-md);
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    position: relative;
}
.upload-area:hover, .upload-area.drag-over {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.upload-prompt { pointer-events: none; }
.upload-icon { font-size: 2rem; color: var(--text-muted); margin-bottom: 10px; }
.upload-prompt p { color: var(--text-secondary); font-size: 0.9rem; margin: 4px 0; }
.upload-note { font-size: 0.8rem !important; color: var(--text-muted) !important; }

.upload-browse {
    color: var(--accent);
    cursor: pointer;
    pointer-events: all;
    text-decoration: underline;
}
.upload-browse:hover { color: #9ecdef; }

.file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* ─── IMAGE PREVIEWS (upload form) ──────────────────────────────────────────── */
.image-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.preview-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.preview-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.preview-title {
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    padding: 7px 10px;
    background: var(--bg-input);
}
.preview-title:focus { box-shadow: none; }

/* ─── THUMBS GRID (edit page) ───────────────────────────────────────────────── */
.thumbs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.thumb-item {
    position: relative;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
}
.thumb-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.thumb-caption {
    padding: 7px 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    background: var(--bg-input);
}
.thumb-delete {
    position: absolute;
    top: 7px;
    right: 7px;
    background: rgba(13,15,18,0.85);
    border: 1px solid var(--border-light);
    color: var(--declined);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    line-height: 1;
}
.thumb-delete:hover { background: var(--declined-dim); transform: scale(1.1); }

/* ─── MAPS LINK (edit page) ─────────────────────────────────────────────────── */
.maps-preview-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-link);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 7px 14px;
    border: 1px solid rgba(126,184,232,0.25);
    border-radius: var(--r-sm);
    background: var(--accent-dim);
    margin-bottom: 18px;
    transition: background 0.15s, border-color 0.15s;
}
.maps-preview-link:hover { background: rgba(126,184,232,0.15); border-color: var(--accent); }

/* ─── EMPTY STATE ───────────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
}
.empty-icon {
    font-size: 3rem;
    opacity: 0.2;
    margin-bottom: 16px;
}
.empty-state p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ─── INLINE FORM ───────────────────────────────────────────────────────────── */
.inline-form { display: inline; }

/* ─── FOOTER ────────────────────────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 20px 24px;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* ─── RESPONSIVE ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero { flex-direction: column; align-items: flex-start; padding: 28px 24px; }
    .hero-title { font-size: 1.8rem; }
    .stats-bar { grid-template-columns: repeat(3, 1fr); }
    .form-grid { grid-template-columns: 1fr; }
    .form-group--sm { max-width: 100%; }
    .form-group--full { grid-column: auto; }
    .card-grid { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; gap: 12px; }
    .nav-inner { padding: 0 16px; }
    .main-wrap { padding: 20px 16px 60px; }
    .form-section { padding: 18px 16px; }
    .form-actions { flex-wrap: wrap; justify-content: flex-start; }
}

@media (max-width: 480px) {
    .stats-bar { grid-template-columns: 1fr; gap: 8px; }
    .stat { padding: 14px 18px; flex-direction: row; justify-content: space-between; align-items: center; }
    .nav-links .nav-link:not(.active) { display: none; }
}

/* ─── CARD THUMBNAIL STRIP ──────────────────────────────────────────────────── */
.card-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.card-thumb {
    height: 70px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    flex-shrink: 0;
    transition: transform 0.15s, border-color 0.15s;
}
.card-thumb:hover {
    transform: scale(1.08);
    border-color: var(--accent);
    z-index: 1;
}

/* ─── TIME WINDOW ───────────────────────────────────────────────────────────── */
.time-window {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ─── TIME RANGE INPUTS ─────────────────────────────────────────────────────── */
.form-grid--3 {
    grid-template-columns: 1fr 1fr 1fr;
}
.time-range {
    display: flex;
    align-items: center;
    gap: 6px;
}
.form-input--time {
    flex: 1;
    min-width: 0;
    padding: 9px 8px;
    font-size: 0.875rem;
}
.time-sep {
    color: var(--text-muted);
    font-size: 0.8rem;
    flex-shrink: 0;
}
.date-row-group {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

/* ─── MAPS INLINE LINK (under address field) ────────────────────────────────── */
.maps-inline-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    color: var(--text-link);
    font-size: 0.8125rem;
    text-decoration: none;
}
.maps-inline-link:hover { color: var(--accent); text-decoration: underline; }

/* ─── FORM HINT INLINE (under input) ───────────────────────────────────────── */
.form-hint-inline {
    font-size: 0.775rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

/* ─── PREVIEW REMOVE BUTTON ─────────────────────────────────────────────────── */
.preview-item {
    position: relative;
}
.preview-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(13,15,18,0.85);
    border: 1px solid var(--border-light);
    color: var(--declined);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    line-height: 1;
    z-index: 2;
}
.preview-remove:hover { background: var(--declined-dim); transform: scale(1.1); }

/* ─── RESPONSIVE: 3-col grid collapses ──────────────────────────────────────── */
@media (max-width: 900px) {
    .form-grid--3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .form-grid--3 { grid-template-columns: 1fr; }
    .card-thumb { height: 54px; max-width: 100px; }
}
