/* ========================================
   xPayZen - Premium Token Management
   Responsive Design with Gradients
   ======================================== */

/* ===== IMPORTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00ff88 0%, #00cc66 50%, #00994d 100%);
    --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-dark: linear-gradient(145deg, #0b0f1a 0%, #1a2332 100%);
    --gradient-card: linear-gradient(145deg, rgba(26, 35, 50, 0.95) 0%, rgba(17, 24, 39, 0.95) 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    --gradient-glow: radial-gradient(circle at 50% 0%, rgba(0, 255, 136, 0.15) 0%, transparent 70%);
    --gradient-sidebar: linear-gradient(180deg, #0f1624 0%, #0b0f1a 100%);
    --gradient-hover: linear-gradient(135deg, rgba(0, 255, 136, 0.15) 0%, rgba(0, 255, 136, 0.05) 100%);
    
    /* Colors */
    --bg-primary: #0b0f1a;
    --bg-secondary: #111827;
    --bg-card: rgba(26, 35, 50, 0.85);
    --bg-input: rgba(15, 22, 36, 0.8);
    --border-color: rgba(42, 58, 82, 0.5);
    --border-light: rgba(30, 45, 66, 0.3);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #6b7280;
    --accent-green: #00ff88;
    --accent-green-dim: rgba(0, 255, 136, 0.1);
    --accent-blue: #3b82f6;
    --accent-red: #ef4444;
    --accent-yellow: #f59e0b;
    --accent-purple: #8b5cf6;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 60px rgba(0, 255, 136, 0.08);
    --shadow-glow-strong: 0 0 80px rgba(0, 255, 136, 0.15);
    
    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Sizes */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --header-height: 72px;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    background-image: var(--gradient-glow), var(--gradient-dark);
    background-attachment: fixed;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00cc66 0%, #00994d 100%);
}

/* ===== SELECTION ===== */
::selection {
    background: var(--accent-green);
    color: #0b0f1a;
}

/* ========================================
   APP LAYOUT
   ======================================== */
.app {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--gradient-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    flex-shrink: 0;
    transition: var(--transition);
    z-index: 100;
    overflow-y: auto;
}

/* Sidebar Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 24px 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.brand-icon {
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulseGlow 2.5s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.3)); }
    50% { filter: drop-shadow(0 0 30px rgba(0, 255, 136, 0.6)); }
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.brand-name span {
    -webkit-text-fill-color: #00ff88;
}

.brand-sub {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleX(0);
    width: 3px;
    height: 24px;
    background: var(--gradient-primary);
    border-radius: 0 4px 4px 0;
    transition: var(--transition);
}

.nav-item:hover {
    background: var(--gradient-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-green-dim);
    color: var(--accent-green);
}

.nav-item.active::before {
    transform: translateY(-50%) scaleX(1);
}

.nav-item .nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item .nav-text {
    flex: 1;
}

.nav-item .nav-badge {
    background: var(--gradient-primary);
    color: #0b0f1a;
    font-size: 11px;
    padding: 1px 10px;
    border-radius: var(--radius-full);
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: auto;
}

.wallet-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 4px 0 14px 0;
}

.wallet-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-red);
    transition: var(--transition);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.wallet-dot.connected {
    background: var(--accent-green);
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.5);
    animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(0, 255, 136, 0.4); }
    50% { box-shadow: 0 0 28px rgba(0, 255, 136, 0.8); }
}

.wallet-label {
    font-weight: 500;
}

.sidebar-wallet-btn {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--gradient-glass);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sidebar-wallet-btn:hover {
    background: var(--gradient-hover);
    border-color: var(--accent-green);
    color: var(--accent-green);
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.sidebar-wallet-btn.connected {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: var(--accent-green-dim);
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.main {
    flex: 1;
    padding: 24px 36px 36px 36px;
    min-height: 100vh;
    background: var(--gradient-dark);
    position: relative;
}

/* Main Glow Effect */
.main::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(0, 255, 136, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.main > * {
    position: relative;
    z-index: 1;
}

/* ========================================
   TOPBAR
   ======================================== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 24px;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm), var(--shadow-glow);
}

.topbar-left {
    display: flex;
    flex-direction: column;
}

.page-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-wallet {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px 6px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
}

.wallet-label-text {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.wallet-address-display {
    font-size: 13px;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Courier New', monospace;
}

.topbar-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--gradient-glass);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.topbar-btn:hover {
    background: var(--gradient-hover);
    border-color: var(--accent-green);
    color: var(--accent-green);
    transform: rotate(60deg);
    box-shadow: var(--shadow-glow);
}

/* ========================================
   ADMIN OVERLAY
   ======================================== */
.admin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeInOverlay 0.4s ease;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.admin-overlay.hidden {
    display: none;
}

.admin-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg), var(--shadow-glow-strong);
    animation: slideUpCard 0.5s ease;
    position: relative;
    overflow: hidden;
}

