/* ============================================
   DaPraPagar - Custom Styles
   Only product-specific styles here.
   Everything else comes from the design system CDN.
   ============================================ */

:root {
    --accent: #1D2B4E;
    --accent-light: #E8ECF2;
    --accent-dark: #141E35;
    --accent-glow: rgba(29, 43, 78, 0.10);
}

/* ── Sidebar scroll ── */
.sidebar {
    display: flex;
    flex-direction: column;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden;
}
.sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

/* ── Stats Cards ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    padding: 20px;
}
.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}
.stat-card-label {
    font-size: 13px;
    color: var(--text-secondary, #6b7280);
}

/* ── Member Status Badge ── */
.badge-paid {
    background-color: #dcfce7;
    color: #166534;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-pending {
    background-color: #fef9c3;
    color: #854d0e;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-overdue {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-active {
    background-color: #dcfce7;
    color: #166534;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-inactive {
    background-color: #f3f4f6;
    color: #6b7280;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ── Charge Table ── */
.charge-table {
    width: 100%;
    border-collapse: collapse;
}
.charge-table th,
.charge-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border, #e5e7eb);
    font-size: 14px;
}
.charge-table th {
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.charge-table tr:hover {
    background: var(--accent-light);
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-secondary, #6b7280);
}
.empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}
.empty-state-text {
    font-size: 15px;
    margin-bottom: 16px;
}

