/* =====================================================
   PRINTSD PRO — Premium UI
   Glassmorphism + Crystal design system
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

:root {
  --primary:        #5b21b6;
  --primary-dark:   #4c1d95;
  --primary-light:  #ede9fe;
  --accent:         #7c3aed;
  --accent2:        #2563eb;
  --bg:             #f0f2fa;
  --card:           rgba(255,255,255,0.85);
  --card-solid:     #ffffff;
  --text:           #1e1b4b;
  --muted:          #6b7280;
  --border:         rgba(255,255,255,0.6);
  --border-hard:    #e5e7eb;
  --green:          #059669;
  --green-bg:       #d1fae5;
  --red:            #dc2626;
  --red-bg:         #fee2e2;
  --blue:           #2563eb;
  --blue-bg:        #dbeafe;
  --yellow:         #d97706;
  --yellow-bg:      #fef3c7;
  --shadow-sm:      0 1px 4px rgba(91,33,182,.08);
  --shadow:         0 4px 20px rgba(91,33,182,.12);
  --shadow-lg:      0 12px 40px rgba(91,33,182,.18);
  --shadow-hover:   0 8px 30px rgba(91,33,182,.22);
  --glass:          rgba(255,255,255,0.72);
  --glass-border:   rgba(255,255,255,0.55);
  --sidebar-w:      270px;
  --topbar-h:       60px;
  --radius:         16px;
  --radius-sm:      10px;
  --radius-xs:      7px;
  --transition:     .18s cubic-bezier(.4,0,.2,1);
}

html, body { height: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 800px 600px at 10% 5%, rgba(124,58,237,.10) 0%, transparent 70%),
    radial-gradient(ellipse 600px 500px at 90% 80%, rgba(37,99,235,.08) 0%, transparent 70%);
  background-attachment: fixed;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--accent); }

/* Layout */
.app-shell { min-height: 100vh; display: flex; }
.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Admin Sidebar */
.sidebar.sidebar-admin {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0f0c29 0%, #1a1060 50%, #0f172a 100%);
  color: #e2e8f0;
  padding: 20px 16px 24px;
  display: flex; flex-direction: column;
  position: sticky; top: 0;
  height: 100vh; overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.sidebar-admin .sb-brand {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px; padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-admin .sb-logo {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  color: #0f172a; border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 18px; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(245,158,11,.4);
}
.sidebar-admin .sb-name { color: #fff; font-weight: 700; font-size: 16px; line-height: 1.2; }
.sidebar-admin .sb-name small { font-weight: 400; font-size: 12px; color: #94a3b8; display: block; }
.sidebar-admin .sb-section {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: #475569;
  padding: 16px 12px 8px; margin-top: 4px;
}
.sidebar-admin .sb-nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar-admin .sb-nav a {
  display: flex; align-items: center; gap: 12px;
  color: #94a3b8; padding: 11px 14px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.sidebar-admin .sb-nav a .nav-icon {
  width: 32px; height: 32px; background: rgba(255,255,255,.06);
  border-radius: 8px; display: grid; place-items: center;
  font-size: 14px; flex-shrink: 0; transition: background var(--transition);
}
.sidebar-admin .sb-nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.sidebar-admin .sb-nav a.active { background: rgba(124,58,237,.35); color: #fff; font-weight: 600; }
.sidebar-admin .sb-nav a.active .nav-icon { background: rgba(124,58,237,.5); }
.sidebar-admin .sb-divider { height: 1px; background: rgba(255,255,255,.06); margin: 16px 0 12px; }
.sidebar-admin .sb-bottom { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.06); }
.sidebar-admin .sb-userlabel { font-size: 12px; color: #64748b; padding: 0 4px 10px; }
.sidebar-admin .sb-btn {
  display: block; width: 100%;
  background: rgba(255,255,255,.1); color: #fff; text-align: center;
  padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: 13px;
  margin-bottom: 8px; border: none; cursor: pointer;
  transition: background var(--transition);
}
.sidebar-admin .sb-btn:hover { background: rgba(255,255,255,.18); text-decoration: none; }

/* User Sidebar */
.sidebar.sidebar-user {
  width: var(--sidebar-w);
  background: var(--glass);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  color: var(--text);
  padding: 18px 14px 24px;
  display: flex; flex-direction: column;
  position: sticky; top: 0;
  height: 100vh; overflow-y: auto;
  flex-shrink: 0;
}
.sidebar-user .sb-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 8px 18px; margin-bottom: 10px;
  border-bottom: 1px solid var(--border-hard);
}
.sidebar-user .sb-logo {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 16px; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(91,33,182,.35);
}
.sidebar-user .sb-name { font-weight: 800; font-size: 17px; color: var(--primary); letter-spacing: -.3px; }
.sidebar-user .sb-section {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: #9ca3af; padding: 16px 12px 8px;
}
.sidebar-user .sb-nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar-user .sb-nav a {
  display: flex; align-items: center; gap: 12px;
  color: #374151; padding: 10px 12px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.sidebar-user .sb-nav a .sb-ico {
  width: 30px; height: 30px;
  background: #fff; border: 1px solid var(--border-hard);
  border-radius: 8px; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: var(--primary);
  flex-shrink: 0; transition: all var(--transition);
}
.sidebar-user .sb-nav a:hover { background: rgba(91,33,182,.06); color: var(--primary); text-decoration: none; }
.sidebar-user .sb-nav a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.sidebar-user .sb-nav a.active .sb-ico { background: var(--primary); color: #fff; border-color: var(--primary); }
.sidebar-user .sb-bottom { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border-hard); }
.sidebar-user .sb-userlabel { font-size: 12px; color: var(--muted); padding: 0 12px 10px; }
.sidebar-user .sb-btn {
  display: block; width: 100%; text-align: center;
  background: var(--primary); color: #fff;
  padding: 10px; border-radius: 10px; font-size: 13px; font-weight: 600;
  margin-bottom: 8px; border: none; cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 12px rgba(91,33,182,.25);
}
.sidebar-user .sb-btn:hover { background: var(--primary-dark); text-decoration: none; box-shadow: 0 6px 16px rgba(91,33,182,.35); }
.sidebar-user .sb-btn-outline { background: rgba(91,33,182,.08); color: var(--primary); border: 1px solid rgba(91,33,182,.25); box-shadow: none; }
.sidebar-user .sb-btn-outline:hover { background: var(--primary-light); box-shadow: none; }

.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 55; backdrop-filter: blur(2px); }
.sidebar-backdrop.show { display: block; }

/* Top Bar */
.app-topbar {
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent2) 100%);
  color: #fff; height: var(--topbar-h); padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  position: sticky; top: 0; z-index: 40;
  box-shadow: 0 2px 16px rgba(91,33,182,.2);
}
.app-topbar.admin { background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 100%); }
.app-topbar .tb-left { display: flex; align-items: center; gap: 14px; }
.tb-toggle {
  display: none; background: rgba(255,255,255,.18); color: #fff;
  width: 40px; height: 40px; border: none; border-radius: 10px;
  font-size: 20px; cursor: pointer; transition: background var(--transition);
}
.tb-toggle:hover { background: rgba(255,255,255,.28); }
.app-topbar .tb-back {
  background: rgba(255,255,255,.18); color: #fff; border: none;
  width: 36px; height: 36px; border-radius: 9px;
  display: grid; place-items: center; cursor: pointer;
  font-size: 17px; font-weight: 700; text-decoration: none;
  transition: background var(--transition);
}
.app-topbar .tb-back:hover { background: rgba(255,255,255,.28); text-decoration: none; }
.app-topbar .tb-title { font-size: 15px; font-weight: 600; }
.app-topbar .tb-right { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.tb-balance-pill {
  background: rgba(255,255,255,.18); padding: 6px 14px;
  border-radius: 999px; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255,255,255,.3);
}
.tb-balance-pill strong { color: #fde047; }
.tb-user-chip { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.tb-user-chip span { opacity: .8; }

/* Content */
.content { flex: 1; padding: 28px 28px 48px; max-width: 100%; }
.page-title { font-size: 24px; font-weight: 800; margin-bottom: 5px; letter-spacing: -.4px; }
.page-sub { color: var(--muted); margin-bottom: 24px; font-size: 14px; }

/* Glassmorphism Panel */
.panel {
  background: var(--glass);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); margin-bottom: 24px;
}
.panel-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

/* Stat Cards */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-bottom: 28px; }
.stat-card {
  background: var(--glass);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 22px 20px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--primary); border-radius: var(--radius) var(--radius) 0 0;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.stat-card .stat-label { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 28px; font-weight: 800; color: var(--text); letter-spacing: -.5px; }
