:root{
  --mg-bg:#f5f7fb;
  --mg-surface:#ffffff;
  --mg-surface-2:#eef4ff;
  --mg-text:#0f172a;
  --mg-muted:#64748b;
  --mg-border:#e2e8f0;
  --mg-primary:#2563eb;
  --mg-primary-2:#0ea5e9;
  --mg-success:#16a34a;
  --mg-warning:#d97706;
  --mg-danger:#dc2626;
  --mg-dark:#0b1220;
  --mg-radius:18px;
  --mg-shadow:0 12px 34px rgba(15,23,42,.08);
}
*{box-sizing:border-box}
body{
  font-family:'Hind Siliguri','Inter','Segoe UI',sans-serif;
  background:var(--mg-bg);
  color:var(--mg-text);
}
a{text-decoration:none}
#login-screen{
  background:
    radial-gradient(circle at 15% 20%, rgba(37,99,235,.18), transparent 32%),
    radial-gradient(circle at 85% 80%, rgba(14,165,233,.15), transparent 30%),
    linear-gradient(135deg,#eef5ff 0%,#f8fafc 55%,#eefbf8 100%);
  padding:24px;
}
.login-card{
  width:100%;
  max-width:430px;
  border:0;
  border-radius:24px;
  box-shadow:0 24px 70px rgba(15,23,42,.14);
}
.login-logo{height:52px;max-width:220px}
.brand{color:var(--mg-text);font-weight:800}
.app-navbar{
  min-height:68px;
  background:linear-gradient(90deg,#09111f 0%,#111d32 100%);
  box-shadow:0 1px 0 rgba(255,255,255,.06);
}
.app-navbar .navbar-brand img{
  height:36px;
  filter:drop-shadow(0 2px 8px rgba(0,0,0,.18));
}
.app-navbar .brand-wordmark{
  color:#fff;
  font-weight:800;
  letter-spacing:.2px;
}
.app-shell{min-height:calc(100vh - 68px)}
.sidebar{
  width:248px;
  min-width:248px;
  min-height:calc(100vh - 68px);
  background:#fff;
  border-right:1px solid var(--mg-border);
  padding:20px 14px;
}
.sidebar .menu-caption{
  color:#94a3b8;
  font-size:.75rem;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:6px 12px 10px;
}
.sidebar .nav-link{
  color:#334155;
  border-radius:12px;
  margin-bottom:5px;
  padding:11px 13px;
  font-weight:600;
  display:flex;
  gap:10px;
  align-items:center;
}
.sidebar .nav-link:hover{background:#f1f5f9;color:#0f172a}
.sidebar .nav-link.active{
  color:#fff;
  background:linear-gradient(135deg,var(--mg-primary),var(--mg-primary-2));
  box-shadow:0 8px 20px rgba(37,99,235,.22);
}
.sidebar .nav-icon{width:22px;text-align:center}
#page-content{min-width:0;max-width:1600px;margin:0 auto}
.page-title{font-weight:800;letter-spacing:-.02em}
.page-subtitle{color:var(--mg-muted)}
.stat-card{
  border:1px solid rgba(226,232,240,.85);
  border-radius:var(--mg-radius);
  background:var(--mg-surface);
  box-shadow:var(--mg-shadow);
  overflow:hidden;
}
.metric-card{position:relative;min-height:132px}
.metric-card:after{
  content:"";
  position:absolute;
  width:88px;height:88px;border-radius:999px;
  right:-26px;top:-26px;background:rgba(37,99,235,.08);
}
.metric-icon{
  width:44px;height:44px;border-radius:14px;
  display:grid;place-items:center;font-size:1.35rem;
  background:#eff6ff;color:var(--mg-primary);
}
.metric-value{font-size:1.85rem;font-weight:800;line-height:1.1}
.metric-label{color:var(--mg-muted);font-weight:600}
.section-card{
  border:1px solid var(--mg-border);
  border-radius:var(--mg-radius);
  background:var(--mg-surface);
  box-shadow:var(--mg-shadow);
}
.section-card .card-header{
  background:transparent;border-bottom:1px solid var(--mg-border);
  padding:18px 20px;font-weight:700;
}
.section-card .card-body{padding:20px}
.table-shell{
  background:#fff;border:1px solid var(--mg-border);
  border-radius:16px;overflow:hidden;box-shadow:var(--mg-shadow);
}
table.table{margin-bottom:0;background:#fff}
table.table thead th{
  background:#f8fafc;color:#475569;font-size:.83rem;
  font-weight:700;border-bottom:1px solid var(--mg-border);
  white-space:nowrap;
}
table.table td{vertical-align:middle;border-color:#eef2f7}
.badge-locked{background:#fee2e2!important;color:#b91c1c!important}
.badge-unlocked{background:#dcfce7!important;color:#166534!important}
.badge-pending{background:#f1f5f9!important;color:#475569!important}
.btn{border-radius:10px;font-weight:600}
.btn-primary{
  background:linear-gradient(135deg,var(--mg-primary),#1d4ed8);
  border-color:transparent;
}
.btn-primary:hover{background:linear-gradient(135deg,#1d4ed8,#1e40af)}
.form-control,.form-select{
  border-radius:11px;border-color:#d8e0ea;min-height:42px;
}
.form-control:focus,.form-select:focus{
  border-color:#93c5fd;box-shadow:0 0 0 .22rem rgba(37,99,235,.12);
}
.modal-content{border:0;border-radius:20px;box-shadow:0 30px 80px rgba(15,23,42,.2)}
.modal-header{border-bottom:1px solid var(--mg-border)}
.info-strip{
  border-radius:14px;background:linear-gradient(135deg,#eff6ff,#ecfeff);
  border:1px solid #dbeafe;padding:14px 16px;
}
.quick-actions{display:flex;gap:10px;flex-wrap:wrap}
.payment-method{
  display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;
  font-size:.78rem;font-weight:700;background:#f1f5f9;color:#334155;
}
.empty-state{
  text-align:center;padding:44px 16px;color:var(--mg-muted);
}
.report-kpi{
  padding:18px;border-radius:16px;border:1px solid var(--mg-border);
  background:linear-gradient(180deg,#fff,#fbfdff);
}
.report-kpi .value{font-size:1.45rem;font-weight:800}
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.support-card{
  border-radius:18px;padding:22px;background:linear-gradient(135deg,#0f172a,#172554);color:#fff;
}
.support-card a{color:#bfdbfe}
.mobile-menu-btn{display:none}
@media(max-width:991.98px){
  .sidebar{width:210px;min-width:210px}
  #page-content{padding:20px!important}
  .settings-grid{grid-template-columns:1fr}
}
@media(max-width:767.98px){
  .app-navbar{min-height:auto}
  .app-shell{display:block!important}
  .sidebar{
    width:100%;min-width:0;min-height:0;border-right:0;border-bottom:1px solid var(--mg-border);
    padding:10px;overflow-x:auto;
  }
  .sidebar .menu-caption{display:none}
  .sidebar .nav{flex-direction:row!important;flex-wrap:nowrap;min-width:max-content}
  .sidebar .nav-link{margin:0 4px 0 0;white-space:nowrap}
  #page-content{padding:16px!important}
  .app-navbar .user-name{display:none}
}

.pricing-card{
  position:relative;height:100%;padding:22px;border-radius:18px;border:1px solid var(--mg-border);
  background:linear-gradient(180deg,#fff,#fbfdff);box-shadow:0 10px 28px rgba(15,23,42,.05);
  display:flex;flex-direction:column;
}
.pricing-card.featured{border:2px solid var(--mg-primary);box-shadow:0 16px 34px rgba(37,99,235,.14)}
.pricing-card .price-main{font-size:1.8rem;font-weight:800;line-height:1.1}
.plan-ribbon{
  position:absolute;top:-11px;right:14px;background:linear-gradient(135deg,var(--mg-primary),var(--mg-primary-2));
  color:#fff;padding:5px 10px;border-radius:999px;font-size:.72rem;font-weight:800;
}

.shop-fallback-mark{
  width:52px;height:52px;border-radius:14px;display:flex;align-items:center;justify-content:center;
  font-size:1.65rem;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.2);
}

.pricing-card .btn{margin-top:auto!important;min-height:44px;display:flex;align-items:center;justify-content:center}
.pricing-card .small.mt-3{min-height:44px}
.forgot-link{font-size:.9rem;font-weight:600}
.fx-preview{font-size:.86rem;color:var(--mg-muted);margin-top:6px}


html,body{min-height:100%;overflow-y:auto!important}
#app-screen,.app-shell,#page-content{overflow:visible!important}
#page-content{padding-bottom:110px!important}

.guide-toolbar{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.guide-list{display:grid;gap:8px}
.guide-row{
  display:grid;
  grid-template-columns:46px minmax(0,1fr);
  gap:12px;
  align-items:start;
  background:#fff;
  border:1px solid var(--mg-border);
  border-radius:13px;
  padding:12px 14px;
  box-shadow:0 4px 14px rgba(15,23,42,.035);
}
.guide-number{
  width:38px;height:38px;border-radius:10px;
  display:grid;place-items:center;
  background:#eff6ff;color:var(--mg-primary);font-weight:800;
}
.guide-row-body h5{font-weight:800;margin:0 0 4px;font-size:1rem}
.guide-row-body p{margin:0;color:var(--mg-muted);line-height:1.52;font-size:.92rem}
.guide-mobile-panel{border-left:4px solid var(--mg-primary)}
.mobile-setup-list{display:grid;gap:7px}
.mobile-setup-row{
  display:grid;
  grid-template-columns:30px minmax(0,1fr);
  gap:10px;
  align-items:start;
  padding:8px 0;
  border-bottom:1px dashed #e2e8f0;
}
.mobile-setup-row:last-child{border-bottom:0}
.mobile-setup-row span{
  width:28px;height:28px;border-radius:999px;display:grid;place-items:center;
  background:#e0f2fe;color:#0369a1;font-size:.8rem;font-weight:800;
}
.mobile-setup-row p{margin:2px 0 0;color:#475569;line-height:1.5;font-size:.91rem}
.guide-checklist{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px 16px;
  color:#334155;
  font-size:.92rem;
}

@media(max-width:900px){
  .guide-checklist{grid-template-columns:1fr}
  .guide-toolbar{justify-content:flex-start}
}
@media(max-width:600px){
  .guide-row{grid-template-columns:38px minmax(0,1fr);padding:10px}
}

@media print{
  @page{size:A4;margin:12mm}
  body{background:#fff!important;color:#000!important}
  .app-navbar,.sidebar,.guide-toolbar{display:none!important}
  .app-shell{display:block!important}
  #page-content{max-width:none!important;width:100%!important;padding:0!important;margin:0!important}
  .guide-page{width:100%!important}
  .guide-row,.section-card,.info-strip{
    box-shadow:none!important;
    break-inside:avoid;
  }
  .guide-row{padding:8px 10px;margin-bottom:5px}
  .guide-row-body p,.mobile-setup-row p{font-size:9.5pt!important}
  .page-title{font-size:18pt!important}
  .page-subtitle{font-size:10pt!important}
  .alert{border:1px solid #bbb!important}
}
