/* venue.css — OnCourt Match Venue Portal */

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

body {
    font-family: 'Inter', sans-serif;
    background: #f8f9fa;
    color: #111827;
    min-height: 100vh;
}

/* ── Login view ──────────────────────────────────────────────── */

#loginView {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e4220 0%, #2C5F2D 55%, #4CAF50 100%);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.22);
}

.login-logo {
    text-align: center;
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, #2C5F2D, #4CAF50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.login-title {
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 4px;
}

.login-sub {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 28px;
}

.vp-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.vp-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.15s;
    margin-bottom: 16px;
    color: #111827;
}

.vp-input:focus { border-color: #2C5F2D; }

.vp-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #2C5F2D, #4CAF50);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: opacity 0.15s;
}

.vp-btn:hover  { opacity: 0.9; }
.vp-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.vp-btn--ghost { background: #f3f4f6; color: #374151; }

.vp-lockout {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    color: #dc2626;
    margin-top: 12px;
    display: none;
    text-align: center;
    line-height: 1.4;
}

.vp-lockout-timer {
    display: block;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.04em;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}

.vp-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #dc2626;
    margin-top: 12px;
    display: none;
}

/* ── Dashboard view ──────────────────────────────────────────── */

#dashboardView { display: none; }

.vp-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: calc(env(safe-area-inset-top) + 14px) 24px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    gap: 12px;
}

