:root {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827; background: #f3f4f9; font-synthesis: none;
  --app-blue: #2f55e7; --app-blue-soft: #e9efff; --app-surface: #fff;
  --app-muted: #7b8494; --app-line: #e7e9ef;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.top {
  height: 76px; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--app-line);
  display: flex; justify-content: space-between; align-items: center; padding: 0 5vw;
  position: sticky; top: 0; z-index: 15; backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: #102b58; font-size: 22px; font-weight: 800; }
.logo { width: 42px; height: 42px; border-radius: 11px; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.page { width: min(1120px, 92vw); margin: 34px auto; }
.card { background: white; border: 1px solid var(--app-line); border-radius: 24px; box-shadow: 0 8px 28px rgba(30,50,90,.045); }
.auth { width: min(440px, 92vw); margin: 7vh auto; padding: 30px; }
.auth h1 { margin: 18px 0 5px; }
.muted { color: #6d7d94; font-size: 14px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 13px; margin-top: 22px; }
.contact-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.message-contacts {
  display: grid; grid-template-columns: max-content 1fr; gap: 5px 12px;
  margin: 12px 0; padding: 12px; border-radius: 10px; background: #f5f7fb; font-size: 13px;
}
.message-contacts dt { color: #6d7d94; }
.message-contacts dd { margin: 0; overflow-wrap: anywhere; }
.message-contacts a { color: #2455eb; }
label { display: grid; min-width: 0; gap: 6px; font-size: 13px; font-weight: 650; }
input, select, textarea {
  width: 100%; min-width: 0; max-width: 100%; border: 1px solid #cbd6e5;
  border-radius: 9px; padding: 11px 12px; background: white; color: #132a4e;
}
label > small.muted { display: block; font-weight: 400; line-height: 1.45; overflow-wrap: anywhere; }
textarea { width: 100%; min-height: 92px; resize: vertical; }
.primary, .secondary, .link {
  border: 0; border-radius: 9px; padding: 10px 14px; font-weight: 750;
}
.primary { background: var(--app-blue); color: white; }
.secondary { background: #edf2fb; color: #17345e; }
.link { background: transparent; color: #2455eb; padding: 6px; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; }
.policy-notice { margin: 12px 4px 0; color: #6d7d94; font-size: 12px; line-height: 1.55; text-align: center; }
.policy-notice a { color: #2455eb; font-weight: 700; }
.oauth-buttons { display: grid; gap: 10px; margin-top: 22px; }
.oauth-button {
  width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 11px;
  border: 1px solid #cfd6e2; border-radius: 10px; background: #fff; color: #172033; font-weight: 750;
}
.oauth-button:hover { background: #f8f9fc; border-color: #aeb9ca; }
.oauth-button:disabled { opacity: .5; cursor: not-allowed; }
.oauth-button:focus-visible { outline: 3px solid rgba(47,85,231,.22); outline-offset: 2px; }
.oauth-button svg { width: 21px; height: 21px; flex: 0 0 21px; }
.oauth-apple { background: #050505; border-color: #050505; color: #fff; }
.oauth-apple:hover { background: #242424; border-color: #242424; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 0; color: #7b8494; font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; background: #e2e6ed; flex: 1; }
.portal-link { display: block; text-align: center; text-decoration: none; margin-top: 18px; }
.whatsapp-link {
  width: 58px; height: 58px; display: grid; place-items: center; margin: 18px auto 0;
  border-radius: 50%; background: #20b65a; color: #fff; text-decoration: none;
  box-shadow: 0 10px 24px rgba(32,182,90,.24); transition: transform .15s, background .15s;
}
.whatsapp-link:hover { background: #169c4a; transform: translateY(-1px); }
.whatsapp-link svg { width: 34px; height: 34px; display: block; }
.whatsapp-link:focus-visible { outline: 3px solid rgba(32,182,90,.32); outline-offset: 3px; }
.whatsapp-support {
  display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 18px;
  border-radius: 16px; background: #20b65a; color: #fff; text-decoration: none;
  box-shadow: 0 10px 24px rgba(32,182,90,.22); transition: transform .15s, background .15s;
}
.whatsapp-support:hover { background: #169c4a; transform: translateY(-1px); }
.whatsapp-support:focus-visible { outline: 3px solid rgba(32,182,90,.32); outline-offset: 3px; }
.whatsapp-support svg { width: 34px; height: 34px; flex: 0 0 34px; }
.whatsapp-support span { display: grid; gap: 2px; }
.whatsapp-support strong { font-size: 15px; }
.whatsapp-support small { color: rgba(255,255,255,.84); font-size: 12px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.applicant-card { cursor: pointer; }
.applicant-card:hover { border-color: #2f5bea; transform: translateY(-1px); }
.primary:disabled { opacity: .45; cursor: not-allowed; }
.error, .success, .info { padding: 12px 14px; border-radius: 10px; margin: 12px 0; font-size: 14px; }
.error { color: #a12626; background: #fff0f0; border: 1px solid #ffcaca; }
.success { color: #146c36; background: #ecf9f0; border: 1px solid #bfe9ca; }
.info { color: #174f9e; background: #eaf2ff; border: 1px solid #c8dafb; }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 26px; }
.hero h1 { margin: 0 0 6px; font-size: 38px; letter-spacing: -.045em; }
.applications { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 15px; }
.application { padding: 19px; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.application:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(20,50,90,.1); }
.application h2 { font-size: 17px; margin: 0; }
.applicant-card { padding: 19px; }
.applicant-card h2 { font-size: 17px; margin: 0 0 4px; }
.applicant-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; color: #6d7d94; font-size: 13px; }
.row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.pill { background: #eaf0ff; color: #2455eb; padding: 5px 9px; border-radius: 99px; font-size: 12px; font-weight: 750; }
.empty { text-align: center; padding: 60px 25px; }
.modal { position: fixed; inset: 0; background: rgba(7,24,51,.45); display: grid; place-items: center; padding: 20px; z-index: 20; }
.modal-card { width: min(520px, 100%); padding: 25px; max-height: 90vh; overflow: auto; }
.modal-card h2 { margin-top: 0; }
.checkout-redirect {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px;
  background: rgba(243, 244, 249, .98);
}
.checkout-redirect-card { width: min(420px, 100%); padding: 34px; text-align: center; }
.checkout-redirect-card .progress { width: 34px; height: 34px; margin-bottom: 14px; }
.checkout-redirect-card h2 { margin: 0 0 8px; }
.checkout-redirect-card p { margin: 0; }
.detail-layout { display: grid; grid-template-columns: 1.3fr .7fr; gap: 18px; }
.section { padding: 21px; margin-bottom: 18px; }
.section h2 { font-size: 18px; margin: 0 0 15px; }
.item { padding: 13px 0; border-top: 1px solid #edf1f6; }
.item:first-of-type { border-top: 0; }
.item-title { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.check { color: #128141; font-weight: 800; }
.pending { color: #7a8799; }
.timeline { border-left: 2px solid #d9e3f1; padding-left: 17px; margin-left: 7px; }
.timeline .item { position: relative; }
.timeline .item::before { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #2455eb; left: -23px; top: 18px; }
.address { background: #f0f5ff; border: 1px solid #cfddfb; }
.fees { display: grid; gap: 8px; }
.total { border-top: 1px solid #dce4ef; padding-top: 10px; font-size: 18px; font-weight: 800; }
.case-sidebar { align-self: start; position: sticky; top: 94px; }
.payment-summary { transition: border-color .2s, box-shadow .2s, background .2s; }
.payment-summary-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 15px; }
.payment-summary-heading h2 { margin: 0; }
.payment-status { padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.payment-status--pending { color: #8a4b08; background: #ffecbd; border: 1px solid #f4ca69; }
.payment-status--paid { color: #146c36; background: #e4f7e9; border: 1px solid #b9e2c4; }
.payment-summary--pending {
  background: linear-gradient(180deg, #fffdf7 0%, #fff9e9 100%);
  border: 2px solid #efbd4f;
  box-shadow: 0 14px 34px rgba(151, 101, 0, .14);
}
.payment-summary--paid { border-color: #b9e2c4; }
.payment-reminder {
  display: grid; gap: 4px; margin: -2px 0 16px; padding: 12px 13px;
  border-radius: 12px; color: #71420e; background: rgba(255, 236, 189, .58);
}
.payment-reminder strong { font-size: 14px; }
.payment-reminder span { font-size: 12px; line-height: 1.45; }
.payment-summary-cta { width: 100%; min-height: 46px; margin-top: 16px; font-size: 16px; }
.payment-confirmation { margin-top: 15px; color: #146c36; font-size: 13px; font-weight: 750; }
.mobile-payment-bar { display: none; }
.back { margin-bottom: 16px; }
.progress { width: 22px; height: 22px; border: 3px solid #d7e0ed; border-top-color: #2455eb; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
.account-layout { display: grid; grid-template-columns: 270px 1fr; min-height: calc(100vh - 76px); }
.account-sidebar { background: #fff; border-right: 1px solid var(--app-line); padding: 28px 18px; }
.account-person { display: flex; gap: 11px; align-items: center; padding: 8px 9px 22px; border-bottom: 1px solid #edf1f6; margin-bottom: 16px; }
.account-person strong, .account-person span { display: block; overflow: hidden; text-overflow: ellipsis; }
.account-person span { max-width: 150px; color: #7b899c; font-size: 11px; margin-top: 3px; }
.avatar { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #e7edff; color: #2455eb; font-weight: 800; }
.account-nav { width: 100%; display: flex; gap: 11px; align-items: center; border: 0; background: transparent; color: #52627b; padding: 12px 13px; border-radius: 10px; margin-bottom: 5px; text-align: left; font-weight: 700; }
.account-nav span { color: #2455eb; width: 20px; text-align: center; }
.account-nav.active { background: var(--app-blue-soft); color: var(--app-blue); }
.account-content { min-width: 0; padding: 38px; }
.account-page { width: min(1180px, 100%); margin: 0 auto; }
.mobile-account-nav { display: none; }
.portal-list { display: grid; gap: 13px; }
.shipment-flow { width: min(840px, 100%); }
.shipment-address { background: #f0f5ff; border-color: #cfddfb; }
.shipment-address-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.shipment-address-heading h2 { margin: 3px 0 15px; }
.shipment-address address { display: grid; gap: 4px; font-style: normal; line-height: 1.45; }
.shipment-address address a { color: #2455eb; width: fit-content; }
.shipment-address-instructions {
  margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  background: rgba(255,255,255,.75); white-space: pre-wrap;
}
.shipment-address > .muted { margin-bottom: 0; }
.shipment-entry { margin-bottom: 22px; }
.shipment-entry > .muted { margin-top: -6px; }
.shipment-entry .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shipment-entry .stack button { grid-column: 1 / -1; min-height: 44px; }
.portal-row { padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.portal-row-end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.portal-row a { text-decoration: none; }
.receipt-detail { width: 100%; padding: 15px; background: #f7f9fd; border-radius: 10px; }
.receipt-detail h3 { margin-top: 0; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.toggles label { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.toggles input { width: 18px; height: 18px; }
.danger-zone { border-color: #f3c6c6; }
.danger-button { border: 0; border-radius: 9px; padding: 11px 14px; background: #b42318; color: #fff; font-weight: 750; }
.service-hub { margin-bottom: 18px; }
.service-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.service-links button {
  border: 1px solid var(--app-line); background: #fff; border-radius: 16px; min-height: 92px;
  padding: 16px; display: grid; grid-template-columns: 38px 1fr auto; align-items: center;
  gap: 10px; color: #111827; text-align: left;
}
.service-links button:hover { border-color: #bdcafa; background: #f8faff; }
.service-links button span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--app-blue-soft); color: var(--app-blue); font-size: 19px; }
.service-links button strong { font-size: 14px; }
.service-links button i { color: #a5adba; font-size: 25px; font-style: normal; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  .detail-layout { grid-template-columns: 1fr; }
  .case-sidebar { position: static; }
  body { background: #f3f4f9; }
  .top { height: 64px; padding: 0 18px; background: #f3f4f9; border-bottom: 0; position: static; }
  .brand span { display: none; }
  .top .logo { width: 38px; height: 38px; }
  .page { margin-top: 22px; }
  .hero { align-items: start; flex-direction: column; }
  .hero h1 { font-size: 34px; }
  .account-layout { grid-template-columns: 1fr; padding-bottom: 76px; }
  .account-sidebar { display: none; }
  .account-content { padding: 22px 16px 38px; }
  .account-page { width: 100%; }
  .card { border: 0; border-radius: 24px; box-shadow: none; }
  .application, .applicant-card, .section { padding: 20px; }
  .applications { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .contact-fields { grid-template-columns: 1fr; }
  .shipment-entry .stack { grid-template-columns: 1fr; }
  .shipment-entry .stack button { grid-column: auto; }
  .shipment-address-heading { display: grid; }
  .mobile-account-nav {
    position: fixed; display: grid; grid-template-columns: repeat(4, 1fr);
    left: 12px; right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 30; background: rgba(255,255,255,.96);
    border: 1px solid #e1e4eb; border-radius: 26px; padding: 8px;
    box-shadow: 0 12px 35px rgba(20,50,90,.18); backdrop-filter: blur(18px);
  }
  .mobile-account-nav button { border: 0; background: transparent; color: #596170; display: grid; place-items: center; gap: 3px; padding: 7px 2px; border-radius: 18px; }
  .mobile-account-nav button span { font-size: 20px; line-height: 1; }
  .mobile-account-nav button small { font-size: 11px; font-weight: 700; }
  .mobile-account-nav button.active { background: var(--app-blue-soft); color: var(--app-blue); }
  .service-links { grid-template-columns: 1fr; gap: 0; }
  .service-links button { min-height: 62px; border: 0; border-bottom: 1px solid var(--app-line); border-radius: 0; padding: 10px 2px; }
  .service-links button:last-child { border-bottom: 0; }
  .portal-row { align-items: flex-start; }
  .case-page.has-mobile-payment-bar { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
  .mobile-payment-bar {
    position: fixed; display: flex; align-items: center; justify-content: space-between; gap: 14px;
    left: 12px; right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 35;
    padding: 10px 12px 10px 16px; border: 1px solid #d5dded; border-radius: 20px;
    background: rgba(255,255,255,.97); box-shadow: 0 14px 38px rgba(20,50,90,.22);
    backdrop-filter: blur(18px);
  }
  .mobile-payment-bar div { display: grid; gap: 1px; }
  .mobile-payment-bar span { color: #7a5a17; font-size: 11px; font-weight: 750; }
  .mobile-payment-bar strong { color: #111827; font-size: 18px; }
  .mobile-payment-bar button { min-width: 126px; min-height: 44px; }
}
