:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --secondary: #f97316;
    --secondary-dark: #ea580c;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --purple: #8b5cf6;
    --pink: #ec4899;
    --teal: #14b8a6;
    --indigo: #6366f1;
    --text-900: #0f172a;
    --text-800: #1e293b;
    --text-700: #334155;
    --text-600: #475569;
    --text-500: #64748b;
    --text-400: #94a3b8;
    --text-300: #cbd5e1;
    --text-200: #e2e8f0;
    --text-100: #f1f5f9;
    --text-50: #f8fafc;
    --bg-white: #ffffff;
    --bg-50: #f8fafc;
    --bg-100: #f1f5f9;
    --bg-200: #e2e8f0;
    --sidebar-bg: #0f172a;
    --sidebar-800: #1e293b;
    --sidebar-700: #334155;
    --sidebar-text: #cbd5e1;
    --sidebar-active: rgba(37, 99, 235, 0.15);
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --transition: all 0.2s ease;
    --sidebar-w: 260px;
    --sidebar-w-collapsed: 78px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-100);
    color: var(--text-800);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.panel {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, #111c35 100%);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    overflow: hidden;
}

.sidebar.collapsed { width: var(--sidebar-w-collapsed); }

.sidebar-brand {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    min-height: 72px;
    flex-shrink: 0;
}

.sidebar-brand-img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    flex-shrink: 0;
    background: rgba(37, 99, 235, 0.15);
    padding: 4px;
}

.sidebar-brand-text {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-brand-text { display: none; }

.sidebar-user {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.sidebar-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-user-info { overflow: hidden; }
.sidebar-user-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-plan {
    font-size: 12px;
    color: #93c5fd;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sidebar-user-plan::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.sidebar.collapsed .sidebar-user-info { display: none; }

.sidebar-menu {
    flex: 1;
    padding: 14px 12px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-menu::-webkit-scrollbar { width: 4px; }
.sidebar-menu::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.2); border-radius: 2px; }

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-section-title {
    padding: 8px 12px 6px;
    font-size: 10.5px;
    font-weight: 700;
    color: rgba(148, 163, 184, 0.6);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-section-title { display: none; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10.5px 12px;
    border-radius: var(--radius);
    color: rgba(203, 213, 225, 0.82);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
    white-space: nowrap;
    position: relative;
}

.sidebar-link i {
    width: 22px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-link:hover {
    background: rgba(148, 163, 184, 0.08);
    color: #fff;
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(59, 130, 246, 0.1));
    color: #fff;
    box-shadow: inset 3px 0 0 #3b82f6;
}

.sidebar-link.active::after {
    content: "";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary-light);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}

.sidebar-link .menu-badge {
    margin-left: auto;
    padding: 2px 8px;
    background: var(--danger);
    color: #fff;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
}

.sidebar-link .menu-new {
    background: var(--success);
}

.sidebar.collapsed .sidebar-link { justify-content: center; padding: 12px; }
.sidebar.collapsed .sidebar-link span,
.sidebar.collapsed .sidebar-link .menu-badge { display: none; }

.sidebar-footer {
    padding: 14px 12px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    flex-shrink: 0;
}

.sidebar-btn-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10.5px 12px;
    border-radius: var(--radius);
    color: rgba(248, 113, 113, 0.9);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.sidebar-btn-logout i {
    width: 22px;
    text-align: center;
    font-size: 16px;
}

.sidebar-btn-logout:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}

.sidebar.collapsed .sidebar-btn-logout { justify-content: center; padding: 12px; }
.sidebar.collapsed .sidebar-btn-logout span { display: none; }

/* ===== MAIN WRAPPER ===== */
.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .main { margin-left: var(--sidebar-w-collapsed); }

/* ===== TOP BAR ===== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.toggle-sidebar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-600);
    transition: var(--transition);
    font-size: 17px;
}

.toggle-sidebar:hover {
    background: var(--primary-50);
    color: var(--primary);
}

.page-heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.page-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-900);
    letter-spacing: -0.5px;
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--text-500);
    font-weight: 500;
}

.page-breadcrumb a {
    transition: var(--transition);
}

.page-breadcrumb a:hover {
    color: var(--primary);
}

.page-breadcrumb i {
    font-size: 10px;
    color: var(--text-400);
}

.page-breadcrumb .current {
    color: var(--text-800);
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-switch {
    display: flex;
    align-items: center;
    background: var(--bg-white);
    border-radius: var(--radius-full);
    padding: 3px;
    border: 1px solid var(--border);
}

.lang-btn {
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 12px;
    color: var(--text-600);
    transition: var(--transition);
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.topbar-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-600);
    font-size: 17px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.topbar-icon-btn:hover {
    color: var(--primary);
    border-color: var(--primary-200);
    background: var(--primary-50);
    transform: translateY(-2px);
}

.topbar-icon-btn .dot-notify {
    position: absolute;
    top: 9px;
    right: 11px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--bg-white);
}

.topbar-icon-btn .badge-count {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--danger);
    color: #fff;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-white);
}

.topbar-wallet {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

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

.topbar-wallet i {
    color: var(--success);
    font-size: 15px;
}

.topbar-wallet-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.topbar-wallet-label {
    font-size: 10px;
    color: var(--text-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.topbar-wallet-amount {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-900);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 8px 5px 5px;
    border-radius: var(--radius-full);
    background: var(--bg-white);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.topbar-user:hover {
    border-color: var(--primary-200);
    box-shadow: var(--shadow-md);
}

.topbar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.topbar-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    padding-right: 6px;
}

.topbar-user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-900);
}

.topbar-user-role {
    font-size: 11px;
    color: var(--text-500);
    font-weight: 500;
}

/* ===== CONTENT ===== */
.content {
    flex: 1;
    padding: 28px;
}

/* ===== STAT CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 22px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-100);
}

.stat-card::after {
    content: "";
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, currentColor 0%, transparent 70%);
    opacity: 0.08;
    pointer-events: none;
}

.stat-card.color-blue { color: var(--primary); }
.stat-card.color-green { color: var(--success); }
.stat-card.color-orange { color: var(--secondary); }
.stat-card.color-purple { color: var(--purple); }
.stat-card.color-pink { color: var(--pink); }
.stat-card.color-teal { color: var(--teal); }

.stat-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: currentColor;
    opacity: 0.12;
    color: inherit;
}

.stat-icon i { color: inherit; }

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
}

.stat-trend.up {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.stat-trend.down {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

.stat-label {
    font-size: 13.5px;
    color: var(--text-500);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--text-900);
    line-height: 1.1;
    margin-bottom: 6px;
}

.stat-meta {
    font-size: 12.5px;
    color: var(--text-400);
}

/* ===== PANEL ROWS ===== */
.panel-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 28px;
}