.admin-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 0%, rgba(0, 255, 136, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

@keyframes slideUpCard {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.admin-card-icon {
    font-size: 56px;
    margin-bottom: 12px;
    display: block;
}

.admin-card h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.admin-card-wallet {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 12px;
    text-align: left;
    transition: var(--transition);
}

.admin-card-wallet:hover {
    border-color: var(--accent-green);
}

.admin-card-wallet > span {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-bottom: 4px;
}

.admin-card-wallet code {
    font-size: 14px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.admin-card-wallet .wallet-required {
    color: var(--accent-green);
}

.admin-card-wallet .wallet-connected {
    color: var(--accent-yellow);
}

.admin-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-sm);
    color: #0b0f1a;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.admin-card-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition);
}

.admin-card-btn:hover::before {
    left: 100%;
}

.admin-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.3);
}

/* ========================================
   DASHBOARD CONTENT
   ======================================== */
.dashboard-content.hidden {
    display: none;
}

.dashboard-content {
    animation: fadeInContent 0.5s ease;
}

@keyframes fadeInContent {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   STATS GRID
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    border-color: rgba(0, 255, 136, 0.3);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.stat-card-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-green-dim);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    border: 1px solid rgba(0, 255, 136, 0.1);
}

.stat-card-info {
    flex: 1;
}

.stat-card-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-card-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card-change {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 12px;
    border-radius: var(--radius-full);
}

.stat-card-change.positive {
    background: var(--accent-green-dim);
    color: var(--accent-green);
}

.stat-card-change.neutral {
    background: rgba(107, 114, 128, 0.1);
    color: var(--text-muted);
}

.stat-card-change .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
}

.stat-card-change .dot.green {
    background: var(--accent-green);
}
.stat-card-change .dot.gray {
    background: var(--text-muted);
}
.stat-card-change .dot.yellow {
    background: var(--accent-yellow);
}

/* ========================================
   ACTIONS BAR
   ======================================== */
.actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
    padding: 12px 16px;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.action-btn.primary {
    background: var(--gradient-primary);
    color: #0b0f1a;
    box-shadow: 0 2px 12px rgba(0, 255, 136, 0.2);
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 255, 136, 0.3);
}

.action-btn.secondary {
    background: var(--gradient-glass);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.action-btn.secondary:hover {
    background: var(--gradient-hover);
    color: var(--text-primary);
    border-color: var(--accent-green);
}

.search-wrapper {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-wrapper .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--text-muted);
}

.search-wrapper input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.search-wrapper input:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.05);
}

.search-wrapper input::placeholder {
    color: var(--text-muted);
}

/* ========================================
   TABLE CARD
   ======================================== */
.table-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm), var(--shadow-glow);
    transition: var(--transition);
}

.table-card:hover {
    box-shadow: var(--shadow-md), var(--shadow-glow-strong);
}

.table-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
}

.table-card-header-left {
    display: flex;
    flex-direction: column;
}

.table-card-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.table-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
}

.table-count {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 16px;
    background: var(--gradient-primary);
    color: #0b0f1a;
    border-radius: var(--radius-full);
}

.table-wrapper {
    overflow-x: auto;
    padding: 0;
}

