/* =========================================================
   CF FACEBOOK LIVE - WEB ADMIN DASHBOARD STYLESHEET
   Design: Cyber Dark Luxury / Glassmorphic UI
   Fonts: Outfit & Inter
   ========================================================= */

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

:root {
    --bg-main: #090D16;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-card-solid: #0F172A;
    --bg-card-hover: rgba(30, 41, 59, 0.7);
    --border-color: rgba(51, 65, 85, 0.6);
    --border-glow: rgba(56, 189, 248, 0.4);
    
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --primary-glow: rgba(37, 99, 235, 0.35);

    --cyan: #38BDF8;
    --cyan-glow: rgba(56, 189, 248, 0.25);
    
    --gold: #F59E0B;
    --gold-glow: rgba(245, 158, 11, 0.25);
    
    --green: #10B981;
    --green-glow: rgba(16, 185, 129, 0.25);
    
    --purple: #818CF8;
    --purple-glow: rgba(129, 140, 248, 0.25);
    
    --red: #EF4444;
    --red-glow: rgba(239, 68, 68, 0.25);

    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-color);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(245, 158, 11, 0.05) 0%, transparent 40%);
}

/* Header & Navbar */
.navbar {
    height: 70px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    font-size: 24px;
    background: linear-gradient(135deg, #F59E0B, #EF4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #FFFFFF, #94A3B8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text p {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.db-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34D399;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 600;
}

.db-dot {
    width: 8px;
    height: 8px;
    background-color: #34D399;
    border-radius: 50%;
    box-shadow: 0 0 8px #34D399;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Layout Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 24px;
    width: 100%;
    flex: 1;
}

/* KPI Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s, border-color 0.2s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-glow);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.kpi-card.gold::before { background: linear-gradient(90deg, #F59E0B, #FBBF24); }
.kpi-card.green::before { background: linear-gradient(90deg, #10B981, #34D399); }
.kpi-card.red::before { background: linear-gradient(90deg, #EF4444, #F87171); }
.kpi-card.purple::before { background: linear-gradient(90deg, #818CF8, #A78BFA); }

.kpi-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.kpi-val {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: #FFFFFF;
}

/* Action Toolbar */
.toolbar {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    box-shadow: var(--shadow-card);
}

.search-box {
    display: flex;
    align-items: center;
    background: #090D16;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    height: 42px;
    flex: 1;
    min-width: 260px;
    max-width: 440px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
    border-color: var(--cyan);
    box-shadow: 0 0 0 2px var(--cyan-glow);
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: #FFFFFF;
    font-size: 13px;
    width: 100%;
    margin-left: 8px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.select-ctrl {
    height: 42px;
    background: #090D16;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.select-ctrl:focus {
    border-color: var(--cyan);
}

/* Buttons */
.btn {
    height: 42px;
    padding: 0 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #FFFFFF;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #10B981, #059669);
    color: #FFFFFF;
    box-shadow: 0 4px 12px var(--green-glow);
}

.btn-success:hover {
    background: linear-gradient(135deg, #34D399, #10B981);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-secondary);
}

.btn-sm {
    height: 30px;
    padding: 0 10px;
    font-size: 11.5px;
    border-radius: 4px;
}

/* Data Table Card */
.table-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

thead {
    background: #090D16;
    border-bottom: 1px solid var(--border-color);
}

th {
    padding: 14px 16px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 14px 16px;
    font-size: 12.5px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
    vertical-align: middle;
}

tbody tr:hover {
    background-color: var(--bg-card-hover);
}

/* Plan Badges */
.badge-plan {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
}

.badge-plan.vip {
    background: rgba(245, 158, 11, 0.16);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.5);
}

.badge-plan.ultra {
    background: rgba(129, 140, 248, 0.16);
    color: #A78BFA;
    border: 1px solid rgba(129, 140, 248, 0.5);
}

.badge-plan.max {
    background: rgba(56, 189, 248, 0.16);
    color: #38BDF8;
    border: 1px solid rgba(56, 189, 248, 0.5);
}

.badge-plan.pro {
    background: rgba(16, 185, 129, 0.16);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.5);
}

.badge-plan.free {
    background: rgba(148, 163, 184, 0.16);
    color: #CBD5E1;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

/* Status Badges */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
}

.badge-status.active {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
}

.badge-status.banned {
    background: rgba(239, 68, 68, 0.15);
    color: #F87171;
}

.badge-status.expired {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
}

.key-code {
    font-family: 'Consolas', monospace;
    font-weight: 700;
    color: #38BDF8;
    background: rgba(56, 189, 248, 0.08);
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.hwid-text {
    font-family: 'Consolas', monospace;
    font-size: 11px;
    color: #94A3B8;
}

.hwid-bound {
    color: #34D399;
    font-weight: 700;
}

/* Action Buttons In Table */
.action-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-action {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-action:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-action.edit:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: #818CF8;
    color: #C7D2FE;
}

.btn-action.unlock:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38BDF8;
    color: #38BDF8;
}

.btn-action.extend:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10B981;
    color: #34D399;
}

.btn-action.ban:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #EF4444;
    color: #F87171;
}

.btn-action.del:hover {
    background: #DC2626;
    border-color: #DC2626;
    color: #FFFFFF;
}

/* Tabs */
.tabs-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
    color: var(--cyan);
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Modal Overlay & Card */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: #0F172A;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(37, 99, 235, 0.2);
    overflow: hidden;
    animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 800;
    color: var(--cyan);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
}

.modal-close:hover {
    color: #FFFFFF;
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
}

.form-input {
    background: #090D16;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    height: 40px;
    padding: 0 12px;
    color: #FFFFFF;
    font-size: 13px;
    outline: none;
}

.form-input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 2px var(--cyan-glow);
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #34D399;
    cursor: pointer;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: #090D16;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
}

.toast {
    background: #0F172A;
    border: 1px solid var(--border-color);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlide 0.3s ease-out;
}

.toast.success { border-left: 4px solid #10B981; color: #34D399; }
.toast.error { border-left: 4px solid #EF4444; color: #F87171; }
.toast.info { border-left: 4px solid #38BDF8; color: #38BDF8; }

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar { padding: 0 16px; }
    .container { padding: 16px 12px; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .search-box { max-width: 100%; }
}
