/* ================================================
   API Platform Admin - Cyberpunk Glassmorphism
   ================================================ */

/* CSS Variables - Design Tokens */
:root {
    /* Primary Colors */
    --primary-purple: #8b5cf6;
    --primary-cyan: #00ffff;
    --primary-pink: #ec4899;
    --primary-blue: #3b82f6;
    --primary-green: #10b981;
    --primary-orange: #f59e0b;
    --primary-red: #ef4444;
    
    /* Background Colors */
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --bg-card: rgba(15, 20, 35, 0.75);
    --bg-card-hover: rgba(25, 30, 50, 0.85);
    --bg-sidebar: rgba(10, 12, 20, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.03);
    
    /* Border Colors */
    --border-glow: rgba(139, 92, 246, 0.4);
    --border-cyan: rgba(0, 255, 255, 0.3);
    --border-glass: rgba(255, 255, 255, 0.08);
    
    /* Text Colors */
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
    --gradient-cyan: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
    --gradient-pink: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-error: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-border: linear-gradient(135deg, rgba(139, 92, 246, 0.6), rgba(0, 255, 255, 0.3), rgba(236, 72, 153, 0.4));
    
    /* Shadows & Glows */
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.4);
    --shadow-cyan: 0 0 30px rgba(0, 255, 255, 0.3);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-lift: 0 25px 60px rgba(0, 0, 0, 0.4);
    
    /* Spacing & Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Typography */
    --font-display: 'Orbitron', 'Fira Code', monospace;
    --font-body: 'Exo 2', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Cyberpunk Grid Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Ambient Glow Effects */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 10% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 80%, rgba(0, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(236, 72, 153, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ================================================
   Glass Card Component
   ================================================ */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: var(--gradient-border);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.5;
    transition: opacity var(--transition-normal);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift), var(--shadow-glow);
    border-color: var(--border-glow);
}

.glass-card:hover::before {
    opacity: 1;
}

/* HUD Corner Decorations */
.hud-corners {
    position: relative;
}

.hud-corners::before,
.hud-corners::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-cyan);
    opacity: 0.6;
    pointer-events: none;
}

.hud-corners::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: var(--radius-md);
}

.hud-corners::after {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: var(--radius-md);
}

/* ================================================
   Login Page
   ================================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

/* Floating Orbs */
.login-container::before {
    content: '';
    position: absolute;
    top: -150px;
    left: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
    filter: blur(80px);
    animation: orbFloat1 15s ease-in-out infinite;
}

.login-container::after {
    content: '';
    position: absolute;
    bottom: -150px;
    right: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.3) 0%, transparent 70%);
    filter: blur(80px);
    animation: orbFloat2 12s ease-in-out infinite reverse;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(80px, 60px) scale(1.1); }
    66% { transform: translate(40px, 100px) scale(0.95); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-60px, -80px) scale(1.15); }
    66% { transform: translate(-100px, -40px) scale(0.9); }
}

/* Scanline Effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.03) 0px,
        rgba(0, 0, 0, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
}

.login-box {
    position: relative;
    z-index: 10;
    background: var(--bg-card);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 56px 48px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-card), 0 0 80px rgba(139, 92, 246, 0.2);
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: var(--gradient-border);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.6;
}

.login-box .logo {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.login-box .logo h1 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    text-shadow: 0 0 50px rgba(139, 92, 246, 0.6);
    letter-spacing: 2px;
}

.login-box .logo p {
    color: var(--text-secondary);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Form Styling */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(30, 30, 50, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-body);
    transition: all var(--transition-normal);
    outline: none;
    backdrop-filter: blur(10px);
}

.form-group input:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2), var(--shadow-glow);
    background: rgba(30, 30, 50, 0.9);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* Neon Button */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-top: 16px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.5), 0 0 60px rgba(139, 92, 246, 0.3);
}

.btn-submit:active {
    transform: translateY(-1px);
}

.back-link {
    text-align: center;
    margin-top: 32px;
}

.back-link a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition-normal);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    display: inline-block;
}

.back-link a:hover {
    color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.1);
}

/* Messages */
.error-message {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 14px;
    backdrop-filter: blur(10px);
    position: relative;
    padding-left: 40px;
}