.vp-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.vp-header-logo {
    font-size: 16px;
    font-weight: 900;
    background: linear-gradient(135deg, #2C5F2D, #4CAF50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    flex-shrink: 0;
}

.vp-header-divider {
    width: 1px;
    height: 20px;
    background: #e5e7eb;
    flex-shrink: 0;
}

.vp-header-portal {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
    flex-shrink: 0;
}

.vp-header-venue {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vp-logout-btn {
    background: none;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.vp-logout-btn:hover { border-color: #2C5F2D; color: #2C5F2D; }

/* ── Tab navigation ──────────────────────────────────────────── */

.vp-tab-nav {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    position: sticky;
    top: 60px;
    z-index: 90;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 24px;
}

.vp-tab-nav::-webkit-scrollbar { display: none; }

.vp-tab-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.15s, border-color 0.15s;
}

.vp-tab-btn:hover { color: #2C5F2D; }

.vp-tab-btn.active {
    color: #2C5F2D;
    border-bottom-color: #2C5F2D;
}

.vp-tab-pane { display: none; }

.vp-tab-pane.active {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Page body ───────────────────────────────────────────────── */

.vp-body {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px 56px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.vp-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.vp-card-title {
    font-size: 15px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Overview ────────────────────────────────────────────────── */

.vp-venue-name {
    font-size: 22px;
    font-weight: 900;
    color: #2C5F2D;
    margin-bottom: 4px;
}

.vp-venue-meta {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 20px;
}

.vp-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.vp-stat {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
}

.vp-stat-num {
    font-size: 28px;
    font-weight: 900;
    color: #2C5F2D;
    line-height: 1;
}

.vp-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Session rows ────────────────────────────────────────────── */

.vp-session-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.vp-session-row:last-child { border-bottom: none; }

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

.vp-session-name {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
}

.vp-session-sub {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
}

.vp-poll-bar-wrap { margin-top: 8px; }

.vp-poll-nums {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 5px;
}

.vp-bar-track {
    height: 7px;
    background: #f3f4f6;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
}

.vp-bar-yes  { background: #22c55e; height: 100%; transition: width 0.4s; }
.vp-bar-no   { background: #ef4444; height: 100%; transition: width 0.4s; }
.vp-bar-pend { background: #d1d5db; height: 100%; transition: width 0.4s; }

/* ── Status chips ────────────────────────────────────────────── */

.vp-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.vp-chip--open   { background: #dcfce7; color: #15803d; }
.vp-chip--closed { background: #f3f4f6; color: #6b7280; }

/* ── Toggle switch ───────────────────────────────────────────── */

.vp-toggle-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.vp-toggle-label {
    font-size: 10px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vp-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.vp-toggle input { opacity: 0; width: 0; height: 0; }

.vp-toggle-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s;
}

.vp-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.vp-toggle input:checked + .vp-toggle-slider            { background: #2C5F2D; }
.vp-toggle input:checked + .vp-toggle-slider::before   { transform: translateX(20px); }
.vp-toggle input:disabled + .vp-toggle-slider           { opacity: 0.45; cursor: not-allowed; }

/* ── Holiday mode ────────────────────────────────────────────── */

.vp-holiday-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.vp-holiday-info h3 {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
}

.vp-holiday-info p {
    font-size: 12px;
    color: #6b7280;
}

.vp-holiday-toggle {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
    flex-shrink: 0;
}

.vp-holiday-toggle input { opacity: 0; width: 0; height: 0; }

.vp-holiday-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s;
}

.vp-holiday-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 4px;
    top: 4px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.vp-holiday-toggle input:checked + .vp-holiday-slider            { background: #f59e0b; }
.vp-holiday-toggle input:checked + .vp-holiday-slider::before   { transform: translateX(26px); }

.vp-holiday-banner {
    background: #fef9c3;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #92400e;
    font-weight: 600;
    margin-bottom: 12px;
    display: none;
}

.vp-auto-note {
    font-size: 13px;
    color: #6b7280;
    padding-top: 4px;
    line-height: 1.5;
}

/* ── Performance stats ───────────────────────────────────────── */

.vp-perf-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.vp-perf-stat {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.vp-perf-num {
    font-size: 30px;
    font-weight: 900;
    color: #2C5F2D;
    line-height: 1;
}

.vp-perf-lbl {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.vp-perf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.vp-perf-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 8px;
    border-bottom: 1px solid #e5e7eb;
}

.vp-perf-table td {
    padding: 11px 8px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: middle;
}

.vp-perf-table tr:last-child td { border-bottom: none; }

.perf-rank { font-weight: 800; color: #111827; font-size: 14px; }

.perf-no-data {
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
}

/* ── Pending approvals ───────────────────────────────────────── */

.vp-pending-row,
.vp-admin-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.vp-pending-row:last-child,
.vp-admin-row:last-child { border-bottom: none; }

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

.vp-pending-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vp-pending-meta {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vp-approve-btn {
    background: #2C5F2D;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: opacity 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.vp-approve-btn:hover    { opacity: 0.85; }
.vp-approve-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Suggestions ─────────────────────────────────────────────── */

.vp-suggest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.vp-suggest-item {
    background: #f8f9fa;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    padding: 16px;
}

.vp-suggest-icon  { font-size: 22px; margin-bottom: 6px; }
.vp-suggest-title { font-size: 13px; font-weight: 700; color: #374151; margin-bottom: 4px; }
.vp-suggest-desc  { font-size: 12px; color: #6b7280; line-height: 1.5; }

.vp-soon {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    background: #e5e7eb;
    color: #6b7280;
    border-radius: 999px;
    padding: 2px 8px;
    margin-top: 8px;
}

/* ── Add Member form ─────────────────────────────────────────── */

.vp-add-member-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.vp-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ── Success state ────────────────────────────────────────────── */

.vp-success {
    display: none;
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
}

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

.vp-empty {
    text-align: center;
    padding: 28px 0;
    color: #9ca3af;
    font-size: 13px;
}

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

@media (max-width: 600px) {
    .vp-header          { padding: calc(env(safe-area-inset-top) + 14px) 14px 14px; }
    .vp-header-venue    { display: none; }
    .vp-header-divider  { display: none; }
    .vp-header-portal   { display: none; }
    .vp-card            { padding: 18px 14px; }
    .login-card         { padding: 32px 22px; }
    .vp-perf-table th:nth-child(3),
    .vp-perf-table td:nth-child(3) { display: none; }
    .vp-form-row        { grid-template-columns: 1fr; }
    .vp-activity-table th:first-child { min-width: 120px !important; }
    .vp-activity-table th:not(:first-child) { min-width: 70px !important; }
}

/* ── Roadmap badges ────────────────────────────────────────── */
.vp-soon--shipped {
    background: #dcfce7;
    color: #15803d;
}
.vp-soon--idea {
    background: #ede9fe;
    color: #7c3aed;
}

/* ── Announcement rows ─────────────────────────────────────── */
.vp-ann-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #f3f4f6;
}
.vp-ann-row:last-child { border-bottom: none; }
.vp-ann-content { flex: 1; min-width: 0; }

/* ── Automation timeline ───────────────────────────────────── */
.vp-timeline {
    margin-top: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 12px;
    color: #374151;
}
.vp-tl-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    margin-bottom: 6px;
}
.vp-tl-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    line-height: 1.4;
    flex-wrap: nowrap;
}
.vp-tl-icon  { flex-shrink: 0; width: 18px; text-align: center; }
.vp-tl-label { flex: 1 1 auto; font-weight: 500; white-space: nowrap; }
.vp-tl-time  { flex-shrink: 0; color: #6b7280; white-space: nowrap; }
