/* assets/css/style.css */
:root {
    --bg-dark: #121212;
    --card-bg: #1e1e1e;
    --card-bg-hover: #252525;
    --accent: #FFC107;
    /* Vibrant Gold/Yellow from reference */
    --accent-hover: #ffca2c;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --danger: #ff5252;
    --success: #69f0ae;
    /* Brighter success green */
    --radius-lg: 16px;
    --radius-sm: 8px;
    --whatsapp: #25D366;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin-bottom: 80px;
    /* More space for potential bottom nav */
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    background-color: var(--card-bg-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 193, 7, 0.3);
    /* Subtle gold border on hover */
}

/* ==========================================================================
   BUTTON SYSTEM REDESIGN (Senior UI/UX)
   Force all .btn to Filled, Premium Animation & Feedback
   ========================================================================== */

/* 1. Base Reset & Layout */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent !important;
    /* Force solid border foundation */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn-sm {
    padding: 5px 12px !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.3px;
}

/* 2. Global Feedback & States (Non-disabled) */
.btn:not(:disabled):not(.disabled):not(.keep-outline) {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Hover: Lift + Brightness */
.btn:not(:disabled):not(.disabled):not(.keep-outline):hover {
    transform: translateY(-2px);
    filter: brightness(1.1) contrast(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* Active: Press + Darker */
.btn:not(:disabled):not(.disabled):not(.keep-outline):active,
.btn:not(:disabled):not(.disabled):not(.keep-outline).active {
    transform: translateY(1px) scale(0.96);
    filter: brightness(0.9);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.05s linear;
}

/* Focus: Accessibility Ring */
.btn:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px var(--bg-dark), 0 0 0 5px var(--accent) !important;
}

/* Disabled State */
.btn:disabled,
.btn.disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    transform: none !important;
    filter: grayscale(1) !important;
    box-shadow: none !important;
}

/* 3. Color Maps & Forced Filled Styles (Direct & Outlines) */

/* General Primary (Gold) */
.btn-primary,
.btn-outline-primary:not(.keep-outline) {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #000 !important;
}

/* Warning (Same as accent usually) */
.btn-warning,
.btn-outline-warning:not(.keep-outline) {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #000 !important;
}

/* Danger (Red) */
.btn-danger,
.btn-outline-danger:not(.keep-outline) {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
    color: #fff !important;
}

/* Success (Green) */
.btn-success,
.btn-outline-success:not(.keep-outline) {
    background-color: var(--success) !important;
    border-color: var(--success) !important;
    color: #000 !important;
}

/* Info (Cyan/Blue) */
.btn-info,
.btn-outline-info:not(.keep-outline) {
    background-color: #0dcaf0 !important;
    border-color: #0dcaf0 !important;
    color: #000 !important;
}

/* Secondary (Grey) */
.btn-secondary,
.btn-outline-secondary:not(.keep-outline) {
    background-color: #444 !important;
    border-color: #444 !important;
    color: #fff !important;
}

/* Blue for specific Promotions (Match Icon Primary) */
.btn-fidelidad-blue {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(13, 110, 253, 0.3) !important;
}

.btn-fidelidad-blue:hover {
    background-color: #0b5ed7 !important;
    border-color: #0a58ca !important;
}

/* Rakeback Orange */
.btn-rakeback-orange {
    background-color: #ff860f !important;
    border-color: #ff860f !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(255, 134, 15, 0.3) !important;
}

.btn-rakeback-orange:hover {
    background-color: #e67500 !important;
    border-color: #cc6800 !important;
}

.bg-rakeback-orange {
    background-color: rgba(255, 134, 15, 1) !important;
}

/* For the icon circle background with opacity */
.bg-rakeback-orange.bg-opacity-25 {
    background-color: rgba(255, 134, 15, 0.25) !important;
}

.text-rakeback-orange {
    color: #ff860f !important;
}

/* Light / Outline Light */
.btn-outline-light:not(.keep-outline) {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

/* 4. Exceptions */
.keep-outline {
    background-color: transparent !important;
    border: 1px solid currentColor !important;
}

/* Inputs & Forms */
.form-control,
.form-select {
    background-color: #2c2c2c;
    border: 1px solid #444;
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 12px;
}

.form-control:focus,
.form-select:focus {
    background-color: #333;
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.25);
}

/* Navbar */
.navbar {
    background-color: rgba(30, 30, 30, 0.95) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
    padding-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -1px;
}

.filter-options-scroll::-webkit-scrollbar {
    width: 6px;
}

.filter-options-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.filter-options-scroll::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

.filter-options-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary) !important;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: #fff !important;
}

/* Tables in Admin */
.table-dark {
    --bs-table-bg: transparent;
    color: var(--text-secondary);
}

.table-dark th {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.table-dark td {
    border-bottom-color: rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

/* Badges */
.badge {
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 600;
}

/* Utilities */
.text-accent {
    color: var(--accent);
}

.text-whatsapp {
    color: var(--whatsapp) !important;
}

.player-name {
    color: #ffffff !important;
}

.player-code {
    color: var(--accent) !important;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .container-fluid {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }
}

/* Specific UI updates from images */
.status-active-card {
    border: 1px solid var(--success) !important;
    box-shadow: 0 0 20px rgba(105, 240, 174, 0.15) !important;
}

.session-timer {
    font-family: 'Monaco', 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: -1px;
}