/* ─── Variables ─────────────────────────────────────────────────────────────── */

:root {
    color-scheme: dark;
    --bg-primary: #191919;
    --bg-secondary: #262626;
    --bg-card: #303030;
    --bg-input: #3d3d3d;
    --accent: #3b82f6;
    --accent-dark: #2563eb;
    --accent-light: rgba(59, 130, 246, 0.16);
    --text-primary: #ededed;
    --text-secondary: #c0c0c0;
    --text-muted: #a3a3a3;
    --border: #2a2a2a;
    --border-light: #1f1f1f;
    --radius: 0px;
    --radius-lg: 0px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.55);

    --status-active: #4ade80;
    --status-active-bg: rgba(34, 197, 94, 0.16);
    --status-inactive: #94a3b8;
    --status-inactive-bg: rgba(148, 163, 184, 0.14);
    --status-pending: #fbbf24;
    --status-pending-bg: rgba(251, 191, 36, 0.16);
}

/* ─── Reset / Base ─────────────────────────────────────────────────────────── */

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

body {
    font-family: 'PT Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Serif (Gilda Display) for titles and headings; sans-serif (Inter) for body. */
h1, h2, h3, h4, h5, h6,
.page-title,
.card-title,
.panel-title,
.modal-title,
.logo-text {
    font-family: 'Gilda Display', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
    font-weight: 400;
    letter-spacing: 0;
}

main { flex: 1; }

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

img { max-width: 100%; }

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

/* ─── Header ───────────────────────────────────────────────────────────────── */

.site-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 22px;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.logo-text i { color: var(--accent); margin-right: 8px; }

.logo-img {
    display: block;
    height: 30px;
    width: auto;
}

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

.nav-links-desktop {
    display: flex;
    gap: 2px;
    margin-right: 12px;
}

.nav-link {
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 400;
    transition: all 0.15s;
    text-decoration: none;
}

.nav-link:hover { color: var(--text-primary); background: var(--bg-primary); }
.nav-link.active { color: var(--accent); background: var(--accent-light); font-weight: 500; }

.nav-user {
    color: var(--text-secondary);
    font-size: 13px;
    margin-right: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.15s;
    text-decoration: none;
}

.nav-user:hover { color: var(--text-primary); }

.nav-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-input) center/cover no-repeat;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12px;
    flex: 0 0 auto;
}
.nav-user-avatar--fallback { background-color: var(--bg-secondary); }

.nav-btn {
    padding: 7px 16px;
    border-radius: var(--radius);
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.nav-btn--accent { background: var(--accent); color: #fff; }
.nav-btn--accent:hover { background: var(--accent-dark); }

.nav-btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.nav-btn--ghost:hover { background: var(--bg-primary); color: var(--text-primary); }

.nav-btn--icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.lang-picker {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    margin-left: 4px;
}
.lang-picker:hover { color: var(--text-primary); border-color: var(--text-muted); }
.lang-picker:focus { outline: none; border-color: var(--accent); }

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.2s;
}

.nav-accordion {
    display: none;
    flex-direction: column;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}
.nav-accordion.open { display: flex; }

.nav-accordion-link {
    color: var(--text-secondary);
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    text-decoration: none;
}
.nav-accordion-link:hover { color: var(--text-primary); background: var(--bg-primary); }
.nav-accordion-link.active { color: var(--accent); font-weight: 500; }

/* ─── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius);
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }

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

.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ─── Forms ────────────────────────────────────────────────────────────────── */

.form-field { margin-bottom: 14px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-input);
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
    background: var(--bg-card);
}

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

.form-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
}

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

/* ─── Cards / Panels ────────────────────────────────────────────────────────── */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.card-title { font-size: 18px; color: var(--text-primary); }
.card-body { padding: 20px; }

/* ─── Table ────────────────────────────────────────────────────────────────── */

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

table { width: 100%; border-collapse: collapse; }

thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 14px;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { cursor: pointer; transition: background 0.1s; }
tbody tr:hover { background: var(--accent-light); }