.error-message::before {
    content: '!';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: var(--primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

.success-message {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 14px;
    backdrop-filter: blur(10px);
    position: relative;
    padding-left: 40px;
}

.success-message::before {
    content: '✓';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

/* ================================================
   Admin Layout
   ================================================ */
.admin-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-right: 1px solid var(--border-glass);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 28px;
    transition: transform 0.3s ease;
    z-index: 1000;
    box-shadow: 10px 0 60px rgba(0, 0, 0, 0.4);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar .logo {
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-glass);
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar .logo svg {
    width: 32px;
    height: 32px;
    color: var(--primary-purple);
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.6));
}

.sidebar .logo h1,
.sidebar .logo span {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

/* Navigation Menu */
.menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.menu a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.menu a:hover::before {
    opacity: 1;
}

.menu a:hover {
    background: rgba(139, 92, 246, 0.12);
    color: var(--text-primary);
    transform: translateX(4px);
}

.menu a.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(99, 102, 241, 0.15) 100%);
    color: var(--primary-purple);
    border-left: 3px solid var(--primary-purple);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.25);
}

.menu a svg {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5));
    flex-shrink: 0;
}

.logout {
    padding-top: 28px;
    border-top: 1px solid var(--border-glass);
    position: relative;
}

.logout a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: #fca5a5;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.logout a:hover {
    background: rgba(239, 68, 68, 0.15);
    transform: translateX(4px);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 32px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    gap: 20px;
    flex-wrap: wrap;
}

.header-left h2 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.header-left p {
    color: var(--text-secondary);
    font-size: 14px;
}

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

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
}

.user-info span {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.5);
    font-size: 14px;
}

.user-info div {
    font-size: 14px;
    color: var(--text-secondary);
}

.user-info div strong {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
}

/* Primary Button */
.btn-add {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-add::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s ease;
}

.btn-add:hover::before {
    left: 100%;
}

.btn-add:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.5), 0 0 50px rgba(139, 92, 246, 0.3);
}

.btn-add svg {
    width: 20px;
    height: 20px;
}

/* ================================================
   Stats Grid
   ================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 28px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

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

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
    transition: transform 0.4s;
}

.stat-card:hover::after {
    transform: scale(1.5);
}

.stat-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-lift), var(--shadow-glow);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 26px;
    position: relative;
    z-index: 1;
}

.stat-icon.api { 
    background: rgba(139, 92, 246, 0.2); 
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.4);
}
.stat-icon.category { 
    background: rgba(59, 130, 246, 0.2); 
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.4);
}
.stat-icon.user { 
    background: rgba(16, 185, 129, 0.2); 
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
}
.stat-icon.call { 
    background: rgba(245, 158, 11, 0.2); 
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
}
.stat-icon.today { 
    background: rgba(6, 182, 212, 0.2); 
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
    letter-spacing: 2px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ================================================
   Section Layout
   ================================================ */
.section-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.section {
    background: var(--bg-card);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: var(--gradient-border);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.3;
}

.section h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 1px;
}

/* ================================================
   Data Table
   ================================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
    font-size: 14px;
}

.data-table th {
    background: rgba(139, 92, 246, 0.08);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    font-family: var(--font-display);
}

.data-table tr {
    transition: background var(--transition-fast);
}

.data-table tr:hover {
    background: rgba(139, 92, 246, 0.08);
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    position: relative;
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.success::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 12px #34d399;
    animation: pulse 2s infinite;
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.error::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fca5a5;
    box-shadow: 0 0 12px #fca5a5;
}

.status-badge.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

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

/* Method Badge */
.method-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    font-family: var(--font-mono);
    letter-spacing: 1px;
}