.stat-card .stat-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.stat-card.green::before { background: var(--green); }
.stat-card.red::before   { background: var(--red); }
.stat-card.yellow::before{ background: var(--yellow); }
.stat-card.blue::before  { background: var(--blue); }
.stat-icon { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 36px; opacity: .12; }

/* Service Grid */
.service-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
@media (max-width: 1400px) { .service-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1200px) { .service-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 960px)  { .service-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .service-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

.service-card {
  background: var(--glass); backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 18px 14px 16px; text-align: center; cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none; color: var(--text); position: relative;
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: var(--primary); text-decoration: none; color: var(--text); }
.service-icon {
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: var(--primary);
  display: grid; place-items: center; font-weight: 800; font-size: 22px;
  box-shadow: 0 4px 14px rgba(91,33,182,.18), inset 0 0 0 3px #fff;
}
.service-icon img { width: 36px; height: 36px; object-fit: contain; display: block; }
.service-title { font-weight: 700; font-size: 13px; color: var(--text); line-height: 1.25; min-height: 32px; }
.service-sub { font-size: 11px; color: var(--muted); }
.service-price { color: var(--primary); font-weight: 800; font-size: 17px; }
.service-unit { font-size: 10px; color: var(--muted); }
.service-off-overlay {
  position: absolute; inset: 0; border-radius: var(--radius);
  background: rgba(255,255,255,.8); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--red);
}