.td-actions { display: flex; gap: 6px; align-items: center; }

/* ─── Badges ───────────────────────────────────────────────────────────────── */

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge-active   { background: var(--status-active-bg);   color: var(--status-active); }
.badge-inactive { background: var(--status-inactive-bg); color: var(--status-inactive); }
.badge-pending  { background: var(--status-pending-bg);  color: var(--status-pending); }

/* ─── Page layout ───────────────────────────────────────────────────────────── */

.page-section { padding: 28px 0; }

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.page-title { font-size: 28px; color: var(--text-primary); letter-spacing: 0; line-height: 1.2; }

/* ─── Slide panel ───────────────────────────────────────────────────────────── */

.panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    display: none;
    align-items: stretch;
    justify-content: flex-end;
}
.panel-overlay.open { display: flex; }

.panel {
    width: 460px;
    max-width: 100vw;
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-primary);
}

.panel-title { font-size: 18px; }

.panel-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    padding: 2px 6px;
    border-radius: var(--radius);
    transition: all 0.1s;
}
.panel-close:hover { background: var(--border); color: var(--text-primary); }

.panel-body { padding: 22px; flex: 1; }

.panel-footer {
    padding: 16px 22px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    background: var(--bg-primary);
}

/* ─── Modal ─────────────────────────────────────────────────────────────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    padding: 28px;
    position: relative;
}

.modal-title {
    font-size: 22px;
    margin-bottom: 20px;
    color: var(--text-primary);
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}
.modal-close:hover { color: var(--text-primary); }

/* ─── Empty state ────────────────────────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 64px 20px;
    color: var(--text-muted);
}
.empty-state-icon { font-size: 44px; margin-bottom: 12px; color: var(--text-muted); }
.empty-state p { font-size: 14px; }

/* ─── Toast ───────────────────────────────────────────────────────────────── */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.2s ease;
    max-width: 360px;
}
.toast-success { background: #16a34a; color: #fff; }
.toast-error   { background: #dc2626; color: #fff; }

@keyframes toastIn {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* ─── Footer ────────────────────────────────────────────────────────────────── */

.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 16px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ─── Event grid (home page) ───────────────────────────────────────────────── */

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 5px;
}
.event-grid--lg {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
}
@media (max-width: 700px) {
    .event-grid--lg { grid-template-columns: 1fr; }
}
.event-grid--lg .event-meta { padding: 18px 20px; }
.event-grid--lg .event-meta h3 { font-size: 22px; margin-bottom: 6px; }
.event-grid--lg .event-meta .event-sub { font-size: 13px; }

.event-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.15s, box-shadow 0.15s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.event-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: inherit; }

.event-cover {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--bg-primary) center/cover no-repeat;
    border-bottom: 1px solid var(--border-light);
}

.event-cover-empty {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, var(--accent-light), var(--bg-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 32px;
    border-bottom: 1px solid var(--border-light);
}

.event-meta { padding: 14px 16px; }
.event-meta h3 { font-size: 15px; margin-bottom: 4px; }
.event-meta .event-sub { font-size: 12px; color: var(--text-muted); }

/* ─── Photographer cards (home page) ────────────────────────────────────── */

.photographer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 5px;
}
.photographer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.photographer-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
    color: inherit;
}
.photographer-card-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--bg-input) center/cover no-repeat;
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 12px;
}
.photographer-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.photographer-card-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* ─── Photographer page ─────────────────────────────────────────────────── */

.photographer-hero {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.photographer-hero-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--bg-input) center/cover no-repeat;
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    flex: 0 0 auto;
}
.photographer-hero-info { flex: 1 1 300px; min-width: 0; }
.photographer-bio {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}
.photographer-bio--empty { color: var(--text-muted); font-style: italic; }