.panel-grid.cols-2 {
    grid-template-columns: 2fr 1fr;
}
.panel-grid.cols-2even {
    grid-template-columns: 1fr 1fr;
}
.panel-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.panel-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border-light);
    gap: 12px;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-50);
    color: var(--primary);
    font-size: 15px;
}

.panel-title h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-900);
    letter-spacing: -0.2px;
}

.panel-title p {
    font-size: 12.5px;
    color: var(--text-500);
    font-weight: 500;
    margin-top: 2px;
}

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

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-500);
    font-size: 14px;
    background: var(--bg-50);
    border: 1px solid var(--border);
    transition: var(--transition);
}

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

.period-tabs {
    display: inline-flex;
    background: var(--bg-50);
    border: 1px solid var(--border);
    padding: 3px;
    border-radius: var(--radius-full);
}

.period-tabs button {
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-500);
    transition: var(--transition);
}

.period-tabs button.active {
    background: var(--bg-white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.panel-card-body {
    padding: 22px;
    flex: 1;
}

/* ===== CHART ===== */
.chart-container {
    width: 100%;
    height: 300px;
    position: relative;
}

.chart-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 14px 22px 20px;
    border-top: 1px solid var(--border-light);
}

.chart-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--text-600);
    font-weight: 600;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.legend-dot.blue { background: var(--primary); }
.legend-dot.green { background: var(--success); }
.legend-dot.orange { background: var(--secondary); }

/* ===== ACTIVE PRODUCTS ===== */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    transition: var(--transition);
}

.product-item:hover {
    background: var(--bg-50);
    border-color: var(--border);
}

.product-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.product-icon.blue { background: rgba(37, 99, 235, 0.1); color: var(--primary); }
.product-icon.green { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.product-icon.purple { background: rgba(139, 92, 246, 0.1); color: var(--purple); }
.product-icon.orange { background: rgba(249, 115, 22, 0.1); color: var(--secondary); }
.product-icon.teal { background: rgba(20, 184, 166, 0.1); color: var(--teal); }

.product-info {
    flex: 1;
    min-width: 0;
}

.product-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-900);
    margin-bottom: 3px;
}

.product-meta {
    font-size: 12.5px;
    color: var(--text-500);
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-progress-wrap {
    margin-top: 8px;
}

.progress-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-500);
    margin-bottom: 5px;
}