.method-badge.get { 
    background: var(--gradient-success); 
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}
.method-badge.post { 
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); 
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}
.method-badge.put { 
    background: var(--gradient-warning); 
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}
.method-badge.delete { 
    background: var(--gradient-error); 
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}
.method-badge.patch { 
    background: var(--gradient-primary); 
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

/* Action Buttons */
.btn-edit, .btn-delete, .btn-regen {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.btn-edit {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-edit:hover {
    background: rgba(59, 130, 246, 0.25);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.btn-regen {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.btn-regen:hover {
    background: rgba(139, 92, 246, 0.25);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.25);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

/* API Key Display */
.api-key {
    font-family: var(--font-mono);
    font-size: 12px;
    word-break: break-all;
    background: rgba(139, 92, 246, 0.1);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.2);
    display: inline-block;
    max-width: 100%;
    overflow-x: auto;
}

/* ================================================
   Modal
   ================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
}

.modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease;
}

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

.modal {
    background: linear-gradient(145deg, rgba(15, 20, 35, 0.9), rgba(10, 12, 25, 0.95));
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 
        0 0 60px rgba(139, 92, 246, 0.25),
        0 0 120px rgba(0, 255, 255, 0.1),
        var(--shadow-lift);
    position: relative;
}

.modal::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.6) 0%, 
        rgba(0, 255, 255, 0.3) 50%, 
        rgba(236, 72, 153, 0.4) 100%
    );
    z-index: -1;
    opacity: 0.7;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.7; filter: blur(20px); }
    50% { opacity: 1; filter: blur(30px); }
}

.modal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.03) 0%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.02) 100%
    );
    pointer-events: none;
}

@keyframes modalIn {
    from { 
        opacity: 0; 
        transform: scale(0.9) translateY(40px); 
        filter: blur(10px);
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
        filter: blur(0);
    }
}

/* Universal Modal Styles for JS modal system */
.modal {
    background: linear-gradient(145deg, rgba(15, 20, 35, 0.95), rgba(10, 12, 25, 0.98));
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    padding: 32px;
    position: relative;
    box-shadow: 
        0 0 60px rgba(139, 92, 246, 0.3),
        0 0 120px rgba(0, 255, 255, 0.15),
        0 25px 50px rgba(0, 0, 0, 0.5);
    animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #8b5cf6, #06b6d4, #ec4899);
}

.modal-icon {
    text-align: center;
    margin-bottom: 20px;
}

.modal-icon svg {
    width: 56px;
    height: 56px;
}

.modal-icon.warning svg {
    color: #f59e0b;
}

.modal-icon.success svg {
    color: #22c55e;
}

.modal-icon.error svg {
    color: #ef4444;
}

.modal-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #f0f0f5;
    margin-bottom: 12px;
    font-family: 'Exo 2', sans-serif;
}

.modal-message {
    text-align: center;
    color: rgba(200, 200, 215, 0.9);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
    padding: 0 20px;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 28px;
}

.modal-btn {
    padding: 14px 36px;
    border-radius: 14px;
    font-family: 'Exo 2', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
    min-width: 120px;
    text-transform: uppercase;
}

.modal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.6s ease;
}

.modal-btn:hover::before {
    left: 100%;
}

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

.modal-btn.cancel {
    background: rgba(75, 75, 95, 0.5);
    color: #c0c0d0;
    border: 1px solid rgba(100, 100, 120, 0.3);
}

.modal-btn.cancel:hover {
    background: rgba(90, 90, 110, 0.6);
    border-color: rgba(120, 120, 140, 0.4);
}

.modal-btn.confirm {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.modal-btn.confirm:hover {
    background: linear-gradient(135deg, #9333ea, #c026d3);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
}

.modal-btn.confirm.warning {
    background: linear-gradient(135deg, #ea580c, #f97316);
    box-shadow: 0 4px 15px rgba(234, 88, 12, 0.4);
}

.modal-btn.confirm.warning:hover {
    background: linear-gradient(135deg, #c2410c, #ea580c);
    box-shadow: 0 6px 20px rgba(234, 88, 12, 0.5);
}

.modal-btn.success {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.modal-btn.success:hover {
    background: linear-gradient(135deg, #15803d, #16a34a);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
}

.modal-btn.error {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.modal-btn.error:hover {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* Modal Input Focus State */
#modalPromptInput:focus {
    border-color: rgba(139, 92, 246, 0.7) !important;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 32px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    position: relative;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.08) 0%, transparent 100%);
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 32px;
    right: 32px;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(139, 92, 246, 0.5) 50%, 
        transparent 100%
    );
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary-purple), var(--primary-cyan));
    border-radius: 2px;
    box-shadow: 0 0 10px var(--primary-purple);
}

.btn-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    transition: all var(--transition-normal);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-close::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(239, 68, 68, 0.2) 50%, 
        transparent 100%
    );
    transition: left 0.3s ease;
}

.btn-close:hover::before {
    left: 100%;
}

.btn-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.4);
    transform: rotate(90deg);
}

.modal-body {
    padding: 32px;
}

/* Form Layout */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group.full {
    grid-column: span 2;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    padding-left: 16px;
}

