@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --deep-blue: #1E3A8A;
  --vibrant-green: #22C55E;
  --warm-coral: #F97316;
  --soft-gray: #F3F4F6;
  --charcoal: #1F2937;
  --white: #FFFFFF;
  --border: #E5E7EB;
  --danger: #EF4444;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --input-border: #D1D5DB;
  --green-tint: #F0FDF4;
  --blue-tint: #EFF6FF;
}

* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Inter',sans-serif; background:var(--soft-gray); color:var(--charcoal); font-size:16px; line-height:1.5; }
h1,h2,h3 { font-family:'Plus Jakarta Sans',sans-serif; color:var(--deep-blue); }

/* LAYOUT */
.app { display:flex; height:100vh; overflow:hidden; }

/* SIDEBAR */
.sidebar {
  width:260px; background:var(--white); border-right:1px solid var(--border);
  display:flex; flex-direction:column; flex-shrink:0;
  transition: transform .3s ease; height:100vh;
}
.sidebar-profile { padding:24px; border-bottom:1px solid var(--border); }
.sidebar-profile .avatar { width:48px; height:48px; border-radius:50%; background:var(--deep-blue); display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:18px; }
.sidebar-profile .name { font-size:16px; font-weight:600; color:var(--charcoal); margin-top:8px; }
.sidebar-profile .link { font-size:13px; color:var(--text-muted); cursor:pointer; margin-top:4px; }
.sidebar-profile .link:hover { color:var(--vibrant-green); }

