:root {
  --page: #f3f5fc;
  --panel: #ffffff;
  --line: #cfd8e3;
  --text: #5f738d;
  --dark: #18324a;
  --accent: #0b7a5c;
  --gold: #f2b84b;
  --green: #0b7a5c;
  --shadow: 0 2px 8px rgba(31, 45, 61, 0.06);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--page); color: var(--text); font-family: "Segoe UI", Arial, sans-serif; font-size: 13px; }
button, input, select { font: inherit; }
button { cursor: pointer; border: 0; background: none; color: inherit; }
.auth-screen { display: none; min-height: 100vh; place-items: center; padding: 24px; }
.auth-screen.active { display: grid; }
.auth-card { width: min(420px, 92vw); padding: 28px; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.suite-logo { width: 166px; margin: 18px auto 34px; color: var(--dark); text-align: center; }
.suite-logo.large { width: 100%; max-width: 100%; margin: 0 auto 22px; }
.brand-logo {
  display: block;
  width: 100%;
  max-width: 310px;
  height: auto;
  max-height: 155px;
  margin: 0 auto;
  object-fit: contain;
}
.brand-logo.small {
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}
.brand-symbol {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--dark), var(--accent));
  color: #fff;
  font-size: 25px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(24, 50, 74, 0.18);
}
.suite-logo.large .brand-symbol { width: 76px; height: 76px; border-radius: 18px; font-size: 42px; }
.suite-logo strong { display: block; letter-spacing: 5px; line-height: 1; font-size: 34px; font-weight: 700; }
.suite-logo.large strong { font-size: clamp(58px, 7vw, 94px); letter-spacing: 8px; }
.suite-logo em { display: block; margin-top: 6px; color: #58708c; text-align: center; font-size: 10px; font-style: normal; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.suite-logo.large em { font-size: 18px; }
.suite-logo.large strong, .suite-logo.large em { display: none; }
.auth-label { display: grid; gap: 12px; margin-top: 26px; color: #3e5d82; font-size: 18px; font-weight: 500; }
.input-shell { display: grid; grid-template-columns: 1fr 44px 44px; align-items: center; height: 58px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.input-shell input { height: 100%; min-width: 0; border: 0; padding: 0 22px; outline: 0; color: #4b6786; font-size: 23px; }
.input-icon { display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid #000; border-radius: 9px; background: #c3c8cf; color: #000; justify-self: center; font-weight: 800; }
.eye-btn { font-size: 20px; color: #58708c; }
.suite-btn { width: 100%; min-height: 58px; margin-top: 24px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 24px; font-weight: 500; box-shadow: 0 8px 12px rgba(11, 122, 92, 0.16); }
.otp-card h1 { margin: 14px 0; color: #3f5f83; font-size: 36px; font-weight: 400; }
.otp-card p { margin: 0 0 36px; color: #637b99; font-size: 24px; }
.otp-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; color: #3e5d82; }
.otp-row span:nth-child(2), .otp-row button { color: var(--accent); font-size: 20px; }
.app-shell { display: none; grid-template-columns: 240px 1fr; min-height: 100vh; }
.app-shell.active { display: grid; }
.side { position: relative; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); box-shadow: 10px 0 30px rgba(31, 45, 61, 0.03); }
.side::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--dark), var(--accent), var(--gold)); }
.side-brand { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 12px; min-height: 92px; padding: 22px 18px 18px; border-bottom: 1px solid #edf1f6; }
.side-brand .brand-symbol { width: 42px; height: 42px; margin: 0; border-radius: 11px; font-size: 24px; box-shadow: 0 10px 20px rgba(24, 50, 74, 0.14); }
.side-brand strong { display: block; color: var(--dark); letter-spacing: 3px; font-size: 23px; line-height: 1; }
.side-brand em { display: block; margin-top: 6px; color: #6b7d94; font-size: 9px; font-style: normal; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.nav-section-label { margin: 16px 18px 8px; color: #96a5b7; font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.side-nav { display: grid; gap: 4px; padding: 0 12px; }
[data-role-hidden="true"] { display: none !important; }
.side-link { position: relative; display: grid; grid-template-columns: 34px 1fr; align-items: center; width: 100%; min-height: 42px; padding: 0 12px; border-radius: 7px; color: #536a84; text-align: left; transition: background 160ms ease, color 160ms ease, transform 160ms ease; }
.side-link::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 999px; background: transparent; }
.side-link.active, .side-link:hover { background: #f2f7f5; color: var(--dark); }
.side-link.active::before { background: var(--accent); }
.side-link:hover { transform: translateX(1px); }
.side-link span { display: grid; place-items: center; width: 26px; height: 24px; border-radius: 6px; background: #eef3f7; color: #5f738d; font-size: 10px; font-weight: 800; letter-spacing: 0; }
.side-link.active span { background: #dff3ec; color: var(--accent); }
.sub-links { display: none; gap: 4px; padding: 3px 0 8px 47px; }
.sub-links.active { display: grid; }
.sub-links button { min-height: 28px; padding: 0 8px; border-radius: 5px; text-align: left; color: #647995; font-size: 12px; }
.sub-links button:hover { background: #f6f9fb; color: var(--accent); }
.sub-links button::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 8px; border-radius: 50%; background: #b6c2d0; vertical-align: middle; }
.user-dot { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #dfe8f0, #ffffff); border: 1px solid #d7e0ea; position: relative; }
.user-dot::after { content: ""; position: absolute; right: 0; bottom: 1px; width: 8px; height: 8px; border-radius: 50%; background: #58c64a; border: 2px solid #fff; }
.content { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 100vh; padding: 10px 20px 30px; }
.top-strip { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 0 18px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.crumb-actions, .profile-tools { display: flex; align-items: center; gap: 16px; }
.square-btn { display: inline-grid; place-items: center; min-width: 44px; height: 34px; border-radius: 5px; color: #fff; font-weight: 800; }
.mobile-menu-btn { display: none; place-items: center; width: 42px; height: 34px; border-radius: 5px; background: var(--dark); color: #fff; font-size: 18px; font-weight: 800; }
.square-btn.dark { background: var(--dark); box-shadow: 0 5px 7px rgba(31,45,61,.22); }
.square-btn.accent { background: var(--accent); box-shadow: 0 5px 7px rgba(11,122,92,.18); }
.moon-btn { font-size: 22px; color: #536b87; }
.avatar { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #eee; }
.avatar::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: #d7d1c9; box-shadow: 0 15px 0 5px #d7d1c9; }
.avatar:has(img)::before { display: none; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar b { position: absolute; right: 1px; bottom: 1px; width: 8px; height: 8px; border-radius: 50%; background: #62d245; }
.profile-tools { position: relative; }
.system-clock { min-width: 210px; color: #49627d; font-size: 13px; font-weight: 700; text-align: right; white-space: nowrap; }
.profile-button { display: flex; align-items: center; gap: 8px; padding: 3px 8px 3px 3px; border-radius: 999px; background: #f7fafc; border: 1px solid #edf1f6; color: var(--dark); }
.profile-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.profile-menu { position: absolute; right: 0; top: 44px; z-index: 10; display: none; min-width: 190px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 14px 35px rgba(24, 50, 74, 0.12); }
.profile-menu.active { display: grid; gap: 4px; }
.profile-menu button { min-height: 34px; padding: 0 10px; border-radius: 5px; text-align: left; color: #536a84; }
.profile-menu button:hover { background: #f2f7f5; color: var(--accent); }
.notice { margin-top: 10px; padding: 14px 16px; background: #e6fbdd; color: #2f8f18; border-radius: 4px; font-size: 16px; font-weight: 700; line-height: 1.5; }
.notice.hidden { display: none; }
.suite-view { display: none; }
.suite-view.active { display: block; }
.admin-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 126px; margin-top: 14px; padding: 24px 28px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.admin-hero span { color: var(--accent); font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; font-size: 11px; }
.admin-hero h1 { margin: 8px 0 6px; color: var(--dark); font-size: 28px; letter-spacing: 1px; }
.admin-hero p { margin: 0; max-width: 720px; color: #667b94; font-size: 14px; }
.admin-hero > strong { flex: 0 0 auto; padding: 8px 12px; border-radius: 5px; background: #e2f3ee; color: var(--accent); }
.sms-balance-card {
  flex: 0 0 260px;
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid #bfe7d8;
  border-left: 5px solid var(--green);
  border-radius: 6px;
  background: linear-gradient(135deg, #f0fff8, #ffffff);
  box-shadow: var(--shadow);
}
.sms-balance-card span { color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; }
.sms-balance-card strong { color: var(--dark); font-size: 24px; letter-spacing: .4px; }
.sms-balance-card small { color: #6d7f96; }
.admin-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 16px; }
.manager-grid { margin-bottom: 18px; }
.admin-panel { margin-top: 18px; }
.admin-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.admin-panel-heading p { margin: -8px 0 12px; color: var(--muted); font-size: 13px; }
.b2c-toolbar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.b2c-grid { min-width: 1500px; }
.status-pill { display: inline-flex; border-radius: 999px; padding: 4px 8px; background: #fff4d6; color: #8a5a00; font-size: 10px; font-weight: 800; }
.status-pill.success { background: #dff6ea; color: #087f5b; }
.status-pill.danger { background: #fde7e5; color: #b42318; }
.manager-scope-panel { margin-top: 18px; }
.compact-field { min-width: 220px; margin: 0; }
.compact-field span { display: block; margin-bottom: 6px; color: #6d7f96; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.compact-field select { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); padding: 0 10px; }
.manager-mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.manager-mini-grid div { border: 1px solid var(--line); border-radius: 5px; padding: 12px; background: #f8fafc; }
.manager-mini-grid strong { display: block; color: var(--accent); font-size: 17px; }
.manager-mini-grid span { display: block; margin-top: 4px; color: #6d7f96; font-size: 11px; text-transform: uppercase; }
.manager-copy { margin: 8px 0 0; color: #6c7f97; line-height: 1.6; }
.agent-selector-panel { display: grid; gap: 14px; }
.agent-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.agent-summary-grid div { min-height: 66px; border: 1px solid var(--line); border-radius: 5px; padding: 12px; background: #f8fafc; }
.agent-summary-grid strong, .agent-summary-grid span { display: block; }
.agent-summary-grid strong { color: var(--dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-summary-grid span { margin-top: 6px; color: #6d7f96; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 70px; margin-top: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.page-head h1 { margin: 0; color: var(--dark); font-size: 20px; }
.page-head p { margin: 5px 0 0; color: #6c7f97; }
.page-head.inside-card { margin: 0 0 20px; padding: 0 0 16px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.management-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.management-form.hidden, .hidden { display: none !important; }
.management-form h2 { margin: 0 0 8px; color: var(--dark); font-size: 16px; }
.management-form h2 { grid-column: 1 / -1; }
.management-form input, .management-form select, .management-form textarea { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 4px; padding: 0 10px; color: #5e7490; outline: 0; background: #fff; }
.management-form textarea { min-height: 78px; padding: 10px; resize: vertical; }
.management-form input:focus, .management-form select:focus, .management-form textarea:focus { border-color: var(--accent); }
.management-form .full-span { grid-column: 1 / -1; }
.compact-scroll { max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 4px; }
.file-field { display: grid; align-content: center; min-height: 56px; border: 1px dashed var(--line); border-radius: 5px; padding: 8px 10px; background: #f8fafc; color: #5e7490; }
.file-field span { display: block; margin-bottom: 5px; color: var(--dark); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.file-field input { height: auto; border: 0; padding: 0; background: transparent; }
body.profile-required { overflow: hidden; }
body.profile-required::before { content: ""; position: fixed; inset: 0; z-index: 998; background: rgba(13, 31, 48, .78); backdrop-filter: blur(3px); }
body.profile-required .profile-editor { position: fixed; z-index: 999; top: 50%; left: 50%; width: min(560px, calc(100vw - 28px)); max-height: calc(100vh - 32px); overflow: auto; transform: translate(-50%, -50%); padding: 24px; border-radius: 10px; background: #fff; box-shadow: 0 24px 70px rgba(0, 0, 0, .38); }
body.profile-required .profile-editor::before { content: "Complete your profile to continue"; display: block; grid-column: 1 / -1; margin-bottom: 4px; color: #b42318; font-size: 13px; font-weight: 800; text-transform: uppercase; }
.loan-document-section { grid-column: 1 / -1; display: grid; gap: 8px; padding: 11px; border: 1px solid #b9c9dc; border-radius: 6px; background: #f8fafc; }
.loan-document-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.loan-document-heading h2 { margin: 0; }
.loan-document-heading h2 small { color: #6c7f97; font-size: 12px; font-weight: 600; }
.required-badge { padding: 4px 9px; border-radius: 999px; background: #b42318; color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.optional-badge { padding: 4px 9px; border-radius: 999px; background: #60758c; color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.collateral-section { border-color: #b8c5d3; background: #f8fafc; }
.loan-document-actions { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.3fr); gap: 12px; align-items: stretch; }
.loan-document-actions .file-field { min-height: 56px; }
.loan-document-status { padding: 11px 13px; border-radius: 5px; background: #fff4e5; color: #8a4b08; font-size: 15px; font-weight: 700; line-height: 1.5; }
.loan-document-status.complete { background: #e7f6ec; color: #176b36; }
.loan-document-preview { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; }
.loan-document-page { display: grid; gap: 7px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.loan-document-page strong, .loan-document-page small { overflow-wrap: anywhere; }
.loan-document-page img, .loan-document-page object { width: 100%; height: 230px; border: 1px solid var(--line); border-radius: 4px; object-fit: contain; background: #f8fafc; }
.loan-document-page a { color: var(--brand); font-weight: 700; }
@media (max-width: 900px) {
  .loan-document-actions { grid-template-columns: 1fr; }
  .loan-document-preview { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
}
@media (max-width: 560px) {
  .loan-document-preview { grid-template-columns: 1fr; }
}
.doc-link { display: inline-block; margin-right: 6px; color: var(--accent); font-weight: 700; }
.sms-compose { display: grid; gap: 12px; margin-bottom: 18px; }
.sms-compose textarea { width: 100%; min-height: 120px; border: 1px solid var(--line); border-radius: 6px; padding: 12px; resize: vertical; color: #405974; }
.sms-compose-head, .sms-history-head, .sms-target-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sms-compose-head h2, .sms-history-head h2 { margin: 0; }
.sms-compose-head span, .sms-history-head p, .sms-selected-count { color: #6c7f97; }
.sms-history-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin: 12px 0; padding: 10px; border-radius: 6px; background: #eef5fb; }
.sms-history-filters label { display: grid; gap: 4px; color: #49627d; font-size: 12px; font-weight: 700; }
.sms-history-filters input, .sms-history-filters select { min-width: 145px; height: 38px; border: 1px solid var(--line); border-radius: 5px; padding: 0 9px; background: #fff; color: #405974; }
.sms-history-table { max-height: 520px; overflow: auto; }
.sms-history-table table { min-width: 1450px; }
.sms-history-table thead th { position: sticky; z-index: 2; top: 0; background: #f7f9fc; }
.sms-history-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin-top: 12px; }
.sms-history-footer > .suite-btn { justify-self: end; }
.sms-pagination { display: flex; align-items: center; gap: 5px; }
.sms-pagination button { min-width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: #385471; cursor: pointer; }
.sms-pagination button:disabled { cursor: not-allowed; opacity: .45; }
.sms-pagination strong { min-width: 72px; text-align: center; color: #213b57; }
.sms-recipient-picker { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.6fr) auto; gap: 12px; align-items: end; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: #f8fbfe; }
.sms-recipient-search-block { position: relative; display: grid; gap: 6px; }
.sms-recipient-search-block label { font-weight: 800; color: #213b57; }
.sms-recipient-search-block input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 5px; padding: 0 11px; }
.sms-lookup-results { position: absolute; z-index: 20; top: 68px; left: 0; right: 0; max-height: 260px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 10px 22px rgba(29, 55, 82, .14); }
.sms-lookup-results button { width: 100%; display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 0; border-bottom: 1px solid #edf2f7; background: #fff; text-align: left; cursor: pointer; }
.sms-lookup-results button:hover { background: #eef7f3; }
.sms-lookup-results span, .sms-recipient-details span { color: #6c7f97; }
.sms-recipient-details { min-height: 40px; display: flex; align-items: center; gap: 18px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.sms-recipient-details strong { color: #12304e; }
.sms-target-head { padding-top: 4px; }
.sms-target-head h2, .sms-target-head p { margin: 0; }
.sms-target-head p { color: #6c7f97; }
.sms-recipient-table { max-height: 330px; overflow: auto; }
.sms-history-head select { min-width: 150px; height: 36px; border: 1px solid var(--line); border-radius: 5px; padding: 0 9px; }
.sms-status-sent { color: #087f5b; font-weight: 800; }
.sms-status-failed { color: #b42318; font-weight: 800; }
@media (max-width: 900px) { .sms-recipient-picker { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .sms-history-footer { grid-template-columns: 1fr; } .sms-history-footer > .suite-btn { justify-self: stretch; } }
.check-panel { position: relative; min-width: 0; }
.branch-picker summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 4px; padding: 0 10px; color: #5e7490; background: #fff; cursor: pointer; list-style: none; }
.branch-picker summary::-webkit-details-marker { display: none; }
.branch-picker summary small { display: block; margin-bottom: 1px; color: #7b8da3; font-size: 9px; font-weight: 800; line-height: 1; text-transform: uppercase; }
.branch-picker summary strong { display: block; max-width: 100%; overflow: hidden; color: #49627d; font-size: 13px; font-weight: 600; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.branch-picker summary span { min-width: 0; }
.branch-picker summary b { width: 8px; height: 8px; flex: 0 0 auto; border-right: 2px solid #6c7f97; border-bottom: 2px solid #6c7f97; transform: translateY(-2px) rotate(45deg); transition: transform 0.18s ease; }
.branch-picker[open] summary { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(12, 137, 107, 0.1); }
.branch-picker[open] summary b { transform: translateY(2px) rotate(225deg); }
.check-grid.branch-menu { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; left: 0; display: grid; grid-template-columns: 1fr; gap: 4px; max-height: 230px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 8px; background: #fff; box-shadow: 0 16px 36px rgba(26, 43, 62, 0.16); }
.check-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; border-radius: 4px; padding: 6px 8px; color: #49627d; font-size: 13px; cursor: pointer; }
.check-option:hover { background: #f3f7f9; }
.check-option input { width: 16px; height: 16px; flex: 0 0 auto; padding: 0; accent-color: var(--accent); }
.check-empty { padding: 8px; color: #7b8da3; font-size: 13px; }
.suite-btn.compact { min-height: 38px; margin-top: 6px; font-size: 13px; font-weight: 700; }
.action-btn { width: auto; min-width: 130px; margin-top: 0; padding: 0 16px; }
.dash-grid { display: grid; grid-template-columns: 41% 58%; gap: 18px; margin-top: 14px; }
.dash-grid.lower { grid-template-columns: 41% 58%; }
.metric-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.stat-card, .suite-panel, .trend-head, .chart-panel, .trend-side article, .report-card { border: 1px solid var(--line); border-radius: 5px; background: #fff; box-shadow: var(--shadow); }
.stat-card { position: relative; min-height: 76px; padding: 20px 18px; }
.stat-card.wide { min-height: 78px; }
.stat-card strong, .stat-card span { display: block; }
.stat-card strong { color: #637991; }
.stat-card span { margin-top: 8px; font-size: 11px; }
.stat-card i, .side-metrics i { position: absolute; right: 20px; top: 18px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 4px; background: #e5e9ee; color: #8494a6; font-style: normal; font-weight: 800; }
.suite-panel { padding: 12px 16px; }
.suite-panel h2 { margin: 0 0 14px; color: var(--green); font-size: 13px; }
.suite-panel h2::before { content: ""; display: inline-block; width: 3px; height: 18px; margin: -2px 12px 0 -16px; background: var(--green); vertical-align: middle; }
.settings-form { margin-top: 14px; }
.settings-grid { display: grid; gap: 14px; }
.settings-category { overflow: visible; }
.settings-note { margin: -6px 0 14px; padding: 10px 12px; border-left: 3px solid #0b8763; background: #f0faf6; color: #49657d; line-height: 1.45; }
.settings-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; }
.setting-field { display: grid; gap: 6px; color: #526981; font-size: 12px; }
.setting-field span { color: var(--dark); font-weight: 800; letter-spacing: .02em; }
.setting-field small { color: #7185a0; line-height: 1.35; }
.setting-field input, .setting-field select, .setting-field textarea {
  width: 100%;
  border: 1px solid #c7d5e6;
  border-radius: 4px;
  padding: 10px 11px;
  color: #223d5a;
  background: #fff;
}
.setting-field textarea { resize: vertical; min-height: 96px; }
.settings-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 5px; background: #eef6ff; color: #526981; }
.collection-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 0 18px; }
.collection-grid div + div { border-left: 1px solid var(--line); padding-left: 18px; }
.collection-grid strong, .collection-grid span { display: block; }
.collection-grid span { margin-top: 8px; font-size: 11px; }
.progress { height: 38px; margin: 8px 0; border-radius: 4px; background: #e9edf2; overflow: hidden; }
.progress span { display: grid; place-items: center end; width: 59.62%; height: 100%; padding-right: 10px; background: var(--accent); color: #fff; font-weight: 700; }
.ring-layout { display: grid; grid-template-columns: 58% 1fr; align-items: center; gap: 18px; min-height: 230px; }
.donut { display: grid; place-items: center; justify-self: center; width: 170px; height: 170px; border-radius: 50%; background: conic-gradient(#3b4b5d 0 320deg, #edf0f4 320deg 360deg); position: relative; }
.donut::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #fff; }
.donut.risk { background: conic-gradient(var(--gold) 0 100deg, #edf0f4 100deg 360deg); }
.donut span, .donut strong, .donut em { position: relative; z-index: 1; display: block; }
.donut strong { color: #5c7089; font-size: 26px; font-weight: 400; }
.donut em { color: #94a2b1; font-style: normal; }
.donut span { color: #8393a7; font-size: 30px; }
.side-metrics { display: grid; gap: 20px; }
.side-metrics div { position: relative; min-height: 50px; padding: 10px 58px 10px 14px; background: #fcfdff; }
.side-metrics strong, .side-metrics span { display: block; }
.side-metrics span { margin-top: 6px; font-size: 11px; }
.side-metrics i { right: 12px; top: 12px; width: 30px; height: 30px; color: var(--accent); background: #e2f3ee; }
.disb-layout { display: grid; grid-template-columns: 1fr 404px; gap: 22px; margin-top: 12px; }
.trend-head { display: grid; grid-template-columns: 1fr 1fr 1fr; min-height: 74px; padding: 18px; }
.trend-head div + div { border-left: 1px solid var(--line); padding-left: 20px; }
.trend-head strong, .trend-head span { display: block; }
.trend-head span, .trend-side small { margin-top: 8px; font-size: 11px; }
.chart-panel { margin-top: 18px; min-height: 424px; padding: 24px 46px; }
.legend { color: #2d3c4d; font-size: 10px; }
.red-dot, .yellow-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 5px; }
.red-dot { background: var(--accent); }
.yellow-dot { background: var(--gold); }
.chart-canvas { position: relative; display: grid; height: 330px; margin-top: 22px; color: #111; font-size: 9px; }
.chart-canvas em { position: absolute; right: -28px; top: 116px; writing-mode: vertical-rl; color: #111; font-style: normal; }
.today-disbursement-canvas { align-content: center; color: var(--muted); font-size: 13px; }
.today-disbursement-list { display: grid; gap: 10px; width: min(720px, 100%); }
.today-disbursement-list div { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--dark); }
.today-disbursement-list span { color: var(--muted); }
.today-disbursement-list em { position: static; writing-mode: horizontal-tb; color: var(--accent); font-size: 12px; font-style: normal; font-weight: 800; }
.trend-side { display: grid; gap: 18px; }
.trend-side article { min-height: 112px; padding: 22px; text-align: right; }
.trend-side span { float: left; color: #93a3b4; font-weight: 700; }
.trend-side strong, .trend-side small { display: block; }
.table-toolbar { display: flex; align-items: center; gap: 12px; min-height: 54px; margin-top: 10px; padding: 0 18px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.suite-search { margin-top: 12px; }
.suite-search.inline { margin: 0 0 12px; }
.suite-search input { width: min(520px, 100%); height: 38px; border: 1px solid var(--line); border-radius: 4px; padding: 0 12px; color: var(--dark); outline: 0; background: #fff; }
.prospect-form { margin-bottom: 14px; }
.prospect-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.prospect-filters input { width: auto; min-width: 180px; }
.prospect-filters input[type="search"] { flex: 1 1 360px; }
.sms-history-filters .sms-history-search { min-width: min(360px, 100%); flex: 1 1 360px; }
.sms-history-filters .sms-history-search input { width: 100%; }
.suite-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10, 132, 93, 0.12); }
.suite-table-wrap { margin-top: 12px; overflow-x: auto; }
.mpesa-filterbar { display: grid; grid-template-columns: 150px 180px 180px minmax(220px, 1fr) auto; gap: 10px; align-items: end; margin: 12px 0; }
.mpesa-filterbar label { display: grid; gap: 4px; color: #6c7f95; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.mpesa-filterbar input, .mpesa-filterbar select { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 4px; padding: 0 10px; color: #233a55; background: #fff; }
.mpesa-grid { min-width: 1880px; font-size: 11px; }
.mpesa-grid th { padding: 7px 8px; background: #e7f4fd; color: #172a42; border: 1px solid #b8d5e8; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.mpesa-grid td { padding: 7px 8px; border: 1px solid #d2e3ee; white-space: nowrap; }
.mpesa-grid tr:nth-child(even) td { background: #eaf6fd; }
.statement-filterbar { grid-template-columns: 150px 180px 180px minmax(260px, 1fr) auto; }
.statement-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 8px 0 12px; }
.statement-summary article { border: 1px solid #c8d9e6; border-radius: 4px; background: #f8fcff; padding: 12px 14px; }
.statement-summary span { display: block; color: #6c7f95; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; }
.statement-summary strong { display: block; margin-top: 5px; color: var(--dark); font-size: 16px; }
.statement-table-wrap { max-height: 66vh; overflow: auto; border: 1px solid #c8d9e6; border-radius: 4px; }
.c2b-statement-grid { min-width: 2100px; }
.row-icons { width: 58px; text-align: center; }
.icon-action { min-width: 24px; height: 22px; padding: 0 5px; border: 1px solid #9bbbd1; background: #edf8ff; color: #0a6c9e; border-radius: 3px; font-weight: 900; }
.mono-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; font-family: Consolas, monospace; }
.mpesa-reconcile-panel { margin-top: 14px; border-top: 4px solid var(--accent); background: #eef8ff; border-radius: 6px; padding: 12px; }
.reconcile-search-grid { display: grid; grid-template-columns: 1.4fr 1.6fr 180px 1fr; gap: 10px; margin-top: 10px; }
.reconcile-search-grid label { display: grid; gap: 4px; color: #506985; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.reconcile-search-grid input, .reconcile-search-grid select { height: 38px; border: 1px solid var(--line); border-radius: 4px; padding: 0 10px; background: #fff; }
.lookup-results.wide { max-width: none; margin-top: 8px; }
.mpesa-reconcile-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 10px; padding: 8px; background: #a9d6f0; border-radius: 4px; }
.mpesa-reconcile-actions span { margin-right: auto; color: #284864; font-weight: 800; }
.suite-table { width: 100%; min-width: 1000px; border-collapse: collapse; }
.suite-table th { padding: 12px 14px; background: #fff; color: #6d7f96; font-size: 10px; letter-spacing: 1px; text-align: left; text-transform: uppercase; }
.suite-table td { padding: 12px 14px; background: rgba(255,255,255,.45); color: #637991; }
.suite-table tr:nth-child(even) td { background: #f7f8fc; }
.suite-table td:first-child, .suite-table .hot { color: var(--accent); }
.report-card { min-height: 248px; margin-top: 12px; padding: 26px 28px 18px; }
.report-card h1 { margin: 0; color: var(--dark); font-size: 20px; font-weight: 700; }
.export-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.export-actions button { min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 5px; background: #f8fbfa; color: var(--accent); font-weight: 700; }
.export-actions button:hover { background: #e2f3ee; }
.row-action { border: 1px solid var(--line); background: #fff; color: var(--blue); border-radius: 4px; min-height: 28px; padding: 0 10px; margin-right: 6px; cursor: pointer; font-weight: 700; }
.row-action:hover { border-color: var(--accent); color: var(--accent); }
.row-action.strong { background: rgba(0, 127, 89, .1); color: var(--accent); border-color: rgba(0, 127, 89, .18); }
.row-action.link-action { min-height: 0; padding: 0; margin: 0; border: 0; background: transparent; color: var(--accent); text-align: left; }
.row-action:disabled { opacity: .45; cursor: default; }
.follow-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.follow-toolbar select { min-height: 32px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--blue); padding: 0 10px; font-weight: 700; }
.follow-toolbar span { color: #6d7f96; font-size: 12px; font-weight: 700; white-space: nowrap; }
.payment-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.payment-form input[type="search"], .payment-form .file-field, .payment-form button, .payment-form .helper-text { grid-column: 1 / -1; }
.helper-text { color: #526b86; font-size: 14px; font-weight: 600; margin: 0; line-height: 1.6; }
.toggle-line { display: flex; align-items: center; gap: 8px; color: var(--blue); font-weight: 700; min-height: 42px; }
.lookup-results { grid-column: 1 / -1; display: grid; gap: 6px; }
.lookup-results button, .lookup-results div { border: 1px solid var(--line); background: #fff; color: #526b86; border-radius: 4px; padding: 11px 12px; text-align: left; font-size: 14px; line-height: 1.45; }
.lookup-results button { cursor: pointer; }
.lookup-results button:hover { border-color: var(--accent); }
.lookup-results strong { display: block; color: var(--blue); }
.lookup-results span { font-size: 13px; }
.filter-title { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-size: 11px; }
.filter-title::after { content: ""; flex: 1; border-top: 1px dashed var(--line); }
.report-form { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; align-items: start; }
.joined-input { display: grid; grid-template-columns: 70px 1fr; border: 1px solid var(--line); border-radius: 4px; background: #fff; overflow: hidden; }
.joined-input:focus-within { border-color: var(--accent); }
.joined-input span { display: grid; place-items: center; border-right: 1px solid var(--line); color: #5e7490; }
.joined-input select, .joined-input input { height: 32px; min-width: 0; border: 0; padding: 0 10px; color: #5e7490; outline: 0; }
.report-btn { grid-column: 1 / -1; justify-self: center; width: 92px; min-height: 32px; margin-top: 14px; font-size: 12px; font-weight: 700; }
.report-output { margin-top: 18px; border-top: 1px solid var(--line); padding: 14px 4px 4px; min-height: 30px; font-size: 15px; line-height: 1.55; }
.report-result-wrap { margin-top: 14px; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; min-height: 34px; padding-top: 12px; color: #5e7490; font-size: 12px; }
.toast { position: fixed; z-index: 1200; right: 20px; bottom: 20px; max-width: min(560px, calc(100vw - 32px)); padding: 16px 20px; border-radius: 6px; background: #26394d; color: #fff; font-size: 17px; font-weight: 700; line-height: 1.45; opacity: 0; transform: translateY(10px); transition: 160ms ease; box-shadow: 0 14px 36px rgba(0, 0, 0, .28); }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.info { background: #245b86; }
.toast.success { background: #197047; }
.toast.warning { background: #9a6500; }
.toast.error { background: #a83232; }
.customer-details-content { display: grid; gap: 16px; }
.customer-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.customer-detail-card { padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.customer-detail-card span { display: block; color: #6d7f96; font-size: 12px; margin-bottom: 5px; }
.field-label { display: block; margin: 12px 0 6px; color: #49617d; font-size: 12px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.full-width-input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 5px; padding: 0 12px; margin-bottom: 10px; color: #233a55; background: #fff; outline: 0; }
.full-width-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10, 132, 93, 0.12); }
.customer-documents { display: flex; gap: 16px; flex-wrap: wrap; }
.customer-documents img { width: 220px; max-height: 260px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.change-entry { white-space: pre-wrap; overflow-wrap: anywhere; }
.loan-document-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.loan-document-grid .customer-detail-card { display: grid; gap: 8px; align-content: start; }
.loan-document-grid img { width: 100%; max-height: 320px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
body.dark { --page: #17202c; --panel: #213044; --line: #34465c; --text: #c8d4e2; }
body.dark .side, body.dark .top-strip, body.dark .stat-card, body.dark .suite-panel, body.dark .trend-head, body.dark .chart-panel, body.dark .trend-side article, body.dark .report-card, body.dark .table-toolbar, body.dark .suite-table th, body.dark .joined-input, body.dark .management-form, body.dark .admin-hero, body.dark .page-head, body.dark .profile-menu { background: var(--panel); }
body.dark .suite-table td { background: #1c293a; }
body.dark .suite-table tr:nth-child(even) td { background: #202f43; }
body.dark .branch-picker summary, body.dark .check-grid.branch-menu { background: #1c293a; }
body.dark .check-option:hover { background: #24364d; }
body.dark .donut::before { background: var(--panel); }
body.dark .side-brand { border-bottom-color: #34465c; }
body.dark .side-link.active, body.dark .side-link:hover { background: #1c293a; }
body.dark .sub-links button:hover { background: #1c293a; }
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 1fr; }
  .mobile-menu-btn { display: inline-grid; }
  .side {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(285px, 84vw);
    overflow-y: auto;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: 24px 0 60px rgba(20, 30, 44, 0.24);
  }
  body.nav-open .side { transform: translateX(0); }
  body.nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(12, 18, 28, 0.45);
  }
  .side-nav { display: grid; grid-template-columns: 1fr; padding: 0 14px 24px; }
  .side-link { min-height: 46px; }
  .sub-links { padding-left: 46px; }
  .sub-links.active { display: grid; }
  .dash-grid, .dash-grid.lower, .disb-layout { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .management-form { grid-template-columns: 1fr 1fr; }
  .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 12px; }
  .auth-card { padding: 22px; }
  .brand-logo { max-width: 280px; max-height: 140px; }
  .suite-logo.large strong { font-size: 54px; letter-spacing: 6px; }
  .suite-logo.large .brand-symbol { width: 54px; height: 54px; font-size: 30px; }
  .suite-logo.large em { font-size: 18px; }
  .content { padding: 8px; }
  .top-strip { gap: 8px; padding: 8px; align-items: center; }
  .crumb-actions { gap: 8px; min-width: 0; }
  #crumbText { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .system-clock { min-width: 0; font-size: 11px; }
  .profile-name { max-width: 110px; }
  .square-btn { min-width: 38px; }
  .metric-row, .collection-grid, .ring-layout, .trend-head, .report-form, .admin-grid, .management-form, .payment-form, .manager-mini-grid, .check-grid, .agent-summary-grid { grid-template-columns: 1fr; }
  .admin-hero, .page-head, .footer { display: block; }
  .admin-hero { padding: 20px; }
  .admin-hero h1 { font-size: 25px; }
  .sms-balance-card { margin-top: 16px; }
  .compact-field { min-width: 0; margin-top: 12px; }
  .collection-grid div + div, .trend-head div + div { border-left: 0; padding-left: 0; }
  .ring-layout { min-height: 0; }
  .donut { width: 154px; height: 154px; }
  .side-metrics { gap: 10px; }
  .suite-panel { padding: 12px; }
  .page-head.inside-card { margin-bottom: 14px; }
  .suite-table { min-width: 720px; }
  .mpesa-filterbar { grid-template-columns: 1fr 1fr; }
  .mpesa-filterbar .suite-btn { grid-column: 1 / -1; }
  .statement-summary { grid-template-columns: 1fr 1fr; }
  .footer span { display: block; margin-top: 8px; }
}