.form-group label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary-cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary-cyan);
}

.form-group.required label::after {
    content: '*';
    color: var(--primary-pink);
    margin-left: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(145deg, rgba(30, 35, 55, 0.8), rgba(20, 25, 45, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-body);
    transition: all var(--transition-normal);
    outline: none;
    backdrop-filter: blur(15px);
    position: relative;
}

.form-group input::before,
.form-group select::before,
.form-group textarea::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-purple);
    box-shadow: 
        0 0 0 3px rgba(139, 92, 246, 0.15),
        0 0 20px rgba(139, 92, 246, 0.1),
        inset 0 0 20px rgba(139, 92, 246, 0.05);
    background: linear-gradient(145deg, rgba(35, 40, 60, 0.9), rgba(25, 30, 50, 0.95));
}

.form-group input:focus::before,
.form-group select:focus::before,
.form-group textarea:focus::before {
    opacity: 1;
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    font-size: 13px;
}

.form-group select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

.form-group select:focus {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%238b5cf6' stroke-width='2'%3E%3Cpolyline points='6 15 12 9 18 15'%3E%3C/polyline%3E%3C/svg%3E");
}

.form-group select option {
    background: #0a0a0f;
    color: #f0f0f5;
    padding: 10px 16px;
    border: none;
}

.form-group select option:hover {
    background: rgba(139, 92, 246, 0.3);
}

.form-group .checkbox-label {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    padding: 14px 18px;
    background: rgba(30, 35, 55, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.form-group .checkbox-label:hover {
    background: rgba(35, 40, 60, 0.8);
    border-color: rgba(139, 92, 246, 0.3);
}

.form-group input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--primary-purple);
    position: relative;
    transition: all var(--transition-fast);
}

.form-group input[type="checkbox"]:checked {
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid rgba(139, 92, 246, 0.15);
    position: relative;
}

.form-actions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(139, 92, 246, 0.4) 50%, 
        transparent 100%
    );
}

.btn-cancel {
    padding: 14px 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(30, 35, 55, 0.6), rgba(20, 25, 45, 0.8));
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

.btn-cancel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%
    );
    transition: left 0.3s ease;
}

.btn-cancel:hover::before {
    left: 100%;
}

.btn-cancel:hover {
    background: linear-gradient(145deg, rgba(35, 40, 60, 0.8), rgba(25, 30, 50, 0.9));
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-cancel:active {
    transform: translateY(0);
}

/* ================================================
   Filter Bar
   ================================================ */
.filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    padding: 20px 24px;
    background: linear-gradient(145deg, rgba(15, 20, 35, 0.8), rgba(10, 12, 25, 0.9));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-xl);
    position: relative;
}

.filter-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), transparent, rgba(0, 255, 255, 0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.filter-bar select,
.filter-bar input {
    padding: 14px 20px;
    background: linear-gradient(145deg, rgba(30, 35, 55, 0.8), rgba(20, 25, 45, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-body);
    outline: none;
    transition: all var(--transition-normal);
    backdrop-filter: blur(15px);
    cursor: pointer;
    position: relative;
    min-width: 180px;
}

.filter-bar select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

.filter-bar select:focus {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%238b5cf6' stroke-width='2'%3E%3Cpolyline points='6 15 12 9 18 15'%3E%3C/polyline%3E%3C/svg%3E");
}

.filter-bar select option {
    background: #0a0a0f;
    color: #f0f0f5;
    padding: 10px 16px;
}

.filter-bar select option:hover {
    background: rgba(139, 92, 246, 0.3);
}

.filter-bar select:focus,
.filter-bar input:focus {
    border-color: var(--primary-purple);
    box-shadow: 
        0 0 0 3px rgba(139, 92, 246, 0.15),
        0 0 20px rgba(139, 92, 246, 0.15);
    background: linear-gradient(145deg, rgba(35, 40, 60, 0.9), rgba(25, 30, 50, 0.95));
}

.filter-bar input::placeholder {
    color: var(--text-muted);
}

.filter-bar button {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary-purple) 0%, #6366f1 100%);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 
        0 4px 15px rgba(139, 92, 246, 0.4),
        0 0 0 1px rgba(139, 92, 246, 0.3) inset;
}

.filter-bar button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%
    );
    transition: left 0.4s ease;
}

.filter-bar button:hover::before {
    left: 100%;
}

