:root {
  --navy: #0b233f;
  --navy-2: #123a60;
  --blue: #1d6fe9;
  --blue-dark: #155bc2;
  --mint: #dff7ef;
  --green: #17835d;
  --orange: #f5a623;
  --red: #c73f4b;
  --paper: #fff;
  --surface: #f4f7f9;
  --line: #dfe6ec;
  --text: #1c2d3f;
  --muted: #687789;
  --shadow: 0 22px 60px rgba(11, 35, 63, .12);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--surface); font-family: "DM Sans", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body.dialog-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.portal-header { position: sticky; z-index: 20; top: 0; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.95); backdrop-filter: blur(14px); }
.portal-brand { display: flex; align-items: center; gap: 11px; }
.portal-logo-image { width: 62px; height: 44px; flex: 0 0 auto; object-fit: contain; border: 1px solid #dbe3e9; border-radius: 10px; background: #fff; box-shadow: 0 8px 20px rgba(11,35,63,.12); }
.portal-logo { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--blue); box-shadow: 0 8px 20px rgba(29,111,233,.25); font: 800 13px "Manrope", sans-serif; }
.portal-brand > span:last-child { display: flex; flex-direction: column; }
.portal-brand strong { color: var(--navy); font: 800 17px "Manrope", sans-serif; letter-spacing: -.4px; }
.portal-brand small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.header-actions { display: flex; align-items: center; gap: 20px; color: #526376; font-size: 12px; font-weight: 700; }
.header-actions button { padding: 9px 13px; border: 1px solid #d5dee5; border-radius: 9px; background: #fff; cursor: pointer; }

.auth-screen { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-intro { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 80px max(7vw, 50px); color: #fff; background: linear-gradient(145deg, #0b233f, #124b75); }
.auth-intro::before { content: ""; position: absolute; width: 520px; height: 520px; right: -230px; top: -220px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 55px rgba(255,255,255,.025), 0 0 0 110px rgba(255,255,255,.015); }
.kicker { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
.auth-intro .kicker { color: #91e5c6; }
.auth-intro h1, .page-heading h1 { margin: 14px 0 19px; font: 800 clamp(38px, 5vw, 63px)/1.08 "Manrope", sans-serif; letter-spacing: -2.5px; }
.auth-intro > p { max-width: 610px; margin: 0; color: #b7c9d6; font-size: 16px; line-height: 1.75; }
.auth-benefits { display: grid; gap: 17px; margin-top: 42px; }
.auth-benefits > div { display: flex; align-items: center; gap: 15px; }
.auth-benefits i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: #91e5c6; background: rgba(94,208,165,.12); font-size: 10px; font-style: normal; font-weight: 800; }
.auth-benefits span { display: flex; flex-direction: column; }
.auth-benefits strong { font-size: 13px; }
.auth-benefits small { margin-top: 4px; color: #92a9ba; font-size: 10px; }

.auth-screen > .auth-card { align-self: flex-start; width: min(420px, calc(100% - 40px)); margin: 22px auto 30px; }
.auth-card { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; margin-bottom: 28px; border-radius: 11px; background: #eef2f5; }
.auth-tabs button { height: 43px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; }
.auth-tabs button.active { color: var(--navy); background: #fff; box-shadow: 0 4px 12px rgba(11,35,63,.08); }
.auth-form h2 { margin: 0 0 6px; color: var(--navy); font: 800 27px "Manrope", sans-serif; letter-spacing: -1px; }
.auth-form > p:not(.form-message) { margin: 0 0 22px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.auth-form label, .form-card label, .dialog-content label, .admin-detail label { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; color: #45576a; font-size: 11px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 47px; padding: 0 13px; border: 1px solid #ccd7df; border-radius: 9px; outline: none; color: var(--navy); background: #fff; transition: border .2s, box-shadow .2s; }
.phone-input { display: flex; align-items: center; width: 100%; min-height: 47px; overflow: hidden; border: 1px solid #ccd7df; border-radius: 9px; background: #fff; transition: border .2s, box-shadow .2s; }
.phone-input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,111,233,.1); }
.phone-input b { align-self: stretch; display: grid; place-items: center; padding: 0 13px; border-right: 1px solid #d9e1e7; color: var(--navy); background: #f1f5f7; font-size: 14px; }
.phone-input input { min-width: 0; border: 0; border-radius: 0; box-shadow: none; }
textarea { padding-top: 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,111,233,.1); }
.primary-button, .secondary-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 20px; border: 1px solid var(--blue); border-radius: 10px; color: #fff; background: var(--blue); box-shadow: 0 8px 20px rgba(29,111,233,.18); font-size: 12px; font-weight: 800; cursor: pointer; transition: .2s; }
.primary-button:hover { background: var(--blue-dark); transform: translateY(-1px); }
.auth-form .primary-button { width: 100%; margin-top: 20px; }
.secondary-button { color: var(--navy); border-color: #ccd7df; background: #fff; box-shadow: none; }
.compact-button { min-height: 43px; }
.form-message { min-height: 18px; margin: 10px 0 0 !important; color: var(--red); font-size: 11px !important; }
.form-message.success { color: var(--green); }
.security-note { margin: 22px 0 0; padding: 12px; border-radius: 10px; color: #7c6842; background: #fff8e8; font-size: 9px; line-height: 1.55; }
.captcha-block { margin-top: 14px; padding: 10px; border: 1px solid #dce4ea; border-radius: 11px; background: #f7fafc; }
.captcha-block > div { display: flex; align-items: center; gap: 10px; }
.captcha-block img { width: 180px; height: 62px; border-radius: 9px; }
.captcha-block button { padding: 8px 10px; border: 1px solid #ccd7df; border-radius: 8px; color: var(--blue); background: #fff; font-size: 9px; font-weight: 800; cursor: pointer; }
.captcha-block label { margin-top: 10px; }
.register-form label { margin-top: 12px; }
.register-form .captcha-block,
.register-form .forgot-password-grid,
.register-form .primary-button,
.register-form .form-message { margin-top: 16px; }
.register-form .captcha-block label,
.register-form .forgot-password-grid > label { margin-top: 0; }
.register-form .forgot-password-grid { grid-template-columns: 132px 1fr; gap: 10px; }
.register-form .secondary-button { min-height: 46px; padding: 0 14px; }
.register-form .captcha-inline-row {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 10px;
  align-items: stretch;
}
.register-form .captcha-inline-row label {
  justify-content: center;
}
.register-form .captcha-visual {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: nowrap;
}
.register-form .captcha-visual img {
  flex: 0 1 160px;
  width: 100%;
  min-width: 0;
  max-width: 160px;
  height: 58px;
}
.register-form .captcha-visual button {
  flex: 0 0 auto;
  align-self: center;
  white-space: nowrap;
  padding-inline: 12px;
  min-height: 42px;
  font-size: 11px;
}

.dashboard { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 245px 1fr; }
.portal-sidebar { position: sticky; top: 72px; height: calc(100vh - 72px); display: flex; flex-direction: column; padding: 26px 17px; border-right: 1px solid var(--line); background: #fff; }
.client-mini { display: flex; align-items: center; gap: 11px; padding: 0 10px 25px; border-bottom: 1px solid #e7ecef; }
.client-mini > span { flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--navy); font-size: 11px; font-weight: 800; }
.client-mini div { min-width: 0; display: flex; flex-direction: column; }
.client-mini strong { color: var(--navy); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-mini small { margin-top: 3px; color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portal-sidebar nav { display: grid; gap: 5px; margin-top: 23px; }
.portal-sidebar nav button { height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 9px; color: #5c6c7d; background: transparent; font-size: 11px; font-weight: 700; text-align: left; cursor: pointer; }
.portal-sidebar nav button span { width: 19px; color: var(--blue); font-size: 16px; text-align: center; }
.portal-sidebar nav button.active { color: var(--navy); background: #eaf3ff; }
.portal-sidebar nav button:hover { color: var(--navy); background: #f5f9ff; transform: translateX(3px); }
.sidebar-help { margin-top: auto; padding: 16px; border-radius: 13px; background: var(--navy); color: #fff; }
.sidebar-help strong { font: 700 12px "Manrope", sans-serif; }
.sidebar-help p { margin: 7px 0 12px; color: #9fb4c4; font-size: 9px; line-height: 1.5; }
.sidebar-help a { color: #8ee5c5; font-size: 10px; font-weight: 800; }

.dashboard-main { min-width: 0; padding: 28px 42px 42px; }
.portal-view { max-width: 1180px; margin: 0 auto; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.heading-actions { display: flex; gap: 9px; }
.page-heading h1 { margin: 8px 0 5px; color: var(--navy); font-size: 34px; letter-spacing: -1.5px; }
.page-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.summary-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 22px; }
.admin-summary { grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); }
.summary-grid article { min-height: 137px; display: flex; flex-direction: column; justify-content: center; padding: 23px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.summary-grid article.interactive-summary,
.case-row,
.content-card { transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease; }
.summary-grid article.interactive-summary { cursor: pointer; }
.summary-grid article.interactive-summary:hover,
.content-card:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(11,35,63,.08); }
.summary-grid article > span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.summary-grid strong { margin: 7px 0 4px; color: var(--navy); font: 800 32px "Manrope", sans-serif; }
.summary-grid small { color: #84919d; font-size: 9px; }
.content-card { padding: 27px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 10px 35px rgba(11,35,63,.045); }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.card-heading h2 { margin: 0; color: var(--navy); font: 800 18px "Manrope", sans-serif; }
.card-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.text-button, .back-button { padding: 0; border: 0; color: var(--blue); background: transparent; font-size: 11px; font-weight: 800; cursor: pointer; }
.back-button { margin-bottom: 20px; }
.case-list { display: grid; }
.case-row { display: grid; grid-template-columns: 1.4fr .8fr .7fr auto; align-items: center; gap: 18px; padding: 17px 0; border-top: 1px solid #edf0f2; }
.case-row:first-child { border-top: 0; }
.case-row:hover { transform: translateX(3px); }
.case-name { display: flex; align-items: center; gap: 12px; }
.case-icon { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: #eaf3ff; font-size: 9px; font-weight: 800; }
.case-name div, .case-meta { display: flex; flex-direction: column; }
.case-name strong { color: var(--navy); font-size: 12px; }
.case-name small, .case-meta small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.status-pill { display: inline-flex; width: fit-content; align-items: center; padding: 6px 9px; border-radius: 99px; color: #156248; background: #e4f6ef; font-size: 9px; font-weight: 800; }
.status-pill.attention { color: #8a5a0c; background: #fff1d4; }
.status-pill.complete { color: #174f9b; background: #e8f1ff; }
.mini-progress { height: 5px; margin-top: 7px; overflow: hidden; border-radius: 10px; background: #e8edf1; }
.mini-progress i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.empty-state { min-height: 130px; display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; }

.form-card { max-width: 950px; }
.service-choice-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; }
.service-choice-grid label { margin: 0; cursor: pointer; }
.service-choice-grid input { position: absolute; opacity: 0; pointer-events: none; }
.service-choice-grid label > span { min-height: 145px; display: flex; flex-direction: column; padding: 18px; border: 1px solid #dce4ea; border-radius: 13px; transition: .2s; }
.service-choice-grid input:checked + span { border-color: var(--blue); background: #f1f7ff; box-shadow: 0 0 0 2px rgba(29,111,233,.12); }
.service-choice-grid b { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: #eaf3ff; font-size: 9px; }
.service-choice-grid strong { margin-top: 13px; color: var(--navy); font-size: 12px; }
.service-choice-grid small { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.two-columns, .amount-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-card > .two-columns { margin: 20px 0; }

.case-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 17px; }
.case-card { padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: #fff; cursor: pointer; transition: .2s; }
.case-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.case-card-top { display: flex; justify-content: space-between; gap: 15px; }
.case-card h3 { margin: 10px 0 4px; color: var(--navy); font: 800 16px "Manrope", sans-serif; }
.case-card p { margin: 0; color: var(--muted); font-size: 10px; }
.case-card .progress-line { margin: 20px 0 11px; }
.progress-line { height: 7px; overflow: hidden; border-radius: 10px; background: #e7edf1; }
.progress-line i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #55cfa2); }
.case-card-footer { display: flex; justify-content: space-between; color: #82909e; font-size: 9px; }

.case-detail-hero { padding: 22px 24px; border-radius: 17px; color: #fff; background: linear-gradient(135deg, var(--navy), #185d95); }
.case-detail-hero-top { display: flex; justify-content: space-between; gap: 20px; }
.case-detail-hero span { color: #8fddc2; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; }
.case-detail-hero h1 { margin: 8px 0 5px; font: 800 27px "Manrope", sans-serif; }
.case-detail-hero p { margin: 0; color: #adc0cf; font-size: 11px; }
.case-detail-hero .progress-line { margin-top: 22px; background: rgba(255,255,255,.15); }
.case-detail-hero .progress-line i { background: #75dfb9; }
.detail-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; margin-top: 14px; }
.staff-remark { padding: 16px; border-left: 3px solid var(--blue); border-radius: 8px; background: #f2f7fd; }
.staff-remark strong { display: block; color: var(--navy); font-size: 11px; }
.staff-remark p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.timeline { margin-top: 22px; }
.timeline h3, .upload-block h3, .itr-summary h3 { color: var(--navy); font: 800 14px "Manrope", sans-serif; }
.timeline-step { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding-bottom: 17px; }
.timeline-step::before { content: ""; position: absolute; width: 1px; left: 10px; top: 21px; bottom: 0; background: #dbe3e9; }
.timeline-step:last-child::before { display: none; }
.timeline-step i { width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid #cad5dd; border-radius: 50%; color: #8996a2; background: #fff; font-size: 8px; font-style: normal; }
.timeline-step.done i { color: #fff; border-color: var(--green); background: var(--green); }
.timeline-step strong { display: block; font-size: 10px; }
.timeline-step small { color: var(--muted); font-size: 8px; }
.document-checklist { display: grid; gap: 8px; margin: 14px 0 20px; }
.document-checklist span { padding: 9px 11px; border-radius: 8px; color: #4d6072; background: #f3f6f8; font-size: 9px; }
.upload-drop { display: block; padding: 18px; border: 1px dashed #aebdca; border-radius: 11px; text-align: center; cursor: pointer; }
.upload-drop.disabled { opacity: .6; cursor: not-allowed; }
.upload-drop input { display: none; }
.upload-drop strong { color: var(--blue); font-size: 11px; }
.upload-drop small { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; }
.document-items { display: grid; gap: 8px; margin-top: 14px; }
.document-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border: 1px solid #e3e8ec; border-radius: 9px; background: #fff; text-align: left; cursor: pointer; }
.document-item:hover { border-color: #bfd3e3; box-shadow: 0 10px 24px rgba(11,35,63,.05); }
.document-item strong { font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-item small { color: var(--muted); font-size: 8px; }
.document-section-stack { display: grid; gap: 16px; margin-top: 16px; }
.document-subsection { padding: 14px; border: 1px solid #e5ecf1; border-radius: 14px; background: linear-gradient(135deg, #fcfdff, #f8fbfd); }
.subsection-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.subsection-head h4 { margin: 0; color: var(--navy); font: 800 13px "Manrope", sans-serif; }
.subsection-head span { display: inline-flex; min-width: 30px; min-height: 30px; align-items: center; justify-content: center; padding: 0 10px; border-radius: 999px; color: var(--blue); background: #edf5ff; font-size: 10px; font-weight: 800; }
.selected-upload-files { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; color: var(--muted); font-size: 9px; }
.selected-upload-files span { padding: 7px 10px; border-radius: 999px; background: #f0f5f8; }
.selected-upload-files-detailed {
  display: grid;
  gap: 8px;
}
.selected-file-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #e2e9ef;
  border-radius: 11px;
  background: #f8fbfd;
}
.selected-file-row strong {
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .35px;
}
.selected-file-row span {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--navy);
  font-size: 10px;
  font-weight: 700;
}
.selected-file-row-actionable {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.selected-file-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
}
.selected-file-remove {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid #d7e2ea;
  border-radius: 999px;
  color: #b44545;
  background: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.selected-file-remove:hover {
  transform: translateY(-1px);
  border-color: #efc3c3;
  background: #fff7f7;
  box-shadow: 0 8px 18px rgba(180,69,69,.12);
}
.upload-action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.upload-action-row.single-action { grid-template-columns: 1fr; }
.upload-warning-note { margin-top: 10px; padding: 12px 14px; border-left: 3px solid var(--orange); border-radius: 10px; color: #745a32; background: #fff8ea; font-size: 10px; line-height: 1.6; }
.submission-lock-banner { margin-bottom: 10px; padding: 14px; border: 1px solid #f0d8a4; border-radius: 12px; color: #7b5a1f; background: #fff7e4; }
.submission-lock-banner strong { display: block; color: #5f4618; font-size: 12px; }
.submission-lock-banner p,
.submission-meta { margin: 6px 0 0; font-size: 10px; line-height: 1.55; }
.submission-meta { color: var(--muted); }
.preview-approval-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #bfd8ef;
  border-radius: 16px;
  background: linear-gradient(135deg, #f4f9ff, #f5fcf9);
  box-shadow: 0 16px 34px rgba(29,111,233,.08);
}
.preview-approval-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.preview-approval-header h3 {
  margin: 6px 0 4px;
  color: var(--navy);
  font: 800 18px "Manrope", sans-serif;
}
.preview-approval-header p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}
.preview-approval-count {
  display: inline-flex;
  min-width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--blue);
  background: #fff;
  box-shadow: 0 10px 24px rgba(11,35,63,.08);
  font-size: 12px;
  font-weight: 800;
}
.preview-review-list { display: grid; gap: 10px; }
.preview-review-card { padding: 14px; border: 1px solid #dfe7ed; border-radius: 12px; background: #fff; }
.highlight-list .preview-review-card,
.featured-preview-card {
  border-color: #cfe0f4;
  box-shadow: 0 12px 28px rgba(11,35,63,.06);
}
.preview-review-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.preview-review-top strong { display: block; color: var(--navy); font-size: 11px; }
.preview-review-top small { color: var(--muted); font-size: 9px; }
.preview-review-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.inline-approval-actions {
  align-items: center;
  margin-bottom: 14px;
}
.featured-preview-card textarea {
  background: #fcfdff;
}
.compact-drop { margin-top: 12px; }
.itr-summary { margin-top: 18px; padding-top: 17px; border-top: 1px solid #e4e9ed; }
.summary-table { display: grid; gap: 8px; }
.summary-table div { display: flex; justify-content: space-between; gap: 15px; font-size: 10px; }
.summary-table span { color: var(--muted); }
.summary-table strong { color: var(--navy); }
.summary-table .highlight { margin-top: 5px; padding-top: 10px; border-top: 1px solid #e5eaee; }
.round-icon { width: 55px; height: 55px; display: grid; place-items: center; border-radius: 16px; color: var(--blue); background: #e9f3ff; font: 800 21px "Manrope", sans-serif; }
.itr-launch-card { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.itr-launch-card h2 { margin: 17px 0 7px; color: var(--navy); font: 800 20px "Manrope", sans-serif; }
.itr-launch-card p { margin: 0; color: var(--muted); font-size: 11px; }

.portal-dialog { width: min(560px, calc(100% - 30px)); max-height: 88vh; padding: 0; overflow: auto; border: 0; border-radius: 18px; box-shadow: 0 30px 90px rgba(11,35,63,.3); }
.portal-dialog::backdrop { background: rgba(5,19,32,.72); backdrop-filter: blur(4px); }
.wide-dialog { width: min(850px, calc(100% - 30px)); }
.dialog-x { position: sticky; z-index: 2; float: right; top: 13px; right: 13px; width: 36px; height: 36px; margin: 13px 13px -49px 0; border: 0; border-radius: 50%; color: var(--navy); background: #edf2f5; font-size: 22px; cursor: pointer; }
.dialog-content { padding: 37px; }
.dialog-content h2 { margin: 8px 0 7px; color: var(--navy); font: 800 25px "Manrope", sans-serif; }
.dialog-content > p { margin: 0 45px 22px 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.picker-list { display: grid; gap: 9px; margin-top: 22px; }
.picker-list button { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; cursor: pointer; }
.picker-list strong { display: block; color: var(--navy); font-size: 11px; }
.picker-list small { color: var(--muted); font-size: 9px; }
.wizard-progress { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; margin: 23px 0; }
.wizard-progress span { padding: 9px 5px; border-bottom: 3px solid #dfe5ea; color: #8a97a3; font-size: 9px; font-weight: 800; text-align: center; }
.wizard-progress span.active { color: var(--blue); border-color: var(--blue); }
.official-verification-card { margin-top: 22px; padding: 20px; border: 1px solid #cfe0ec; border-radius: 14px; background: linear-gradient(135deg, #f4f9fd, #f3fbf7); }
.official-verification-head { display: flex; align-items: center; gap: 13px; }
.official-verification-head .round-icon { flex: 0 0 auto; width: 46px; height: 46px; font-size: 10px; }
.official-verification-head h3 { margin: 0 0 4px; color: var(--navy); font: 800 15px "Manrope", sans-serif; }
.official-verification-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.official-verification-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.official-verification-actions .primary-button, .official-verification-actions .secondary-button { min-height: 43px; }
.official-security-note { margin: 13px 0 0; padding: 11px 12px; border-left: 3px solid var(--orange); color: #685b42; background: #fff9eb; font-size: 11px; line-height: 1.55; }
.amount-grid { grid-template-columns: repeat(3,1fr); }
.check-label { flex-direction: row !important; align-items: flex-start; gap: 9px !important; }
.check-label input { flex: 0 0 auto; width: 16px; min-height: 16px; margin-top: 2px; accent-color: var(--blue); }
.check-label span { color: var(--muted); font-size: 10px; line-height: 1.5; }
.wizard-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }
.portal-toast { position: fixed; z-index: 50; left: 50%; bottom: 22px; padding: 13px 18px; border-radius: 9px; color: #fff; background: var(--navy); box-shadow: var(--shadow); font-size: 11px; transform: translate(-50%, 100px); opacity: 0; transition: .25s; }
.portal-toast.show { transform: translate(-50%, 0); opacity: 1; }

.admin-login { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 35px; background: linear-gradient(145deg, #edf5fb, #e7f7f1); }
.admin-login .auth-card { width: min(500px, 100%); }
.team-login-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 28px; padding: 6px; border: 1px solid #dce5eb; border-radius: 14px; background: #eef3f6; }
.team-login-tabs button { min-height: 70px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 11px 15px; border: 1px solid transparent; border-radius: 10px; color: #687789; background: transparent; cursor: pointer; text-align: left; transition: .2s; }
.team-login-tabs button strong { color: var(--navy); font: 800 14px "Manrope", sans-serif; }
.team-login-tabs button span { font-size: 10px; font-weight: 600; }
.team-login-tabs button.active { border-color: #b9d6f3; color: #276491; background: #fff; box-shadow: 0 7px 18px rgba(11,35,63,.09); }
.team-login-tabs button.active strong { color: var(--blue); }
.admin-dashboard { padding: 34px 24px 40px; }
.admin-shell { max-width: 1540px; margin: 0 auto; }
.admin-workspace { display: grid; grid-template-columns: minmax(340px, .9fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.admin-case-list { max-height: 760px; overflow: auto; }
.admin-case-list .card-heading input { width: 220px; min-height: 42px; border-radius: 14px; }
.admin-list-tabs { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 18px; padding: 6px; border-radius: 16px; background: linear-gradient(135deg, #edf4fb, #edf7f3); }
.admin-list-tabs button { min-height: 42px; border: 0; border-radius: 12px; color: #607184; background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease; }
.admin-list-tabs button:hover { color: var(--navy); transform: translateY(-1px); }
.admin-list-tabs button.active { color: var(--blue); background: #fff; box-shadow: 0 10px 24px rgba(11,35,63,.08); }
.admin-list-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 10px; border-top: 1px solid #edf0f2; border-radius: 14px; cursor: pointer; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.admin-list-row:hover, .admin-list-row.active { background: linear-gradient(135deg, #f5f9ff, #f5fcf8); transform: translateY(-1px); box-shadow: 0 12px 26px rgba(11,35,63,.06); }
.admin-list-row strong { display: block; color: var(--navy); font-size: 11px; }
.admin-list-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.admin-list-row.compact-row { padding: 12px 10px; cursor: default; }
.admin-list-row.compact-row:hover { transform: none; box-shadow: none; }
.admin-detail { min-height: 350px; }
.summary-grid.admin-summary {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(168px, 1fr);
  gap: 12px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
}
.summary-grid.admin-summary::-webkit-scrollbar { height: 8px; }
.summary-grid.admin-summary::-webkit-scrollbar-thumb { border-radius: 99px; background: rgba(17, 58, 96, .18); }
.dashboard-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.dashboard-role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #cfe0ec;
  border-radius: 999px;
  color: #0d5a7c;
  background: linear-gradient(135deg, #f1f8ff, #eefcf7);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2px;
  box-shadow: 0 8px 22px rgba(11,35,63,.06);
}
.dashboard-role-badge.staff {
  color: #0d4e7f;
  border-color: #b8d4f1;
  background: linear-gradient(135deg, #edf5ff, #f5fbff);
}
.dashboard-role-badge.admin {
  color: #166347;
  border-color: #c7ead8;
  background: linear-gradient(135deg, #eefaf4, #f7fffb);
}
.workflow-assets-box { margin-top: 16px; }
.workflow-assets-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.workflow-upload-form { padding: 16px; border: 1px solid #e2e9ee; border-radius: 14px; background: linear-gradient(135deg, #fcfdff, #f7fbff); }
.workflow-asset-list { display: grid; gap: 10px; margin-top: 14px; }
.workflow-asset-list div { padding: 12px 14px; border-radius: 12px; background: #f6fafc; }
.workflow-asset-list strong { display: block; color: var(--navy); font-size: 11px; }
.workflow-asset-list small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.summary-grid.admin-summary article {
  position: relative;
  min-height: 106px;
  padding: 16px 18px;
  overflow: hidden;
  border: 1px solid rgba(181, 202, 220, .8);
  border-radius: 18px;
  background: linear-gradient(145deg, #ffffff, #f6fbff);
  box-shadow: 0 12px 30px rgba(11,35,63,.05);
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.summary-grid.admin-summary article::before {
  content: "";
  position: absolute;
  inset: auto -24px -24px auto;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  opacity: .85;
}
.summary-grid.admin-summary article:hover,
.summary-grid.admin-summary article.active {
  transform: translateY(-3px);
  border-color: rgba(29, 111, 233, .34);
  box-shadow: 0 18px 36px rgba(11,35,63,.1);
}
.summary-grid.admin-summary article.active { outline: 2px solid rgba(29, 111, 233, .16); }
.summary-grid.admin-summary article > span { position: relative; z-index: 1; }
.summary-grid.admin-summary strong { position: relative; z-index: 1; margin: 6px 0 3px; font-size: 26px; line-height: 1; }
.summary-grid.admin-summary small { position: relative; z-index: 1; font-size: 11px; line-height: 1.35; }
.summary-card-clients::before { background: radial-gradient(circle, rgba(29,111,233,.18), transparent 68%); }
.summary-card-total::before { background: radial-gradient(circle, rgba(11,35,63,.14), transparent 68%); }
.summary-card-review::before { background: radial-gradient(circle, rgba(245,166,35,.22), transparent 68%); }
.summary-card-ready::before { background: radial-gradient(circle, rgba(23,131,93,.2), transparent 68%); }
.summary-card-reminders::before { background: radial-gradient(circle, rgba(120,104,255,.18), transparent 68%); }
.billing-summary-card::before { background: radial-gradient(circle, rgba(94,208,165,.22), transparent 68%); }
.admin-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-height: 42px;
  margin: -12px 0 10px;
  padding: 0 2px 2px;
}
.admin-top-actions .secondary-button {
  min-height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 8px 20px rgba(11,35,63,.04);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.admin-top-actions .secondary-button:hover {
  transform: translateY(-1px);
  border-color: rgba(29,111,233,.35);
  box-shadow: 0 12px 26px rgba(11,35,63,.09);
}
.admin-top-actions .secondary-button:disabled { opacity: .7; cursor: wait; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.heading-actions .secondary-button { min-height: 42px; border-radius: 12px; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.heading-actions .secondary-button:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(11,35,63,.08); }
.heading-actions .secondary-button:disabled { opacity: .7; cursor: wait; }
.registered-client-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.registered-client-actions a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid #ccd9e3; border-radius: 9px; color: var(--blue); background: #fff; font-size: 12px; font-weight: 800; text-decoration: none; }
.client-case-picker { display: grid; gap: 9px; margin-top: 18px; }
.client-case-picker h3 { margin: 0 0 4px; color: var(--navy); font: 800 15px "Manrope", sans-serif; }
.client-case-picker button { display: flex; align-items: center; justify-content: space-between; gap: 15px; width: 100%; padding: 13px; border: 1px solid #dfe7ec; border-radius: 10px; color: var(--navy); background: #fff; cursor: pointer; text-align: left; }
.client-case-picker button:hover { border-color: #b8d3ed; background: #f4f8fc; }
.client-case-picker button > span:first-child { display: flex; flex-direction: column; gap: 4px; }
.client-case-picker button small { color: var(--muted); font-size: 11px; }
.admin-client-head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.admin-client-head h2 { margin: 5px 0; color: var(--navy); font: 800 21px "Manrope", sans-serif; }
.admin-client-head p { margin: 0; color: var(--muted); font-size: 10px; }
.admin-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.admin-box { padding: 16px; border: 1px solid #e2e8ec; border-radius: 11px; }
.admin-box h3 { margin: 0 0 12px; color: var(--navy); font: 800 13px "Manrope", sans-serif; }
.admin-box p { color: var(--muted); font-size: 9px; line-height: 1.6; }
.admin-update-form { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.admin-update-form .two-columns { grid-template-columns: 1fr 1fr 1fr; }
.admin-update-form label, .case-reminder-form label { min-width: 0; }
.admin-update-form input, .admin-update-form select, .admin-update-form textarea,
.case-reminder-form input, .case-reminder-form textarea { min-width: 0; max-width: 100%; }
.admin-update-form .primary-button { margin-top: 16px; }
.auth-inline-link { margin-top: 10px; align-self: flex-start; padding: 0; border: 0; color: var(--blue); background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; }
.forgot-password-grid { display: grid; grid-template-columns: 160px 1fr; gap: 12px; align-items: end; margin-top: 14px; }
.forgot-password-grid > label { margin-top: 0; }
.document-review-note { margin-top: 6px; padding: 10px 12px; border-radius: 10px; color: #8a5a0c; background: #fff7e2; font-size: 11px; line-height: 1.5; }
.document-review-note strong { color: #724406; }
.reminder-panel { margin-top: 22px; padding: 20px; border: 1px solid #d9e4eb; border-radius: 15px; background: #f8fbfd; }
.reminder-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.reminder-heading h3, .reminder-history h3 { margin: 5px 0; color: var(--navy); font: 800 16px "Manrope", sans-serif; }
.reminder-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.reminder-count { flex: 0 0 auto; padding: 7px 10px; border-radius: 99px; color: #174f9b; background: #e8f1ff; font-size: 11px; font-weight: 800; }
.case-reminder-form { margin-top: 18px; padding: 17px; border: 1px solid #e0e7ec; border-radius: 12px; background: #fff; }
.reminder-channels { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.reminder-channels label { min-height: 68px; flex-direction: row; align-items: center; gap: 11px; margin: 0; padding: 12px; border: 1px solid #dce5eb; border-radius: 10px; cursor: pointer; }
.reminder-channels input { width: 18px; min-height: 18px; accent-color: var(--blue); }
.reminder-channels span { color: var(--navy); font-weight: 800; }
.reminder-channels small { color: var(--muted); font-weight: 500; }
.reminder-send-button { margin-top: 14px; }
.reminder-history { margin-top: 20px; }
.reminder-history > article { padding: 14px 0; border-top: 1px solid #e0e7ec; }
.reminder-history > article > div:first-child { display: flex; justify-content: space-between; gap: 15px; }
.reminder-history strong { color: var(--navy); font-size: 12px; }
.reminder-history small { color: var(--muted); font-size: 10px; }
.reminder-history p { margin: 8px 0; color: #526477; font-size: 12px; line-height: 1.55; }
.reminder-delivery { display: flex; flex-wrap: wrap; gap: 7px; }
.reminder-delivery span { padding: 5px 8px; border-radius: 99px; color: #8a5a0c; background: #fff1d4; font-size: 10px; font-weight: 800; }
.reminder-delivery span.sent { color: #156248; background: #e4f6ef; }
.staff-create-form { margin-top: 20px; padding: 18px; border-radius: 13px; background: #f4f7f9; }
.staff-create-form .primary-button { margin-top: 15px; }
.staff-list { display: grid; gap: 9px; margin-top: 22px; }
.staff-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid #e0e7ec; border-radius: 11px; }
.staff-row strong { display: block; color: var(--navy); font-size: 11px; }
.staff-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.staff-role { padding: 5px 8px; border-radius: 99px; color: #174f9b; background: #e8f1ff; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.staff-role.inactive { color: #8a5a0c; background: #fff1d4; }
.staff-actions { display: flex; gap: 6px; }
.staff-actions button { padding: 7px 9px; border: 1px solid #ccd7df; border-radius: 7px; background: #fff; font-size: 8px; font-weight: 800; cursor: pointer; }
.welcome-notification { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-bottom: 22px; padding: 20px; border: 1px solid #bfe7d7; border-radius: 15px; background: linear-gradient(135deg, #e9f9f3, #eef7ff); }
.welcome-notification span { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.welcome-notification h2 { margin: 5px 0; color: var(--navy); font: 800 18px "Manrope", sans-serif; }
.welcome-notification p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.welcome-notification button { flex: 0 0 auto; padding: 9px 12px; border: 1px solid #acd8c8; border-radius: 8px; color: var(--green); background: #fff; font-size: 12px; font-weight: 800; cursor: pointer; }
.welcome-dialog .dialog-content { text-align: center; }
.welcome-dialog .round-icon { margin: 0 auto 14px; color: #fff; background: var(--blue); }
.welcome-actions { display: flex; justify-content: center; gap: 9px; margin-top: 23px; flex-wrap: wrap; }
.blog-manager-dialog { width: min(1180px, calc(100% - 30px)); }
.blog-manager-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 22px; margin-top: 22px; }
.blog-editor-form { padding: 20px; border: 1px solid #e0e7ec; border-radius: 14px; background: #f7f9fa; }
.editor-actions { display: flex; gap: 9px; margin-top: 18px; }
.managed-blog-panel { display: grid; gap: 12px; align-content: start; }
.managed-blog-filters { display: grid; grid-template-columns: minmax(0,1fr) 150px 150px; gap: 9px; }
.managed-blog-filters input,
.managed-blog-filters select { width: 100%; min-height: 44px; }
.managed-blog-list { max-height: 650px; display: grid; align-content: start; gap: 10px; overflow: auto; }
.managed-blog-card { padding: 15px; border: 1px solid #e0e7ec; border-radius: 12px; background: #fff; }
.managed-blog-card > span { color: var(--blue); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.managed-blog-card h3 { margin: 7px 0 5px; color: var(--navy); font: 800 14px "Manrope", sans-serif; }
.managed-blog-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.managed-blog-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.managed-blog-actions button { padding: 7px 10px; border: 1px solid #ccd7df; border-radius: 7px; color: var(--blue); background: #fff; font-size: 11px; font-weight: 800; cursor: pointer; }
.managed-blog-actions .delete-blog { color: var(--red); border-color: #efc9cd; }
.managed-blog-actions .toggle-blog-visibility { color: #0f6b4a; border-color: #c6eadb; }
.managed-blog-actions .danger-lite-button { color: var(--red); border-color: #efc9cd; }
.blog-current-media { margin-top: -4px; padding: 12px 14px; border: 1px solid #d8e4ee; border-radius: 10px; background: #f7fafc; color: #516579; font-size: 12px; line-height: 1.55; }
.blog-current-media a { color: var(--blue); font-weight: 800; text-decoration: none; }
.case-billing-panel { margin-top: 22px; padding: 20px; border: 1px solid #d9e4eb; border-radius: 15px; background: linear-gradient(135deg, #f7fbff, #f8fcfa); }
.case-billing-panel h3 { margin: 0; color: var(--navy); font: 800 16px "Manrope", sans-serif; }
.case-billing-panel p { color: var(--muted); font-size: 12px; line-height: 1.55; }
.billing-form-grid { display: grid; grid-template-columns: 1fr 180px 170px; gap: 12px; margin-top: 16px; }
.billing-history { display: grid; gap: 10px; margin-top: 18px; }
.billing-card { padding: 14px; border: 1px solid #dde6ec; border-radius: 12px; background: #fff; }
.billing-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.billing-card-head h4 { margin: 0; color: var(--navy); font: 800 13px "Manrope", sans-serif; }
.billing-card-head small { color: var(--muted); font-size: 11px; }
.billing-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.billing-card-actions button { padding: 8px 10px; border: 1px solid #ccd7df; border-radius: 9px; color: var(--navy); background: #fff; font-size: 11px; font-weight: 800; cursor: pointer; }
.billing-form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.client-bill-card { margin-top: 18px; padding: 18px; border: 1px solid #dbe7ef; border-radius: 16px; background: linear-gradient(135deg, #f9fcff, #f5fbf8); }
.client-bill-card h3 { margin: 4px 0 2px; color: var(--navy); font: 800 18px "Manrope", sans-serif; }
.client-bill-card p { margin: 0; }
.client-bill-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.client-bill-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.bill-dialog { width: min(1020px, calc(100% - 30px)); }
.bill-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.invoice-sheet { border: 1px solid #d8e0e8; border-radius: 18px; padding: 22px; background: #fff; color: #0b233f; }
.invoice-sheet-top { display: grid; grid-template-columns: 170px 1fr; gap: 20px; align-items: start; }
.invoice-sheet-logo img { max-width: 140px; height: auto; }
.invoice-sheet-title { text-align: center; }
.invoice-sheet-title h2, .invoice-sheet-title h3, .invoice-sheet-title p { margin: 0; }
.invoice-sheet-title h2 { font: 800 26px "Manrope", sans-serif; }
.invoice-sheet-title h3 { font: 800 22px "Manrope", sans-serif; }
.invoice-sheet-title p { margin-top: 4px; font-size: 13px; line-height: 1.45; }
.invoice-sheet-rule { border-top: 1px solid #24374d; margin: 14px 0 16px; }
.invoice-sheet-meta { display: grid; grid-template-columns: 1fr 250px; gap: 20px; font-size: 14px; }
.invoice-sheet-meta table, .invoice-sheet-lines { width: 100%; border-collapse: collapse; }
.invoice-sheet-meta td { padding: 2px 0; vertical-align: top; }
.invoice-sheet-lines th, .invoice-sheet-lines td { padding: 8px; border: 1px solid #203349; font-size: 13px; vertical-align: top; }
.invoice-sheet-lines th { background: #f5f7fb; text-align: left; }
.invoice-sheet-total td { font-weight: 800; }
.amount-cell { text-align: right; white-space: nowrap; }
.invoice-sheet-bottom { display: grid; grid-template-columns: 1fr 220px; gap: 22px; margin-top: 18px; align-items: start; }
.invoice-payment-card { font-size: 14px; line-height: 1.65; }
.invoice-payment-qr { display: grid; justify-items: center; gap: 8px; text-align: center; }
.invoice-payment-qr img { width: 160px; height: 160px; object-fit: contain; border: 1px solid #dce4ec; border-radius: 14px; padding: 8px; background: #fff; }
.invoice-payment-qr.qr-unavailable img,
.invoice-payment-qr.qr-unavailable small { display: none; }
.invoice-payment-qr.qr-unavailable::after { content: "QR image not configured yet. Use bank transfer details."; color: #5a6d7f; font-size: 12px; line-height: 1.5; }
.invoice-sheet-signature { display: grid; justify-items: end; gap: 3px; margin-top: 18px; }
.invoice-sheet-signature strong { font-size: 14px; }
.invoice-sheet-signature span { font-size: 14px; }
.invoice-sheet-signature small { color: var(--muted); font-size: 12px; }
.invoice-sheet-footer { margin-top: 18px; text-align: center; font: 700 16px "Manrope", sans-serif; }
.invoice-print-body { padding: 16px; background: #fff; }
.document-review-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.document-review-actions button { padding: 7px 9px; border: 1px solid #ccd7df; border-radius: 8px; background: #fff; font-size: 11px; font-weight: 800; cursor: pointer; }
.document-review-actions .reject-document-button { color: #a75b00; border-color: #f0d19c; background: #fff8eb; }
.document-review-actions .approve-document-button { color: #156248; border-color: #bbe5d2; background: #ecfaf4; }

@media (max-width: 1000px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-intro { min-height: 520px; }
  .dashboard { grid-template-columns: 210px 1fr; }
  .dashboard-main { padding: 30px 24px; }
  .service-choice-grid { grid-template-columns: 1fr 1fr; }
  .admin-workspace { grid-template-columns: 1fr; }
  .workflow-assets-grid { grid-template-columns: 1fr; }
  .summary-grid.admin-summary { grid-auto-columns: minmax(180px, 1fr); }
}

@media (max-width: 760px) {
  .portal-header { min-height: 65px; padding: 0 15px; }
  .header-actions a { display: none; }
  .portal-brand small { display: none; }
  .auth-screen { min-height: calc(100vh - 65px); }
  .auth-intro { min-height: auto; padding: 65px 25px; }
  .auth-intro h1 { font-size: 40px; }
  .dashboard { display: block; }
  .portal-sidebar { position: sticky; z-index: 10; top: 65px; width: 100%; height: auto; display: block; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .client-mini, .sidebar-help { display: none; }
  .portal-sidebar nav { display: flex; min-width: 560px; margin: 0; }
  .portal-sidebar nav button { flex: 1; justify-content: center; }
  .dashboard-main, .admin-dashboard { padding: 25px 14px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .admin-top-actions { justify-content: flex-start; margin-top: 4px; }
  .admin-top-actions .secondary-button { flex: 1 1 145px; }
  .heading-actions { width: 100%; }
  .summary-grid { grid-template-columns: 1fr; }
  .summary-grid.admin-summary { grid-auto-columns: minmax(155px, 78vw); }
  .case-row { grid-template-columns: 1fr auto; }
  .case-row > :nth-child(2), .case-row > :nth-child(3) { display: none; }
  .case-grid, .detail-layout { grid-template-columns: 1fr; }
  .amount-grid { grid-template-columns: 1fr 1fr; }
  .upload-action-row { grid-template-columns: 1fr; }
  .preview-review-top, .subsection-head { flex-direction: column; align-items: flex-start; }
  .admin-sections, .admin-update-form .two-columns { grid-template-columns: 1fr; }
  .reminder-channels { grid-template-columns: 1fr; }
  .invoice-sheet-top,
  .invoice-sheet-meta,
  .invoice-sheet-bottom { grid-template-columns: 1fr; }
  .forgot-password-grid,
  .billing-form-grid,
  .register-form .captcha-inline-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .auth-screen > .auth-card { width: calc(100% - 28px); padding: 25px 20px; }
  .admin-login { padding: 18px; }
  .admin-login .auth-card { padding: 25px 18px; }
  .team-login-tabs button { min-height: 64px; padding: 9px 10px; }
  .team-login-tabs button strong { font-size: 13px; }
  .portal-brand strong { font-size: 14px; }
  .service-choice-grid, .two-columns, .amount-grid { grid-template-columns: 1fr; }
  .content-card { padding: 20px; }
  .itr-launch-card { align-items: flex-start; flex-direction: column; }
  .dialog-content { padding: 29px 20px; }
  .wizard-progress span { font-size: 7px; }
  .register-form .captcha-visual {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .register-form .captcha-visual img {
    flex-basis: 100%;
    max-width: 100%;
  }
  .register-form .captcha-visual button {
    min-width: 96px;
  }
  .case-detail-hero-top { flex-direction: column; }
  .admin-client-head, .reminder-heading { flex-direction: column; }
  .reminder-history > article > div:first-child { flex-direction: column; gap: 4px; }
  .admin-case-list .card-heading { align-items: stretch; flex-direction: column; }
  .admin-case-list .card-heading input { width: 100%; }
  .blog-manager-layout { grid-template-columns: 1fr; }
  .managed-blog-filters { grid-template-columns: 1fr; }
  .welcome-notification { align-items: flex-start; flex-direction: column; }
}

/* Portal readability pass */
.portal-brand small,
.kicker,
.auth-benefits small,
.security-note,
.client-mini small,
.sidebar-help p,
.summary-grid article > span,
.summary-grid small,
.card-heading p,
.case-icon,
.case-name small,
.case-meta small,
.status-pill,
.service-choice-grid b,
.service-choice-grid small,
.case-card-footer,
.case-detail-hero span,
.timeline-step small,
.document-checklist span,
.upload-drop small,
.document-item small,
.picker-list small,
.wizard-progress span,
.admin-list-row small,
.admin-box p,
.staff-row small,
.staff-role,
.staff-actions button { font-size: 12px; }
.auth-form label,
.form-card label,
.dialog-content label,
.admin-detail label,
.form-message,
.portal-sidebar nav button,
.sidebar-help a,
.text-button,
.back-button,
.case-card p,
.case-detail-hero p,
.staff-remark strong,
.staff-remark p,
.timeline-step strong,
.upload-drop strong,
.document-item strong,
.summary-table div,
.itr-launch-card p,
.dialog-content > p,
.picker-list strong,
.check-label span,
.portal-toast,
.admin-list-row strong,
.admin-client-head p,
.staff-row strong { font-size: 13px !important; }
.auth-benefits strong,
.case-name strong,
.service-choice-grid strong { font-size: 14px; }
.captcha-block button { font-size: 12px; }

@media (max-width: 520px) {
  .wizard-progress span { font-size: 10px; }
}

/* Login experience */
.auth-screen {
  overflow: hidden;
}

.auth-intro {
  isolation: isolate;
  background: linear-gradient(145deg, #071d49 0%, #0b3c78 54%, #087365 100%);
}

.auth-intro::before {
  inset: 0;
  z-index: -2;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(92, 226, 194, .2), transparent 28%),
    radial-gradient(circle at 82% 76%, rgba(245, 166, 35, .15), transparent 30%);
  box-shadow: none;
  animation: auth-glow 9s ease-in-out infinite alternate;
}

.auth-intro > :not(.auth-motion-scene) {
  position: relative;
  z-index: 2;
}

.auth-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, rgba(29, 111, 233, .2), rgba(23, 131, 93, .28)) border-box;
  border: 1px solid transparent;
  transition: transform .35s ease, box-shadow .35s ease;
}

.auth-card::before {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -115px;
  top: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(23, 131, 93, .14), transparent 68%);
  pointer-events: none;
}

.auth-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 75px rgba(11, 35, 63, .16);
}

.auth-form:not([hidden]) {
  animation: form-rise .34s ease both;
}

.auth-tabs button,
.team-login-tabs button {
  transition: color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.auth-tabs button:hover,
.team-login-tabs button:hover {
  color: var(--blue);
  transform: translateY(-1px);
}

input,
select,
textarea {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #93afd0;
}

input:focus,
select:focus,
textarea:focus {
  transform: translateY(-1px);
}

.primary-button {
  position: relative;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease, filter .22s ease;
}

.primary-button::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-120%);
  background: linear-gradient(105deg, transparent 22%, rgba(255, 255, 255, .34) 48%, transparent 74%);
  transition: transform .55s ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(29, 111, 233, .27);
  filter: saturate(1.08);
}

.primary-button:hover::after {
  transform: translateX(120%);
}

.auth-motion-scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.motion-ring {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
}

.motion-ring-one {
  width: 330px;
  height: 330px;
  right: -105px;
  top: 60px;
  box-shadow: 0 0 0 45px rgba(255, 255, 255, .035);
  animation: ring-drift 9s ease-in-out infinite;
}

.motion-ring-two {
  width: 150px;
  height: 150px;
  left: 10%;
  bottom: 8%;
  border-color: rgba(92, 226, 194, .3);
  animation: ring-drift 7s ease-in-out infinite reverse;
}

.motion-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #5ce2c2;
  box-shadow: 0 0 0 8px rgba(92, 226, 194, .12);
  animation: dot-pulse 2.6s ease-in-out infinite;
}

.motion-dot-one { right: 18%; top: 22%; }
.motion-dot-two { left: 13%; bottom: 19%; animation-delay: -1.2s; }

.motion-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 215px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 16px;
  background: rgba(255, 255, 255, .11);
  box-shadow: 0 18px 45px rgba(1, 16, 43, .2);
  backdrop-filter: blur(12px);
}

.motion-chip strong,
.motion-chip small {
  display: block;
}

.motion-chip strong {
  color: #fff;
  font-size: 14px;
}

.motion-chip small {
  margin-top: 2px;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
}

.motion-chip-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #072855;
  background: linear-gradient(135deg, #d9fff6, #65e2c4);
  font-size: 11px;
  font-weight: 900;
}

.motion-chip-secure {
  right: 8%;
  bottom: 12%;
  animation: card-float 5.8s ease-in-out infinite;
}

.motion-chip-status {
  right: 15%;
  top: 13%;
  animation: card-float 6.6s ease-in-out infinite -2.1s;
}

.admin-login {
  grid-template-columns: minmax(0, 1.12fr) minmax(430px, .88fr);
  place-items: stretch;
  align-items: stretch;
  gap: 24px;
  background:
    radial-gradient(circle at 8% 8%, rgba(23, 131, 93, .12), transparent 25%),
    linear-gradient(145deg, #edf5fb, #eef9f5);
}

.admin-login .auth-card {
  min-width: 0;
  width: 100%;
  max-width: 560px;
  justify-self: start;
  align-self: center;
  padding: clamp(38px, 5vw, 70px);
  border-radius: 28px;
}

.team-access-visual {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  min-height: 610px;
  display: flex;
  align-items: flex-end;
  padding: clamp(42px, 6vw, 82px);
  border-radius: 30px;
  color: #fff;
  background: linear-gradient(145deg, #071d49 0%, #0b397c 55%, #087665 100%);
  box-shadow: 0 28px 70px rgba(7, 29, 73, .2);
}

.team-access-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .7), transparent 78%);
}

.team-access-copy {
  position: relative;
  z-index: 3;
  min-width: 0;
  max-width: 650px;
}

.team-access-copy .kicker { color: #72e6ca; }

.team-access-copy h1 {
  max-width: 620px;
  margin: 15px 0;
  color: #fff;
  font: 800 clamp(35px, 4.2vw, 68px)/1.03 "Manrope", sans-serif;
  letter-spacing: -2px;
  overflow-wrap: break-word;
}

.team-access-copy p {
  max-width: 570px;
  margin: 0;
  color: rgba(255, 255, 255, .76);
  font-size: 16px;
  line-height: 1.75;
}

.team-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 28px;
}

.team-signal-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, .86);
  font-size: 13px;
  font-weight: 700;
}

.team-signal-row i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #68e3c5;
  box-shadow: 0 0 0 5px rgba(104, 227, 197, .12);
}

.team-motion-scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.team-orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 50%;
}

.team-orbit-one {
  width: 430px;
  height: 430px;
  right: -90px;
  top: -80px;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, .025);
  animation: ring-drift 10s ease-in-out infinite;
}

.team-orbit-two {
  width: 180px;
  height: 180px;
  left: 10%;
  top: 15%;
  border-color: rgba(96, 225, 195, .24);
  animation: ring-drift 7s ease-in-out infinite reverse;
}

.team-pulse-dot {
  position: absolute;
  right: 24%;
  top: 24%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #69e5c7;
  animation: team-pulse 2.3s ease-out infinite;
}

.team-float-card {
  position: absolute;
  min-width: 188px;
  padding: 15px 17px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 17px;
  background: rgba(255, 255, 255, .1);
  box-shadow: 0 18px 45px rgba(1, 16, 43, .2);
  backdrop-filter: blur(12px);
}

.team-float-card span,
.team-float-card strong,
.team-float-card small {
  display: block;
}

.team-float-card span {
  color: #69e5c7;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
}

.team-float-card strong {
  margin-top: 5px;
  color: #fff;
  font-size: 15px;
}

.team-float-card small {
  margin-top: 3px;
  color: rgba(255, 255, 255, .65);
  font-size: 12px;
}

.team-float-card-one {
  right: 8%;
  top: 17%;
  animation: card-float 6.4s ease-in-out infinite;
}

.team-float-card-two {
  right: 27%;
  top: 39%;
  animation: card-float 7s ease-in-out infinite -2.2s;
}

.admin-update-form .two-columns,
.admin-update-form .staff-update-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-update-form .admin-assignment-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@keyframes auth-glow {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-1.5%, 1%, 0); }
}

@keyframes ring-drift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(-12px, 14px, 0) rotate(9deg); }
}

@keyframes dot-pulse {
  0%, 100% { transform: scale(.82); opacity: .65; }
  50% { transform: scale(1.12); opacity: 1; }
}

@keyframes card-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -11px, 0); }
}

@keyframes team-pulse {
  0% { box-shadow: 0 0 0 0 rgba(105, 229, 199, .42); }
  75%, 100% { box-shadow: 0 0 0 18px rgba(105, 229, 199, 0); }
}

@keyframes form-rise {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1120px) {
  .admin-login {
    grid-template-columns: 1fr;
  }

  .team-access-visual {
    min-height: 450px;
  }

  .admin-login .auth-card {
    max-width: 620px;
    justify-self: center;
  }
}

@media (max-width: 760px) {
  .motion-chip {
    opacity: .62;
    transform: scale(.86);
  }

  .motion-chip-secure {
    right: -45px;
  }

  .motion-chip-status {
    right: -70px;
  }

  .admin-login {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
    overflow: hidden;
  }

  .team-access-visual {
    width: 100%;
    min-height: 390px;
    padding: 38px 26px;
    border-radius: 24px;
  }

  .team-access-copy h1 {
    font-size: 38px;
  }

  .team-login-tabs {
    min-width: 0;
  }

  .team-float-card-two {
    display: none;
  }
}

@media (max-width: 520px) {
  .auth-card:hover {
    transform: none;
  }

  .team-access-visual {
    min-height: 340px;
  }

  .team-access-copy h1 {
    font-size: 31px;
    letter-spacing: -1.2px;
  }

  .team-access-copy p {
    font-size: 14px;
  }

  .team-signal-row span:nth-child(3),
  .team-float-card {
    display: none;
  }

  .admin-update-form .admin-assignment-grid,
  .admin-update-form .staff-update-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-intro::before,
  .motion-ring,
  .motion-dot,
  .motion-chip,
  .team-orbit,
  .team-pulse-dot,
  .team-float-card,
  .auth-form:not([hidden]) {
    animation: none !important;
  }

  .auth-card,
  .primary-button,
  input,
  select,
  textarea {
    transition-duration: .01ms !important;
  }
}

/* Staff document review and automatic case progress */
.admin-documents-box {
  grid-column: span 2;
}

.admin-document-list {
  display: grid;
  gap: 9px;
}

.admin-document-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid #dfe7ed;
  border-radius: 11px;
  background: #f9fbfc;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.admin-document-item:hover {
  border-color: #b8cee1;
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgba(11, 35, 63, .07);
}

.admin-document-type {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #175cae;
  background: #e7f1ff;
  font-size: 10px;
  font-weight: 900;
}

.admin-document-copy {
  min-width: 0;
}

.admin-document-copy strong,
.admin-document-copy small {
  display: block;
}

.admin-document-copy strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-document-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.admin-document-actions {
  display: flex;
  gap: 7px;
}

.admin-document-actions button,
.admin-document-actions a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid #c9d7e2;
  border-radius: 8px;
  color: var(--blue);
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.admin-document-actions button:hover,
.admin-document-actions a:hover {
  border-color: var(--blue);
  background: #f1f7ff;
  transform: translateY(-1px);
}

.auto-progress-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 14px;
}

.auto-progress-field > span {
  color: #45576a;
  font-size: 13px;
  font-weight: 700;
}

.auto-progress-field > div:nth-child(2) {
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 13px;
  border: 1px solid #cddfe9;
  border-radius: 9px;
  background: linear-gradient(135deg, #f2f8ff, #eefaf6);
}

.auto-progress-field strong {
  color: var(--blue);
  font: 800 18px "Manrope", sans-serif;
}

.auto-progress-field small {
  overflow: hidden;
  color: #607487;
  font-size: 10px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auto-progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #dfe8ed;
}

.auto-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #4fc79c);
  transition: width .35s ease;
}

.document-preview-dialog {
  width: min(1120px, calc(100% - 30px));
  overflow: hidden;
}

.document-preview-dialog .dialog-content {
  padding-bottom: 28px;
}

.document-preview-stage {
  height: min(66vh, 720px);
  min-height: 420px;
  overflow: hidden;
  border: 1px solid #d9e4eb;
  border-radius: 14px;
  background:
    linear-gradient(45deg, #f3f6f8 25%, transparent 25%),
    linear-gradient(-45deg, #f3f6f8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f3f6f8 75%),
    linear-gradient(-45deg, transparent 75%, #f3f6f8 75%),
    #fff;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.document-preview-stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.document-preview-fallback {
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 35px;
  color: var(--muted);
  background: rgba(255, 255, 255, .94);
  text-align: center;
}

.document-preview-fallback > span {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #18744f;
  background: #e1f6ed;
  font-weight: 900;
}

.document-preview-fallback h3 {
  max-width: 520px;
  margin: 18px 0 8px;
  color: var(--navy);
  font: 800 20px "Manrope", sans-serif;
}

.document-preview-fallback p {
  max-width: 560px;
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.document-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.document-preview-note {
  padding: 12px 14px;
  border-top: 1px solid #dce6ed;
  color: var(--muted);
  background: rgba(255,255,255,.96);
  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .admin-documents-box {
    grid-column: auto;
  }

  .admin-document-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .admin-document-type {
    width: 38px;
    height: 38px;
  }

  .admin-document-actions {
    grid-column: 1 / -1;
  }

  .admin-document-actions button,
  .admin-document-actions a {
    flex: 1;
  }

  .document-preview-stage {
    min-height: 350px;
  }
}

@media (max-width: 520px) {
  .auto-progress-field small {
    max-width: 155px;
  }

  .document-preview-dialog .dialog-content {
    padding: 29px 16px 20px;
  }

  .document-preview-stage {
    height: 56vh;
    min-height: 300px;
  }

  .document-preview-actions {
    flex-direction: column-reverse;
  }
}

.safe-action-panel { margin-top: 18px; padding: 16px; border: 1px solid #dce7ef; border-radius: 13px; background: #f8fbfd; }
.safe-action-panel h3 { margin: 0 0 7px; color: var(--navy); font: 800 13px "Manrope", sans-serif; }
.safe-action-panel p { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.safe-action-row { display: flex; flex-wrap: wrap; gap: 8px; }
.safe-action-row button { padding: 8px 11px; border: 1px solid #cad7e2; border-radius: 9px; background: #fff; color: var(--navy); font-size: 11px; font-weight: 800; cursor: pointer; }
.safe-action-row button:hover { border-color: var(--blue); color: var(--blue); }
.safe-action-row .attention-action { color: #8a5a0c; border-color: #efd08e; background: #fff8e8; }
.safe-action-row .dangerless-action { color: #9b2735; border-color: #efc9cd; background: #fff5f6; }
.billing-summary-card { background: linear-gradient(145deg, #ffffff, #f3fbf8) !important; }
.billing-dashboard { display: grid; gap: 16px; }
.billing-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.billing-metrics div { padding: 14px; border: 1px solid #e0e8ee; border-radius: 12px; background: #fff; }
.billing-metrics span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.billing-metrics strong { display: block; margin-top: 5px; color: var(--navy); font: 800 20px "Manrope", sans-serif; }
.billing-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.billing-table th, .billing-table td { padding: 10px 8px; border-bottom: 1px solid #edf1f4; text-align: left; vertical-align: top; }
.billing-table th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 760px) { .billing-metrics { grid-template-columns: 1fr 1fr; } .admin-list-tabs { grid-template-columns: 1fr; } }


.security-monitor-dialog {
  width: min(1120px, calc(100vw - 28px));
  overflow: hidden;
}
.security-monitor-dialog .dialog-content {
  width: 100%;
  max-height: min(88vh, 820px);
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
}
.security-dialog-card {
  margin: 0;
  padding: 22px;
  border: 1px solid #d8e5ef;
  border-radius: 18px;
  background: linear-gradient(145deg, #ffffff, #f6fbff);
  box-shadow: 0 18px 45px rgba(8, 31, 55, .08);
}
.security-dialog-card h2 {
  margin: 4px 0 8px;
  color: var(--navy);
  font: 900 25px/1.15 "Manrope", sans-serif;
}
.security-dialog-card h3 {
  margin: 0;
  color: var(--navy);
  font: 900 16px/1.2 "Manrope", sans-serif;
}
.security-dialog-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.security-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.security-summary-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid #dbe7ef;
  border-radius: 15px;
  background: #fff;
}
.security-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.security-summary-card strong {
  display: block;
  margin-top: 5px;
  color: var(--navy);
  font: 900 22px/1 "Manrope", sans-serif;
}
.security-monitor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.security-panel {
  min-width: 0;
  padding: 15px;
  border: 1px solid #dfe9f0;
  border-radius: 15px;
  background: rgba(255, 255, 255, .92);
}
.security-panel .panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.security-panel .panel-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.security-list {
  display: grid;
  gap: 9px;
}
.security-list-row,
.security-rule-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid #e4edf4;
  border-radius: 12px;
  background: #f9fcff;
  color: #17324d;
  font-size: 12px;
}
.security-list-row > div,
.security-rule-card > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.security-list-row small,
.security-rule-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}
.security-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 38px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eaf3ff;
  color: #1262d8;
  font-size: 11px;
  font-weight: 900;
}
.security-pill.warning { background: #fff3d9; color: #9b5f00; }
.security-pill.danger { background: #ffe8ec; color: #b82239; }
.security-pill.success { background: #e6f8ef; color: #087247; }
.security-rule-panel {
  margin-top: 12px;
}
.security-rule-form {
  display: grid;
  grid-template-columns: minmax(145px, 1fr) minmax(135px, .9fr) minmax(120px, .8fr) minmax(180px, 1.2fr);
  gap: 10px;
  margin-bottom: 14px;
}
.security-rule-form label {
  min-width: 0;
  color: #30475f;
  font-size: 11px;
  font-weight: 900;
}
.security-rule-form input,
.security-rule-form select {
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
  padding: 9px 11px;
  border: 1px solid #cbd8e4;
  border-radius: 11px;
  background: #fff;
  color: var(--navy);
  font: 800 12px "Manrope", sans-serif;
  box-sizing: border-box;
}
.security-rule-form .check-label {
  align-self: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #dfe9f0;
  border-radius: 11px;
  background: #f8fbff;
}
.security-rule-form .editor-actions,
.security-rule-form .form-message {
  grid-column: 1 / -1;
}
.security-rule-form .editor-actions {
  justify-content: flex-start;
  margin: 0;
}
.security-rule-form button,
.security-rule-card button {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid #bcd1e4;
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.security-rule-form button {
  border-color: #1f6fe5;
  background: #2474eb;
  color: #fff;
}
.security-rule-card button:hover,
.security-rule-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(22, 91, 184, .14);
}
.security-empty {
  padding: 15px;
  border: 1px dashed #cbd8e4;
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
@media (max-width: 980px) {
  .security-summary-grid,
  .security-monitor-grid {
    grid-template-columns: 1fr 1fr;
  }
  .security-rule-form {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 620px) {
  .security-monitor-dialog {
    width: calc(100vw - 18px);
  }
  .security-dialog-card {
    padding: 16px;
  }
  .security-dialog-card h2 {
    font-size: 20px;
  }
  .security-summary-grid,
  .security-monitor-grid,
  .security-rule-form {
    grid-template-columns: 1fr;
  }
  .security-list-row,
  .security-rule-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Security monitor IP rule polish - 2026-07-16 */
.security-rule-panel {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(36, 116, 235, .08), transparent 28%),
    linear-gradient(145deg, #ffffff 0%, #f8fcff 100%);
  box-shadow: 0 18px 45px rgba(8, 31, 55, .08);
}
.security-rule-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #2474eb, #75e1c6, #f7aa1d);
  opacity: .95;
}
.security-rule-panel > * {
  position: relative;
  z-index: 1;
}
.security-rule-form {
  align-items: end;
}
.security-rule-form .check-label {
  grid-column: 1 / 3;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start;
  gap: 12px !important;
  width: max-content;
  min-width: 210px;
  max-width: 100%;
  min-height: 46px;
  padding: 9px 14px 9px 10px !important;
  margin: 0;
  border: 1px solid #cfe2f3;
  border-radius: 999px;
  background: linear-gradient(135deg, #f4fbff 0%, #ecfff8 100%);
  color: #17324d;
  box-shadow: 0 12px 28px rgba(12, 39, 70, .08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.security-rule-form .check-label:hover {
  transform: translateY(-2px);
  border-color: #8dc8ff;
  box-shadow: 0 18px 34px rgba(36, 116, 235, .16);
}
.security-rule-form .check-label input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  position: relative;
  flex: 0 0 38px !important;
  width: 38px !important;
  height: 22px !important;
  min-width: 38px !important;
  min-height: 22px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #cdd8e4 !important;
  box-shadow: inset 0 2px 5px rgba(8, 31, 55, .16);
  cursor: pointer;
  transition: background .18s ease, box-shadow .18s ease;
}
.security-rule-form .check-label input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(8, 31, 55, .24);
  transition: transform .18s ease;
}
.security-rule-form .check-label input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #2474eb, #11b981) !important;
  box-shadow: 0 0 0 4px rgba(36, 116, 235, .10), inset 0 2px 5px rgba(8, 31, 55, .12);
}
.security-rule-form .check-label input[type="checkbox"]:checked::after {
  transform: translateX(16px);
}
.security-rule-form .check-label span {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  color: #17324d !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  font-weight: 900;
  white-space: nowrap;
}
.security-rule-form .check-label span::after {
  content: "Enable this IP rule";
  color: #6a7d90;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.security-rule-form .editor-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 2px;
}
.security-rule-form .editor-actions button {
  border-radius: 999px;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.security-rule-form .editor-actions button:hover {
  transform: translateY(-2px) scale(1.02);
  filter: saturate(1.08);
}
.security-rule-form #reset-ip-rule-form,
.security-rule-form button#reset-ip-rule-form {
  border-color: #d4e3f0;
  background: #ffffff;
  color: #11304f;
}
.security-list-row.security-row-stack {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(150px, .9fr);
  align-items: center;
  gap: 12px;
}
.security-list-row.security-row-stack strong,
.security-list-row.security-row-stack small {
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .security-rule-form .check-label,
  .security-rule-form .editor-actions {
    grid-column: 1 / -1;
  }
  .security-rule-form .check-label {
    width: 100%;
    min-width: 0;
  }
  .security-list-row.security-row-stack {
    grid-template-columns: 1fr;
  }
}

/* Security monitor dashboard polish - 2026-07-16 */
.security-summary-grid {
  align-items: stretch;
  gap: 12px;
}
.security-summary-card,
.security-metric-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: 98px;
  padding: 16px 17px;
  border: 1px solid rgba(36, 116, 235, .18);
  border-radius: 20px;
  background: radial-gradient(circle at 100% 0%, rgba(117, 225, 198, .18), transparent 34%), linear-gradient(135deg, #ffffff 0%, #f7fbff 62%, #edf7ff 100%);
  color: var(--navy);
  font: inherit;
  text-align: left;
  box-shadow: 0 16px 34px rgba(8, 31, 55, .08);
  cursor: pointer;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}
.security-metric-card::before {
  content: "";
  position: absolute;
  inset: auto 14px 12px auto;
  width: 34px;
  height: 34px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(36, 116, 235, .14), rgba(117, 225, 198, .18));
  transform: rotate(8deg);
  transition: transform .22s ease, opacity .22s ease;
}
.security-metric-card:hover,
.security-metric-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(36, 116, 235, .42);
  box-shadow: 0 22px 44px rgba(36, 116, 235, .16);
  outline: none;
}
.security-metric-card:hover::before,
.security-metric-card:focus-visible::before {
  transform: rotate(8deg) scale(1.16);
  opacity: .95;
}
.security-summary-card span,
.security-metric-card span {
  color: #587088;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.security-summary-card strong,
.security-metric-card strong {
  display: block;
  margin: 7px 0 4px;
  color: var(--navy);
  font: 900 27px/1 "Manrope", sans-serif;
}
.security-metric-card small {
  display: block;
  max-width: 165px;
  color: #5d7186;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}
.security-failure-list {
  display: grid;
  gap: 10px;
}
.security-failure-card {
  position: relative;
  padding: 12px;
  border: 1px solid #dfe9f4;
  border-radius: 15px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(8, 31, 55, .06);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.security-failure-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ef4444, #f7aa1d);
}
.security-failure-card:hover {
  transform: translateY(-2px);
  border-color: rgba(239, 68, 68, .28);
  box-shadow: 0 18px 34px rgba(239, 68, 68, .10);
}
.security-failure-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-left: 6px;
}
.security-failure-main strong {
  display: block;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.security-failure-main small {
  display: block;
  margin-top: 3px;
  color: #667b90;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.security-failure-reason {
  flex: 0 0 auto;
  max-width: 160px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #fff1f2;
  color: #b42335;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  text-transform: capitalize;
}
.security-failure-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 11px;
  padding-left: 6px;
}
.security-failure-meta small {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 11px;
  background: #f1f6fb;
  color: #385269;
  font-size: 10px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.security-failure-meta b {
  display: block;
  margin-bottom: 2px;
  color: #7b8ea1;
  font-size: 8px;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.security-history-more {
  margin-top: 2px;
}
.security-history-more summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px dashed #b8d3ef;
  border-radius: 14px;
  background: linear-gradient(135deg, #f7fbff, #eef8ff);
  color: #1262d8;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.security-history-more summary::-webkit-details-marker {
  display: none;
}
.security-history-more summary:hover {
  transform: translateY(-2px);
  border-color: #7fb4ed;
  box-shadow: 0 14px 28px rgba(36, 116, 235, .12);
}
.security-history-more summary strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2474eb;
  color: #fff;
  transition: transform .2s ease;
}
.security-history-more[open] summary strong {
  transform: rotate(180deg);
}
.security-failure-list-more {
  margin-top: 10px;
}
@media (max-width: 900px) {
  .security-failure-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .security-summary-card,
  .security-metric-card {
    min-height: 86px;
  }
  .security-failure-main {
    display: grid;
  }
  .security-failure-reason {
    max-width: none;
    width: max-content;
  }
  .security-failure-meta {
    grid-template-columns: 1fr;
  }
}
.calendar-sync-dialog { width: min(1120px, calc(100% - 32px)); }
.calendar-sync-card { padding: 28px; background: linear-gradient(135deg, #ffffff 0%, #f6fbff 100%); }
.calendar-sync-card h2 { margin: 6px 0 8px; font-size: clamp(24px, 3vw, 34px); }
.calendar-sync-card > p { max-width: 780px; color: var(--muted); line-height: 1.65; }
.calendar-sync-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 18px 0 20px; }
.calendar-sync-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.calendar-sync-panel { border: 1px solid #d8e6f2; border-radius: 20px; padding: 18px; background: rgba(255,255,255,.9); box-shadow: 0 18px 40px rgba(11,35,63,.06); }
.calendar-sync-panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.calendar-sync-panel-head h3 { margin: 0; font-size: 18px; }
.calendar-sync-panel-head span { min-width: 34px; min-height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #eaf3ff; color: var(--blue); font-weight: 900; }
.calendar-sync-list { display: grid; gap: 12px; margin-top: 14px; max-height: 58vh; overflow: auto; padding-right: 4px; }
.calendar-sync-item { border: 1px solid #dbe7f1; border-radius: 18px; padding: 15px; background: #fff; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.calendar-sync-item:hover { transform: translateY(-2px); border-color: #9dc8ff; box-shadow: 0 16px 34px rgba(29,111,233,.12); }
.calendar-sync-item.approved { background: linear-gradient(135deg, #ffffff, #f3fff9); }
.calendar-sync-date { display: inline-flex; margin-right: 8px; font-size: 12px; font-weight: 900; color: var(--navy); text-transform: uppercase; }
.calendar-sync-chip { display: inline-flex; border-radius: 999px; padding: 5px 9px; background: #eaf3ff; color: var(--blue); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.calendar-sync-item h4 { margin: 10px 0 6px; font-size: 17px; line-height: 1.35; }
.calendar-sync-item p { margin: 0; color: var(--muted); line-height: 1.55; }
.calendar-sync-meta { min-height: 24px; margin-top: 10px; font-size: 12px; font-weight: 800; }
.calendar-sync-meta a { color: var(--blue); text-decoration: none; }
.calendar-sync-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.calendar-sync-live-badge { display: inline-flex; margin-top: 12px; border-radius: 999px; padding: 7px 11px; background: #dcfce7; color: #047857; font-size: 12px; font-weight: 900; }
.empty-state.mini { border: 1px dashed #cfe0ef; border-radius: 16px; padding: 20px; color: var(--muted); background: #f8fbff; text-align: center; }
@media (max-width: 860px) {
  .calendar-sync-card { padding: 20px; }
  .calendar-sync-grid { grid-template-columns: 1fr; }
  .calendar-sync-list { max-height: none; }
}