*{box-sizing:border-box;margin:0;padding:0}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;font-size:13px;background:#f5f5f0;color:#1a1a1a;min-height:100vh;line-height:1.5;-webkit-font-smoothing:antialiased}
.hidden{display:none!important}

/* ============ MODERN LOGIN ============ */
:root {
  --brand: #0ea572;
  --brand-dark: #0b7a54;
  --brand-glow: rgba(14,165,114,0.18);
  --sa-accent: #7c3aed;
  --sa-glow: rgba(124,58,237,0.18);
  --surface: #ffffff;
  --surface2: #f6f8fa;
  --border: #e5e8ed;
  --text: #0f1923;
  --muted: #6b7685;
  --error: #e53535;
}

#login-screen {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f1f2e 0%, #0d2b1e 50%, #1a1060 100%);
  padding: 40px 24px;
  position: relative;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}
#login-screen::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 700px 600px at 25% 50%, rgba(14,220,130,0.18) 0%, transparent 60%),
              radial-gradient(ellipse 500px 500px at 75% 20%, rgba(100,80,255,0.15) 0%, transparent 60%),
              radial-gradient(ellipse 400px 400px at 80% 80%, rgba(0,180,255,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.login-container {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 980px;
  min-height: 580px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.06);
  position: relative;
  z-index: 1;
}
.login-left-pane {
  width: 380px;
  min-width: 380px;
  flex-shrink: 0;
  background: linear-gradient(150deg, #0f4c35 0%, #1a6b4a 25%, #0e3d5c 60%, #1a1060 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 40px 36px;
  position: relative;
  overflow: hidden;
}
.login-left-pane::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 400px 400px at 50% 25%, rgba(14,220,130,0.28) 0%, transparent 55%),
              radial-gradient(ellipse 350px 300px at 10% 85%, rgba(0,180,255,0.22) 0%, transparent 55%),
              radial-gradient(ellipse 300px 250px at 90% 10%, rgba(160,80,255,0.2) 0%, transparent 55%);
  pointer-events: none;
}
.login-left-pane::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.llp-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
  z-index: 1;
  text-align: center;
}
.llp-logo-icon {
  width: 82px;
  height: 82px;
  padding: 5px;
  background: linear-gradient(145deg, rgba(232,236,240,0.28), rgba(186,195,204,0.14));
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 42px rgba(7, 28, 30, 0.18), inset 0 1px 0 rgba(255,255,255,0.22);
  border: 1px solid rgba(220,228,235,0.24);
  overflow: hidden;
}
.llp-logo-icon img {
  width: 100%;
  height: 100%;
  display: block;
}
.llp-logo-text { color: #fff; text-align: center; }
.llp-logo-text h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.llp-logo-text span { font-size: 10px; color: rgba(255,255,255,0.5); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }
.llp-hero { position: relative; z-index: 1; margin: auto 0; padding: 20px 0; }
.llp-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(14,165,114,0.18);
  border: 1px solid rgba(14,165,114,0.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  color: #4ecca3;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}
.llp-hero-label::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #0ea572;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:0.5; transform:scale(0.8); }
}
.llp-hero h2 {
  font-size: 34px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.llp-hero h2 em { color: #2edb96; font-style: normal; }
.llp-hero p { font-size: 13px; color: rgba(255,255,255,0.65); line-height: 1.65; max-width: 300px; }
.llp-stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
  position: relative;
  z-index: 1;
  margin-top: 28px;
}
.llp-stat {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  padding: 12px 14px;
  backdrop-filter: blur(10px);
}
.llp-stat-val { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.llp-stat-lbl { font-size: 10px; color: rgba(255,255,255,0.55); font-weight: 500; margin-top: 2px; }
.llp-footer { position: relative; z-index: 1; }
.llp-footer p { font-size: 10px; color: rgba(255,255,255,0.4); }
.login-right-pane {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 40px;
  background: linear-gradient(180deg, #f8fffd 0%, #eef6ff 52%, #f7f1ff 100%);
  position: relative;
  overflow-y: auto;
}
.login-right-pane > .lf-card { margin: auto; }
.login-right-pane::before {
  content: '';
  position: absolute;
  top: -150px;
  right: -150px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14,165,114,0.06), transparent 70%);
  pointer-events: none;
}
.lf-card {
  width: 100%;
  max-width: 380px;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  border: none;
  position: relative;
  z-index: 1;
}
.lf-card.sa-card { border-top: none; }
.lf-card-header { margin-bottom: 28px; }
.lf-card-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.lf-card-header p { font-size: 13px; color: var(--muted); }
.sa-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--sa-accent);
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 20px;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  transition: opacity 0.15s;
}
.sa-back-btn:hover { opacity: 0.7; }
.role-tabs {
  display: flex;
  gap: 6px;
  background:
    radial-gradient(circle at 20% 18%, rgba(46, 219, 150, 0.12) 0%, transparent 30%),
    radial-gradient(circle at 82% 22%, rgba(0, 180, 255, 0.11) 0%, transparent 32%),
    radial-gradient(circle at 50% 100%, rgba(124, 58, 237, 0.11) 0%, transparent 40%),
    linear-gradient(135deg, rgba(32, 136, 103, 0.84) 0%, rgba(33, 128, 150, 0.86) 52%, rgba(57, 63, 166, 0.88) 100%);
  border-radius: 16px;
  padding: 6px;
  margin-bottom: 20px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  flex-wrap: wrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 10px 22px rgba(37, 99, 235, 0.14);
}
.rtab {
  flex: 1 1 120px;
  min-height: 44px;
  padding: 11px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 12px;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: rgba(244, 249, 255, 0.84);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  line-height: 1.25;
  border: 1px solid transparent;
}
.rtab:hover {
  background: rgba(255,255,255,0.06);
  color: #ffffff;
}
.rtab.on {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(226, 248, 238, 0.16) 42%, rgba(225, 236, 255, 0.18) 100%);
  color: #ffffff;
  border-color: rgba(255,255,255,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 18px rgba(37, 99, 235, 0.14);
  transform: translateY(-1px);
}
.login-form { display: block; }
.lf-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.lf-field label { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.lf-field-wrap { position: relative; }
.lf-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 13.5px;
  outline: none;
  background: var(--surface2);
  color: var(--text);
  transition: all 0.18s;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.lf-field input:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.sa-mode-active .lf-field input:focus {
  border-color: var(--sa-accent);
  box-shadow: 0 0 0 3px var(--sa-glow);
}
.lf-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  user-select: none;
  transition: color 0.15s;
}
.lf-pw-toggle:hover { color: var(--text); }
.lf-field input[type=password],
.lf-field input[type=text] { padding-right: 38px; }
.demo-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
  margin-bottom: 14px;
  font-size: 11.5px;
  font-family: 'DM Mono', monospace;
  overflow-wrap: anywhere;
}
.demo-box b {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 11px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
}
.demo-box span { color: var(--muted); display: block; line-height: 1.9; }
.demo-box strong { color: var(--text); }
.demo-box.sa-demo { background: #f5f3ff; border-color: #ddd6fe; }
.demo-box.sa-demo b { color: var(--sa-accent); }
.err {
  color: var(--error);
  font-size: 12px;
  margin-bottom: 12px;
  display: none;
  line-height: 1.5;
  background: #fff0f0;
  border: 1px solid #ffc5c5;
  border-radius: 8px;
  padding: 8px 12px;
}
.err.show { display: block; }
.btn-login {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #0ea572 0%, #0b8a5e 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: -0.01em;
  font-family: 'Plus Jakarta Sans', sans-serif;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(14,165,114,0.35);
}
.btn-login::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(14,165,114,0.45); }
.btn-login:active { transform: translateY(0); }
.btn-login.sa-btn {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  box-shadow: 0 4px 16px rgba(124,58,237,0.35);
}
.btn-login.sa-btn:hover { box-shadow: 0 6px 24px rgba(124,58,237,0.45); }
.forgot-link {
  text-align: center;
  font-size: 12px;
  color: var(--brand);
  cursor: pointer;
  margin-top: 12px;
  font-weight: 600;
  transition: opacity 0.15s;
}
.forgot-link:hover { opacity: 0.75; }
.back-link {
  text-align: center;
  font-size: 12px;
  color: var(--sa-accent);
  cursor: pointer;
  margin-top: 12px;
  font-weight: 600;
}
.sa-portal-btn {
  width: 100%;
  padding: 11px 14px;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 32%, #eef2ff 68%, #faf5ff 100%);
  border: 1.5px solid rgba(125, 211, 252, 0.42);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.18s;
  margin-bottom: 20px;
  text-align: left;
  flex-wrap: wrap;
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.08);
}
.sa-portal-btn:hover {
  background: linear-gradient(135deg, #ecfdf5 0%, #e0f2fe 34%, #e9ddff 72%, #f5f3ff 100%);
  border-color: rgba(129, 140, 248, 0.42);
  box-shadow: 0 14px 30px rgba(99, 102, 241, 0.14);
}
.sa-portal-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #22c55e 0%, #06b6d4 48%, #7c3aed 100%);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28);
}
.sa-portal-text-block { flex: 1; }
.sa-portal-text-block .sa-sub { font-size: 10px; color: #7c3aed; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; }
.sa-portal-text-block .sa-ttl { font-size: 13px; font-weight: 700; color: #1a1a2e; }

/* APP */
:root {
  --app-sidebar-width: 210px;
  --app-mobile-topbar-height: 58px;
  --app-shell-max-width: 1600px;
  --app-page-pad-x: 24px;
  --app-page-pad-y: 20px;
  --app-page-pad-x-tablet: 18px;
  --app-page-pad-y-tablet: 18px;
  --app-page-pad-x-mobile: 14px;
  --app-page-pad-y-mobile: 14px;
  --app-radius-lg: 16px;
  --app-radius-md: 12px;
  --app-overlay: rgba(15, 23, 42, 0.42);
}

html{overflow-x:hidden}
body.app-shell-sidebar-open{overflow:hidden}
#app-screen{display:flex;min-height:100vh;width:100%;max-width:100%;overflow-x:clip}
.sidebar{width:var(--app-sidebar-width);background:#fff;border-right:1px solid #e8e8e0;display:flex;flex-direction:column;flex-shrink:0;height:100vh;position:sticky;top:0;overflow:hidden}
.sb-brand{padding:14px 16px;border-bottom:1px solid #e8e8e0;flex-shrink:0}
.sb-brand h2{font-size:14px;font-weight:700}
.sb-brand p{font-size:10px;color:#999}
.sb-user{display:flex;align-items:center;gap:9px;padding:12px 16px;border-bottom:1px solid #e8e8e0;flex-shrink:0}
.ava{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:11px;font-weight:700;flex-shrink:0}
.sb-nav{padding:8px;flex:1;overflow-y:auto;overflow-x:hidden}
.sb-nav::-webkit-scrollbar{width:3px}
.sb-nav::-webkit-scrollbar-track{background:transparent}
.sb-nav::-webkit-scrollbar-thumb{background:#e0e0d8;border-radius:3px}
.sb-nav::-webkit-scrollbar-thumb:hover{background:#c0c0b8}
.nl{font-size:10px;font-weight:600;color:#aaa;letter-spacing:.06em;padding:6px 8px 4px;text-transform:uppercase;display:flex;align-items:center;justify-content:space-between;cursor:pointer;border-radius:6px;transition:background .12s;user-select:none}
.nl:hover{background:#f5f5f0}
.nl .nl-arrow{font-size:9px;color:#ccc;transition:transform .2s;font-style:normal}
.nl[aria-expanded="true"] .nl-arrow{transform:rotate(0deg)}
.nl[aria-expanded="false"] .nl-arrow{transform:rotate(0deg)}
.nl-group{overflow:hidden;transition:max-height .25s ease}
.nl-group.collapsed{max-height:0!important}
.ni{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:8px;cursor:pointer;color:#555;font-size:12px;margin-bottom:2px;transition:all .12s;font-weight:500}
.ni:hover{background:#f5f5f0;color:#1a1a1a}
.ni.on{background:#E1F5EE;color:#0F6E56;font-weight:600}
.ni .ic{width:16px;text-align:center;font-style:normal;flex-shrink:0}
.nb{margin-left:auto;background:#E24B4A;color:#fff;font-size:9px;padding:1px 5px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;min-width:18px}
.sb-logout{padding:12px 16px;border-top:1px solid #e8e8e0;cursor:pointer;font-size:12px;color:#999;flex-shrink:0}
.sb-logout:hover{color:#E24B4A}
.main{flex:1;min-width:0;display:flex;flex-direction:column;max-width:100%}
.topbar{background:#fff;border-bottom:1px solid #e8e8e0;padding:0 20px;min-height:52px;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.topbar h1{font-size:15px;font-weight:700;letter-spacing:-0.01em;min-width:0;overflow-wrap:anywhere}
.tb-right{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end;min-width:0;max-width:100%}
.topbar-shell-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end;min-width:0;max-width:100%}
.topbar-shell-btn{white-space:nowrap}
.rbadge{font-size:10px;padding:3px 10px;border-radius:12px;font-weight:600}
.rb-w{background:#E1F5EE;color:#0F6E56}
.rb-s{background:#E6F1FB;color:#185FA5}
.rb-c{background:#EEEDFE;color:#534AB7}
.rb-d{background:#FAEEDA;color:#854F0B}
.content{padding:var(--app-page-pad-y) var(--app-page-pad-x);flex:1;min-width:0;max-width:100%}
.main > .content,
.main > .topbar{width:100%;max-width:100%}
.content > *{max-width:100%}
.mb-menu-btn{display:none;align-items:center;justify-content:center;gap:8px;background:#fff;border:1px solid #e8e8e0;border-radius:10px;padding:8px 10px;font-size:14px;font-weight:700;cursor:pointer;box-shadow:0 8px 18px rgba(15,23,42,.06)}
.sb-overlay{display:none;position:fixed;inset:0;background:var(--app-overlay);backdrop-filter:blur(2px);z-index:150;opacity:0;transition:opacity .2s ease}
.sb-overlay.on{display:block;opacity:1}
.card{background:#fff;border:1px solid #e8e8e0;border-radius:12px;padding:18px 20px;margin-bottom:14px;overflow:hidden}
.card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;flex-wrap:wrap;gap:6px}
.card-head h3{font-size:13px;font-weight:700;letter-spacing:-0.01em}
.g4{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:14px}
.g2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.stat{background:#fff;border:1px solid #e8e8e0;border-radius:12px;padding:14px 16px;min-width:0}
.stat .lbl{font-size:11px;color:#888;margin-bottom:6px}
.stat .val{font-size:22px;font-weight:800;letter-spacing:-0.02em;line-height:1.1}
.stat .chg{font-size:11px;color:#999;margin-top:6px}
.stat .chg.up{color:#0F6E56}
.stat .chg.dn{color:#E24B4A}
.list{display:flex;flex-direction:column;gap:8px}
.li{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #ecece4;border-radius:10px;background:#fff;min-width:0}
.li-main{min-width:0;flex:1}
.li-title{font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.li-meta{font-size:10px;color:#999;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.li-amt{font-size:12px;font-weight:700;white-space:nowrap}
.badge{font-size:10px;padding:3px 8px;border-radius:10px;background:#f0f0eb;color:#666;white-space:nowrap}
.b-g{background:#E1F5EE;color:#0F6E56}
.b-b{background:#E6F1FB;color:#185FA5}
.b-r{background:#FDECEC;color:#E24B4A}
.b-a{background:#FAF1D6;color:#9A6B00}
.b-gr{background:#efefef;color:#666}
.btn{padding:7px 12px;border:none;border-radius:8px;background:#1D9E75;color:#fff;font-size:12px;font-weight:600;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:6px}
.btn:hover{filter:brightness(.97)}
.btn.sec{background:#fff;color:#555;border:1px solid #e0e0d8}
.btn.danger{background:#E24B4A}
.fbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.fbar input.si,.fbar select.si,.fbar textarea.si{padding:8px 10px;border:1px solid #e0e0d8;border-radius:8px;background:#fff;font-size:12px;min-width:130px;max-width:100%}
.tbl{width:100%;border-collapse:collapse;table-layout:fixed}
.tbl th,.tbl td{border-bottom:1px solid #f0f0eb;padding:9px 8px;text-align:left;font-size:12px;vertical-align:middle;word-break:break-word}
.tbl th{font-size:10px;color:#888;text-transform:uppercase;letter-spacing:.05em}
.pager{display:flex;align-items:center;justify-content:space-between;margin-top:10px;gap:8px;flex-wrap:wrap}
.muted{color:#999}
.modal-bg{position:fixed;inset:0;background:rgba(0,0,0,.4);display:flex;align-items:flex-start;justify-content:center;padding-top:30px;z-index:999}
.modal{background:#fff;border-radius:14px;padding:24px;width:92%;max-width:520px;max-height:85vh;overflow-y:auto;border:1px solid #e0e0d8}
.modal h3{font-size:15px;font-weight:700;margin-bottom:16px;letter-spacing:-0.01em}
.ui-scroll-x{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}
.ui-scroll-x > *{min-width:max-content}
.ui-grid-auto-fit{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
.ui-toolbar-wrap{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0}
.ui-card-stack{display:grid;gap:14px;min-width:0}
.ui-page-shell{width:min(var(--app-shell-max-width),100%);margin:0 auto;min-width:0}

/* MOBILE RESPONSIVE */
@media(max-width:1000px) and (min-width:769px){
  .login-container{max-width:820px;min-height:520px}
  .login-left-pane{width:320px;min-width:320px;padding:36px 28px}
  .llp-hero h2{font-size:26px}
  .llp-logo-icon{width:58px;height:58px}
  .llp-logo-text h1{font-size:20px}
  .login-right-pane{padding:36px 32px}
  .content{padding:var(--app-page-pad-y-tablet) var(--app-page-pad-x-tablet)}
  .g4{grid-template-columns:1fr 1fr}
  .modal{max-width:500px}
  .stat .val{font-size:18px}
}
@media(max-width:768px){
  #login-screen{padding:0;align-items:flex-start}
  .login-container{flex-direction:column;max-width:100%;width:100%;min-height:100vh;border-radius:0;box-shadow:none}
  .login-left-pane{width:100%;min-width:0;padding:28px 24px 30px;flex-direction:column;align-items:center;text-align:center}
  .llp-logo{flex-direction:column;align-items:center}
  .llp-logo-icon{width:56px;height:56px}
  .llp-logo-text h1{font-size:20px}
  .llp-hero{display:flex;flex-direction:column;align-items:center;padding:10px 0 0;text-align:center}
  .llp-hero h2{font-size:28px}
  .llp-hero p{max-width:420px}
  .llp-stats{width:100%;max-width:420px}
  .llp-footer{margin-top:18px}
  .login-right-pane{width:100%;padding:28px 24px 36px;display:block}
  .lf-card{max-width:460px;margin:0 auto}
  .role-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:8px;border-radius:18px}
  .rtab{flex:1 1 auto;min-height:46px}
  #app-screen{display:block;position:relative;overflow-x:hidden}
  .sidebar{position:fixed;left:0;top:0;bottom:0;width:min(84vw,320px);max-width:320px;height:100dvh;z-index:200;transform:translateX(-100%);transition:transform .25s ease;box-shadow:16px 0 40px rgba(15,23,42,.16);overflow:hidden}
  .sidebar.open{transform:translateX(0)}
  .main{width:100%;max-width:100%}
  .topbar{padding:10px 14px;min-height:var(--app-mobile-topbar-height);align-items:center}
  .topbar > div:first-child{display:flex;align-items:center;gap:10px;min-width:0;flex:1 1 auto}
  .topbar h1{font-size:15px;max-width:none}
  .tb-right{flex:0 1 auto;justify-content:flex-end}
  .sb-overlay.on{display:block}
  .mb-menu-btn{display:inline-flex!important;flex:0 0 auto}
  .content{padding:var(--app-page-pad-y-mobile) var(--app-page-pad-x-mobile)}
  .g4{grid-template-columns:1fr 1fr;gap:10px}
  .g2{grid-template-columns:1fr;gap:12px}
  .tbl{display:block;overflow-x:auto;white-space:nowrap}
  .fbar input.si,.fbar select.si{min-width:0;flex:1 1 180px}
  .ui-grid-auto-fit{grid-template-columns:1fr}
}
@media(max-width:480px){
  #login-screen{padding:0}
  .login-left-pane{padding:22px 16px 24px}
  .login-right-pane{padding:20px 16px 28px}
  .llp-hero h2{font-size:24px}
  .llp-hero p{font-size:12px}
  .llp-stats{grid-template-columns:1fr;gap:8px;max-width:none}
  .llp-stat{padding:10px}
  .llp-stat-val{font-size:16px}
  .llp-stat-lbl{font-size:9px}
  .lf-card{max-width:none}
  .lf-card-header{margin-bottom:20px}
  .sa-portal-btn{padding:10px 12px;gap:10px}
  .sa-portal-icon{width:32px;height:32px;font-size:14px}
  .sa-portal-text-block .sa-ttl{font-size:12px}
  .role-tabs{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:7px;border-radius:16px}
  .rtab{padding:10px 8px;font-size:11px;border-radius:11px}
  .demo-box{padding:10px 11px;font-size:11px}
  .btn-login{padding:13px 12px;font-size:13px}
  .forgot-link{font-size:11px;line-height:1.5}
  .topbar{padding:10px 12px}
  .topbar h1{font-size:14px;max-width:100%}
  .tb-right,.topbar-shell-actions{width:100%;justify-content:flex-start}
  .modal{padding:12px 10px!important;width:100%!important;max-width:100%!important;border-radius:8px!important}
  .modal-bg{padding:6px 0 0!important;align-items:flex-start}
  .g4{grid-template-columns:1fr!important}
  .card,.stat{padding:14px}
}
@media(min-width:769px){
  .sb-overlay{display:none!important;opacity:0!important}
  .mb-menu-btn{display:none!important}
}
@media(min-width:1025px){
  .ui-grid-auto-fit{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
}
@media print{.sidebar,.topbar,.btn,.fbar,.pager,.modal-bg,#ord-bulk-bar,.tb-right,.mb-menu-btn,.sb-overlay{display:none!important}.main{margin:0!important}body{background:#fff}}