.filter-bar button:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(139, 92, 246, 0.5),
        0 0 30px rgba(139, 92, 246, 0.3);
}

.filter-bar button:active {
    transform: translateY(0);
}

.filter-bar button svg {
    width: 18px;
    height: 18px;
}

/* ================================================
   Pagination
   ================================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
}

.pagination button {
    padding: 12px 20px;
    background: rgba(20, 20, 35, 0.8);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.pagination button:hover:not(:disabled) {
    background: rgba(139, 92, 246, 0.15);
    color: var(--text-primary);
    border-color: var(--border-glow);
}

.pagination button.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.5);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ================================================
   Chart Container
   ================================================ */
.chart-container {
    height: 220px;
    position: relative;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 100%;
    padding-bottom: 15px;
}

.chart-bar {
    width: 10%;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    position: relative;
    transition: height 0.5s ease, box-shadow 0.3s;
    min-height: 6px;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.chart-bar:hover {
    box-shadow: 0 0 35px rgba(139, 92, 246, 0.7);
}

.chart-bar:hover::after {
    content: attr(data-value);
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-primary);
    white-space: nowrap;
    border: 1px solid var(--border-glass);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
}

.chart-labels span {
    width: 10%;
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
}

/* ================================================
   Today Calls Stats
   ================================================ */
.today-calls {
    text-align: center;
    padding: 40px;
    position: relative;
}

.today-calls::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
    animation: pulseRing 3s ease-in-out infinite;
}

@keyframes pulseRing {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.4); opacity: 0.8; }
}

.today-value {
    font-family: var(--font-display);
    font-size: 80px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    position: relative;
    z-index: 1;
    letter-spacing: 4px;
}

