/* ============================================
   DASHBOARD.CSS
   Theme: Black Background, Green Buttons,
   White & Gold Text
   Version: 2.0.0 - FIXED
   ============================================ */

/* ---------- ROOT VARIABLES ---------- */
:root {
    --bg-primary: #0b0b0b;
    --bg-card: #161616;
    --bg-card-hover: #1f1f1f;
    --bg-input: #1a1a1a;
    
    --btn-bg: #2b7a3a;
    --btn-hover: #3a9e4d;
    --btn-shadow: rgba(43, 122, 58, 0.3);
    --btn-active: #1f6a2e;
    
    --text-white: #f5f0e8;
    --text-gold: #e6c87a;
    --text-muted: #a8a08b;
    --text-dark: #d0c8b8;
    
    --border-subtle: #2a2a2a;
    --border-card: #242424;
    
    --shadow-card: 0 10px 25px -8px rgba(0, 0, 0, 0.8);
    --shadow-hover: 0 15px 35px -10px rgba(0, 0, 0, 0.9);
    --shadow-btn: 0 4px 12px rgba(43, 122, 58, 0.3);
    
    --radius-card: 20px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --radius-full: 9999px;
    
    --transition: all 0.25s ease;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
    background: var(--bg-primary);
    color: var(--text-white);
    font-family: var(--font-family);
    padding: 12px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- DASHBOARD CONTAINER ---------- */
.dashboard-container {
    max-width: 1360px;
    width: 100%;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: 24px;
    padding: 16px;
}

/* ---------- CARDS ---------- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-card);
    transition: var(--transition);
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--text-gold), transparent);
    opacity: 0.3;
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: #333;
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-white);
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--btn-bg);
    color: #ffffff;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    border: none;
    font-size: 0.85rem;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    box-shadow: var(--shadow-btn);
}

.btn:hover {
    background: var(--btn-hover);
    transform: scale(1.02);
    box-shadow: 0 8px 20px var(--btn-shadow);
    color: #fff;
}

.btn:active {
    transform: scale(0.97);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--btn-bg);
    color: var(--btn-bg);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--btn-bg);
    color: #fff;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.7rem;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 1rem;
}

/* ---------- TEXT UTILITIES ---------- */
.text-gold { color: var(--text-gold) !important; }
.text-white { color: var(--text-white) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }
.text-uppercase { text-transform: uppercase !important; }
.text-capitalize { text-transform: capitalize !important; }

/* ---------- BADGES ---------- */
.badge {
    background: #1f2a1f;
    color: var(--text-gold);
    padding: 3px 12px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #2a3a2a;
}

.badge-green {
    background: #1a2a1a;
    color: #8fc99f;
    border-color: #2a4a2a;
}
.badge-yellow {
    background: #2a2a1a;
    color: #e6c87a;
    border-color: #3a3a2a;
}
.badge-blue {
    background: #1a1a2a;
    color: #7ab8d4;
    border-color: #2a2a4a;
}
.badge-gray {
    background: #1a1a1a;
    color: #888;
    border-color: #2a2a2a;
}
.badge-red {
    background: #2a1a1a;
    color: #d97a7a;
    border-color: #3a2a2a;
}
.badge-purple {
    background: #1a1a2a;
    color: #b08fd4;
    border-color: #2a2a4a;
}

/* ---------- ICON CIRCLE ---------- */
.icon-circle {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: #1f2a1f;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gold);
    flex-shrink: 0;
    border: 1px solid #2a3a2a;
}

.icon-circle-sm {
    width: 36px;
    height: 36px;
    font-size: 1rem;
}
.icon-circle-lg {
    width: 56px;
    height: 56px;
    font-size: 1.8rem;
}

/* ---------- GRID LAYOUTS ---------- */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

/* ---------- FLEX HELPERS ---------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }

/* ---------- SPACING ---------- */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }

.p-0 { padding: 0; }
.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }

/* ---------- TYPOGRAPHY ---------- */
.text-xs { font-size: 0.65rem; }
.text-sm { font-size: 0.85rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.2rem; }
.text-xl { font-size: 1.5rem; }
.text-2xl { font-size: 1.8rem; }
.text-3xl { font-size: 2.2rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* ---------- BORDERS ---------- */
.border { border: 1px solid var(--border-subtle); }
.border-2 { border-width: 2px; }
.border-bottom { border-bottom: 1px solid var(--border-subtle); }
.border-gold { border-color: var(--text-gold); }
.border-green { border-color: var(--btn-bg); }
.rounded { border-radius: var(--radius-xs); }
.rounded-lg { border-radius: var(--radius-sm); }
.rounded-xl { border-radius: 16px; }
.rounded-2xl { border-radius: var(--radius-card); }
.rounded-full { border-radius: var(--radius-full); }

/* ---------- PROGRESS BAR ---------- */
.progress {
    background: #2a2a2a;
    border-radius: var(--radius-full);
    height: 5px;
    overflow: hidden;
    width: 100%;
}

.progress-lg { height: 8px; }
.progress-sm { height: 3px; }

.progress-fill {
    background: var(--btn-bg);
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill-gold {
    background: linear-gradient(90deg, var(--text-gold), #d4b87a);
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ---------- TIMER BOX ---------- */
.timer-box {
    background: #1a1a1a;
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    min-width: 55px;
    text-align: center;
    border: 1px solid #2d2d2d;
}

.timer-box .number {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-gold);
    line-height: 1.2;
}

.timer-box .label {
    font-size: 0.55rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---------- ALERT ---------- */
.alert {
    padding: 12px 16px;
    border-radius: 14px;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-left-width: 4px;
    border-left-style: solid;
}

.alert-danger {
    background: #1a0f0f;
    border-left-color: #b33a3a;
    color: #f0d0c0;
}
.alert-success {
    background: #0f1a0f;
    border-left-color: #4a9a5a;
    color: #c0e0c0;
}
.alert-warning {
    background: #1a1a0f;
    border-left-color: #d4b050;
    color: #e0d0a0;
}
.alert-info {
    background: #0f1a1a;
    border-left-color: #5a9ab8;
    color: #a0d0e0;
}

/* ---------- QUICK ACTION ---------- */
.quick-action {
    background: #141414;
    border: 1px solid #242424;
    border-radius: var(--radius-sm);
    padding: 12px 6px;
    text-align: center;
    text-decoration: none;
    color: var(--text-white);
    transition: var(--transition);
    cursor: pointer;
    display: block;
}

.quick-action:hover {
    background: #1f1f1f;
    border-color: var(--btn-bg);
    transform: translateY(-2px);
}

.quick-action .icon {
    font-size: 1.4rem;
    color: var(--text-gold);
    display: block;
    margin-bottom: 3px;
}

.quick-action .label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* ---------- RECENT EARNINGS ---------- */
.earnings-list {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.earnings-list::-webkit-scrollbar {
    width: 3px;
}
.earnings-list::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 10px;
}
.earnings-list::-webkit-scrollbar-thumb {
    background: var(--btn-bg);
    border-radius: 10px;
}

.earning-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #1e1e1e;
}

.earning-item:last-child {
    border-bottom: none;
}

.earning-item .type {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-white);
}
.earning-item .time {
    font-size: 0.65rem;
    color: var(--text-muted);
}
.earning-item .amount {
    font-weight: 700;
    color: #8fc99f;
}

/* ---------- MATRIX NODE ---------- */
.matrix-node {
    padding: 6px 4px;
    text-align: center;
    border-radius: var(--radius-full);
    background: #1a1a1a;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    flex: 1;
    border: 1px solid transparent;
}

.matrix-node.active {
    background: #1a2a1a;
    color: var(--text-gold);
    border-color: #2a4a2a;
}
.matrix-node.inactive {
    background: #121212;
    color: #555;
}

/* ---------- STATS CARD ---------- */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 16px;
    border: 1px solid var(--border-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--text-gold);
    opacity: 0.5;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.stat-card .stat-icon {
    font-size: 1.6rem;
    color: var(--text-gold);
    opacity: 0.7;
}
.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-white);
    margin-top: 3px;
}
.stat-card .stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-card .stat-sub {
    font-size: 0.55rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---------- GLOBAL POOL ---------- */
.pool-status {
    border-radius: var(--radius-sm);
    padding: 14px;
    border: 1px solid var(--border-subtle);
}

.pool-status.qualified {
    background: #0f1a0f;
    border-color: #2a4a2a;
}
.pool-status.in-progress {
    background: #1a1a0f;
    border-color: #3a3a2a;
}
.pool-status.not-qualified {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

/* ============================================================ */
/* ====== NEWS TICKER - NORMAL SPEED (READABLE) ====== */
/* ============================================================ */

@keyframes marquee-slow {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.animate-marquee-slow {
    animation: marquee-slow 65s linear infinite;
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
}

/* ============================================================ */
/* ====== MOBILE RESPONSIVE ====== */
/* ============================================================ */

/* Tablets & Small Laptops */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }
    .grid-5 {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .dashboard-container {
        padding: 12px;
    }
    .card {
        padding: 14px;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }
    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }
    .grid-5 {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .card {
        padding: 12px;
        margin-bottom: 12px;
    }
    .text-2xl {
        font-size: 1.3rem;
    }
    .text-xl {
        font-size: 1.1rem;
    }
    .timer-box {
        min-width: 45px;
        padding: 3px 6px;
    }
    .timer-box .number {
        font-size: 1.1rem;
    }
    .stat-card .stat-value {
        font-size: 1.3rem;
    }
    .icon-circle {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    .btn {
        padding: 6px 14px;
        font-size: 0.75rem;
    }
    .dashboard-container {
        padding: 8px;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    body {
        padding: 6px;
    }
    .dashboard-container {
        padding: 6px;
        border-radius: 16px;
    }
    .card {
        padding: 10px;
        margin-bottom: 10px;
        border-radius: 14px;
    }
    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }
    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }
    .grid-5 {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .text-2xl {
        font-size: 1.1rem;
    }
    .text-lg {
        font-size: 0.95rem;
    }
    .stat-card .stat-value {
        font-size: 1.1rem;
    }
    .icon-circle {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
    .timer-box {
        min-width: 38px;
        padding: 2px 5px;
    }
    .timer-box .number {
        font-size: 0.95rem;
    }
    .timer-box .label {
        font-size: 0.45rem;
    }
    .btn {
        padding: 5px 12px;
        font-size: 0.7rem;
    }
    .quick-action {
        padding: 8px 4px;
    }
    .quick-action .icon {
        font-size: 1.1rem;
    }
    .quick-action .label {
        font-size: 0.6rem;
    }
    .badge {
        font-size: 0.55rem;
        padding: 2px 8px;
    }
    .card-title {
        font-size: 0.9rem;
    }
    .card-header {
        gap: 8px;
        margin-bottom: 10px;
    }
}

/* ---------- LAPTOP ENHANCEMENTS ---------- */
@media (min-width: 1024px) {
    .dashboard-container {
        padding: 28px;
    }
    .card {
        padding: 22px;
        margin-bottom: 20px;
    }
    .grid-2 {
        gap: 22px;
    }
    .grid-4 {
        gap: 18px;
    }
    .grid-5 {
        gap: 14px;
    }
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--btn-bg);
}

/* ---------- SELECTION ---------- */
::selection {
    background: var(--btn-bg);
    color: #fff;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}