.progress-label-row .value { color: var(--text-700); }

.progress-bar {
    height: 6px;
    background: var(--bg-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
}

.progress-fill.blue { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.progress-fill.green { background: linear-gradient(90deg, var(--success), #34d399); }
.progress-fill.orange { background: linear-gradient(90deg, var(--secondary), var(--secondary-light)); }
.progress-fill.purple { background: linear-gradient(90deg, var(--purple), #a78bfa); }

.product-price {
    text-align: right;
    flex-shrink: 0;
}

.product-price-val {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-900);
}

.product-price-plan {
    font-size: 11.5px;
    color: var(--success);
    font-weight: 600;
}

/* ===== TABLE ===== */
.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.data-table thead {
    background: var(--bg-50);
}

.data-table th {
    text-align: left;
    padding: 13px 16px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-500);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-700);
    vertical-align: middle;
}

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

.data-table tbody tr:hover {
    background: var(--bg-50);
}

.txn-id {
    font-family: 'Inter', monospace;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.3px;
}

.txn-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.txn-type.credit {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.txn-type.debit {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.txn-type.service {
    background: rgba(139, 92, 246, 0.1);
    color: var(--purple);
}

.txn-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.txn-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.txn-status.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}
.txn-status.success::before { background: var(--success); }

.txn-status.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}
.txn-status.pending::before { background: var(--warning); }

.txn-status.failed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}
.txn-status.failed::before { background: var(--danger); }

.txn-amount {
    font-weight: 700;
    color: var(--text-900);
}

.txn-amount.positive { color: var(--success); }
.txn-amount.negative { color: var(--danger); }

.txn-customer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.txn-customer-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.avatar-1 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.avatar-2 { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.avatar-3 { background: linear-gradient(135deg, #f97316, #ea580c); }
.avatar-4 { background: linear-gradient(135deg, #10b981, #059669); }
.avatar-5 { background: linear-gradient(135deg, #ec4899, #be185d); }
.avatar-6 { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }

.txn-customer-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-900);
    line-height: 1.2;
}

.txn-customer-meta {
    font-size: 11.5px;
    color: var(--text-500);
}

/* ===== WORKSPACE TOOLS ===== */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.tool-tile {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 22px 18px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tool-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    transition: var(--transition);
    pointer-events: none;
}

.tool-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-100);
}

.tool-tile:hover::after {
    border-color: var(--primary);
}

.tool-tile-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 14px;
}

.tool-tile-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-900);
    margin-bottom: 4px;
}

.tool-tile-desc {
    font-size: 12px;
    color: var(--text-500);
    line-height: 1.4;
}

.tool-tile-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.badge-hot { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge-new { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-pro { background: rgba(139, 92, 246, 0.12); color: var(--purple); }

/* ===== PROFILE PAGE ===== */
.profile-cover {
    height: 160px;
    border-radius: var(--radius-md);
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.85), rgba(6, 182, 212, 0.85)),
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.2), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.15), transparent 40%);
    position: relative;
    margin-bottom: 0;
}

.profile-header {
    position: relative;
    padding: 0 28px 28px;
    margin-top: -60px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 800;
    border: 5px solid var(--bg-white);
    box-shadow: var(--shadow-xl);
    flex-shrink: 0;
}

.profile-info {
    display: flex;
    align-items: flex-end;
    gap: 22px;
    flex-wrap: wrap;
    flex: 1;
}

.profile-details h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-900);
    letter-spacing: -0.5px;
}

.profile-shop {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 14px;
    color: var(--text-600);
    font-weight: 500;
}

.profile-shop i { color: var(--secondary); }

.profile-badges {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 700;
}

.profile-badge.free-plan { background: rgba(37, 99, 235, 0.1); color: var(--primary); }
.profile-badge.verified { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.profile-badge.joined { background: var(--bg-100); color: var(--text-600); }

.profile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    white-space: nowrap;
    border: 1.5px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 6px 16px -4px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -4px rgba(37, 99, 235, 0.45); }

.btn-outline {
    background: var(--bg-white);
    color: var(--text-700);
    border-color: var(--border);
}

.btn-outline:hover { border-color: var(--primary-200); color: var(--primary); background: var(--primary-50); }

.btn-sm { padding: 8px 14px; font-size: 13px; }

.profile-section {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-top: 20px;
}

.profile-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-light);
}

.profile-section-title h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-900);
}

.profile-section-body {
    padding: 22px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-700);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text-800);
    background: var(--bg-white);
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-control:hover { border-color: var(--text-300); }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); }