.today-label {
    font-size: 18px;
    color: var(--text-secondary);
    margin-top: 16px;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.today-trend {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 20px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: var(--radius-full);
    color: #34d399;
    font-size: 14px;
    font-weight: 600;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ================================================
   Toggle Switch
   ================================================ */
.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(71, 85, 105, 0.5);
    transition: 0.3s;
    border-radius: 28px;
    border: 1px solid var(--border-glass);
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 2px;
    background: var(--text-secondary);
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

input:checked + .slider {
    background: var(--gradient-primary);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.6);
}

input:checked + .slider:before {
    transform: translateX(24px);
    background: white;
}

/* ================================================
   Responsive Design
   ================================================ */
@media (max-width: 1024px) {
    .section-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .header {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .header-left h2 {
        font-size: 24px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-value {
        font-size: 36px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-group.full {
        grid-column: span 1;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
    
    .modal {
        width: 95%;
        margin: 16px;
    }
    
    .login-box {
        padding: 40px 28px;
        margin: 16px;
    }
}

@media (max-width: 480px) {
    .btn-add {
        padding: 12px 18px;
        font-size: 13px;
    }
    
    .user-info {
        display: none;
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .filter-bar select,
    .filter-bar input {
        width: 100%;
    }
    
    .today-value {
        font-size: 56px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* ================================================
   API Edit Page Styles
   ================================================ */
.api-edit-section {
    background: linear-gradient(145deg, rgba(15, 20, 35, 0.85), rgba(10, 12, 25, 0.95));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-xl);
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.api-edit-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), transparent, rgba(0, 255, 255, 0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.scanline-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(139, 92, 246, 0.03) 2px,
        rgba(139, 92, 246, 0.03) 4px
    );
    pointer-events: none;
    border-radius: var(--radius-xl);
}

.api-form {
    position: relative;
    z-index: 1;
}

.form-section {
    margin-bottom: 32px;
}

.form-section h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-purple);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    position: relative;
}

.form-section h3::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* 收费设置样式 */
.paid-settings {
    margin-top: 20px;
    padding: 20px;
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.paid-settings .membership-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 20, 35, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.paid-settings .membership-select:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    outline: none;
}

.paid-settings .membership-select option {
    background: rgba(15, 20, 35, 0.95);
    color: var(--text-primary);
    padding: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.required label::after {
    content: '*';
    color: #ef4444;
    margin-left: 4px;
}

/* 参数列表样式 */
#parameters-container {
    margin-bottom: 16px;
}

.parameter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 16px;
    background: rgba(30, 35, 55, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.parameter-row:hover {
    background: rgba(35, 40, 60, 0.8);
    border-color: rgba(139, 92, 246, 0.3);
}

.parameter-fields {
    flex: 1;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.parameter-fields .param-name {
    flex: 0 0 180px;
    min-width: 150px;
    padding: 12px 16px;
    background: rgba(20, 25, 45, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-mono);
    outline: none;
    transition: all var(--transition-normal);
}

.parameter-fields .param-name:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.parameter-fields .param-name::placeholder {
    color: var(--text-muted);
}

.parameter-fields .param-type {
    flex: 0 0 120px;
    padding: 12px 16px;
    background: rgba(20, 25, 45, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    transition: all var(--transition-normal);
}

.parameter-fields .param-type:focus {
    border-color: var(--primary-purple);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%238b5cf6' stroke-width='2'%3E%3Cpolyline points='6 15 12 9 18 15'%3E%3C/polyline%3E%3C/svg%3E");
}

.parameter-fields .param-type option {
    background: #0a0a0f;
    color: #f0f0f5;
    padding: 10px 16px;
}

.parameter-fields .param-type option:hover {
    background: rgba(139, 92, 246, 0.3);
}

.parameter-fields .checkbox-label.inline {
    flex: 0 0 auto;
    padding: 0;
    background: transparent;
    border: none;
    gap: 8px;
}

.parameter-fields .checkbox-label.inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.parameter-fields .checkbox-label.inline span {
    font-size: 13px;
    color: var(--text-secondary);
}

.parameter-fields .param-description {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    background: rgba(20, 25, 45, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all var(--transition-normal);
}

.parameter-fields .param-description:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.parameter-fields .param-description::placeholder {
    color: var(--text-muted);
}

.btn-add-param, .btn-remove-param {
    padding: 12px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add-param {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(99, 102, 241, 0.15));
    color: var(--primary-purple);
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
}

.btn-add-param:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(99, 102, 241, 0.25));
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

.btn-add-param svg {
    width: 18px;
    height: 18px;
}

.btn-remove-param {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    width: 44px;
    height: 44px;
}

.btn-remove-param:hover {
    background: rgba(239, 68, 68, 0.25);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.btn-remove-param svg {
    width: 18px;
    height: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: linear-gradient(145deg, rgba(30, 35, 55, 0.8), rgba(20, 25, 45, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-body);
    outline: none;
    transition: all var(--transition-normal);
    backdrop-filter: blur(15px);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-purple);
    box-shadow: 
        0 0 0 3px rgba(139, 92, 246, 0.15),
        0 0 20px rgba(139, 92, 246, 0.15);
    background: linear-gradient(145deg, rgba(35, 40, 60, 0.9), rgba(25, 30, 50, 0.95));
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

.form-group select:focus {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%238b5cf6' stroke-width='2'%3E%3Cpolyline points='6 15 12 9 18 15'%3E%3C/polyline%3E%3C/svg%3E");
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: var(--font-mono);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.url-input-group {
    display: flex;
    align-items: center;
    background: linear-gradient(145deg, rgba(30, 35, 55, 0.8), rgba(20, 25, 45, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.url-input-group:focus-within {
    border-color: var(--primary-purple);
    box-shadow: 
        0 0 0 3px rgba(139, 92, 246, 0.15),
        0 0 20px rgba(139, 92, 246, 0.15);
}

.url-prefix {
    padding: 14px 16px;
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary-purple);
    font-family: var(--font-mono);
    font-size: 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.url-input-group input {
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.form-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

.checkbox-label.large {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 12px 16px;
    background: linear-gradient(145deg, rgba(30, 35, 55, 0.6), rgba(20, 25, 45, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.checkbox-label.large:hover {
    background: linear-gradient(145deg, rgba(35, 40, 60, 0.7), rgba(25, 30, 50, 0.8));
    border-color: rgba(139, 92, 246, 0.3);
}

.checkbox-label.large input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-purple);
}

.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-normal);
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-back svg {
    width: 18px;
    height: 18px;
}

.btn-cancel {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary-purple) 0%, #6366f1 100%);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 15px rgba(139, 92, 246, 0.4),
        0 0 0 1px rgba(139, 92, 246, 0.3) inset;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%
    );
    transition: left 0.4s ease;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(139, 92, 246, 0.5),
        0 0 30px rgba(139, 92, 246, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 768px) {
    .api-edit-section {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-submit,
    .btn-cancel {
        width: 100%;
        justify-content: center;
    }
}
