/* Resto Calendar — Mobile-First Styles */

:root {
    --primary: #e74c3c;
    --primary-dark: #c0392b;
    --secondary: #2c3e50;
    --accent: #3498db;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --bg: #f8f9fa;
    --card: #ffffff;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #e0e0e0;
    --radius: 12px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --max-width: 480px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* App Container */
.app-container {
    max-width: var(--max-width);
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
}

/* Auth Pages */
.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.auth-logo {
    margin-bottom: 8px;
}

.auth-logo img {
    width: 140px;
    height: auto;
    border-radius: 24px;
    display: block;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.auth-subtitle {
    color: var(--text-light);
    margin-bottom: 32px;
    font-size: 14px;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
    width: 100%;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.form-input, .form-select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    background: var(--card);
    color: var(--text);
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237f8c8d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:active {
    background: var(--primary-dark);
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    width: auto;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Cards */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
}

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

.card-title {
    font-size: 16px;
    font-weight: 600;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-scheduled { background: #e8f4fd; color: #2980b9; }
.badge-confirmed { background: #e8f8f5; color: #27ae60; }
.badge-visited { background: #e8f8f5; color: #2ecc71; }
.badge-completed { background: #f0f3f4; color: #7f8c8d; }
.badge-cancelled { background: #fdedec; color: #e74c3c; }
.badge-pending { background: #fef9e7; color: #f39c12; }
.badge-paid { background: #e8f8f5; color: #27ae60; }
.badge-draft { background: #fef9e7; color: #f39c12; }
.badge-published { background: #e8f8f5; color: #27ae60; }

/* Top Navigation */
.top-nav {
    background: var(--card);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-title {
    font-size: 18px;
    font-weight: 700;
}

.nav-user {
    font-size: 13px;
    color: var(--text-light);
}

.nav-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    color: var(--text);
}

.lang-btn {
    font-size: 13px !important;
    font-weight: 700;
    padding: 2px 6px !important;
    border: 1px solid var(--text-light) !important;
    border-radius: 4px;
    margin-right: 4px;
    line-height: 1.4;
    cursor: pointer;
}

.lang-dropdown {
    position: fixed;
    z-index: 9999;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    min-width: 130px;
    overflow: hidden;
}

.lang-dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: none;
    text-align: left;
    font-size: 13px;
    cursor: pointer;
    color: var(--text);
}

.lang-dropdown-item:hover {
    background: #f5f5f5;
}

/* Bottom Tab Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: var(--max-width);
    width: 100%;
    background: var(--card);
    display: flex;
    box-shadow: 0 -1px 4px rgba(0,0,0,0.06);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0 6px;
    font-size: 10px;
    color: var(--text-light);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.tab-item.active {
    color: var(--primary);
}

.tab-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

/* Content Area */
.content {
    padding: 16px;
    padding-bottom: 72px;
}

/* Calendar View */
.calendar-list {
    list-style: none;
}

.calendar-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: var(--card);
    border-radius: var(--radius);
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.15s;
}

.calendar-item:active {
    transform: scale(0.98);
}

.calendar-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
}

.date-day {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.date-month {
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
}

.calendar-info {
    flex: 1;
    min-width: 0;
}

.calendar-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.calendar-info p {
    font-size: 13px;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-time {
    display: flex;
    align-items: center;
    color: var(--text-light);
    font-size: 13px;
}

/* Modal / Detail Sheet */
.detail-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: var(--max-width);
    width: 100%;
    background: var(--card);
    border-radius: 20px 20px 0 0;
    padding: 8px 16px 32px;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.18);
    z-index: 200;
    max-height: 88vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateX(-50%) translateY(100%); }
    to { transform: translateX(-50%) translateY(0); }
}

.detail-handle {
    position: relative;
    width: 100%;
    height: 28px;
    margin: 0 0 8px;
    background: none;
}

.detail-grip {
    width: 44px;
    height: 5px;
    background: var(--border);
    border-radius: 3px;
    margin: 0 auto;
}

.detail-close {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text-light);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.detail-close:hover {
    background: var(--border);
    color: var(--text);
}

.detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 199;
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Secret display for admin */
.hidden { display: none !important; }

/* Page-specific sections */
.page-section { display: none; }
.page-section.active { display: block; }

/* Grid */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Filter tabs */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.filter-tab {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: var(--card);
    border: 1px solid var(--border);
    cursor: pointer;
    white-space: nowrap;
    color: var(--text-light);
}

.filter-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeIn 0.2s;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* QR Scanner */
.qr-manual-input {
    flex: 1;
    padding: 14px 14px;
    font-size: 18px;
    border: 2px solid var(--primary);
    border-radius: 10px;
    text-align: center;
    letter-spacing: 2px;
    font-family: monospace;
}

.qr-go-btn {
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 10px;
    white-space: nowrap;
}

.qr-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    color: var(--text-light);
    font-size: 12px;
    text-transform: uppercase;
}

.qr-divider::before,
.qr-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Venue check-in modal */
.venue-checkin-modal .checkin-initial {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent, #e74c3c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    margin: 0 auto 16px;
}

.confirm-venue:active {
    transform: scale(0.98);
}

.checkin-indicator {
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    margin: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.checkin-indicator.checkin-ok {
    background: #d4edda !important;
    color: #155724 !important;
}

.checkin-indicator.checkin-warn {
    background: #fff3cd !important;
    color: #856404 !important;
}

.checkin-indicator.checkin-bad {
    background: #f8d7da !important;
    color: #721c24 !important;
}

/* QR Scanner modal - larger viewport */
.qr-scanner-modal {
    max-width: 520px !important;
}

/* Toast */
.toast {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    max-width: var(--max-width);
    width: calc(100% - 32px);
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    z-index: 500;
    animation: slideDown 0.3s ease;
    text-align: center;
}

.toast-success { background: var(--success); color: white; }
.toast-error { background: var(--danger); color: white; }

@keyframes slideDown {
    from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ===== Per-Venue Calendar Grid ===== */

.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cal-nav-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 18px;
    cursor: pointer;
    color: var(--text);
    min-width: 36px;
    text-align: center;
}

.cal-nav-btn:active {
    background: var(--bg);
}

.cal-nav-title {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    flex: 1;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.cal-weekday {
    background: var(--card);
    padding: 6px 2px;
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
}

.cal-day {
    background: var(--card);
    aspect-ratio: 1;
    padding: 2px;
    vertical-align: top;
    cursor: default;
    position: relative;
    font-size: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cal-day.cal-other-month {
    opacity: 0.3;
}

.cal-day.cal-today {
    background: #fff8f0;
}

.cal-day.cal-empty {
    background: var(--bg);
}

.cal-day-num {
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1px;
    flex-shrink: 0;
}

.cal-booking {
    font-size: 8px;
    padding: 1px 2px;
    border-radius: 3px;
    margin-bottom: 1px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    max-width: 100%;
    flex-shrink: 0;
    min-width: 0;
}

.cal-booking:active {
    opacity: 0.7;
}

.cal-booking.confirmed {
    background: #e8f8f5;
    color: #1a8a5c;
    border-left: 2px solid var(--success);
}

.cal-booking.scheduled {
    background: #e8f4fd;
    color: #206a9c;
    border-left: 2px solid var(--accent);
}

.cal-booking.visited {
    background: #e8f8f5;
    color: #1d9b5c;
    border-left: 2px solid #2ecc71;
}

.cal-booking.completed {
    background: #f0f3f4;
    color: #7f8c8d;
    border-left: 2px solid #bdc3c7;
}

/* Responsive — wider screens */
@media (min-width: 768px) {
    .app-container {
        box-shadow: 0 0 20px rgba(0,0,0,0.05);
    }
}

/* ═══ Stats Dashboard (US-21/22/23) ═══ */
.stats-dashboard {
    padding: 4px 0;
}

.stats-summary-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.stats-summary-card {
    background: var(--card-bg, #fff);
    border-radius: 10px;
    padding: 12px 16px;
    flex: 1;
    min-width: 70px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.stats-summary-num {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary, #e74c3c);
}

.stats-summary-label {
    display: block;
    font-size: 11px;
    color: var(--text-light, #888);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-card {
    transition: box-shadow 0.2s;
}

.stats-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.stats-card-detail {
    animation: fadeIn 0.2s ease;
}

.stats-age-fresh {
    background: #d4edda;
    color: #155724;
}

.stats-age-warn {
    background: #fff3cd;
    color: #856404;
}

.stats-age-stale {
    background: #f8d7da;
    color: #721c24;
}

/* ═══ Venue Stats Enhancements ═══ */
.stats-venue-header {
    margin-bottom: 12px;
}
.stats-venue-name {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.stats-section-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light, #888);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 8px 0 6px;
    margin-top: 14px;
    border-bottom: 1px solid #eee;
}

.stats-booking-cards-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
    margin-bottom: 4px;
}

.stats-mini-card {
    flex: 1;
    min-width: 60px;
    background: var(--card-bg, #fff);
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.stats-mini-card.stats-green .stats-mini-num {
    color: #27ae60;
}

.stats-mini-num {
    font-size: 20px;
    font-weight: 700;
}

.stats-mini-label {
    font-size: 11px;
    color: var(--text-light, #888);
    margin-top: 2px;
}

.stats-empty {
    padding: 12px 0;
    font-size: 13px;
    color: var(--text-light, #888);
    text-align: center;
}
.stats-empty-section {
    padding: 20px 0;
    font-size: 14px;
    color: var(--text-light, #888);
    text-align: center;
}

.stats-reach-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.stats-reach-card {
    flex: 1;
    min-width: 140px;
    background: var(--card-bg, #fff);
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.stats-reach-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light, #888);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.stats-reach-item {
    font-size: 13px;
    padding: 2px 0;
}

.stats-reach-icon {
    font-size: 14px;
}

.stats-incomplete-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: box-shadow 0.2s;
}
.stats-incomplete-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.stats-incomplete-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.stats-incomplete-num {
    font-size: 22px;
    font-weight: 700;
    color: #856404;
}
.stats-incomplete-left > div:last-child {
    font-size: 12px;
    color: #856404;
}
.stats-incomplete-right {
    display: flex;
    align-items: center;
}
.stats-chevron {
    font-size: 12px;
    color: #856404;
    transition: transform 0.2s;
}
.stats-chevron.open {
    transform: rotate(180deg);
}

.stats-incomplete-list {
    display: none;
    margin-top: 8px;
    margin-bottom: 4px;
    background: var(--card-bg, #fff);
    border-radius: 10px;
    padding: 12px;
    border: 1px solid #ffc107;
}
.stats-incomplete-list.visible {
    display: block;
}
.stats-incomplete-content {
    font-size: 13px;
}
.stats-incomplete-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}
.stats-incomplete-item:last-child {
    border-bottom: none;
}
.stats-incomplete-name {
    font-weight: 500;
    font-size: 14px;
}
.stats-incomplete-meta {
    font-size: 11px;
    color: var(--text-light, #888);
    margin-top: 1px;
}
.stats-incomplete-actions {
    text-align: right;
}
.stats-incomplete-progress {
    font-size: 11px;
    color: #856404;
    margin-bottom: 4px;
}
.stats-incomplete-view-btn {
    margin-top: 2px;
}
.stats-incomplete-error {
    color: #e74c3c;
    font-size: 13px;
}

.stats-visitor-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.stats-visitor-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg, #fff);
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.stats-visitor-name {
    font-weight: 600;
    font-size: 14px;
    flex: 0 0 auto;
    margin-right: 8px;
}
.stats-visitor-stats {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--text-light, #888);
}
.stats-visitor-stat {
    white-space: nowrap;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══ Article Platform Selector (Redesign) ═══ */
.platform-selector {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.platform-tab {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border: 1px solid var(--border, #ddd);
    border-radius: 20px;
    background: #f5f5f5;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}

.platform-tab:hover {
    background: #ebebeb;
}

.platform-tab-active {
    background: var(--primary, #e74c3c);
    color: #fff;
    border-color: var(--primary, #e74c3c);
}

.platform-tab-active:hover {
    background: #c0392b;
}

.platform-tab-check {
    font-size: 11px;
    color: #27ae60;
    margin-left: 2px;
}

.platform-tab-active .platform-tab-check {
    color: #fff;
}

.platform-content {
    animation: fadeIn 0.2s ease;
}

.req-platforms-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    padding: 8px 10px;
    background: #f9f9f9;
    border-radius: 6px;
    font-size: 12px;
    align-items: center;
}

.req-platforms-bar > span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light, #888);
    width: 100%;
}

.req-platforms-bar label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.req-platforms-bar input[type="checkbox"] {
    margin: 0;
}

/* ── Mass Stats Scrape ─────────────────────────────────── */
.scrape-panel { margin-bottom: 16px; padding: 16px; background: var(--card-bg); border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.scrape-panel h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.scrape-scope-pills { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.scrape-scope-pill { padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border); background: transparent; font-size: 13px; cursor: pointer; }
.scrape-scope-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.scrape-actions { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.scrape-preview { padding: 12px; background: #f5f5f5; border-radius: 8px; font-size: 13px; margin-bottom: 12px; }
.scrape-preview-row { display: flex; gap: 16px; margin-bottom: 4px; flex-wrap: wrap; }
.scrape-progress { padding: 12px; background: #f0f7ff; border: 1px solid #bdd3e8; border-radius: 8px; margin-bottom: 12px; }
.scrape-progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.scrape-progress-label { font-weight: 600; font-size: 14px; }
.scrape-progress-status { font-size: 13px; color: var(--text-light); }
.scrape-progress-bar-wrap { height: 8px; background: #e0e0e0; border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.scrape-progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent), #4f8ef7); border-radius: 4px; transition: width 0.5s ease; }
.scrape-progress-stats { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.scrape-progress-time { font-size: 11px; color: var(--text-light); margin-top: 4px; }
.scrape-job-card { padding: 10px; background: #fafafa; border: 1px solid #eee; border-radius: 8px; margin-bottom: 8px; }
.scrape-job-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.scrape-job-card-stats { display: flex; gap: 12px; font-size: 12px; flex-wrap: wrap; }
.scrape-status-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.scrape-status-badge.running { background: #fff3cd; color: #856404; }
.scrape-status-badge.completed { background: #d4edda; color: #155724; }
.scrape-status-badge.failed { background: #f8d7da; color: #721c24; }
.scrape-params { margin-bottom: 12px; }
.scrape-params select, .scrape-params input { width: 100%; max-width: 300px; }
.scrape-history { margin-top: 16px; }
.scrape-done-actions { display: flex; gap: 8px; margin-top: 8px; }

/* ═══ Booking Detail Modal (Redesign) ═══ */
.bd-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
}

.bd-card-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--accent);
    margin-bottom: 10px;
}

.bd-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    margin: 20px 0 10px;
    color: var(--text);
}

.bd-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.bd-empty {
    color: var(--text-light);
    font-size: 13px;
    text-align: center;
    padding: 8px 0;
}

/* Influencer profile card */
.bd-profile {
    background: linear-gradient(180deg, #f2f8fd, #ffffff);
    border: 1px solid #d8e9f7;
}

.bd-profile-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.bd-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #5dade2);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bd-profile-main { min-width: 0; flex: 1; }

.bd-name { font-size: 16px; font-weight: 700; }
.bd-handle { font-size: 12px; color: var(--text-light); }
.bd-schedule-count { font-size: 12px; color: var(--text-light); margin-top: 2px; }

.bd-followers {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
    font-size: 12px;
}

.bd-fstat { display: inline-flex; align-items: center; gap: 4px; }
.bd-fstat strong { font-size: 13px; }
.bd-fstat-age { color: var(--text-light); font-size: 11px; }

.bd-social {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #cfe3f5;
}

.bd-social a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    color: #fff;
    text-decoration: none;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bd-social a.bd-wx { background: #07c160; }
.bd-social a.bd-xhs { background: #ff2442; }
.bd-social a.bd-ig { background: #e4405f; }
.bd-social a.bd-tt { background: #111; }

/* Venue header */
.bd-venue { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.bd-venue-main { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.bd-venue-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.bd-venue-info { min-width: 0; }
.bd-venue-name { font-size: 18px; font-weight: 700; line-height: 1.25; }
.bd-venue-addr { font-size: 12px; color: var(--text-light); margin: 2px 0 6px; }
.bd-cat-badge { font-size: 10px; background: var(--bg); color: var(--text-light); }
.bd-status-badge { flex-shrink: 0; margin-top: 2px; }

/* Venue conditions */
.bd-conditions {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 12px;
}
.bd-conditions-label { font-weight: 700; font-size: 12px; flex-shrink: 0; }

/* Meta row (date / time / guests) */
.bd-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.bd-meta-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 8px;
    text-align: center;
}
.bd-meta-num { display: block; font-size: 15px; font-weight: 700; }
.bd-meta-label { display: block; font-size: 11px; color: var(--text-light); margin-top: 2px; }

/* Status actions */
.bd-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.bd-actions .btn { flex: 1 1 auto; min-width: 0; }
.bd-btn-delete { background: #fdecea; color: var(--danger); border: 1px solid #f5b7b1; }
.bd-btn-delete:hover { background: var(--danger); color: #fff; }

/* QR card */
.bd-qr { text-align: center; }
.bd-qr-img {
    width: 112px;
    height: auto;
    border: 2px solid var(--border);
    border-radius: 12px;
    display: inline-block;
    cursor: pointer;
}
.bd-qr-status { font-size: 11px; color: var(--text-light); margin-top: 4px; }
.bd-qr-actions { display: flex; gap: 6px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.bd-qr-share { display: flex; gap: 6px; justify-content: center; margin-top: 6px; flex-wrap: wrap; }
.bd-qr-wa { background: #25d366 !important; color: #fff !important; border-color: #25d366 !important; }

/* QR pool (per-booking redeemable tickets) */
.bd-pool-loading { font-size: 12px; color: var(--text-light); padding: 6px 0; }
.bd-pool-stats {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    background: #eef2ff;
    color: #3730a3;
    border-radius: 20px;
    padding: 3px 10px;
    margin-bottom: 10px;
}
.bd-pool-actions { margin-bottom: 10px; }
.bd-pool-list { display: flex; flex-direction: column; gap: 10px; }
.bd-pool-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
}
.bd-pool-qr {
    width: 88px;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    flex-shrink: 0;
    cursor: pointer;
}
.bd-pool-info { flex: 1; min-width: 0; }
.bd-pool-label { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.bd-pool-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    padding: 2px 8px;
    margin-bottom: 6px;
}
.bd-pool-avail { background: #d4edda; color: #155724; }
.bd-pool-used { background: #f8d7da; color: #721c24; }
.bd-pool-invalidated { background: #e9ecef; color: #495057; }
.bd-pool-expired { background: #f8d7da; color: #721c24; }
.bd-pool-validity { font-size: 12px; color: var(--text-light); margin-bottom: 4px; }
.bd-pool-validity-expired { color: #721c24; font-weight: 600; }
.bd-pool-empty { font-size: 13px; color: var(--text-light); padding: 4px 0; }
.bd-pool-fold { margin-top: 4px; }
.bd-pool-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    margin-bottom: 10px;
}
.bd-pool-toggle-caret { font-size: 10px; transition: transform 0.15s; }
.bd-pool-share { display: flex; gap: 5px; flex-wrap: wrap; }
.bd-pool-share .btn { font-size: 11px; padding: 4px 8px; }

/* Guest person tabs */
.bd-guest-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

/* Platform cards */
.platform-card {
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    box-shadow: none;
}
.platform-card.bd-plat-extra { opacity: 0.75; }
.bd-plat-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.bd-plat-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.bd-plat-req {
    font-size: 10px;
    font-weight: 600;
    color: var(--accent);
    background: #eaf4fd;
    border-radius: 20px;
    padding: 1px 8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.bd-plat-meta { display: inline-flex; align-items: center; gap: 6px; }
.bd-plat-extra { font-size: 11px; color: var(--text-light); }
.bd-plat-del { background: none; border: none; cursor: pointer; color: #999; font-size: 15px; padding: 2px; line-height: 1; }
.bd-plat-del:hover { color: var(--danger); }

/* Evidence */
.bd-evidence { font-size: 13px; }
.bd-ev-url { display: flex; align-items: flex-start; gap: 6px; flex-wrap: wrap; }
.bd-ev-url a { word-break: break-all; text-decoration: none; color: var(--accent); }
.bd-ev-url a:hover { text-decoration: underline; }
.bd-icon-btn { background: none; border: none; cursor: pointer; font-size: 13px; color: var(--text-light); padding: 2px; line-height: 1; }
.bd-icon-btn:hover { color: var(--text); }
.bd-ev-submitted { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* Screenshot gallery */
.bd-gallery { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.bd-gallery-item { position: relative; flex: 0 0 auto; }
.bd-gallery-img {
    height: 56px;
    width: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    cursor: pointer;
    display: block;
}
.bd-gallery-del {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* Stats display */
.bd-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding: 8px 10px;
    background: var(--bg);
    border-radius: 8px;
    font-size: 12px;
}
.bd-stat { display: inline-flex; align-items: center; gap: 4px; }
.bd-stat-icon { font-size: 12px; }
.bd-stats-age { font-size: 10px; color: var(--text-light); margin-top: 3px; }
.bd-scrape { margin-top: 6px; }

/* Upload screenshot label */
.bd-upload { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-light); cursor: pointer; }
.bd-upload input[type="file"] { display: none; }
.bd-upload span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 5px 10px;
    transition: border-color 0.2s, color 0.2s;
}
.bd-upload span:hover { border-color: var(--accent); color: var(--accent); }

/* Submit form */
.bd-submit { margin-top: 4px; }
.bd-submit-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.bd-pending { font-size: 12px; color: var(--text-light); }

/* Platform requirements toggle */
.bd-req { margin-top: 10px; }
.bd-req-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.bd-req-list { display: flex; gap: 10px 14px; flex-wrap: wrap; }
.bd-req-list label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; cursor: pointer; }
.bd-req-hint { font-size: 11px; color: var(--text-light); margin-top: 6px; }

/* Notes */
.bd-notes { margin-top: 4px; }
.bd-notes p {
    font-size: 13px;
    color: var(--text-light);
    background: var(--bg);
    border-radius: 10px;
    padding: 10px 12px;
}