.photographer-event { margin-bottom: 32px; }
.photographer-event-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.photographer-event-title {
    font-size: 22px;
    font-family: 'Gilda Display', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
    font-weight: 400;
    margin: 0;
}
.photographer-event-title a { color: var(--text-primary); }
.photographer-event-title a:hover { color: var(--accent); }
.photographer-event-meta { color: var(--text-muted); font-size: 13px; }

.photographer-event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 6px;
}
.photographer-event-tile {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-input);
}
.photographer-event-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}
.photographer-event-tile:hover img { transform: scale(1.05); }

/* ─── Photo grid (event gallery) ───────────────────────────────────────────── */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.photo-tile {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--bg-primary);
}

.photo-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}
.photo-tile:hover img { transform: scale(1.04); }

.photo-tile.selected { outline: 3px solid var(--accent); outline-offset: -3px; }

.photo-check {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    border: 2px solid rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0);
    font-size: 13px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, color 0.15s, transform 0.1s;
    z-index: 2;
}
.photo-check:hover { transform: scale(1.08); color: rgba(255, 255, 255, 0.85); }
.photo-tile.selected .photo-check {
    background: var(--accent);
    border-color: #fff;
    color: #fff;
}

.photo-tile .photo-delete,
.photo-tile .photo-cover-btn {
    position: absolute;
    top: 6px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.photo-tile .photo-delete    { right: 6px; }
.photo-tile .photo-cover-btn { right: 36px; }
.photo-tile:hover .photo-delete,
.photo-tile:hover .photo-cover-btn { opacity: 1; }
.photo-tile .photo-delete:hover    { background: #dc2626; }
.photo-tile .photo-cover-btn:hover { background: var(--accent); }
.photo-tile.is-cover .photo-cover-btn { display: none; }

.photo-cover-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: #fbbf24;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: none;
}
.photo-tile.is-cover .photo-cover-badge { display: inline-block; }

/* ─── Dropzone ─────────────────────────────────────────────────────────────── */

.dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-card);
    transition: all 0.15s;
    cursor: pointer;
}
.dropzone.dragover { border-color: var(--accent); background: var(--accent-light); color: var(--accent-dark); }
.dropzone-icon { font-size: 36px; margin-bottom: 12px; }
.dropzone p { font-size: 14px; }