/* ========================================
   TABLE STYLES
   ======================================== */
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

thead {
    background: var(--bg-input);
}

thead th {
    text-align: left;
    padding: 12px 20px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
}

thead th.text-right {
    text-align: right;
}

tbody td {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    font-size: 14px;
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover td {
    background: var(--accent-green-dim);
}

/* Token Cell */
.token-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.token-cell .token-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    object-fit: contain;
    padding: 4px;
    flex-shrink: 0;
    transition: var(--transition);
}

.token-cell .token-logo:hover {
    transform: scale(1.1);
    border-color: var(--accent-green);
}

.token-cell .token-name {
    display: flex;
    flex-direction: column;
}

.token-cell .token-symbol {
    font-weight: 700;
    color: var(--text-primary);
}

.token-cell .token-fullname {
    font-size: 12px;
    color: var(--text-secondary);
}

.contract-address {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-input);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active {
    background: var(--accent-green-dim);
    color: var(--accent-green);
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.status-badge.inactive {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-badge.active .dot {
    background: var(--accent-green);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

.status-badge.inactive .dot {
    background: var(--accent-red);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

/* Action Buttons */
.action-btns {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.action-btn-sm {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: var(--transition);
    background: var(--bg-input);
    color: var(--text-secondary);
    line-height: 1;
}

.action-btn-sm:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-sm);
}

.action-btn-sm.toggle:hover {
    background: var(--accent-green-dim);
    color: var(--accent-green);
}

.action-btn-sm.edit:hover {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.action-btn-sm.delete:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.text-right {
    text-align: right;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-secondary);
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.empty-state .empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.empty-state .empty-sub {
    font-size: 14px;
    color: var(--text-muted);
}

/* ========================================
   MODAL
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 16px;
}

.modal.hidden {
    display: none;
}

.modal-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUpModal 0.4s ease;
    box-shadow: var(--shadow-lg), var(--shadow-glow-strong);
    position: relative;
}

.modal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
    padding: 0 4px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

/* Form */
#tokenForm {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group label .required {
    color: var(--accent-red);
}

.form-group input {
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.05);
}

.form-group input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    justify-content: flex-end;
}

.btn-secondary, .btn-primary {
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #0b0f1a;
    box-shadow: 0 2px 12px rgba(0, 255, 136, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 255, 136, 0.3);
}

/* ========================================
   TOAST
   ======================================== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 14px 24px;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 3000;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: slideInToast 0.4s ease;
    min-width: 200px;
    max-width: 400px;
}

@keyframes slideInToast {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.toast.hidden {
    display: none;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* ===== LARGE DESKTOP (1200px+) ===== */
@media (min-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== DESKTOP (992px - 1199px) ===== */
@media (max-width: 1199px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main {
        padding: 20px 24px 28px 24px;
    }
}

/* ===== TABLET / SMALL DESKTOP (768px - 991px) ===== */
@media (max-width: 991px) {
    /* Collapse Sidebar */
    .sidebar {
        width: var(--sidebar-collapsed);
        padding: 16px 8px;
    }
    
    .sidebar .brand-text,
    .sidebar .nav-text,
    .sidebar .nav-badge,
    .sidebar .wallet-label,
    .sidebar .sidebar-wallet-btn span {
        display: none;
    }
    
    .sidebar .nav-item {
        justify-content: center;
        padding: 12px;
    }
    
    .sidebar .nav-item .nav-icon {
        font-size: 20px;
        width: auto;
    }
    
    .sidebar .sidebar-wallet-btn {
        font-size: 18px;
        padding: 10px;
        justify-content: center;
    }
    
    .sidebar .wallet-status {
        justify-content: center;
        padding: 4px 0 10px 0;
    }
    
    .sidebar-brand {
        justify-content: center;
        padding: 0 0 16px 0;
    }
    
    .brand-icon {
        font-size: 28px;
    }
    
    .main {
        padding: 16px 20px 24px 20px;
    }
    
    .topbar {
        padding: 12px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .topbar-right {
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .topbar-wallet {
        flex: 1;
        justify-content: center;
    }
}

/* ===== MOBILE LANDSCAPE (576px - 767px) ===== */
@media (max-width: 767px) {
    .sidebar {
        display: none;
    }
    
    .main {
        padding: 12px 16px 20px 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
        gap: 12px;
    }
    
    .stat-card-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .stat-card-value {
        font-size: 20px;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .topbar {
        padding: 12px;
    }
    
    .topbar-wallet {
        padding: 4px 12px;
        gap: 6px;
    }
    
    .wallet-address-display {
        font-size: 12px;
    }
    
    .actions-bar {
        padding: 10px 12px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-wrapper {
        min-width: 100%;
    }
    
    .action-btn {
        justify-content: center;
    }
    
    .table-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 16px;
    }
    
    thead th,
    tbody td {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .token-cell .token-logo {
        width: 30px;
        height: 30px;
    }
    
    .contract-address {
        font-size: 11px;
    }
    
    .admin-card {
        padding: 32px 24px;
        margin: 16px;
    }
    
    .modal-card {
        padding: 24px;
        margin: 12px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .btn-secondary,
    .btn-primary {
        justify-content: center;
        width: 100%;
    }
    
    .toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
        padding: 12px 16px;
    }
}

/* ===== MOBILE PORTRAIT (480px and below) ===== */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .page-subtitle {
        font-size: 12px;
    }
    
    .topbar-right {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .topbar-wallet {
        justify-content: center;
        padding: 6px 12px;
    }
    
    .wallet-label-text {
        font-size: 9px;
    }
    
    .wallet-address-display {
        font-size: 11px;
    }
    
    .topbar-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
        align-self: center;
    }
    
    thead th,
    tbody td {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    thead th {
        font-size: 9px;
    }
    
    .token-cell {
        gap: 8px;
    }
    
    .token-cell .token-logo {
        width: 26px;
        height: 26px;
        padding: 2px;
    }
    
    .token-cell .token-symbol {
        font-size: 13px;
    }
    
    .token-cell .token-fullname {
        font-size: 10px;
    }
    
    .contract-address {
        font-size: 10px;
        padding: 1px 6px;
    }
    
    .status-badge {
        font-size: 10px;
        padding: 2px 10px;
    }
    
    .action-btn-sm {
        font-size: 13px;
        padding: 4px 8px;
    }
    
    .admin-card h2 {
        font-size: 20px;
    }
    
    .admin-card-wallet code {
        font-size: 12px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .table-card-header h3 {
        font-size: 14px;
    }
    
    .table-subtitle {
        font-size: 12px;
    }
    
    .table-count {
        font-size: 11px;
        padding: 2px 12px;
    }
    
    .empty-state .empty-icon {
        font-size: 36px;
    }
    
    .empty-state .empty-title {
        font-size: 16px;
    }
    
    .empty-state .empty-sub {
        font-size: 13px;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.hidden {
    display: none !important;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient {
    background: var(--gradient-primary);
}

.border-gradient {
    border-image: var(--gradient-primary) 1;
}

/* ========================================
   MOBILE SIDEBAR TOGGLE (for small screens)
   ======================================== */
.mobile-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    color: #0b0f1a;
    font-size: 24px;
    cursor: pointer;
    z-index: 50;
    box-shadow: 0 4px 24px rgba(0, 255, 136, 0.3);
    transition: var(--transition);
}

.mobile-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 40px rgba(0, 255, 136, 0.4);
}

@media (max-width: 767px) {
    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, 
        var(--bg-input) 25%, 
        var(--border-color) 50%, 
        var(--bg-input) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .sidebar,
    .topbar,
    .actions-bar,
    .action-btns,
    .admin-overlay,
    .modal,
    .toast {
        display: none !important;
    }
    
    .main {
        padding: 20px !important;
    }
    
    .dashboard-content.hidden {
        display: block !important;
    }
    
    .table-card {
        border: 1px solid #333 !important;
        box-shadow: none !important;
    }
    
    .stat-card {
        border: 1px solid #333 !important;
        box-shadow: none !important;
    }
}