textarea.form-control { min-height: 100px; resize: vertical; }

.form-full { grid-column: 1 / -1; }

/* ===== SETTINGS TOGGLES ===== */
.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-light);
    gap: 18px;
}

.setting-item:last-child { border-bottom: none; }

.setting-info {
    flex: 1;
}

.setting-info h4 {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-900);
    margin-bottom: 4px;
}

.setting-info p {
    font-size: 12.5px;
    color: var(--text-500);
    line-height: 1.5;
}

.toggle {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-200);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.toggle-slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: var(--bg-white);
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.toggle input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

/* ===== FILTER BAR ===== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-50);
}

.search-input {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-input i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 13px;
    color: var(--text-400);
    font-size: 14px;
}

.search-input input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13.5px;
    background: var(--bg-white);
    outline: none;
    font-family: inherit;
    transition: var(--transition);
}

.search-input input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.filter-select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
    font-size: 13px;
    color: var(--text-700);
    font-family: inherit;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus {
    border-color: var(--primary);
}

/* ===== RECENT ACTIVITY ===== */
.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    gap: 14px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(255,255,255,1);
}

.activity-dot.blue { background: var(--primary); }
.activity-dot.green { background: var(--success); }
.activity-dot.orange { background: var(--secondary); }
.activity-dot.purple { background: var(--purple); }
.activity-dot.pink { background: var(--pink); }

.activity-content { flex: 1; }
.activity-text {
    font-size: 13.5px;
    color: var(--text-700);
    line-height: 1.45;
}

.activity-text strong {
    color: var(--text-900);
    font-weight: 700;
}

.activity-time {
    font-size: 11.5px;
    color: var(--text-400);
    margin-top: 4px;
    font-weight: 500;
}

/* ===== EMPTY / FILLER ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-500);
}

.empty-state-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--bg-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: var(--text-400);
}

.empty-state h4 {
    font-size: 16px;
    color: var(--text-800);
    margin-bottom: 6px;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
    gap: 12px;
}

.pagination-info {
    font-size: 13px;
    color: var(--text-500);
}

.pagination-info strong { color: var(--text-800); }

.pagination-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-600);
    background: var(--bg-white);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.page-btn:hover { color: var(--primary); border-color: var(--primary-200); background: var(--primary-50); }
.page-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border-color: transparent;
}
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .panel-grid.cols-2,
    .panel-grid.cols-2even,
    .panel-grid.cols-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .sidebar {
        width: var(--sidebar-w-collapsed);
    }
    .sidebar .sidebar-brand-text,
    .sidebar .sidebar-user-info,
    .sidebar .sidebar-section-title,
    .sidebar .sidebar-link span,
    .sidebar .sidebar-link .menu-badge,
    .sidebar .sidebar-btn-logout span {
        display: none;
    }
    .sidebar .sidebar-link,
    .sidebar .sidebar-btn-logout {
        justify-content: center;
        padding: 12px;
    }
    .main { margin-left: var(--sidebar-w-collapsed); }

    .topbar-user-info,
    .topbar-wallet-text,
    .page-breadcrumb { display: none; }

    .form-grid { grid-template-columns: 1fr; }

    .profile-header { flex-direction: column; align-items: flex-start; }
    .profile-info { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
    .content { padding: 18px 14px; }
    .topbar { padding: 0 14px; min-height: 64px; }
    .stats-grid { gap: 14px; }
    .stat-card { padding: 18px; }
    .stat-value { font-size: 24px; }
    .chart-container { height: 240px; }
    .panel-card-header { padding: 16px; }
    .panel-card-body { padding: 16px; }
    .profile-cover { height: 110px; }
    .profile-avatar-large { width: 90px; height: 90px; font-size: 32px; border-radius: 22px; }
    .profile-details h2 { font-size: 22px; }
    .lang-switch { display: none; }
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 45;
}

@media (max-width: 960px) {
    .sidebar.open {
        width: var(--sidebar-w);
    }
    .sidebar.open .sidebar-brand-text,
    .sidebar.open .sidebar-user-info,
    .sidebar.open .sidebar-section-title,
    .sidebar.open .sidebar-link span,
    .sidebar.open .sidebar-link .menu-badge,
    .sidebar.open .sidebar-btn-logout span {
        display: block;
    }
    .sidebar.open .sidebar-link,
    .sidebar.open .sidebar-btn-logout {
        justify-content: flex-start;
        padding: 10.5px 12px;
    }
    .sidebar.open ~ .mobile-menu-overlay { display: block; }
}