.upload-list { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.upload-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
}
.upload-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-progress {
    width: 120px;
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
}
.upload-progress-bar { height: 100%; background: var(--accent); width: 0%; transition: width 0.15s; }
.upload-status { font-size: 12px; color: var(--text-muted); min-width: 60px; text-align: right; }
.upload-status.error { color: #dc2626; }
.upload-status.done  { color: #16a34a; }

/* ─── Lightbox ─────────────────────────────────────────────────────────────── */

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
}
.lightbox-overlay.open { display: flex; }
.lightbox-img { max-width: 96vw; max-height: 86vh; object-fit: contain; }

.lightbox-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 24px 18px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.55) 60%, rgba(0, 0, 0, 0));
    color: #ededed;
    pointer-events: none;
    font-size: 13px;
    text-align: center;
}
.lightbox-info:empty { display: none; }
.lightbox-info-primary {
    color: #d4d4d4;
    margin-bottom: 6px;
    font-size: 13px;
}
.lightbox-info-primary i { color: #a1a1a1; margin-right: 5px; }
.lightbox-info-sep { color: #525252; margin: 0 10px; }
.lightbox-info-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    color: #a1a1a1;
    font-size: 12px;
}
.lightbox-info-meta i { margin-right: 5px; color: #737373; }
.lightbox-info-meta span { white-space: nowrap; }
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    font-size: 28px;
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev  { left: 20px;  top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 20px; top: 50%; transform: translateY(-50%); }

/* ─── Selection bar (gallery) ──────────────────────────────────────────────── */

.selection-bar {
    position: sticky;
    bottom: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 12px 20px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 50;
}

/* ─── OCR search bar ────────────────────────────────────────────────────── */

.gallery-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}
.gallery-tools .btn { white-space: nowrap; flex-shrink: 0; }
.ocr-search-wrap {
    position: relative;
    flex: 1 1 280px;
    min-width: 220px;
    max-width: 420px;
}
.ocr-search-icon {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px;
    pointer-events: none;
}
.ocr-search-input {
    padding-left: 34px;
}
.ocr-suggest {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    list-style: none;
    margin: 0;
    padding: 4px 0;
    box-shadow: var(--shadow-lg);
    max-height: 280px;
    overflow-y: auto;
    z-index: 60;
    display: none;
}
.ocr-suggest li {
    padding: 7px 14px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
}
.ocr-suggest li:hover,
.ocr-suggest li.active { background: var(--accent-light); color: var(--accent); }

.filter-status {
    margin: -8px 0 16px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ─── People row (event gallery) ────────────────────────────────────────── */

.people-row {
    margin-bottom: 18px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.people-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}
.people-count {
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 6px;
}
.people-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.person-chip {
    flex: 0 0 auto;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    position: relative;
    line-height: 0;
}
.person-chip-photo {
    display: block;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-repeat: no-repeat;
    background-color: var(--bg-input);
    border: 2px solid transparent;
    transition: border-color 0.15s, transform 0.1s;
}
.person-chip:hover .person-chip-photo { transform: scale(1.05); }
.person-chip.active .person-chip-photo { border-color: var(--accent); }

.person-chip-fallback {
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 22px;
    background: var(--bg-secondary) !important;
}

.people-rows-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}
.people-rows-inline > .people-row {
    flex: 1 1 320px;
    min-width: 0;
    margin-bottom: 0;
}
/* Photographers panel hugs its chip count instead of stretching. */
.people-rows-inline > .photographers-row {
    flex: 0 0 auto;
    margin-top: 0;
}
.photographers-row .people-list { flex-wrap: wrap; }
.filter-title {
    font-size: 26px;
    color: var(--text-primary);
    margin: 8px 0 18px;
    letter-spacing: 0;
    font-family: 'Gilda Display', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
    font-weight: 400;
}

.avatar-preview {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--bg-secondary) center/cover no-repeat;
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    flex: 0 0 auto;
}
.avatar-preview--sm {
    width: 56px;
    height: 56px;
    font-size: 20px;
}

.th-avatar { width: 56px; }
.td-avatar { width: 56px; padding-right: 0; }
.user-avatar-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-input) center/cover no-repeat;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
}
.user-avatar-cell--fallback { background-color: var(--bg-secondary); }
.person-chip-count {
    position: absolute;
    bottom: -2px;
    right: -2px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
}

/* ─── Lightbox OCR chips ─────────────────────────────────────────────────── */

.lightbox-info-ocr {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.ocr-chip {
    background: rgba(59, 130, 246, 0.18);
    color: #cfe1ff;
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.selection-bar-count { font-size: 14px; font-weight: 500; }

/* ─── Order prints modal ─────────────────────────────────────────────────── */

.prints-overlay {
    align-items: flex-start;
    overflow-y: auto;
    padding: 40px 20px;
}
.prints-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 720px;
    padding: 28px 28px 22px;
    position: relative;
}
.prints-subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 18px;
}
.prints-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 4px;
}
.prints-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    position: relative;
}
.prints-item-photo-wrap {
    flex: 0 0 auto;
    width: 200px;
    height: 200px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.prints-item-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.prints-item-info {
    flex: 1 1 auto;
    min-width: 200px;
}
.prints-item-meta {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}
.prints-item-size { max-width: 280px; }
.prints-item-remove {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    padding: 0 6px;
    line-height: 1;
    align-self: flex-start;
    transition: color 0.15s;
}
.prints-item-remove:hover { color: #dc2626; }
.prints-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
    .prints-item { flex-wrap: wrap; }
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .nav-links-desktop { display: none; }
    .nav-hamburger { display: flex; }
    .form-row { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .gallery-tools { flex-wrap: wrap; }
    .panel { width: 100%; }
    .photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px; }
}

@media (max-width: 480px) {
    .container { padding: 0 14px; }
}
