/* Shared visual contract with the desktop v1.0: readable type, outlined buttons,
   blue holdings, green settled months and nested collapsible stock groups. */
:root{--primary-blue:#2456D7;--bg-color:#F3F6FB;--text-main:#16243C;--text-muted:#53647B;--border-color:#D4DEEB}
[hidden]{display:none!important}*{box-sizing:border-box}
body{font-family:"Microsoft JhengHei UI","Microsoft JhengHei","Segoe UI",sans-serif;font-size:18px;color:#16243C;background:#F3F6FB}
.app-container{max-width:none;height:100dvh}.main-calculator{min-width:0}.calc-scroll-content{padding:20px;max-width:1100px;margin:auto}
.top-header{align-items:center;gap:12px;margin-bottom:14px}.title-area h1{font-size:27px}.subtitle{font-size:16px;line-height:1.6}.tip{font-size:15px;line-height:1.6}
.header-actions{flex-wrap:wrap;justify-content:flex-end;gap:8px}.btn,.btn-sm,.unit-toggle-btn{font-size:17px!important;padding:7px 12px!important;border-radius:8px;border:1px solid #8798B1;background:white;color:#16243C;font-family:inherit;line-height:1.5;white-space:nowrap;min-height:40px}
.btn-primary{background:#2456D7;color:white;border-color:#2456D7}.btn-drawer-toggle{background:#EDF3FF;color:#2456D7}.btn-danger{color:#B42318}.btn:focus-visible,summary:focus-visible{outline:2px solid #2456D7;outline-offset:3px}
.google-user-pill{background:transparent;border:none;gap:8px;flex-wrap:wrap}.google-user-pill #userName{font-size:16px!important}.status-banner{font-size:16px;min-height:38px;padding:7px 12px;margin-bottom:12px}.status-banner.success{background:#EAF6F0;color:#14654F}.sync-status{width:9px;height:9px}
.card,.result-box{border:1px solid #D4DEEB;border-radius:12px;padding:14px;box-shadow:none;background:white}.form-row{gap:14px;margin-bottom:12px}.form-group label{font-size:16px;font-weight:600;min-height:26px}.form-control{border:1px solid #8798B1;border-radius:8px;font-size:22px;padding:8px 10px;color:#16243C;min-height:44px}.form-control::placeholder{color:#63738B}select.form-control{font-size:17px}.row-stock-info .col-2{flex:2}.form-row-sub{display:flex;flex-wrap:wrap;gap:12px;align-items:center;font-size:16px}.fee-tip-row{font-size:15px;line-height:1.7;border:0}.label-hint{display:none}
.results-grid{gap:14px;margin-top:14px}.result-box{border-top:1px solid #D4DEEB}.box-header .title{font-size:24px}.box-header .tag{font-size:15px}.calc-line{font-size:16px;margin:8px 0}.calc-line .val{font-size:22px}.total-line{border:0;padding:12px;border-radius:8px;display:block;background:#EDF3FF}.total-line .val{display:block;font-size:28px;color:#2456D7;margin-top:6px}.sell-box .total-line{background:#EAF6F0}.sell-box .total-line .val{color:#087F5B}
.profit-dark-card{background:#192E4C;border-radius:12px;gap:24px;padding:16px;margin-top:14px}.dark-stat .label{font-size:16px;color:#D4E1F2}.dark-stat .value{font-size:28px}.calc-action-bar{position:sticky;bottom:0;background:white;border-top:1px solid #D4DEEB;padding:12px 0;display:flex;justify-content:flex-end;gap:8px;margin-top:16px}
.records-drawer{width:560px;min-width:0;background:#F7F9FC;border-left:1px solid #D4DEEB}.drawer-header{padding:18px 20px;background:white;gap:8px}.drawer-header h2{font-size:23px}.drawer-header .count-sub{font-size:16px}.drawer-toolbar{padding:14px 16px;background:#F7F9FC}.record-tools{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.drawer-scroll-body{padding:0 16px 16px}.drawer-footer{padding:14px 20px;background:white;font-size:18px;border-top:1px solid #D4DEEB}.drawer-footer #drawerFooterSummary{text-align:left!important}
details>summary{list-style:none;cursor:pointer;position:relative;padding-right:32px}details>summary::-webkit-details-marker{display:none}details>summary:after{content:'⌄';position:absolute;right:0;top:50%;transform:translateY(-50%);font-size:25px;color:#53647B}details[open]>summary:after{content:'⌃'}
.record-group{border:1px solid #DFE6EF;border-radius:12px;background:white;overflow:hidden;margin:0 0 18px}.record-group>summary{padding:16px 42px 16px 16px;background:#EBF6F1}.holding-group>summary{background:#EEF3FF}.record-group>summary:after{right:16px}.record-group>summary strong{font-size:23px;color:#14654F}.holding-group>summary strong{color:#2456B5}.group-meta{font-size:16px;color:#53647B;margin-left:10px}.group-subtotal{font-size:17px;margin-top:7px}.stock-section{margin:0 16px;border-bottom:1px solid #DFE6EF}.stock-section>summary{padding:18px 28px 18px 0;display:flex;align-items:center;flex-wrap:wrap;gap:8px}.stock-section>summary strong{font-size:20px;flex:1}.stock-section>summary>span{font-size:17px}.stock-meta{flex-basis:100%;color:#53647B;font-size:15px}.record-card{margin:0 0 14px;padding:14px;border:1px solid #D4DEEB;border-radius:12px;box-shadow:none}.card-dates{white-space:pre-line;font-size:16px;line-height:1.5}.card-title{font-size:22px}.card-profit{font-size:22px}.card-summary-text{font-size:16px;line-height:1.6}.card-actions{flex-wrap:wrap;gap:8px;border:0}.record-card>details{font-size:16px;padding-top:8px}.record-card>details>summary{padding-right:26px}.record-card>details>summary:after{font-size:18px}.badge{font-size:14px;padding:4px 7px}.stock-val-profit{color:#C22929}.stock-val-loss{color:#14654F}.stock-val-blue,.amount-blue{color:#2456B5}.empty-records{padding:24px;color:#53647B}.settle-row{flex-wrap:wrap}.settle-price-input,.settle-date-input{min-width:110px;flex:1}
.modal-box{max-width:650px!important;border-radius:12px;padding:24px;background:#F3F6FB;max-height:90dvh;overflow:auto}.modal-header h3{font-size:23px}.modal-box label{font-size:18px!important}.modal-box p,.modal-box div{line-height:1.6}.modal-box input{background:white}.modal-box #tabLogin,.modal-box #tabRegister{font-size:18px!important}.modal-box a{font-size:16px!important}.choice-dialog{border:1px solid #D4DEEB;border-radius:12px;background:#F3F6FB;color:#16243C;font:18px/1.6 "Microsoft JhengHei",sans-serif;padding:24px;max-width:760px;width:90vw;max-height:90dvh;overflow:auto}.choice-dialog::backdrop{background:#16243C66}.choice-dialog h2{font-size:23px;margin:0 0 14px}.choice-body{white-space:pre-wrap}.dialog-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px;justify-content:flex-end}
@media(max-width:1100px){.top-header{flex-wrap:wrap}.records-drawer{width:48vw}.title-area{width:100%}.header-actions{width:100%}.results-grid{grid-template-columns:1fr}}
@media(max-width:760px){.records-drawer{position:fixed;inset:0;width:100%;z-index:50}.calc-scroll-content{padding:14px}.form-row{flex-wrap:wrap}.row-prices-qty .form-group{min-width:42%}.header-actions .btn{font-size:16px!important}.profit-dark-card{flex-wrap:wrap}.drawer-header{flex-wrap:wrap}.record-tools{justify-content:flex-start}.drawer-header h2{font-size:22px}}

#btnConfirmLogin,#btnConfirmRegister{background:white;color:#16243C;border-color:#8798B1}