/* ── Wizard ── */
.wizard {
    max-width: 480px;
    margin: 60px auto;
    padding: 0 20px;
}
.wizard-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.wizard-subtitle {
    color: var(--text-secondary, #6b7280);
    margin-bottom: 24px;
    font-size: 14px;
}

/* ── Month selector ── */
.month-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.month-selector button {
    background: none;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text, #111);
}
.month-selector button:hover {
    background: var(--accent-light);
    border-color: var(--accent);
}
.month-selector-label {
    font-size: 16px;
    font-weight: 600;
    min-width: 160px;
    text-align: center;
}

/* ── Landing Page (dark theme) ── */
.landing-dark {
    background: #0B0E14;
    color: #fff;
}
.hero {
    padding: 100px 20px 80px;
    background: linear-gradient(135deg, #1D2B4E 0%, #0B0E14 100%);
}
.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}
.hero-left {
    text-align: left;
}
.hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.hero .lead {
    font-size: 1.125rem;
    color: #C9CCD1;
    line-height: 1.7;
    margin-bottom: 28px;
}
.hero-benefits {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 32px;
}
.hero-benefit {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: #D8D8D8;
}
.hero-check {
    color: #E6C15A;
    font-weight: 700;
    font-size: 18px;
}
.hero-buttons {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}
.btn-hero-primary {
    display: inline-block;
    padding: 16px 32px;
    background: #E6C15A;
    color: #1D2B4E;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}
.btn-hero-primary:hover {
    background: #d4ad3a;
    transform: translateY(-1px);
}
.btn-hero-secondary {
    display: inline-block;
    padding: 16px 24px;
    background: transparent;
    color: #D8D8D8;
    border: 1px solid rgba(216, 216, 216, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}
.btn-hero-secondary:hover {
    border-color: #E6C15A;
    color: #E6C15A;
}
.hero-right {
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-coin {
    width: 320px;
    height: 320px;
    filter: drop-shadow(0 0 60px rgba(230, 193, 90, 0.25));
    animation: coinFloat 4s ease-in-out infinite;
    cursor: pointer;
    transition: filter 0.3s;
}
.hero-coin:hover {
    filter: drop-shadow(0 0 80px rgba(230, 193, 90, 0.45));
}
.hero-coin.spin {
    animation: coinSpin 0.8s ease-in-out forwards;
}
.hero-coin.spin-done {
    animation: coinFloat 4s ease-in-out infinite;
}
@keyframes coinFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
@keyframes coinSpin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(720deg); }
}
.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}
.feature-card {
    background: #12161F;
    border: 1px solid #1A1F2E;
    border-radius: 12px;
    padding: 24px;
}
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(230, 193, 90, 0.12);
    color: #E6C15A;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.feature-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.feature-text {
    font-size: 14px;
    color: #8B95A5;
    line-height: 1.6;
}
.btn-landing {
    display: inline-block;
    padding: 16px 32px;
    background: #E6C15A;
    color: #1D2B4E;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}
.btn-landing:hover {
    background: #d4ad3a;
    transform: translateY(-1px);
}
.pricing-section {
    padding: 80px 20px;
    text-align: center;
}
.footer {
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid #1A1F2E;
    color: #8B95A5;
    font-size: 13px;
}

/* ── Navbar landing ── */
.navbar-links {
    display: flex;
    align-items: center;
    gap: 24px;
}
.navbar-links a {
    color: #8B95A5;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}
.navbar-links a:hover { color: #fff; }
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .hero { padding: 60px 20px 40px; }
    .hero-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .hero-left { text-align: center; }
    .hero-benefits { align-items: center; }
    .hero-buttons { justify-content: center; }
    .hero-coin { width: 200px; height: 200px; }
    .hero-right { order: -1; }
    .hero h1 { font-size: 2rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .navbar-links { display: none; }
    .navbar-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(11, 14, 20, 0.98);
        padding: 16px;
        border-bottom: 1px solid #1A1F2E;
    }
    .navbar-toggle { display: block; }
}

/* ── Custom Fee Badge ── */
.badge-custom-fee {
    background-color: #dbeafe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
    white-space: nowrap;
}

/* ── Fee History ── */
.fee-history-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border, #e5e7eb);
    font-size: 13px;
    flex-wrap: wrap;
}
.fee-history-item:last-child { border-bottom: none; }
.fee-history-date {
    color: var(--text-secondary, #6b7280);
    min-width: 80px;
}
.fee-history-label {
    font-weight: 600;
}
.fee-history-change {
    color: var(--accent);
    font-weight: 500;
}

/* ── Championship Tabs ── */
.champ-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border, #e5e7eb);
    margin-bottom: 20px;
}
.champ-tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text-secondary, #6b7280);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}
.champ-tab:hover { color: var(--text, #111); }
.champ-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ── Match Cards ── */
.match-card {
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: box-shadow 0.2s;
}
.match-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-secondary, #6b7280);
}
.match-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 16px;
    font-weight: 700;
}
.match-team {
    flex: 1;
    text-align: center;
}
.match-score {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent);
    min-width: 60px;
    text-align: center;
}
.match-players {
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
    margin-top: 4px;
}
.badge-scheduled {
    background-color: #e0f2fe;
    color: #0369a1;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-finished {
    background-color: #dcfce7;
    color: #166534;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ── Standings Table ── */
.standings-table {
    width: 100%;
    border-collapse: collapse;
}
.standings-table th,
.standings-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid var(--border, #e5e7eb);
    font-size: 14px;
}
.standings-table th {
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.standings-table td:first-child,
.standings-table th:first-child { text-align: center; width: 40px; }
.standings-table td:nth-child(2),
.standings-table th:nth-child(2) { text-align: left; }
.standings-table tr:hover { background: var(--accent-light); }
.standings-pos { font-weight: 800; color: var(--accent); }
.standings-name { font-weight: 600; }

/* ── Team Selection Grid ── */
.team-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.team-column {
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    padding: 16px;
}
.team-column h4 {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 700;
}
.team-member-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 14px;
}
.team-member-check input[type="checkbox"] {
    accent-color: var(--accent);
}
.score-input-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 16px 0;
}
.score-input {
    width: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    padding: 8px;
    border: 2px solid var(--border, #e5e7eb);
    border-radius: 8px;
}
.score-input:focus {
    border-color: var(--accent);
    outline: none;
}
.score-x {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-secondary, #6b7280);
}

/* ── Championship selector ── */
.champ-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.champ-selector select {
    flex: 1;
    min-width: 200px;
}

@media (max-width: 768px) {
    .team-grid { grid-template-columns: 1fr; }
}

/* ── Group Selector ── */
#group-selector .group-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text, #111);
    padding: 6px 0;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#group-selector select {
    width: 100%;
    font-size: 13px;
}
#group-selector .btn-new-group {
    display: block;
    width: 100%;
    margin-top: 6px;
    font-size: 12px;
    padding: 4px 8px;
    text-align: center;
    border: 1px dashed var(--border, #e5e7eb);
    border-radius: 6px;
    background: none;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
#group-selector .btn-new-group:hover {
    border-color: var(--accent);
    color: var(--accent);
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .charge-table th:nth-child(3),
    .charge-table td:nth-child(3) { display: none; }
    .standings-table th:nth-child(4),
    .standings-table td:nth-child(4),
    .standings-table th:nth-child(5),
    .standings-table td:nth-child(5) { display: none; }
}