/* Category Cards */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 28px; }
@media (max-width: 900px) { .cat-grid { grid-template-columns: 1fr; } }
.cat-card {
  display: block; background: var(--glass); backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 24px 22px; text-decoration: none; color: var(--text);
  box-shadow: var(--shadow); transition: transform var(--transition), box-shadow var(--transition);
  position: relative; overflow: hidden;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); text-decoration: none; }
.cat-card .cat-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; font-weight: 800; font-size: 22px;
  color: #fff; margin-bottom: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.cat-card .cat-name { font-weight: 800; font-size: 17px; margin-bottom: 4px; }
.cat-card .cat-count { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.cat-card .cat-desc { font-size: 13px; color: var(--muted); line-height: 1.45; }
.cat-govt  { border-top: 4px solid var(--green); }
.cat-govt  .cat-icon { background: linear-gradient(135deg, #059669, #10b981); }
.cat-print { border-top: 4px solid var(--red); }
.cat-print .cat-icon { background: linear-gradient(135deg, #dc2626, #ef4444); }
.cat-other { border-top: 4px solid var(--primary); }
.cat-other .cat-icon { background: linear-gradient(135deg, var(--primary), var(--accent)); }

/* Badges */
.badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .4px; }
.badge-green  { background: var(--green-bg);  color: var(--green); }
.badge-red    { background: var(--red-bg);    color: var(--red); }
.badge-blue   { background: var(--blue-bg);   color: var(--blue); }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow); }
.badge-purple { background: var(--primary-light); color: var(--primary); }

/* Auth pages */
.auth-shell {
  min-height: 100vh; display: grid; place-items: center;
  background: linear-gradient(135deg, #1e1b4b 0%, #3b1d8a 50%, #1e3a8a 100%);
  padding: 24px;
}
.auth-wrap {
  width: 100%; max-width: 440px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.7);
  padding: 38px 36px; border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
}
.auth-logo {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  border-radius: 18px; display: grid; place-items: center;
  font-weight: 800; font-size: 24px; color: #1e1b4b;
  margin: 0 auto 18px; box-shadow: 0 6px 20px rgba(245,158,11,.4);
}
.auth-wrap h2 { font-size: 22px; margin-bottom: 4px; text-align: center; color: #1e1b4b; font-weight: 800; }
.auth-wrap p.sub { color: var(--muted); text-align: center; margin-bottom: 26px; font-size: 13px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border-hard); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; background: rgba(255,255,255,.8);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  color: var(--text);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91,33,182,.15); background: #fff;
}
.form-inline-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 16px; margin-bottom: 14px; }
.form-inline-grid .form-group { margin-bottom: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(91,33,182,.28);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(91,33,182,.38); text-decoration: none; color: #fff; }
.btn:active { transform: translateY(0); }
.btn-block { width: 100%; }
.btn-danger  { background: linear-gradient(135deg, #dc2626, #ef4444); box-shadow: 0 4px 14px rgba(220,38,38,.25); }
.btn-danger:hover  { box-shadow: 0 6px 20px rgba(220,38,38,.38); }
.btn-success { background: linear-gradient(135deg, #059669, #10b981); box-shadow: 0 4px 14px rgba(5,150,105,.25); }
.btn-success:hover { box-shadow: 0 6px 20px rgba(5,150,105,.38); }
.btn-blue    { background: linear-gradient(135deg, #2563eb, #3b82f6); box-shadow: 0 4px 14px rgba(37,99,235,.25); }
.btn-secondary { background: linear-gradient(135deg, #64748b, #6b7280); box-shadow: 0 4px 14px rgba(100,116,139,.2); }
.btn-yellow  { background: linear-gradient(135deg, #d97706, #f59e0b); box-shadow: 0 4px 14px rgba(217,119,6,.25); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 7px; box-shadow: none; transform: none !important; }
.btn-sm:hover { box-shadow: none; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 16px; border-left: 4px solid transparent; display: flex; align-items: flex-start; gap: 10px; }
.alert-error   { background: var(--red-bg);    color: #991b1b; border-color: var(--red); }
.alert-success { background: var(--green-bg);  color: #065f46; border-color: var(--green); }
.alert-info    { background: var(--blue-bg);   color: #1e3a8a; border-color: var(--blue); }
.alert-warning { background: var(--yellow-bg); color: #92400e; border-color: var(--yellow); }
.text-center { text-align: center; }
.mt-2 { margin-top: 14px; }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border-hard); }
table.data thead th { background: rgba(91,33,182,.05); font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 700; letter-spacing: .5px; white-space: nowrap; }
table.data tbody tr { transition: background var(--transition); }
table.data tbody tr:hover { background: rgba(91,33,182,.04); }
table.data tbody tr:last-child td { border-bottom: none; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Service Page */
.service-page .svc-header {
  background: var(--glass); backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 24px; display: flex; gap: 20px; align-items: center;
  box-shadow: var(--shadow); margin-bottom: 24px;
}
.service-page .svc-header-icon {
  width: 86px; height: 86px; border-radius: 18px;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  color: var(--primary); display: grid; place-items: center;
  font-weight: 800; font-size: 32px; flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(91,33,182,.2), inset 0 0 0 3px #fff;
}
.service-page .svc-header-icon img { width: 54px; height: 54px; object-fit: contain; }
@media (max-width: 600px) { .service-page .svc-header { flex-direction: column; align-items: flex-start; } }

#svc-result {
  padding: 0;
  background: transparent;
  border: none;
  font-family: inherit;
}


.result-grid div {
    background: rgba(255,255,255,0.06);
    padding: 8px 10px;
    border-radius: 8px;
}

/* Loading Spinner */
.spinner-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15,12,41,.45); z-index: 200; place-items: center;
  backdrop-filter: blur(4px);
}
.spinner-overlay.active { display: grid; }
.spinner-box {
  background: #fff; border-radius: 20px;
  padding: 36px 48px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 4px solid #ede9fe; border-top-color: var(--primary);
  animation: spin .8s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-box p { font-size: 14px; color: var(--muted); font-weight: 500; }

/* Toast Notifications */
#toast-container {
  position: fixed; bottom: 28px; right: 28px;
  z-index: 9999; display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  background: #fff; border-radius: var(--radius-sm);
  padding: 13px 18px; font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 30px rgba(0,0,0,.18);
  border-left: 4px solid var(--primary);
  max-width: 340px; min-width: 240px;
  transform: translateX(120%); opacity: 0;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .3s ease;
  pointer-events: all; cursor: pointer;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast.toast-success { border-color: var(--green); }
.toast.toast-error   { border-color: var(--red); }
.toast.toast-warning { border-color: var(--yellow); }

/* Filters bar */
.filters-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; }
.filters-bar .fg { display: flex; flex-direction: column; gap: 5px; min-width: 140px; }
.filters-bar .fg label { font-size: 12px; font-weight: 600; color: var(--muted); }
.filters-bar input, .filters-bar select {
  padding: 9px 12px; border: 1.5px solid var(--border-hard); border-radius: var(--radius-xs);
  font-size: 13px; font-family: inherit; background: rgba(255,255,255,.8);
}
.filters-bar input:focus, .filters-bar select:focus { outline: none; border-color: var(--primary); }

/* Activity Feed */
.activity-feed { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--border-hard);
}
.activity-item:last-child { border-bottom: none; padding-bottom: 0; }
.activity-dot {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 13px; flex-shrink: 0;
}
.activity-dot.debit  { background: var(--red-bg);   color: var(--red); }
.activity-dot.credit { background: var(--green-bg); color: var(--green); }
.activity-meta { flex: 1; min-width: 0; }
.activity-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-time { font-size: 11.5px; color: var(--muted); }
.activity-amount { font-weight: 700; font-size: 14px; white-space: nowrap; }
.activity-amount.debit  { color: var(--red); }
.activity-amount.credit { color: var(--green); }

/* Status badges */
.status-success { color: var(--green); font-weight: 700; font-size: 12px; }
.status-fail    { color: var(--red);   font-weight: 700; font-size: 12px; }
.status-pending { color: var(--yellow);font-weight: 700; font-size: 12px; }

/* Pagination */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 18px; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px; font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--border-hard); background: #fff; color: var(--text);
  text-decoration: none; transition: all var(--transition);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pagination span.current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Footer */
.footer { background: rgba(255,255,255,.8); backdrop-filter: blur(8px); border-top: 1px solid var(--border-hard); padding: 14px 28px; font-size: 12px; color: var(--muted); text-align: center; }

/* Public Layout */
.public-shell { min-height: 100vh; display: flex; flex-direction: column; }
.public-topbar {
  background: linear-gradient(90deg, #1e1b4b, #3b1d8a);
  color: #fff; padding: 14px 28px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,.2);
}
.public-topbar .brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 800; font-size: 20px; }
.public-topbar .brand-logo {
  width: 38px; height: 38px; background: linear-gradient(135deg, #fde047, #f59e0b);
  color: #1e1b4b; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 16px;
}
.public-topbar nav { display: flex; gap: 16px; align-items: center; }
.public-topbar nav a { color: #c4b5fd; font-weight: 500; transition: color var(--transition); }
.public-topbar nav a:hover { color: #fff; text-decoration: none; }
.public-topbar .btn-pub { background: #fff; color: var(--primary); padding: 8px 18px; border-radius: 10px; font-weight: 700; }
.public-content { flex: 1; max-width: 1260px; width: 100%; margin: 0 auto; padding: 32px 24px; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #3b1d8a 0%, #5b21b6 40%, #2563eb 100%);
  color: #fff; padding: 64px 32px; border-radius: 24px;
  margin-bottom: 32px; text-align: center;
  position: relative; overflow: hidden; box-shadow: 0 16px 50px rgba(91,33,182,.3);
}
.hero h1 { font-size: 38px; margin-bottom: 12px; font-weight: 800; letter-spacing: -.6px; }
.hero p { font-size: 16px; opacity: .88; margin-bottom: 24px; }
.hero .btn { background: #fff; color: var(--primary); padding: 13px 30px; font-size: 15px; }
.hero .btn:hover { background: #f1f5f9; color: var(--primary-dark); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 20px; backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal {
  background: #fff; border-radius: 20px; padding: 28px; max-width: 500px; width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,.25); animation: pop .2s cubic-bezier(.34,1.3,.64,1);
}
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h3 { font-size: 18px; margin-bottom: 18px; font-weight: 700; }
.modal pre { background: #f3f4f6; padding: 14px; border-radius: 10px; font-size: 12px; overflow: auto; max-height: 260px; margin: 12px 0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* Responsive */
@media (max-width: 900px) {
  .sidebar { position: fixed; left: -100%; top: 0; z-index: 60; transition: left .25s ease; box-shadow: 0 0 40px rgba(0,0,0,.25); height: 100vh !important; }
  .sidebar.open { left: 0; }
  .tb-toggle { display: grid !important; }
  .content { padding: 18px 16px 36px; }
  .hero h1 { font-size: 26px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .stat-row { grid-template-columns: 1fr; }
  .auth-wrap { padding: 26px 20px; }
  .cat-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   PRINTSD UPDATES — Status Badges & Transaction Colors
   ===================================================== */

/* Transaction Status Badges */
.txn-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  white-space: nowrap;
}
.txn-success {
  background: #d1fae5; color: #065f46;
  border: 1px solid rgba(5,150,105,.25);
}
.txn-fail {
  background: #fee2e2; color: #991b1b;
  border: 1px solid rgba(220,38,38,.25);
}
.txn-pending {
  background: #fef3c7; color: #92400e;
  border: 1px solid rgba(217,119,6,.25);
}
.txn-default {
  background: #f3f4f6; color: #374151;
  border: 1px solid #e5e7eb;
}

/* Status span classes (used in admin transactions page) */
.status-success { color: #059669; font-weight: 700; font-size: 12px; }
.status-fail    { color: #dc2626; font-weight: 700; font-size: 12px; }
.status-pending { color: #d97706; font-weight: 700; font-size: 12px; }

/* Navigation badge (pending count) */
.nav-badge {
  background: #f59e0b; color: #0f172a;
  font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: 999px;
  margin-left: auto; line-height: 1.5;
  min-width: 20px; text-align: center;
}

/* Admin Transaction History - colored rows */
.table-wrap table.data tr.row-success { background: rgba(5,150,105,0.04); }
.table-wrap table.data tr.row-fail    { background: rgba(220,38,38,0.05); }
.table-wrap table.data tr.row-pending { background: rgba(217,119,6,0.05); }

/* Alert info */
.alert-info {
  background: #dbeafe; border: 1px solid #bfdbfe;
  color: #1e40af; border-radius: var(--radius-xs); padding: 12px 16px;
  font-size: 13.5px;
}

/* Auth shell fix for colored login pages */
.auth-shell { position: relative; z-index: 1; }


.result-card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 20px;
    margin-top: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

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

.copy-btn {
    background: #00c6ff;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    font-size: 14px;
}

.result-footer {
    margin-top: 15px;
    font-weight: bold;
    color: #4caf50;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .22;
  pointer-events: none;
  z-index: -1;
}

body::before {
  top: -8rem;
  right: -8rem;
  background: radial-gradient(circle, rgba(14,165,233,.95) 0%, rgba(14,165,233,0) 70%);
}

body::after {
  left: -10rem;
  bottom: -12rem;
  background: radial-gradient(circle, rgba(249,115,22,.75) 0%, rgba(249,115,22,0) 70%);
}

:root {
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-light: #d9fffa;
  --accent: #0ea5e9;
  --accent2: #f97316;
  --bg: #eef6ff;
  --card: rgba(255,255,255,0.84);
  --text: #10243e;
  --muted: #5f7087;
  --shadow: 0 18px 50px rgba(15,23,42,.08);
  --shadow-hover: 0 24px 70px rgba(15,23,42,.14);
  --glass: rgba(255,255,255,0.72);
  --glass-border: rgba(255,255,255,0.58);
}

.sidebar-admin {
  background:
    linear-gradient(180deg, rgba(9,18,42,.98) 0%, rgba(13,30,57,.95) 45%, rgba(12,18,34,.98) 100%),
    radial-gradient(circle at top, rgba(14,165,233,.18) 0%, transparent 40%);
}

.sidebar-user {
  background:
    linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.6)),
    radial-gradient(circle at top, rgba(14,165,233,.12) 0%, transparent 45%);
}

.app-topbar {
  height: 74px;
  background: linear-gradient(135deg, rgba(15,118,110,.95) 0%, rgba(14,165,233,.92) 62%, rgba(249,115,22,.88) 100%);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,.18);
}

.app-topbar.admin {
  background: linear-gradient(135deg, rgba(16,24,40,.96) 0%, rgba(15,118,110,.92) 55%, rgba(14,165,233,.88) 100%);
}

.tb-title {
  font-size: 16px;
  letter-spacing: -.02em;
}

.tb-subtitle {
  font-size: 11px;
  opacity: .78;
  margin-top: 2px;
}

.tb-alert-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.2);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.tb-alert-link:hover {
  text-decoration: none;
  background: rgba(255,255,255,.2);
}

.content {
  padding-top: 32px;
}

.panel,
.stat-card,
.service-card,
.cat-card {
  box-shadow: var(--shadow);
  border-color: rgba(255,255,255,.66);
}

.panel:hover,
.stat-card:hover,
.cat-card:hover {
  box-shadow: var(--shadow-hover);
}

.service-card {
  min-height: 220px;
  justify-content: center;
}

.service-card::after,
.stat-card::after,
.panel::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,0) 55%);
}

.panel,
.stat-card {
  position: relative;
  overflow: hidden;
}

.page-title {
  font-size: 30px;
}

.page-sub {
  font-size: 14px;
  max-width: 72ch;
}

.admin-impersonation-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(127,29,29,.92);
  color: #fff;
  box-shadow: 0 18px 50px rgba(127,29,29,.28);
}

.admin-impersonation-banner a {
  color: #7f1d1d;
  background: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.result-card {
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.76));
  border: 1px solid rgba(255,255,255,.7);
}

.copy-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

@media (max-width: 900px) {
  .app-topbar {
    height: auto;
    padding: 14px 16px;
  }

  .tb-right {
    gap: 10px;
  }

  .admin-impersonation-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    flex-direction: column;
    align-items: stretch;
  }
}
