:root { --ops-ink:#172b29; --ops-muted:#697975; --ops-line:#e0e8e5; --ops-green:#176b55; --ops-paper:#f2f5f3; }
body.app-page { background:var(--ops-paper); color:var(--ops-ink); padding:0 0 calc(92px + env(safe-area-inset-bottom)); font-size:14px; }
.app-page h1,.app-page h2,.app-page h3 { letter-spacing:-.025em; }
.app-page .button { min-height:48px; border-radius:12px; font-size:14px; font-weight:700; box-shadow:none; }
.app-page .button.primary { background:var(--ops-green); color:white; box-shadow:none; }
.app-page .button.primary:hover { background:#115340; }
.app-page .button.ghost { border-color:var(--ops-line); background:#fff; }
.app-page .button:hover { transform:none; }
.app-page .text-button { min-height:44px; padding:8px 0; background:none; border:0; color:var(--ops-green); font-size:13px; font-weight:650; cursor:pointer; }
.ops-header { height:68px; position:sticky; top:0; z-index:45; padding:0 max(16px,calc((100vw - 1040px)/2)); display:flex; align-items:center; justify-content:space-between; background:#fafffcf5; border-bottom:1px solid var(--ops-line); }
.ops-brand { display:flex; gap:10px; align-items:center; font-size:17px; font-weight:750; }
.ops-brand small { display:block; font-size:11px; font-weight:500; color:var(--ops-muted); margin-top:2px; }
.ops-mark { width:34px; height:34px; border-radius:10px; display:grid; place-items:center; background:var(--ops-ink); color:#d5f3cf; font-size:19px; }
.header-actions { display:flex; align-items:center; gap:8px; }
.header-actions>.icon-button { width:44px; height:44px; font-size:25px; border:1px solid var(--ops-line); background:white; border-radius:50%; }
.account-menu { position:relative; }
.account-menu>summary { width:44px; height:44px; list-style:none; display:grid; place-items:center; border-radius:50%; background:#e2ece4; font-weight:750; cursor:pointer; }
.account-menu>summary::-webkit-details-marker { display:none; }
.account-menu>div { position:absolute; top:52px; right:0; width:180px; padding:8px; border:1px solid var(--ops-line); background:white; box-shadow:0 8px 30px #142b251a; border-radius:14px; }
.account-menu button { min-height:48px; border:0; width:100%; background:white; color:var(--ops-ink); text-align:left; padding:12px; cursor:pointer; }
.ops-main { width:min(100% - 32px,1040px); margin:18px auto 0; }
.balance-card { background:#163e34; color:#fff; border-radius:20px; padding:21px 22px 16px; position:relative; box-shadow:0 8px 24px #163e3410; }
.balance-card .transfer-deduction { background:#ffe6ac;color:#392d12;border-radius:8px;padding:9px 12px;margin:0 0 13px;font-size:13px;line-height:1.45; }
.balance-card .transfer-deduction strong { font-weight:700; }
.balance-card.balance-credit { background:#54492e; }
.balance-top { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.balance-top h1 { font-size:14px; font-weight:550; margin:0; color:#d5e6db; letter-spacing:0; }
.balance-top>[data-sync-status] { font-size:10px; color:#c4e6ca; text-align:right; max-width:130px; }
.balance-amount { display:flex; align-items:baseline; gap:9px; margin:8px 0 15px; font-variant-numeric:tabular-nums; }
.balance-amount>span { font-size:17px; color:#b4d1c1; font-weight:600; }
.balance-amount strong { font-size:clamp(32px,8vw,52px); font-weight:750; line-height:1.15; letter-spacing:-.04em; overflow-wrap:anywhere; min-width:0; }
.balance-bottom { display:flex; align-items:center; justify-content:space-between; gap:14px; border-top:1px solid #ffffff24; padding-top:10px; }
.balance-bottom>a { font-size:12px; min-height:28px; display:flex; align-items:center; gap:8px; color:#deefe3; }
.balance-details { position:relative; }
.balance-details>summary { font-size:12px; cursor:pointer; min-height:28px; padding:5px 0; color:#d3e7db; }
.balance-details dl { position:absolute; z-index:50; width:min(285px,calc(100vw - 60px)); right:0; top:28px; margin:0; padding:17px; background:#fff; color:var(--ops-ink); border:1px solid var(--ops-line); border-radius:14px; box-shadow:0 12px 36px #10261b33; }
.balance-details dl>div { display:flex; justify-content:space-between; gap:14px; padding:9px 0; font-size:12px; }
.balance-details dt { color:var(--ops-muted); }
.balance-details dd { margin:0; font-weight:700; white-space:nowrap; }
.balance-details>p { display:none; }
.separate-fee-inline { margin:8px 0 0; font-size:11px; color:#dae8cf; }
.status-nav { position:sticky; top:68px; z-index:30; display:grid; grid-template-columns:repeat(6,minmax(64px,1fr)); overflow-x:auto; gap:6px; padding:15px 0 12px; background:var(--ops-paper); }
.status-nav a { display:grid; align-content:center; justify-items:center; gap:4px; min-height:66px; background:#fff; border:1px solid var(--ops-line); border-radius:12px; color:var(--ops-muted); }
.status-nav strong { font-size:21px; font-variant-numeric:tabular-nums; font-weight:700; color:var(--ops-ink); }
.status-nav span { font-size:11px; white-space:nowrap; }
.status-nav a.active { background:#e0efe7; border-color:#8cb59e; color:#155d46; box-shadow:inset 0 -2px #176b55; }
.status-nav a.has-pending:not(.active) strong { color:#a46015; }
.orders-toolbar { display:flex; justify-content:space-between; align-items:center; gap:16px; min-height:43px; }
.orders-toolbar h2 { margin:0; font-size:18px; }
.orders-toolbar h2 small { margin-left:7px; font-size:11px; font-weight:400; color:var(--ops-muted); letter-spacing:0; }
.ops-search { display:flex; background:white; border:1px solid var(--ops-line); border-radius:12px; overflow:hidden; margin:3px 0 14px; min-height:46px; }
.ops-search input { width:100%; min-width:0; font-size:16px; border:0; padding:11px 12px; outline-offset:-3px; background:transparent; }
.ops-search button,.ops-search>a { padding:10px 12px; min-width:46px; background:none; border:0; color:var(--ops-green); font-size:12px; font-weight:700; display:grid; place-items:center; }
.latest-batch { display:flex; align-items:center; justify-content:space-between; gap:14px; border:1px solid #d3e2d2; border-radius:10px; padding:5px 12px; margin:0 0 12px; font-size:11px; background:#eaf1e6; }
.latest-batch button { min-height:36px; background:none; border:0; color:#245c44; font-size:12px; font-weight:700; }
.ops-order-list { display:grid; gap:14px; }
.delivery-card { border:1px solid var(--ops-line); border-radius:17px; background:#fff; padding:16px; overflow-wrap:anywhere; }
.delivery-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.delivery-top .status-pill { font-size:10px; padding:5px 8px; letter-spacing:0; min-height:24px; }
.delivery-code { color:#7c8b85; font-size:10px; font-variant-numeric:tabular-nums; }
.delivery-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin:12px 0 9px; }
.delivery-heading>div:first-child { min-width:0; }
.delivery-heading h3 { margin:0; font-size:18px; line-height:1.3; }
.delivery-heading p { margin:4px 0 0; font-size:12px; color:var(--ops-muted); }
.delivery-amount { text-align:right; flex-shrink:0; max-width:48%; }
.delivery-amount>span { display:block; font-size:10px; color:var(--ops-muted); margin:0 0 4px; }
.delivery-amount strong { font-size:16px; font-weight:750; font-variant-numeric:tabular-nums; }
.delivery-address { font-size:13px; line-height:1.55; margin:0 0 8px; color:#52635d; }
.delivery-note { background:#fff9e9; border-radius:8px; padding:8px 10px; font-size:12px; line-height:1.5; }
.quick-contact { display:flex; gap:7px; padding:2px 0 10px; flex-wrap:wrap; }
.quick-contact>a { min-height:40px; display:flex; align-items:center; justify-content:center; flex:1 0 auto; gap:5px; border:1px solid #e4eae7; background:#f8faf9; border-radius:9px; font-size:11px; font-weight:650; padding:8px; }
.contact-wa { color:#176b45; }
.quick-contact .contact-wa { background:#edf7f0; border-color:#d8eade; }
.order-remittance { display:flex; align-items:center; justify-content:space-between; gap:10px; background:#edf5ef; border-radius:9px; padding:11px; margin-bottom:10px; font-size:12px; }
.order-remittance strong { font-size:17px; font-variant-numeric:tabular-nums; }
.delivery-actions { display:flex; gap:8px; align-items:center; }
.role-owner .status-pending .delivery-actions { flex-wrap:wrap; }
.delivery-actions>.owner-accept-form { flex:1 0 100%; }
.delivery-actions>.button,.delivery-actions>form { flex:1; }
.delivery-actions>.button:only-child,.delivery-actions>form:only-child { width:100%; }
.delivery-actions>.button { padding:0 10px; }
.delivery-account { color:var(--ops-muted); padding:0 10px; }
.delivery-secondary { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-top:3px; }
.delivery-secondary .text-button { font-size:11px; min-height:40px; color:#657a70; }
.delivery-secondary .text-button+button { color:#87631e; }
.partner-strip { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:2px 0 12px; padding:10px 0; border-top:1px solid #e9eeea; border-bottom:1px solid #e9eeea; }
.partner-strip span { display:block; font-size:10px; color:var(--ops-muted); margin:0 0 3px; }
.partner-strip strong { font-size:13px; }
.partner-links { display:grid; text-align:right; gap:3px; font-size:11px; }
.partner-links a { min-height:30px; display:flex; align-items:center; justify-content:flex-end; }
.settled-mark { font-size:12px; color:var(--ops-green); padding:8px 0; }
.empty-orders { padding:35px 15px; text-align:center; display:grid; justify-items:center; gap:16px; color:var(--ops-muted); border:1px dashed #cbd7ce; border-radius:15px; }
.ops-bottom-nav { position:fixed; bottom:0; left:0; right:0; z-index:60; display:flex; justify-content:center; background:#fffffffa; border-top:1px solid var(--ops-line); padding:6px max(8px,calc((100vw - 600px)/2)) calc(6px + env(safe-area-inset-bottom)); backdrop-filter:blur(15px); }
.ops-bottom-nav>a,.ops-bottom-nav>button { display:grid; justify-items:center; align-content:center; gap:3px; flex:1; min-height:56px; border:0; background:none; color:#7a8b82; font-size:11px; font-weight:600; cursor:pointer; }
.ops-bottom-nav span { font-size:23px; line-height:26px; position:relative; }
.ops-bottom-nav .active { color:var(--ops-green); }
.ops-bottom-nav .nav-add>span { width:36px; height:32px; border-radius:10px; background:var(--ops-green); color:white; }
.nav-pending b { position:absolute; top:-3px; left:17px; min-width:17px; height:17px; display:grid; place-items:center; padding:0 4px; border-radius:10px; background:#bc7327; color:white; font-size:10px; }
.app-page .modal-card { font-size:14px; }
.app-page .modal-card h2 { font-size:24px; padding-right:26px; }
.app-page .modal-card .eyebrow { color:var(--ops-muted); font-size:10px; letter-spacing:.06em; padding-right:35px; }
.app-page .modal-card>.muted { font-size:12px; line-height:1.55; }
.app-page .stack-form label { font-size:13px; }
.app-page input,.app-page textarea,.app-page select { font-size:16px; }
.app-page .modal-card h3 { font-size:14px; margin:0 0 8px; }
.app-page .modal-card p { line-height:1.5; }
.details-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:4px 0; }
.details-grid dt { font-size:11px; color:var(--ops-muted); margin-bottom:5px; }
.details-grid dd { margin:0; font-size:13px; font-weight:650; }
.record-history>summary,.danger-zone>summary { cursor:pointer; min-height:46px; padding:13px 0; border-top:1px solid var(--ops-line); font-size:13px; }
.record-history>div { padding:12px 0; border-top:1px solid #edf0ec; font-size:12px; }
.record-history small { display:block; margin:5px 0; color:var(--ops-muted); }
.record-history p { font-size:12px; margin:6px 0; }
.danger-zone { color:#9a3b32; }
.app-page .toast { position:relative; width:auto; margin:0 0 12px; font-size:13px; line-height:1.5; }
.app-page .label-status { position:sticky; z-index:55; top:70px; font-size:12px; }
.app-page .operations-panel { margin:0; padding:0; background:none; border:0; }
.operations-panel>.section-heading { margin:4px 0 16px; display:flex; flex-direction:column; align-items:stretch; gap:12px; }
.operations-panel h2 { font-size:25px; }
.operations-panel .muted { font-size:12px; }
.app-page .team-grid { grid-template-columns:1fr; }
.app-page .team-card { padding:17px; background:white; gap:11px; }
.app-page .team-card h3 { font-size:19px; }
.app-page .team-card .contact-links { justify-content:space-between; }
.app-page .team-card .button { width:100%; }
.app-page .team-card.inactive { background:#edf0ed; }
.app-page .batch-list>div { background:white; border:1px solid var(--ops-line); border-radius:13px; padding:14px; }
.app-page .batch-list>div>span { font-size:14px; }
.app-page .batch-list small { font-size:11px; }
.app-page .batch-list .button { padding:0 12px; font-size:12px; }
.app-page .import-note { font-size:11px; }
.login-page .login-shell { display:block; min-height:100dvh; }
.login-page .login-panel { min-height:100dvh; padding:24px; max-width:460px; margin:auto; }
.login-page .mobile-brand { display:flex; }
.login-page .login-card { width:100%; }
.login-page .login-card h2 { font-size:28px; }
.login-page .button.primary { background:var(--ops-green); color:white; box-shadow:none; }
@media(max-width:700px) {
    .app-page .modal[open] { width:100%; max-width:560px; max-height:94dvh; margin:0 auto; inset:auto 0 0; }
    .app-page .modal-card,.app-page .modal-card.wide { width:100%; margin:0; max-height:94dvh; padding:26px 20px calc(24px + env(safe-area-inset-bottom)); border-radius:22px 22px 0 0; }
    .app-page .modal-card .modal-actions { display:flex; }
    .app-page .modal-actions .button { flex:1; }
    .ops-main { width:calc(100% - 24px); margin-top:12px; }
    .balance-card { padding:18px 17px 12px; }
    .balance-amount strong { font-size:43px; }
    .status-nav { gap:5px; }
    .status-nav span { font-size:10px; }
    .delivery-card { padding:14px; }
}
@media(min-width:760px) {
    .ops-main { margin-top:24px; }
    .balance-card { padding:25px 30px 18px; }
    .balance-top h1 { font-size:16px; }
    .balance-amount strong { font-size:56px; }
    .balance-bottom>a { font-size:14px; }
    .ops-order-list { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; }
    .status-nav { max-width:650px; }
    .app-page .team-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .operations-panel>.section-heading { flex-direction:row; align-items:center; }
    .app-page .modal-card.wide { width:min(92vw,700px); }
}
@media(max-width:350px) { .balance-amount strong { font-size:36px; } .status-nav { gap:3px; } .status-nav a { border-radius:9px; } .status-nav span { font-size:9px; } .delivery-amount strong { font-size:14px; } .quick-contact>a { font-size:10px; padding:8px 5px; } }

.order-fee-row { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; margin:0 0 8px; border-top:1px solid var(--ops-line); font-size:12px; color:var(--ops-muted); }
.order-fee-row strong { color:var(--ops-ink); margin-left:5px; }
.order-fee-row .text-button { padding:8px; }
.fee-change-preview { display:grid; gap:8px; border-radius:12px; padding:16px; background:#e7f2eb; }
.fee-change-preview span { font-size:12px; color:var(--ops-muted); }
.fee-change-preview strong { font-size:17px; color:var(--ops-green); }

.owner-order-tools { display:grid; grid-template-columns:1fr 1.35fr; gap:8px; margin:6px 0; }
.owner-order-tools .button { font-size:12px; padding:9px 10px; line-height:1.4; }
.pending-print-note { margin:0 0 12px; font-size:11px; color:var(--ops-muted); }
.owner-order-tools button:disabled, [data-label-pending]:disabled { opacity:.45; cursor:not-allowed; }

.delivery-secondary { flex-wrap:wrap; column-gap:12px; row-gap:0; }
.delivery-secondary .delete-order-button { color:#a43b32; padding:8px 0; }
.order-delete-form { margin:0; }
