@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@400;500;600&display=swap');

/* ============================================
   PLAYGO FINANCE - PREMIUM DESIGN SYSTEM
   ============================================ */

/* Root Variables */
:root {
    --primary-gold: #F7C04A;
    --gold-dark: #D39D35;
    --gold-glow: rgba(247, 192, 74, 0.2);
    --bg-primary: #090B10;
    --bg-secondary: rgba(18, 22, 33, 0.65);
    --bg-tertiary: rgba(28, 35, 51, 0.85);
    --text-primary: #ffffff;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(247, 192, 74, 0.3);
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-gold: 0 0 20px var(--gold-glow);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-blur: blur(16px);
}

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

html, body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(247, 192, 74, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

body {
    overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-gold);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    color: var(--primary-gold);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #FFF2C8;
    text-shadow: 0 0 8px rgba(247, 192, 74, 0.4);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn,
button:not([class*="close"]),
.gold-btn,
input[type="submit"] {
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.btn-primary,
.gold-btn {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--gold-dark) 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(247, 192, 74, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover,
.gold-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(247, 192, 74, 0.4);
    filter: brightness(1.1);
}

.btn-primary:active,
.gold-btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-gold);
    color: var(--primary-gold);
}

button:disabled,
button:disabled:hover {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    filter: grayscale(1);
    box-shadow: none;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    backdrop-filter: var(--glass-blur);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-gold);
    background: rgba(247, 192, 74, 0.05);
    box-shadow: 0 0 0 4px rgba(247, 192, 74, 0.1);
}

/* ============================================
   GLASSMORPHISM CARDS
   ============================================ */
.card,
.card-box,
.stat-item,
.node-card {
    background: var(--bg-secondary);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.card::before,
.stat-item::before,
.node-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
    pointer-events: none;
}

.card:hover,
.card-box:hover,
.stat-item:hover,
.node-card:hover {
    border-color: var(--border-highlight);
    box-shadow: var(--shadow-lg), var(--shadow-gold);
    transform: translateY(-4px);
    background: rgba(22, 28, 45, 0.8);
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
.dashboard-container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, rgba(18, 22, 33, 0.7) 0%, rgba(9, 11, 16, 0.9) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(247, 192, 74, 0.25);
    border-bottom: 1px solid rgba(247, 192, 74, 0.1);
    box-shadow: 10px 10px 40px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(247, 192, 74, 0.03);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: calc(100vh - 40px);
    top: 20px;
    left: 20px;
    border-radius: 24px;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding: 0 10px;
}

.logo-circle {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--gold-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #000;
    font-size: 1.4rem;
    box-shadow: 0 4px 15px rgba(247, 192, 74, 0.3);
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 10px;
    border-radius: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 1.05rem;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(247, 192, 74, 0.15) 0%, transparent 100%);
    transition: var(--transition);
    z-index: 0;
}

.nav-item:hover::before,
.nav-item.active::before {
    width: 100%;
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary-gold);
    transform: translateX(6px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--gold-dark) 100%);
    color: #000;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(247, 192, 74, 0.35), inset 0 2px 4px rgba(255,255,255,0.4);
    border: none;
    transform: translateX(6px);
}

.nav-item.active i {
    color: #000;
}

.nav-item.active::before {
    display: none;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.nav-item i, .nav-item span {
    position: relative;
    z-index: 1;
}

.nav-item i {
    width: 22px;
    text-align: center;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.nav-item:hover i {
    transform: scale(1.15);
}

.main-content {
    flex: 1;
    margin-left: 320px;
    padding: 40px;
    overflow-y: auto;
}

/* ============================================
   DASHBOARD HEADER
   ============================================ */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px 30px;
    background: var(--bg-secondary);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.mobile-logo {
    display: none;
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 350px;
}

.search-container input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid transparent;
    padding-left: 44px;
    border-radius: 20px;
}

.search-container::before {
    content: '\f002';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.icon-btn:hover {
    background: var(--border-color);
    color: var(--primary-gold);
}

.notification-dropdown {
    position: absolute;
    top: 70px;
    right: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    width: 280px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    display: none;
    z-index: 100;
    text-align: left;
}

.notification-dropdown.active {
    display: block;
}

.notification-header {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.notification-item {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 8px 0;
}

.avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--gold-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: 700;
    font-size: 1.2rem;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(247, 192, 74, 0.3);
}

/* ============================================
   TABLES
   ============================================ */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

thead {
    background: rgba(0, 0, 0, 0.2);
}

th {
    padding: 16px;
    text-align: left;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.4;
    white-space: nowrap;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   MODALS
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-primary);
    background-image: radial-gradient(circle at top right, rgba(247, 192, 74, 0.1), transparent 50%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    animation: slideUp 0.3s ease-out forwards;
}

@keyframes slideUp {
    to { transform: translateY(0); }
}

/* ============================================
   UTILITY CLASSES & RESPONSIVE
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 20px 10px;
    }
    .logo-text, .nav-item span {
        display: none;
    }
    .main-content {
        margin-left: 80px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        top: auto;
        width: 100%;
        height: 70px;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 0;
        border-radius: 20px 20px 0 0;
        border: none;
        border-top: 1px solid rgba(247, 192, 74, 0.3);
        background: linear-gradient(0deg, rgba(9, 11, 16, 0.98) 0%, rgba(18, 22, 33, 0.95) 100%);
        z-index: 1000;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    }

    .sidebar .logo {
        display: none;
    }

    .sidebar nav {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        align-items: center;
        height: 100%;
    }

    .nav-item {
        flex-direction: column;
        margin: 0 !important;
        padding: 8px 0;
        gap: 4px;
        flex: 1;
        justify-content: center;
        border-radius: 12px;
        background: transparent !important;
        box-shadow: none !important;
    }

    .nav-item i {
        font-size: 1.2rem;
        margin: 0 auto;
    }

    .nav-item span {
        display: block !important;
        font-size: 0.65rem;
        text-align: center;
    }

    .nav-item.active {
        transform: translateY(-5px);
        color: var(--primary-gold) !important;
    }

    .nav-item.active i {
        color: var(--primary-gold) !important;
    }

    .nav-item:hover, .nav-item.active {
        transform: translateY(-5px);
    }

    .nav-item::before {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        padding: 20px 15px 90px 15px;
    }

    .dashboard-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 15px;
        flex-wrap: wrap;
        padding: 15px;
        border-radius: 16px;
    }

    .mobile-logo {
        display: block !important;
        flex: 1;
    }

    .mobile-logo img {
        height: 36px;
        width: auto;
    }

    .search-container {
        display: none;
    }

    .header-actions {
        order: 2;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 16px !important;
    }
    
    .profile-pic-wrapper {
        margin: 0 auto;
        flex-shrink: 0;
    }
    
    .data-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        display: block;
    }

    .data-table-container table {
        min-width: 800px !important;
        width: 100%;
    }
}
