/* ========================================
   NINZASMS - PROFESSIONAL DASHBOARD CSS
   File: dashboard.css
   ======================================== */

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

/* CSS Variables */
:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --primary-light: #a3b5f5;
    --secondary: #f59e0b;
    --secondary-dark: #d97706;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1f2937;
    --darker: #111827;
    --gray: #6b7280;
    --gray-light: #9ca3af;
    --gray-lighter: #e5e7eb;
    --light: #f9fafb;
    --white: #ffffff;
    
    --sidebar-width: 280px;
    --header-height: 70px;
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 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.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--light);
    overflow-x: hidden;
    color: var(--dark);
}

/* ========================================
   FIXED SIDEBAR (Left Side)
   ======================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--darker) 0%, #1a1a2e 100%);
    color: white;
    z-index: 1000;
    overflow-y: auto;
    transition: var(--transition);
    box-shadow: var(--shadow-xl);
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

/* Sidebar Logo */
.sidebar-logo {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.sidebar-logo h2 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sidebar-logo span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    display: block;
    margin-top: 5px;
}

/* Wallet Card in Sidebar */
.wallet-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    margin: 0 15px 20px 15px;
    padding: 20px;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.wallet-card .bal {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.wallet-card .bal i {
    font-size: 22px;
    margin-right: 8px;
    color: var(--secondary);
}

.wallet-card button {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.wallet-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3);
}

/* Sidebar Navigation - 33+ Options */
.sidebar-nav {
    padding: 0 10px;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin: 4px 0;
    border-radius: var(--border-radius-sm);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
}

.sidebar-nav .nav-item i {
    width: 22px;
    font-size: 16px;
}

.sidebar-nav .nav-item:hover {
    background: rgba(102, 126, 234, 0.2);
    color: white;
    transform: translateX(5px);
}

.sidebar-nav .nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow);
}

.sidebar-nav .nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 15px 0;
}

.sidebar-nav .nav-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    padding: 15px 16px 8px;
    font-weight: 600;
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

/* Top Header */
.top-header {
    position: sticky;
    top: 0;
    background: var(--white);
    padding: 0 30px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-lighter);
    z-index: 99;
    box-shadow: var(--shadow-sm);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark);
}

/* Header Search */
.header-search {
    display: flex;
    align-items: center;
    background: var(--light);
    border-radius: 40px;
    padding: 8px 16px;
    width: 300px;
}

.header-search i {
    color: var(--gray);
}

.header-search input {
    border: none;
    background: none;
    padding: 0 10px;
    outline: none;
    width: 100%;
    font-family: 'Inter', sans-serif;
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-icon {
    position: relative;
    cursor: pointer;
}

.notification-icon i {
    font-size: 20px;
    color: var(--gray);
    transition: var(--transition);
}

.notification-icon:hover i {
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.user-name {
    font-weight: 600;
    color: var(--dark);
}

/* Page Title */
.page-title {
    padding: 25px 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.page-title h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
}

.page-title h1 i {
    color: var(--primary);
    margin-right: 10px;
}

.date-time {
    color: var(--gray);
    font-size: 14px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    padding: 25px 30px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

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

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.stat-card .stat-icon i {
    font-size: 24px;
    color: var(--primary);
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 5px;
}

.stat-card .stat-label {
    color: var(--gray);
    font-size: 14px;
    font-weight: 500;
}

.stat-card .stat-change {
    margin-top: 10px;
    font-size: 12px;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    padding: 0 30px 30px;
}

.content-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--gray-lighter);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
}

.card-header i {
    color: var(--primary);
    font-size: 20px;
}

.card-body {
    padding: 20px 25px;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 0;
    text-align: left;
    border-bottom: 1px solid var(--gray-lighter);
}

.data-table th {
    font-weight: 600;
    color: var(--gray);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    color: var(--dark);
    font-size: 14px;
}

/* Tabs Style */
.tabs-modern {
    display: flex;
    gap: 5px;
    background: var(--white);
    padding: 20px 25px 0;
    border-bottom: 1px solid var(--gray-lighter);
}

.tab-modern {
    padding: 10px 20px;
    background: none;
    border: none;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
    position: relative;
}

.tab-modern:hover {
    color: var(--primary);
}

.tab-modern.active {
    color: var(--primary);
}

.tab-modern.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

/* Form Fields */
.field-modern {
    margin-bottom: 20px;
}

.field-modern label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 13px;
}

.field-modern label i {
    margin-right: 8px;
    color: var(--primary);
}

.field-modern input,
.field-modern select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-lighter);
    border-radius: var(--border-radius-sm);
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    font-size: 14px;
}

.field-modern input:focus,
.field-modern select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Buttons */
.btn-modern {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
}