.sidebar-nav { flex:1; padding:8px 0; overflow-y:auto; min-height:0; }
.nav-item {
  display:flex; align-items:center; height:48px; padding:0 16px; gap:12px;
  cursor:pointer; font-size:15px; font-weight:700; color:var(--text-muted);
  border-left:3px solid transparent; transition: all .2s ease;
}
.nav-item span { flex:1; }
.nav-chevron {
  width:16px; height:16px; flex-shrink:0;
  transform: rotate(180deg);
  opacity: 0.6;
}
.nav-item.active .nav-chevron { opacity: 1; }
.nav-item:hover { background:#F9FAFB; }
.nav-item.active { color:var(--vibrant-green); border-left-color:var(--vibrant-green); background:var(--green-tint); }
.nav-item svg { width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:1.5; flex-shrink:0; }

.nav-children { display:none; }
.nav-children.open { display:block; }
.nav-child {
  display:flex; align-items:center; height:40px; padding-left:52px; padding-right:16px;
  font-size:13px; font-weight:400; color:var(--text-muted); cursor:pointer; transition:.2s;
}
.nav-child:hover { background:#F9FAFB; }
.nav-child.active { color:var(--vibrant-green); }

.sidebar-bottom {
  border-top:1px solid var(--border); padding:16px;
}
.sidebar-bottom .help { font-size:13px; color:var(--text-muted); cursor:pointer; margin-bottom:8px; }
.sidebar-bottom .version { font-size:11px; color:var(--input-border); }
.logout-btn {
  display:flex; align-items:center; gap:12px; height:48px; padding:0 16px;
  color:var(--danger); font-size:14px; font-weight:500; cursor:pointer; border:none; background:none; width:100%;
}
.logout-btn:hover { background:#FEF2F2; }
.logout-btn svg { width:20px; height:20px; stroke:var(--danger); fill:none; stroke-width:1.5; }

/* MAIN */
.main { flex:1; display:flex; flex-direction:column; overflow:hidden; }

/* TOP BAR */
.topbar {
  height:64px; background:var(--deep-blue); border-bottom:none;
  display:flex; align-items:center; justify-content:space-between; padding:0 16px; flex-shrink:0;
}
.topbar-left { display:flex; align-items:center; gap:12px; }
.topbar-left .logo { font-family:'Plus Jakarta Sans',sans-serif; font-weight:700; font-size:20px; color:#fff; }
.hamburger { display:none; background:none; border:none; cursor:pointer; }
.hamburger svg { width:24px; height:24px; stroke:#fff; fill:none; stroke-width:1.5; }
.sidebar-close { display:none; position:absolute; top:12px; right:12px; background:none; border:none; cursor:pointer; color:#6B7280; z-index:10; padding:4px; border-radius:6px; transition:background .2s; }
.sidebar-close:hover { background:#F3F4F6; color:#1F2937; }
.sidebar-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:99; }
.topbar-center { position:relative; }
.campaign-selector {
  display:flex; align-items:center; gap:8px; cursor:pointer; padding:8px 12px;
  border-radius:8px; font-size:20px; font-weight:700; color:#fff; transition:.2s;
}
.campaign-selector:hover { background:rgba(255,255,255,0.1); }
.campaign-selector svg { width:16px; height:16px; stroke:#fff; fill:none; stroke-width:1.5; }
.topbar-right { display:flex; align-items:center; gap:16px; }
.notif-bell { position:relative; cursor:pointer; background:none; border:none; }
.notif-bell svg { width:24px; height:24px; stroke:#fff; fill:none; stroke-width:1.5; }
.notif-dot { position:absolute; top:0; right:0; width:8px; height:8px; background:var(--danger); border-radius:50%; }
.user-info { display:flex; align-items:center; gap:8px; cursor:pointer; }
.user-info .mini-avatar { width:36px; height:36px; border-radius:50%; background:var(--deep-blue); display:flex; align-items:center; justify-content:center; color:#fff; font-size:13px; font-weight:700; }
.user-info .uname { font-size:14px; font-weight:500; }

/* CONTENT */
.content-area { flex:1; overflow-y:auto; padding:14px 32px; background:var(--soft-gray); }
.content-inner { max-width:960px; margin:0 auto; }
.page-title { font-size:24px; font-weight:700; color:var(--deep-blue); margin-bottom:24px; }
.breadcrumbs { font-size:13px; color:var(--text-light); margin-top:-16px; margin-bottom:16px; }

/* CARDS */
.card { background:var(--white); border-radius:12px; border:1px solid var(--border); padding:24px; margin-bottom:24px; }
.card-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.card-header h3 { font-size:18px; font-weight:600; }

.stat-cards { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:24px; }
.stat-card { background:var(--white); border-radius:12px; border:1px solid var(--border); padding:20px; }
.stat-icon { width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center; margin-bottom:8px; }
.stat-icon svg { width:20px; height:20px; stroke:#fff; fill:none; stroke-width:1.5; }
.stat-value { font-family:'Plus Jakarta Sans',sans-serif; font-size:28px; font-weight:700; color:var(--charcoal); display:flex; align-items:center; gap:8px; }
.stat-trend { font-size:12px; display:flex; align-items:center; gap:2px; }
.stat-trend.up { color:var(--vibrant-green); }
.stat-trend.down { color:var(--warm-coral); }
.stat-label { font-size:14px; color:var(--text-muted); margin-top:4px; }

/* STATUS BANNER */
.status-banner { border-left:4px solid var(--vibrant-green); }
.status-banner.paused { border-left-color:var(--warm-coral); }
.banner-row { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; }
.banner-left { display:flex; align-items:center; gap:12px; }
.banner-right { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text-light); }
.quick-actions { margin-top:16px; padding-top:12px; border-top:1px solid var(--soft-gray); display:flex; gap:8px; flex-wrap:wrap; }
.quick-actions a { font-size:14px; font-weight:500; color:var(--deep-blue); text-decoration:none; cursor:pointer; }
.quick-actions a:hover { text-decoration:underline; }
.quick-actions .dot { color:var(--text-light); }

/* BADGES */
.badge { display:inline-flex; align-items:center; padding:0 12px; height:24px; border-radius:12px; font-size:12px; font-weight:700; }
.badge-green { background:var(--vibrant-green); color:#fff; }
.badge-coral { background:var(--warm-coral); color:#fff; }
.badge-gray { background:var(--text-muted); color:#fff; }
.badge-blue { background:var(--deep-blue); color:#fff; }

/* PROGRESS BAR */
.progress-wrap { margin-bottom:24px; }
.progress-labels { display:flex; justify-content:space-between; margin-bottom:8px; }
.progress-labels .raised { font-size:16px; font-weight:600; }
.progress-labels .goal { font-size:16px; color:var(--text-light); }
.progress-bar { height:12px; border-radius:6px; background:var(--border); overflow:hidden; }
.progress-fill { height:100%; border-radius:6px; background:var(--vibrant-green); transition:width .5s ease; }
.progress-stats { display:flex; gap:16px; margin-top:8px; font-size:14px; }
.progress-stats .pct { font-weight:600; color:var(--vibrant-green); }
.progress-stats span { color:var(--text-muted); }

/* ACTIVITY */
.activity-item { display:flex; align-items:center; padding:12px 0; border-bottom:1px solid var(--soft-gray); gap:12px; cursor:pointer; transition:.2s; }
.activity-item:hover { background:#F9FAFB; margin:0 -24px; padding:12px 24px; }
.activity-avatar { width:32px; height:32px; border-radius:50%; background:var(--vibrant-green); display:flex; align-items:center; justify-content:center; color:#fff; font-size:12px; font-weight:700; flex-shrink:0; }
.activity-text { flex:1; font-size:14px; }
.activity-text strong { font-weight:600; }
.activity-time { font-size:13px; color:var(--text-light); white-space:nowrap; }

/* SHARE CARD */
.url-row { display:flex; gap:8px; margin-top:16px; }
.url-input { flex:1; padding:0 14px; height:44px; border:1px solid var(--input-border); border-radius:8px; font-size:14px; color:var(--text-muted); background:var(--white); }
.social-icons { display:flex; gap:12px; margin-top:16px; flex-wrap:wrap; }
.social-btn { width:44px; height:44px; border-radius:50%; border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:transform .2s; }
.social-btn:hover { transform:scale(1.05); }
.social-btn svg { width:20px; height:20px; }

/* BUTTONS */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; border:none; cursor:pointer; font-family:'Inter',sans-serif; font-weight:600; font-size:15px; transition:all .2s; }
.btn-primary { background:var(--vibrant-green); color:#fff; height:44px; padding:0 24px; border-radius:24px; }
.btn-primary:hover { filter:brightness(0.9); }
.btn-outlined { background:var(--white); color:var(--deep-blue); height:40px; padding:0 20px; border-radius:24px; border:1px solid var(--border); }
.btn-outlined:hover { background:#F9FAFB; }
.btn-sm { height:36px; font-size:14px; padding:0 16px; }
.btn-danger { background:var(--danger); color:#fff; height:44px; padding:0 24px; border-radius:24px; }
.btn-danger:hover { filter:brightness(0.9); }
.text-link { background:none; border:none; color:var(--vibrant-green); font-size:14px; font-weight:500; cursor:pointer; }
.text-link:hover { text-decoration:underline; }

/* TABLES */
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; }
thead th { background:#F9FAFB; height:40px; padding:0 16px; text-align:left; font-size:13px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:.5px; border-bottom:1px solid var(--border); }
tbody td { height:52px; padding:0 16px; font-size:14px; border-bottom:1px solid var(--soft-gray); vertical-align:middle; }
tbody tr:hover { background:#F9FAFB; }
.text-green { color:var(--vibrant-green); font-weight:600; }
.text-coral { color:var(--warm-coral); }
.text-red { color:var(--danger); }
.text-muted { color:var(--text-muted); }
.text-light { color:var(--text-light); }

/* FORMS */
.form-group { margin-bottom:16px; }
.form-label { display:block; font-size:14px; font-weight:500; color:var(--charcoal); margin-bottom:4px; }
.form-input { width:100%; height:44px; padding:0 14px; border:1px solid var(--input-border); border-radius:8px; font-size:16px; font-family:'Inter',sans-serif; background:var(--white); transition:border .2s; }
.form-input:focus { outline:none; border-color:var(--vibrant-green); }
textarea.form-input { height:auto; min-height:120px; padding:14px; resize:vertical; }
.form-helper { font-size:13px; color:var(--text-light); margin-top:4px; }
.form-row { display:flex; gap:12px; }

/* FILTER TABS */
.filter-tabs { display:flex; gap:8px; }
.filter-tab { height:36px; padding:0 12px; border-radius:18px; border:1px solid var(--input-border); background:var(--white); font-size:14px; font-weight:500; color:var(--charcoal); cursor:pointer; transition:.2s; }
.filter-tab:hover { background:#F9FAFB; }
.filter-tab.active { background:var(--vibrant-green); color:#fff; border-color:var(--vibrant-green); font-weight:600; }

/* CAMPAIGN LIST CARDS */
.campaign-card { display:flex; align-items:center; padding:20px; gap:16px; }
.campaign-card:hover { border-color:var(--input-border); }
.campaign-thumb { width:80px; height:80px; border-radius:8px; background:var(--soft-gray); display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:24px; }
.campaign-info { flex:1; }
.campaign-info h4 { font-size:16px; font-weight:600; color:var(--deep-blue); margin-bottom:4px; }
.campaign-info .meta { font-size:13px; color:var(--text-muted); }
.campaign-info .cid { font-size:13px; color:var(--text-light); }
.campaign-right { text-align:right; flex-shrink:0; }
.campaign-right .amount { font-size:14px; font-weight:600; color:var(--charcoal); }
.mini-progress { width:120px; height:4px; border-radius:2px; background:var(--border); margin-top:4px; overflow:hidden; }
.mini-progress-fill { height:100%; border-radius:2px; background:var(--vibrant-green); }
.campaign-actions { display:flex; gap:8px; flex-shrink:0; }
.icon-btn { width:36px; height:36px; border-radius:8px; border:1px solid var(--border); background:var(--white); cursor:pointer; display:flex; align-items:center; justify-content:center; transition:.2s; }
.icon-btn:hover { background:var(--soft-gray); }
.icon-btn svg { width:16px; height:16px; stroke:var(--charcoal); fill:none; stroke-width:1.5; }

/* LEDGER */
.ledger-table { border-radius:8px; border:1px solid var(--border); overflow:hidden; }
.ledger-row { display:flex; justify-content:space-between; align-items:center; height:52px; padding:0 20px; border-bottom:1px solid var(--soft-gray); }
.ledger-row:last-child { border-bottom:none; background:var(--green-tint); }
.ledger-row .label { font-size:14px; }
.ledger-row .value { font-size:14px; font-weight:600; }
.ledger-row:last-child .label { font-weight:600; color:var(--deep-blue); }
.ledger-row:last-child .value { font-family:'Plus Jakarta Sans',sans-serif; font-size:20px; font-weight:700; color:var(--vibrant-green); }

/* BANK CARD */
.bank-info { display:flex; justify-content:space-between; align-items:center; }
.bank-details h4 { font-size:16px; font-weight:600; margin-bottom:4px; }
.bank-details p { font-size:14px; color:var(--text-muted); margin-bottom:2px; }

/* TOGGLE SWITCH */
.toggle { position:relative; display:inline-block; width:40px; height:20px; cursor:pointer; }
.toggle input { opacity:0; width:0; height:0; }
.toggle-slider { position:absolute; inset:0; background:var(--input-border); border-radius:10px; transition:.2s; }
.toggle-slider::before { content:''; position:absolute; width:16px; height:16px; border-radius:50%; background:#fff; left:2px; top:2px; transition:.2s; }
.toggle input:checked + .toggle-slider { background:var(--vibrant-green); }
.toggle input:checked + .toggle-slider::before { transform:translateX(20px); }

/* NOTIFICATION ITEMS */
.notif-item { display:flex; align-items:center; padding:16px; border-bottom:1px solid var(--soft-gray); gap:12px; cursor:pointer; transition:.2s; }
.notif-item:hover { background:#F9FAFB; }
.notif-item.unread { border-left:3px solid var(--vibrant-green); background:var(--green-tint); }
.notif-icon { width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; }

/* MODAL */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.5); display:flex; align-items:center; justify-content:center; z-index:1000; opacity:0; pointer-events:none; transition:opacity .2s; }
.modal-overlay.open { opacity:1; pointer-events:auto; }
.modal { background:var(--white); border-radius:16px; padding:32px; max-width:540px; width:90%; transform:scale(.95); transition:transform .3s; text-align:center; }
.modal-overlay.open .modal { transform:scale(1); }
.modal-icon { width:48px; height:48px; border-radius:50%; display:flex; align-items:center; justify-content:center; margin:0 auto 16px; font-size:24px; }
.modal h3 { font-size:20px; font-weight:700; margin-bottom:8px; }
.modal p { font-size:14px; color:var(--text-muted); margin-bottom:24px; }
.modal-btns { display:flex; gap:12px; }
.modal-btns .btn { flex:1; }

/* RADIO CARDS */
.radio-card { display:flex; align-items:center; gap:12px; padding:16px; border:1px solid var(--border); border-radius:8px; cursor:pointer; transition:.2s; }
.radio-card:hover { border-color:var(--input-border); }
.radio-card.selected { border:2px solid var(--vibrant-green); background:var(--green-tint); }
.radio-circle { width:20px; height:20px; border-radius:50%; border:2px solid var(--input-border); flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.radio-card.selected .radio-circle { border-color:var(--vibrant-green); }
.radio-card.selected .radio-circle::after { content:''; width:10px; height:10px; border-radius:50%; background:var(--vibrant-green); }

/* STATS GRID 3x2 */
.stats-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:32px; }

/* CHART PLACEHOLDER */
.chart-area { height:280px; background:linear-gradient(180deg, var(--green-tint) 0%, var(--white) 100%); border-radius:8px; display:flex; align-items:flex-end; padding:20px; position:relative; overflow:hidden; }
.chart-line { width:100%; height:200px; position:relative; }
.chart-svg { width:100%; height:100%; }

/* PAGINATION */
.pagination { display:flex; justify-content:space-between; align-items:center; margin-top:16px; }
.pagination .info { font-size:13px; color:var(--text-light); }
.page-btns { display:flex; gap:4px; }
.page-btn { width:32px; height:32px; border-radius:6px; border:1px solid var(--border); background:var(--white); cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:13px; transition:.2s; }
.page-btn:hover { background:var(--soft-gray); }
.page-btn.active { background:var(--vibrant-green); color:#fff; border-color:var(--vibrant-green); }

/* SESSION TABLE */
.session-badge { font-size:13px; color:var(--vibrant-green); background:var(--green-tint); padding:2px 8px; border-radius:8px; }

/* OTP */
.otp-group { display:flex; gap:12px; justify-content:center; margin:24px 0; }
.otp-box { width:48px; height:48px; border-radius:8px; border:1px solid var(--input-border); text-align:center; font-size:24px; font-family:'Plus Jakarta Sans',sans-serif; font-weight:700; }
.otp-box:focus { outline:none; border-color:var(--vibrant-green); }

/* STRENGTH BAR */
.strength-bar { display:flex; gap:4px; margin-top:8px; }
.strength-seg { flex:1; height:4px; border-radius:2px; background:var(--border); }
.strength-seg.active.weak { background:var(--danger); }
.strength-seg.active.fair { background:var(--warm-coral); }
.strength-seg.active.good { background:#EAB308; }
.strength-seg.active.strong { background:var(--vibrant-green); }

/* DELETE SECTION */
.delete-section { margin-top:48px; padding-top:24px; border-top:1px solid rgba(239,68,68,.2); }

/* INFO BANNER */
.info-banner { background:var(--blue-tint); border-radius:8px; padding:16px; display:flex; gap:12px; align-items:flex-start; font-size:14px; color:#1E40AF; margin-bottom:16px; }

/* TOAST */
.toast { position:fixed; bottom:24px; right:24px; height:48px; padding:0 20px; border-radius:8px; display:flex; align-items:center; gap:8px; font-size:14px; font-weight:500; color:#fff; z-index:2000; transform:translateX(120%); transition:transform .2s; }
.toast.show { transform:translateX(0); }
.toast.success { background:var(--vibrant-green); }
.toast.error { background:var(--danger); }

/* Export Dropdown */
.export-dropdown { display:none; position:absolute; top:calc(100% + 6px); right:0; background:#fff; border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,.12); border:1px solid #E5E7EB; min-width:170px; z-index:50; overflow:hidden; }
.export-dropdown.open { display:block; animation:fadeDropdown .15s ease; }
.export-dropdown button { display:flex; align-items:center; gap:10px; width:100%; padding:12px 16px; border:none; background:none; font:500 14px 'Inter',sans-serif; color:#374151; cursor:pointer; transition:background .15s; text-align:left; }
.export-dropdown button:hover { background:#F3F4F6; }
.export-dropdown button:not(:last-child) { border-bottom:1px solid #F3F4F6; }
@keyframes fadeDropdown { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }

/* RESPONSIVE */
/* Single Campaign Header */
.sc-header { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.sc-title-row { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.sc-id { font-size:14px; color:#9CA3AF; white-space:nowrap; }
.sc-actions { display:flex; gap:12px; margin-top:16px; flex-wrap:wrap; }

@media(max-width:768px) {
  .sidebar { position:fixed; left:0; top:0; bottom:0; z-index:100; transform:translateX(-100%); transition:transform .3s ease; }
  .sidebar.open { transform:translateX(0); }
  .sidebar-close { display:block; }
  .sidebar-overlay.open { display:block; }
  .hamburger { display:block; }
  .stat-cards { grid-template-columns:repeat(2,1fr); }
  .stats-grid { grid-template-columns:repeat(2,1fr); }
  .content-area { padding:16px; }
  .sc-header { flex-direction:column; align-items:flex-start; }
  .sc-actions { flex-direction:column; }
  .sc-actions .btn { width:100%; text-align:center; }
  .banner-row { flex-direction:column; gap:12px; }
  .banner-right { text-align:left; }
  .quick-actions { flex-wrap:wrap; }
  .card-header { flex-direction:column; align-items:flex-start; gap:8px; }
  /* Responsive Tables — stacked card layout */
  .table-wrap { overflow-x:visible; }
  .table-wrap table { min-width:0; }
  .table-wrap table thead { display:none; }
  .table-wrap table tbody tr { display:block; background:#fff; border:1px solid #E5E7EB; border-radius:10px; margin-bottom:12px; padding:14px 16px; }
  .table-wrap table tbody tr:hover { background:#F9FAFB; }
  .table-wrap table tbody td { display:flex; justify-content:space-between; align-items:center; padding:6px 0; height:auto; border-bottom:1px solid #F3F4F6; font-size:14px; }
  .table-wrap table tbody td:last-child { border-bottom:none; }
  .table-wrap table tbody td::before { content:attr(data-label); font:600 12px 'Inter',sans-serif; color:#6B7280; text-transform:uppercase; letter-spacing:.4px; flex-shrink:0; margin-right:16px; }
  .ledger-row { flex-direction:column; gap:4px; }
}
@media(max-width:480px) {
  .stat-cards,.stats-grid { grid-template-columns:1fr; }
  .campaign-card { flex-direction:column; align-items:flex-start; }
  .campaign-right { text-align:left; }
  .sc-title-row span:first-child { font-size:18px !important; }
}
