/* Sofy UI layer
 * Generated as the deployable CSS layer for the utility-first design system.
 * It intentionally keeps the existing PHP class names stable while replacing
 * the overly compressed legacy mobile rules with accessible sizes and spacing.
 */
:root {
  --ui-navy: #123b5d;
  --ui-navy-deep: #0b2942;
  --ui-blue: #1d6f98;
  --ui-gold: #e9ad3d;
  --ui-bg: #f4f7f8;
  --ui-surface: #ffffff;
  --ui-border: #d7e3e8;
  --ui-text: #173246;
  --ui-muted: #5f7482;
  --ui-success: #126a4b;
  --ui-danger: #a53b3b;
  --ui-radius: 16px;
  --ui-shadow: 0 8px 24px rgba(18, 59, 93, .08);
  --ui-focus: 0 0 0 4px rgba(29, 111, 152, .18);
}

html { font-size: 16px; }
body {
  background: var(--ui-bg);
  color: var(--ui-text);
  font-family: Inter, "Noto Sans Devanagari", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 0;
  box-shadow: var(--ui-focus);
}
.topbar {
  min-height: 68px;
  padding: 12px max(20px, calc((100% - 1160px) / 2));
  background: var(--ui-navy-deep);
  box-shadow: 0 4px 18px rgba(11, 41, 66, .16);
}
.brand { font-size: 1.18rem; letter-spacing: -.01em; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; }
.topbar nav { gap: 6px; }
.topbar nav a, .topbar nav button {
  min-height: 44px;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: .9rem;
}
.topbar nav a:hover, .topbar nav a.active { background: rgba(255,255,255,.11); }
.topbar nav a.active { border: 0; color: #fff; }
.nav-cta { background: var(--ui-gold); color: var(--ui-navy-deep) !important; font-weight: 800; }
.shell { max-width: 1160px; padding: 28px 20px 68px; }
.hero { padding: 32px; border-radius: 22px; box-shadow: var(--ui-shadow); }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -.025em; }
.panel, .card { border-color: var(--ui-border); border-radius: var(--ui-radius); box-shadow: var(--ui-shadow); }
.section-title { margin: 30px 0 14px; }
.section-title h2 { font-size: 1.25rem; letter-spacing: -.01em; }
.muted, .child-meta, .stat span { color: var(--ui-muted); }
.btn {
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: .92rem;
  line-height: 1.2;
  letter-spacing: .005em;
  box-shadow: 0 3px 10px rgba(18,59,93,.1);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.02); }
.field label { margin-bottom: 7px; font-size: .95rem; }
.field input, .field select, .field textarea { min-height: 48px; padding: 11px 13px; border-radius: 11px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ui-blue); outline: 0; box-shadow: var(--ui-focus); }
.quick-action { min-height: 104px; padding: 14px 10px; font-size: .9rem; }
.quick-action .action-icon { font-size: 1.9rem; margin-bottom: 2px; }
.batch-card { min-height: 164px; padding: 20px; }
.batch-card-head strong { font-size: 1.3rem; }
.payment-receive-row { padding: 18px 14px; }
.payment-receive-row .actions { align-items: stretch; }
.mobile-nav { display: none; }