/* ========================================
   PROFESSIONAL POPUP
   ======================================== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.popup-container {
    background: var(--white);
    border-radius: 24px;
    max-width: 450px;
    width: 90%;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.popup-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 20px 25px;
    text-align: center;
}

.popup-header i {
    font-size: 48px;
    color: white;
    margin-bottom: 10px;
}

.popup-header h3 {
    color: white;
    font-size: 22px;
    font-weight: 700;
}

.popup-body {
    padding: 25px;
    text-align: center;
}

.popup-body p {
    color: var(--dark);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.popup-body .recaptcha-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.popup-footer {
    padding: 0 25px 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.popup-footer button {
    padding: 12px 28px;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.popup-footer .btn-confirm {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}

.popup-footer .btn-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.popup-footer .btn-cancel {
    background: var(--gray-lighter);
    color: var(--dark);
}

.popup-footer button:hover:not(:disabled) {
    transform: translateY(-2px);
}

/* Flash Message */
.flash-message {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    animation: slideRight 0.3s ease;
    box-shadow: var(--shadow-md);
}

.flash-message.error {
    background: var(--danger);
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* IP List */
.ip-list-modern {
    list-style: none;
    padding: 0;
}

.ip-list-modern li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-lighter);
}

.ip-list-modern li:last-child {
    border-bottom: none;
}

.ip-list-modern .ip-address {
    font-family: monospace;
    font-size: 14px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1001;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        padding: 0 20px 20px;
    }
    
    .page-title {
        padding: 20px 20px 0;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .top-header {
        padding: 0 20px;
    }
    
    .header-search {
        display: none;
    }
    
    .user-name {
        display: none;
    }
}

@media (min-width: 769px) and (max-width: 1280px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dark Mode Support - Optional */
@media (prefers-color-scheme: dark) {
    body.dark-mode {
        background: #1a1a2e;
    }
}




        .flash-message {
            position: fixed;
            top: 80px;
            right: 20px;
            background: #10b981;
            color: white;
            padding: 12px 20px;
            border-radius: 10px;
            z-index: 1000;
            animation: slideIn 0.3s ease;
        }
        @keyframes slideIn {
            from { transform: translateX(100px); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }
        .btn-modern {
            padding: 10px 20px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s;
        }
        .btn-primary { background: linear-gradient(135deg, #667eea, #764ba2); color: white; }
        .btn-success { background: linear-gradient(135deg, #10b981, #059669); color: white; }
        .btn-modern:hover { transform: translateY(-2px); }
        
        /* Notification Dropdown Styles */
        .notification-icon {
            position: relative;
            cursor: pointer;
        }
        .notification-badge {
            position: absolute;
            top: -8px;
            right: -8px;
            background: #ef4444;
            color: white;
            font-size: 10px;
            font-weight: 600;
            padding: 2px 6px;
            border-radius: 20px;
            min-width: 18px;
            text-align: center;
        }
        .notification-dropdown {
            position: absolute;
            top: 35px;
            right: 0;
            width: 320px;
            background: white;
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.15);
            z-index: 1000;
            display: none;
            animation: fadeInDown 0.2s ease;
        }
        .notification-icon:hover .notification-dropdown {
            display: block;
        }
        @keyframes fadeInDown {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .notification-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 15px;
            border-bottom: 1px solid #e5e7eb;
        }
        .notification-header h4 {
            font-size: 14px;
            font-weight: 600;
            color: #1f2937;
            margin: 0;
        }
        .notification-header span {
            color: #667eea;
            font-size: 11px;
            cursor: pointer;
        }
        .notification-list {
            max-height: 350px;
            overflow-y: auto;
        }
        .notification-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 15px;
            border-bottom: 1px solid #f0f0f0;
            transition: background 0.2s;
        }
        .notification-item:hover {
            background: #f9fafb;
        }
        .notification-icon-cir {
            width: 35px;
            height: 35px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
        }
        .notification-icon-cir.warning { background: #fef3c7; color: #f59e0b; }
        .notification-icon-cir.success { background: #d1fae5; color: #10b981; }
        .notification-icon-cir.info { background: #dbeafe; color: #3b82f6; }
        .notification-icon-cir.danger { background: #fee2e2; color: #ef4444; }
        .notification-content {
            flex: 1;
        }
        .notification-content .title {
            font-size: 13px;
            font-weight: 600;
            color: #1f2937;
            margin-bottom: 3px;
        }
        .notification-content .message {
            font-size: 11px;
            color: #6b7280;
        }
        .notification-content .time {
            font-size: 10px;
            color: #9ca3af;
            margin-top: 3px;
        }
        .notification-footer {
            padding: 10px 15px;
            text-align: center;
            border-top: 1px solid #e5e7eb;
            font-size: 11px;
            color: #9ca3af;
        }
        .notification-empty {
            text-align: center;
            padding: 30px;
            color: #9ca3af;
            font-size: 12px;
        }
        @media (max-width: 768px) {
            .notification-dropdown { width: 280px; right: -50px; }
        }
    