/**
 * theme.css — RPOOL.ID Shared Page Styles
 *
 * Extracted from repeated inline <style> blocks across pages.
 * This file centralizes common layout patterns used by non-home pages
 * (profile, membership, payment_history, request_song, etc.)
 *
 * The CSS custom properties are already defined in home.css :root.
 * This file provides shared page-level layout components.
 */

/* ═══════════════════════════════════════
   PAGE CONTAINER — Centered content wrapper
   Used by: profile, membership, payment_history,
            submit_song, request_song, serato, etc.
   ═══════════════════════════════════════ */
.page-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 20px 120px; /* bottom padding for player bar */
    overflow-x: hidden;
}

.page-container.wide {
    max-width: 1200px;
}

.page-container.narrow {
    max-width: 720px;
}

/* ═══════════════════════════════════════
   PAGE HEADER — Title + subtitle block
   ═══════════════════════════════════════ */
.page-header {
    text-align: center;
    margin-bottom: 36px;
}

.page-header h1,
.page-header .page-title {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-1, linear-gradient(135deg, #6c5ce7, #a29bfe));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.page-header p,
.page-header .page-subtitle {
    color: var(--text-secondary, #b8b8cc);
    font-size: 0.9rem;
    margin: 0;
}

/* ═══════════════════════════════════════
   PAGE CARD — Standard dark card box
   ═══════════════════════════════════════ */
.page-card {
    background: var(--bg-card, #1a1a28);
    border: 1px solid var(--border, rgba(255,255,255,0.06));
    border-radius: var(--radius, 16px);
    padding: 28px;
    margin-bottom: 24px;
}

.page-card.compact {
    padding: 20px;
}

.page-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.page-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.page-card-title i {
    color: var(--accent, #6c5ce7);
    font-size: 1.1em;
}

/* ═══════════════════════════════════════
   PAGE TABLE — Styled table inside cards
   ═══════════════════════════════════════ */
.page-table {
    width: 100%;
    border-collapse: collapse;
}

.page-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #6b6b80);
    padding: 10px 12px;
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.06));
}

.page-table td {
    padding: 12px 12px;
    font-size: 0.88rem;
    color: var(--text-primary, #fff);
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.06));
    vertical-align: middle;
}

.page-table tbody tr {
    transition: background 0.15s;
}

.page-table tbody tr:hover {
    background: rgba(108, 92, 231, 0.05);
}

.page-table tbody tr:last-child td {
    border-bottom: none;
}

/* ═══════════════════════════════════════
   FORM ELEMENTS — Inputs, selects, textarea
   ═══════════════════════════════════════ */
.rpool-input,
.page-card input[type="text"],
.page-card input[type="email"],
.page-card input[type="password"],
.page-card input[type="number"],
.page-card input[type="url"],
.page-card input[type="date"],
.page-card select,
.page-card textarea {
    background: var(--bg-secondary, #12121a);
    border: 1px solid var(--border, rgba(255,255,255,0.06));
    border-radius: var(--radius-sm, 10px);
    color: var(--text-primary, #fff);
    padding: 10px 14px;
    font-size: 0.88rem;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rpool-input:focus,
.page-card input:focus,
.page-card select:focus,
.page-card textarea:focus {
    outline: none;
    border-color: var(--accent, #6c5ce7);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.rpool-input::placeholder,
.page-card input::placeholder,
.page-card textarea::placeholder {
    color: var(--text-muted, #6b6b80);
}

.rpool-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary, #b8b8cc);
    margin-bottom: 6px;
}

/* ═══════════════════════════════════════
   BUTTONS — Unified button system
   ═══════════════════════════════════════ */
.btn-rpool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-sm, 10px);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    text-decoration: none;
    line-height: 1.4;
}

.btn-rpool-primary {
    background: var(--gradient-1, linear-gradient(135deg, #6c5ce7, #a29bfe));
    color: #fff;
}

.btn-rpool-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.35);
    color: #fff;
}

.btn-rpool-secondary {
    background: var(--bg-secondary, #12121a);
    color: var(--text-primary, #fff);
    border: 1px solid var(--border, rgba(255,255,255,0.06));
}

.btn-rpool-secondary:hover {
    border-color: var(--accent, #6c5ce7);
    color: var(--accent-light, #a29bfe);
}

.btn-rpool-danger {
    background: var(--danger, #ef4444);
    color: #fff;
}

.btn-rpool-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.btn-rpool-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-rpool-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

/* ═══════════════════════════════════════
   BADGES
   ═══════════════════════════════════════ */
.badge-rpool {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
}

.badge-rpool-accent {
    background: rgba(108, 92, 231, 0.15);
    color: var(--accent-light, #a29bfe);
}

.badge-rpool-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success, #22c55e);
}

.badge-rpool-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning, #f59e0b);
}

.badge-rpool-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger, #ef4444);
}

.badge-rpool-muted {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted, #6b6b80);
}

/* ═══════════════════════════════════════
   EMPTY STATE — No data/results
   ═══════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted, #6b6b80);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-secondary, #b8b8cc);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.88rem;
    margin-bottom: 16px;
}

/* ═══════════════════════════════════════
   STATS ROW — Key stats in a flex row
   ═══════════════════════════════════════ */
.stats-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    flex: 1;
    background: var(--bg-card, #1a1a28);
    border: 1px solid var(--border, rgba(255,255,255,0.06));
    border-radius: var(--radius-sm, 10px);
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-light, #a29bfe);
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted, #6b6b80);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════
   ALERT / NOTICE
   ═══════════════════════════════════════ */
.rpool-alert {
    border-radius: var(--radius-sm, 10px);
    padding: 14px 18px;
    font-size: 0.88rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    border: 1px solid;
}

.rpool-alert-info {
    background: rgba(108, 92, 231, 0.1);
    border-color: rgba(108, 92, 231, 0.2);
    color: var(--accent-light, #a29bfe);
}

.rpool-alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: var(--warning, #f59e0b);
}

.rpool-alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--danger, #ef4444);
}

.rpool-alert-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: var(--success, #22c55e);
}

/* ═══════════════════════════════════════
   TABS — Inline tab navigation
   ═══════════════════════════════════════ */
.rpool-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.06));
    padding-bottom: 0;
    overflow-x: auto;
}

.rpool-tab {
    padding: 10px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted, #6b6b80);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.rpool-tab:hover {
    color: var(--text-secondary, #b8b8cc);
}

.rpool-tab.active {
    color: var(--accent-light, #a29bfe);
    border-bottom-color: var(--accent, #6c5ce7);
}

/* ═══════════════════════════════════════
   SEARCH/FILTER BAR
   ═══════════════════════════════════════ */
.rpool-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.rpool-search-bar input {
    flex: 1;
    background: var(--bg-secondary, #12121a);
    border: 1px solid var(--border, rgba(255,255,255,0.06));
    border-radius: var(--radius-sm, 10px);
    color: var(--text-primary, #fff);
    padding: 10px 14px;
    font-size: 0.88rem;
}

.rpool-search-bar input:focus {
    outline: none;
    border-color: var(--accent, #6c5ce7);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.rpool-search-bar button {
    padding: 10px 18px;
    background: var(--gradient-1, linear-gradient(135deg, #6c5ce7, #a29bfe));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm, 10px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.rpool-search-bar button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.35);
}

/* ═══════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════ */
.rpool-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    padding-top: 16px;
}

.rpool-pagination a,
.rpool-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.rpool-pagination a {
    background: var(--bg-card, #1a1a28);
    color: var(--text-secondary, #b8b8cc);
    border: 1px solid var(--border, rgba(255,255,255,0.06));
}

.rpool-pagination a:hover {
    border-color: var(--accent, #6c5ce7);
    color: var(--accent-light, #a29bfe);
}

.rpool-pagination .active {
    background: var(--accent, #6c5ce7);
    color: #fff;
    border: 1px solid var(--accent);
}

.rpool-pagination .disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* ═══════════════════════════════════════
   MODAL OVERRIDES — Dark theme modals
   ═══════════════════════════════════════ */
.modal-content {
    background: var(--bg-card, #1a1a28) !important;
    border: 1px solid var(--border, rgba(255,255,255,0.06)) !important;
    border-radius: var(--radius, 16px) !important;
    color: var(--text-primary, #fff) !important;
}

.modal-header {
    border-bottom-color: var(--border, rgba(255,255,255,0.06)) !important;
}

.modal-footer {
    border-top-color: var(--border, rgba(255,255,255,0.06)) !important;
}

/* ═══════════════════════════════════════
   LOADING / SKELETON
   ═══════════════════════════════════════ */
@keyframes rpoolShimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255,255,255,0.05) 50%, var(--bg-card) 75%);
    background-size: 200px 100%;
    animation: rpoolShimmer 1.5s infinite;
    border-radius: 6px;
}

/* ═══════════════════════════════════════
   RESPONSIVE — Page container
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
    .page-container {
        padding: 24px 16px 120px;
    }

    .page-header h1,
    .page-header .page-title {
        font-size: 1.5rem;
    }

    .page-card {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .stats-row {
        flex-direction: column;
        gap: 10px;
    }

    .rpool-search-bar {
        flex-direction: column;
    }

    /* Table: horizontal scroll on mobile */
    .page-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .page-table th,
    .page-table td {
        font-size: 0.8rem;
        padding: 8px 10px;
        white-space: nowrap;
    }

    /* Tabs: scrollable, smaller */
    .rpool-tabs {
        gap: 2px;
        -webkit-overflow-scrolling: touch;
    }

    .rpool-tab {
        padding: 8px 14px;
        font-size: 0.82rem;
    }

    /* Pagination: smaller on mobile */
    .rpool-pagination {
        gap: 4px;
        flex-wrap: wrap;
    }

    .rpool-pagination a,
    .rpool-pagination span {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    /* Search bar button */
    .rpool-search-bar button {
        padding: 10px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .page-container {
        padding: 16px 12px 120px;
    }

    .page-header h1,
    .page-header .page-title {
        font-size: 1.3rem;
    }

    .page-card {
        padding: 16px 12px;
    }

    .page-table th,
    .page-table td {
        font-size: 0.75rem;
        padding: 6px 8px;
    }

    .rpool-tab {
        padding: 6px 10px;
        font-size: 0.78rem;
    }

    .rpool-pagination a,
    .rpool-pagination span {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
        border-radius: 6px;
    }
}

/* ═══════════════════════════════════════
   LIGHT THEME OVERRIDES
   ═══════════════════════════════════════ */
html[data-theme="light"] .page-card {
    background: var(--bg-card);
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 2px 12px rgba(108,92,231,0.04), 0 1px 3px rgba(0,0,0,0.03);
}
html[data-theme="light"] .page-card-title {
    color: var(--text-primary);
}
html[data-theme="light"] .page-table th {
    color: var(--text-muted);
    border-bottom-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .page-table td {
    color: var(--text-primary);
    border-bottom-color: rgba(0,0,0,0.06);
}
html[data-theme="light"] .page-table tbody tr:hover {
    background: rgba(108,92,231,0.04);
}
html[data-theme="light"] .rpool-input,
html[data-theme="light"] .page-card input[type="text"],
html[data-theme="light"] .page-card input[type="email"],
html[data-theme="light"] .page-card input[type="password"],
html[data-theme="light"] .page-card input[type="number"],
html[data-theme="light"] .page-card input[type="url"],
html[data-theme="light"] .page-card input[type="date"],
html[data-theme="light"] .page-card select,
html[data-theme="light"] .page-card textarea {
    background: linear-gradient(135deg, #f8f6ff, #f0f0f8);
    border-color: rgba(108,92,231,0.12);
    color: var(--text-primary);
}
html[data-theme="light"] .rpool-input::placeholder,
html[data-theme="light"] .page-card input::placeholder,
html[data-theme="light"] .page-card textarea::placeholder {
    color: #999;
}
html[data-theme="light"] .btn-rpool-secondary {
    background: rgba(0,0,0,0.04);
    color: var(--text-primary);
    border-color: rgba(0,0,0,0.1);
}
html[data-theme="light"] .btn-rpool-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(108,92,231,0.06);
}
html[data-theme="light"] .badge-rpool-muted {
    background: rgba(0,0,0,0.06);
    color: var(--text-muted);
}
html[data-theme="light"] .stat-card {
    background: var(--bg-card);
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 2px 8px rgba(108,92,231,0.04);
}
html[data-theme="light"] .rpool-tabs {
    border-bottom-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .rpool-search-bar input {
    background: linear-gradient(135deg, #f8f6ff, #f0f0f8);
    border-color: rgba(108,92,231,0.12);
    color: var(--text-primary);
}
html[data-theme="light"] .rpool-pagination a {
    background: var(--bg-card);
    color: var(--text-secondary);
    border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .rpool-pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
}
html[data-theme="light"] .modal-content {
    background: linear-gradient(160deg, #ffffff, #f8f6ff) !important;
    border-color: rgba(108,92,231,0.1) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 16px 48px rgba(108,92,231,0.1), 0 8px 24px rgba(0,0,0,0.06) !important;
}
html[data-theme="light"] .modal-header {
    border-bottom-color: rgba(0,0,0,0.08) !important;
}
html[data-theme="light"] .modal-footer {
    border-top-color: rgba(0,0,0,0.08) !important;
}
html[data-theme="light"] .skeleton {
    background: linear-gradient(90deg, rgba(108,92,231,0.08) 25%, rgba(255,255,255,0.5) 50%, rgba(108,92,231,0.08) 75%);
    background-size: 200px 100%;
}