@media (max-width: 700px) {
  body { font-size: 1rem; padding-bottom: 84px; }
  .topbar { min-height: 60px; padding: 9px 12px; }
  .brand { font-size: 1rem; }
  .brand-mark { width: 32px; height: 32px; }
  .shell { padding: 16px 12px calc(94px + env(safe-area-inset-bottom)); }
  .hero { padding: 21px 18px; border-radius: 18px; }
  .hero h1, .shell > .hero h1 { font-size: 1.55rem; }
  .hero p { font-size: .95rem; }
  .panel, .card { padding: 16px; }
  .section-title { margin: 24px 2px 12px; }
  .section-title h2 { font-size: 1.15rem; }
  .section-title .muted { font-size: .85rem; }
  .btn { min-height: 48px; padding: 11px 13px; font-size: .88rem; }
  .actions { gap: 8px; }
  .field { margin-bottom: 15px; }
  .field label { font-size: .93rem; }
  .field input, .field select, .field textarea { min-height: 50px; font-size: 16px; padding: 12px 13px; }
  .quick-actions { gap: 9px; }
  .quick-action { min-height: 92px; padding: 11px 6px; font-size: .82rem; }
  .quick-action .action-icon { font-size: 1.65rem; }
  .batch-card { min-height: 144px; padding: 16px; }
  .batch-card-head strong { font-size: 1.1rem; }
  .batch-card-count, .batch-card-status { font-size: .88rem; }
  .payment-receive-row { padding: 16px 2px; }
  .payment-receive-row .actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .payment-receive-row .actions .btn { width: 100%; }
  .payment-receive-row .actions form { min-width: 0; }
  .mobile-nav {
    min-height: 70px;
    display: flex;
    align-items: stretch;
    padding: 7px max(8px, env(safe-area-inset-left)) calc(7px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.97);
    border-top: 1px solid var(--ui-border);
    box-shadow: 0 -7px 24px rgba(18,59,93,.13);
  }
  .mobile-nav a, .mobile-nav button {
    min-height: 56px;
    gap: 3px;
    padding: 7px 4px;
    border-radius: 12px;
    color: var(--ui-muted);
    font-size: .76rem;
    font-weight: 800;
    line-height: 1.1;
  }
  .mobile-nav a.active, .mobile-nav button.active, .mobile-nav button[aria-expanded="true"] { color: var(--ui-navy); background: #edf4f7; }
  .mobile-nav .nav-icon { width: 28px; height: 26px; font-size: 1.25rem; }
  .mobile-nav .bi-hi { display: none; }
  .mobile-more-links a { min-height: 54px; font-size: .84rem; }
}

@media (max-width: 380px) {
  .shell { padding-left: 10px; padding-right: 10px; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .quick-action { min-height: 84px; }
  .mobile-nav a, .mobile-nav button { font-size: .7rem; }
}

/* Public pages use their own component stylesheet; these mobile values keep
 * the same readable scale instead of shrinking content to fit one screen. */
@media (max-width: 700px) {
  body:has(.landing) .shell, body:has(.legal-page) .shell { padding: 12px 12px 24px; }
  .landing-hero { padding: 20px 17px; gap: 16px; }
  .landing h1 { font-size: 1.9rem; line-height: 1.08; }
  .landing-lead { font-size: .95rem; line-height: 1.45; }
  .landing-actions { gap: 9px; margin: 15px 0 10px; }
  .landing-actions .btn, .landing-cta .btn { min-height: 50px; padding: 11px 13px; font-size: .9rem; }
  .trust span { min-height: 40px; padding: 8px 6px; font-size: .7rem; }
  .landing-section { padding: 28px 0 0; }
  .section-intro h2, .workflow-copy h2 { font-size: 1.35rem; line-height: 1.15; }
  .section-intro p, .workflow-copy p { font-size: .9rem; }
  .feature-card { min-height: 164px; padding: 14px; }
  .feature-icon { width: 36px; height: 36px; font-size: .95rem; }
  .feature-card h3 { margin: 10px 0 5px; font-size: .92rem; }
  .feature-card p { font-size: .78rem; line-height: 1.45; }
  .workflow-section { margin-top: 24px; padding: 18px; }
  .workflow-list { gap: 8px; }
  .workflow-list li { padding: 10px; }
  .workflow-list strong { font-size: .78rem; }
  .workflow-list small { font-size: .68rem; }
  .audience-card { padding: 16px; }
  .audience-card h3 { font-size: .9rem; }
  .audience-card p { font-size: .72rem; }
  .audience-card div > span { font-size: .68rem; }
  .price-card { padding: 16px; }
  .price-card h3 { font-size: .95rem; }
  .price-card .muted, .yearly-price { font-size: .72rem; }
  .price { font-size: 1.35rem; }
  .price-card .btn { min-height: 48px; font-size: .86rem; }
}

@media (max-width: 700px) {
  .landing-actions .btn { min-height: 50px !important; padding: 11px 13px !important; font-size: .9rem !important; }
  form.native-form .field input:not([type="checkbox"]),
  form.native-form .field select,
  form.native-form .field textarea {
    min-height: 46px !important;
    padding: 8px 2px !important;
    font-size: 16px !important;
  }
  form.native-form .field label { font-size: .88rem !important; }
}
