body { background: #f4f6f9; color: #1d1d2b; font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif; }
.app-header { position: sticky; top: 0; z-index: 1020; background: #000080; border-bottom: 3px solid #d28b45; box-shadow: 0 3px 14px rgba(0,0,128,.12); }
.app-header .container { max-width: none; padding-inline: 1.5rem; }
.navbar-brand { letter-spacing: -.025em; }
.app-splash { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 42%, #1e3a8a 0, #000080 47%, #00004d 100%); color: #fff; opacity: 1; transition: opacity .4s ease, visibility .4s ease; }
.app-splash::before, .app-splash::after { position: absolute; width: min(78vw, 430px); aspect-ratio: 1; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; content: ""; }
.app-splash::after { width: min(105vw, 600px); border-color: rgba(210,139,69,.13); }
.app-splash.is-hidden { visibility: hidden; opacity: 0; }
.app-splash-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: .55rem; padding: 2rem; text-align: center; animation: splash-content-enter .75s cubic-bezier(.2,.8,.2,1) both; }
.app-splash-mark { display: grid; width: 122px; height: 122px; place-items: center; margin-bottom: .55rem; border: 1px solid rgba(255,255,255,.72); border-radius: 30px; background: #fff; box-shadow: 0 16px 46px rgba(0,0,0,.24), 0 0 0 9px rgba(255,255,255,.07); animation: splash-mark-enter 1.2s cubic-bezier(.2,.8,.2,1) both; }
.app-splash-mark img { display: block; width: 100%; height: 100%; padding: 9px; object-fit: contain; }
.app-splash-content strong { font-size: 1.4rem; font-weight: 750; letter-spacing: -.035em; }
.app-splash-content > span { color: #d9ddff; font-size: .88rem; }
.app-splash-progress { width: 118px; height: 3px; overflow: hidden; margin-top: 1.1rem; border-radius: 99px; background: rgba(255,255,255,.2); }
.app-splash-progress span { display: block; width: 45%; height: 100%; border-radius: inherit; background: #e5a65f; animation: splash-progress 1.35s ease-in-out infinite; }
@keyframes splash-mark-enter { 0% { opacity: 0; transform: translateY(15px) scale(.72) rotate(-12deg); } 65% { opacity: 1; transform: translateY(-3px) scale(1.04) rotate(2deg); } 100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); } }
@keyframes splash-content-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes splash-progress { from { transform: translateX(-110%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) {
  .app-splash, .app-splash-content, .app-splash-mark, .app-splash-progress span { animation: none; transition-duration: .01ms; }
  .app-splash-mark { opacity: 1; transform: none; }
}
.card { border: 1px solid #e1e4f0; border-radius: 9px; box-shadow: 0 3px 12px rgba(0,0,128,.055); }
.stat { font-size: 1.5rem; font-weight: 700; }
.app-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100vh - 72px); }
.app-shell.password-reset-required { grid-template-columns: minmax(0, 1fr); }
.password-reset-required .app-sidebar { display: none; }
.app-sidebar { position: sticky; top: 0; align-self: start; height: calc(100vh - 72px); overflow-y: auto; padding: 1.25rem .75rem; background: #fff; border-right: 1px solid #dfe4e9; }
.sidebar-backdrop { display: none; }
.sidebar-topbar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.sidebar-heading { padding: .25rem .75rem .75rem; color: #687581; font-size: .72rem; font-weight: 700; }
.sidebar-close { display: none; }
#tabs .nav-link { display: flex; align-items: center; gap: .65rem; margin-bottom: .25rem; padding: .65rem .75rem; border-radius: 5px; color: #344252; cursor: pointer; }
#tabs .nav-link:hover:not(.active) { background: #edf2f6; }
#tabs .nav-link.active { color: #fff; background: #000080; }
.app-main { min-width: 0; padding: 1.75rem; }
.app-main h5 { margin-bottom: 1rem; font-weight: 700; color: #000080; letter-spacing: -.02em; }
.ui-icon { display: inline-block; width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.15em; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.app-header .ui-icon { width: 1rem; height: 1rem; }
.app-header #logout { min-width: 36px; }
.connection-status { display: inline-flex; align-items: center; gap: .35rem; color: #e7f0ed; font-size: .78rem; white-space: nowrap; }
.connection-status { border: 0; padding: .4rem .5rem; background: transparent; cursor: pointer; }
.connection-status:hover { background: rgba(255,255,255,.1); border-radius: 5px; }
.connection-status.is-offline { color: #ffdf9c; }
.pending-count { display: inline-grid; min-width: 1.15rem; height: 1.15rem; place-items: center; border-radius: 50%; background: #d28b45; color: #172522; font-size: .68rem; font-weight: 700; }
.app-notice { margin-top: .75rem; }
.app-notice-content { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; border: 1px solid #d8d9f0; border-left: 4px solid #000080; border-radius: 7px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,128,.045); }
.app-notice-content p { color: #344252; font-size: .9rem; line-height: 1.5; }
.install-inline-link { padding: 0; border: 0; background: transparent; color: #000080; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.install-inline-link:hover { color: #00005c; }
.install-inline-link:focus-visible { outline: 2px solid #000080; outline-offset: 3px; border-radius: 2px; }
.app-main .btn-primary { background: #000080; border-color: #000080; }
.app-main .btn-primary:hover { background: #00005c; border-color: #00005c; }
.table > :not(caption) > * > * { padding: .72rem .8rem; }
.table thead th { color: #414455; font-size: .82rem; font-weight: 650; white-space: nowrap; }
.search-field { position: relative; flex: 1; min-width: 120px; }
.search-field > .ui-icon { position: absolute; top: 50%; left: .8rem; color: #687581; transform: translateY(-50%); pointer-events: none; }
.search-field > input { padding-left: 2.4rem; }
.pending-row > td { background: #fff9e9 !important; }
.btn > .ui-icon + span { margin-left: .4rem; }
.form-control, .form-select { border-color: #d4ded9; }
.form-control:focus, .form-select:focus { border-color: #000080; box-shadow: 0 0 0 .2rem rgba(0,0,128,.14); }
.plan-price { display: grid; gap: .55rem; min-height: 84px; padding: .85rem; border: 1px solid #e1e4f0; border-radius: 6px; background: #fff; }
.plan-price span { color: #687581; font-size: .82rem; }
.plan-price strong { color: #000080; font-size: 1rem; }
#loginBox { margin-top: clamp(2rem, 8vh, 5rem); }
#loginBox .card { border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,128,.09); }
#loginBox h5 { color: #000080; font-weight: 750; }
#billing-config-form .form-label, #subscription-plan-list .form-label { font-size: .84rem; font-weight: 600; }
#subscription-status { border-left: 4px solid #d28b45; }
#billing-config-form h6, #subscription-plan-list h6 { color: #000080; font-weight: 700; }
.app-main .table-responsive { border-radius: 7px; }
.app-main .table { margin-bottom: 0; }
.app-main .table th { background: #f7f8fc; }
.app-main .btn { border-radius: 6px; font-weight: 550; }
.sync-dialog { width: min(520px, calc(100vw - 2rem)); max-height: min(680px, calc(100vh - 2rem)); padding: 0; border: 0; border-radius: 8px; color: #1d1d2b; box-shadow: 0 24px 80px rgba(16,16,40,.24); }
.sync-dialog::backdrop { background: rgba(16,16,40,.45); }
.sync-dialog-content { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: inherit; padding: 1.25rem; }
.sync-dialog header, .sync-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.sync-dialog header { padding-bottom: 1rem; border-bottom: 1px solid #e1e4f0; }
.sync-dialog h2 { margin: .2rem 0 0; font-size: 1.2rem; }
.sync-dialog .eyebrow { color: #687581; font-size: .68rem; font-weight: 700; }
#sync-queue-list { overflow: auto; padding: .5rem 0; }
.sync-queue-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid #edf1ef; }
.sync-queue-item > div { display: flex; align-items: flex-start; gap: .75rem; }
.sync-queue-item p { margin: .15rem 0 0; color: #687581; font-size: .86rem; }
.sync-queue-item time { flex: 0 0 auto; color: #687581; font-size: .75rem; }
.sync-empty { padding: 2rem 0; color: #687581; text-align: center; }
.sync-dialog footer { padding-top: 1rem; border-top: 1px solid #e1e4f0; }
.product-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 4px; }
.product-image-preview { width: 96px; height: 96px; object-fit: cover; border-radius: 4px; }
.report-chart-wrap { position: relative; min-height: 280px; }
.policy-page { max-width: 800px; margin: 2rem auto; padding: clamp(1.25rem, 4vw, 2.5rem); border: 1px solid #e1e4f0; border-radius: 9px; background: #fff; box-shadow: 0 3px 12px rgba(0,0,128,.055); }
.policy-page h1, .policy-page h2 { color: #000080; }
.policy-page h1 { margin-bottom: .4rem; font-size: clamp(1.8rem, 5vw, 2.4rem); }
.policy-page h2 { margin-top: 1.75rem; font-size: 1.2rem; }
.policy-page p, .policy-page li { line-height: 1.65; }
.policy-page .policy-updated { color: #687581; font-size: .9rem; }
.policy-shell { width: min(1080px, calc(100% - 2rem)); margin: 2rem auto 4rem; }
.policy-topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.policy-brand { display: inline-flex; align-items: center; gap: .65rem; color: #000080; font-weight: 750; text-decoration: none; }
.policy-brand-mark { display: grid; width: 2.5rem; height: 2.5rem; place-items: center; border-radius: 9px; background: #000080; color: #fff; font-size: .8rem; }
.policy-top-link { color: #000080; font-size: .9rem; font-weight: 600; text-decoration: none; }
.policy-hero { overflow: hidden; padding: clamp(1.75rem, 5vw, 3.5rem); border-radius: 15px; background: radial-gradient(circle at 95% 0, rgba(210,139,69,.38), transparent 34%), linear-gradient(130deg, #000080, #00005c); color: #fff; }
.policy-hero .eyebrow { color: #f0c28b; font-size: .75rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.policy-hero h1 { max-width: 720px; margin: .65rem 0 .75rem; font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 760; letter-spacing: -.04em; }
.policy-hero p { max-width: 680px; margin-bottom: 0; color: #e1e4ff; line-height: 1.7; }
.policy-meta { margin-top: 1.25rem; color: #e1e4ff; font-size: .85rem; }
.policy-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); align-items: start; gap: 1.25rem; margin-top: 1.25rem; }
.policy-toc, .policy-section, .support-card { border: 1px solid #e1e4f0; border-radius: 11px; background: #fff; box-shadow: 0 3px 12px rgba(0,0,128,.045); }
.policy-toc { position: sticky; top: 1rem; padding: 1.1rem; }
.policy-toc h2 { margin: 0 0 .75rem; color: #000080; font-size: .9rem; }
.policy-toc a { display: block; padding: .4rem 0; color: #4c5262; font-size: .85rem; text-decoration: none; }
.policy-toc a:hover, .policy-top-link:hover { color: #00005c; text-decoration: underline; }
.policy-content { display: grid; gap: .85rem; }
.policy-section { padding: clamp(1.1rem, 3vw, 1.6rem); scroll-margin-top: 1rem; }
.policy-section h2 { margin: 0 0 .7rem; color: #000080; font-size: 1.15rem; font-weight: 720; }
.policy-section p, .policy-section li { color: #46505f; font-size: .95rem; line-height: 1.75; }
.policy-section p:last-child, .policy-section ul:last-child, .policy-section ol:last-child { margin-bottom: 0; }
.policy-section a, .support-card a { color: #000080; font-weight: 600; }
.policy-footer { display: flex; justify-content: space-between; gap: .75rem; margin-top: 1.25rem; padding: 1rem .25rem; color: #687581; font-size: .85rem; }
.support-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.support-card { padding: clamp(1.1rem, 3vw, 1.6rem); }
.support-card h2 { margin: .65rem 0; color: #000080; font-size: 1.1rem; font-weight: 720; }
.support-card p, .support-card li { color: #536071; line-height: 1.7; }
.support-card p:last-child, .support-card ul:last-child { margin-bottom: 0; }
.support-card-icon { display: grid; width: 2.6rem; height: 2.6rem; place-items: center; border-radius: 9px; background: #edf0ff; color: #000080; font-size: 1.15rem; font-weight: 750; }
.payment-step-number { display: grid; flex: 0 0 2rem; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; background: #e9ecfa; color: #000080; font-size: .82rem; font-weight: 750; }
.subscription-payment-card h6 { color: #000080; font-weight: 720; }
.bank-details-panel { padding: 1rem; border: 1px solid #d9dced; border-radius: 9px; background: #f7f8ff; }
.bank-details-label { color: #687581; font-size: .7rem; font-weight: 750; letter-spacing: .1em; }
.bank-details-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: .8rem 0 0; }
.bank-details-grid dt { color: #687581; font-size: .76rem; font-weight: 600; }
.bank-details-grid dd { margin: .2rem 0 0; color: #000080; font-size: .93rem; font-weight: 700; overflow-wrap: anywhere; }
.bank-account-number { font-size: 1.12rem !important; letter-spacing: .06em; }
@media print {
  nav, #tabs, #msg, .no-print { display: none !important; }
  body { background: #fff; }
}
@media (max-width: 767.98px) {
  .policy-layout { grid-template-columns: 1fr; }
  .policy-toc { position: static; }
  .app-shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .app-header { z-index: 1040; }
  .app-header .container { gap: .65rem; padding-inline: 1rem; }
  .app-header #open-sidebar:not(.d-none) { display: inline-flex !important; width: 38px; height: 38px; flex: 0 0 38px; align-items: center; justify-content: center; padding: 0; }
  .app-header .navbar-brand { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .app-sidebar { position: fixed; z-index: 1050; top: 0; bottom: 0; left: 0; width: min(84vw, 310px); height: 100vh; height: 100dvh; padding: 1.15rem .85rem; overflow-y: auto; border-right: 1px solid #dfe4e9; box-shadow: 12px 0 36px rgba(16,16,40,.16); transform: translateX(-105%); transition: transform .24s ease; }
  .app-shell.sidebar-open .app-sidebar { transform: translateX(0); }
  .sidebar-topbar { min-height: 48px; margin-bottom: 1.1rem; padding: 0 .45rem; }
  .sidebar-heading { padding: 0; color: #000080; font-size: .95rem; font-weight: 750; overflow-wrap: anywhere; }
  .sidebar-close { display: inline-grid; width: 38px; height: 38px; place-items: center; color: #46505f; }
  .sidebar-backdrop { position: fixed; z-index: 1045; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(12,16,35,.48); opacity: 0; pointer-events: none; transition: opacity .24s ease; }
  .app-shell.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  body.sidebar-lock { overflow: hidden; }
  #tabs { flex-direction: column !important; flex-wrap: nowrap !important; gap: .15rem; }
  #tabs .nav-item { flex: 0 0 auto; }
  #tabs .nav-link { min-height: 46px; gap: .75rem; margin-bottom: 0; padding: .72rem .85rem; border-radius: 7px; }
  #tabs .nav-link.active { box-shadow: 0 3px 10px rgba(0,0,128,.16); }
  .app-main { padding: 1.15rem; }
  .app-main h5 { margin-bottom: .85rem; }
  .app-main .card { border-radius: 10px; }
  .app-main .table-responsive { max-width: 100%; }
}
@media (max-width: 575.98px) {
  .app-notice { margin-top: .4rem; }
  .app-notice-content { align-items: flex-start; flex-direction: column; gap: .55rem; padding: .7rem .8rem; }
  .app-notice-content p { font-size: .82rem; }
  #install-action { align-self: flex-end; min-width: 0; padding: .35rem .7rem; }
  .app-main { padding: .85rem; }
  #view > .row.g-3 { --bs-gutter-x: .65rem; --bs-gutter-y: .65rem; }
  .app-main .card.p-3 { padding: .85rem !important; }
  .app-main .stat { font-size: 1.25rem; overflow-wrap: anywhere; }
  .app-main .form-control, .app-main .form-select { min-height: 44px; }
  .app-main .btn { min-height: 40px; }
  .app-main .table > :not(caption) > * > * { padding: .55rem .6rem; }
  .support-grid { grid-template-columns: 1fr; }
  .bank-details-grid { grid-template-columns: 1fr; }
  .policy-footer { flex-direction: column; }
  #view > .no-print { flex-wrap: wrap; }
  #view > .no-print input[type="date"] { flex: 1 1 135px; min-width: 0; }
  .report-chart-wrap { min-height: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-sidebar, .sidebar-backdrop { transition: none; }
}
