.sda { color:#193f54; font-family:Arial,sans-serif; min-width:0; }
.sda * { box-sizing:border-box; letter-spacing:0; }
.sda header { display:flex; justify-content:space-between; align-items:center; gap:12px; border-bottom:2px solid #008b8a; padding:12px 0; margin-bottom:16px; }
.sda h1,.sda h2 { font-size:22px; margin:0; }
.sda h3 { font-size:16px; margin:12px 0; }
.sda small { display:block; font-size:12px; color:#617681; margin-top:5px; overflow-wrap:anywhere; }
.sda label { display:grid; gap:6px; margin:0; min-width:0; font-size:14px; }
.sda input:not([type=checkbox]),.sda select,.sda textarea { font:inherit; min-width:0; width:100%; padding:10px; margin:0; border:1px solid #b7cbd6; border-radius:5px; background:#fff; color:#193f54; }
.sda textarea { resize:vertical; }
.sda button { font:inherit; font-size:13px; font-weight:bold; min-height:44px; border:1px solid #9db7c9; border-radius:5px; padding:8px 12px; background:#edf4f8; color:#194d65; margin:0; cursor:pointer; width:auto; }
.sda button:disabled { opacity:.55; cursor:default; }
.sda button:focus-visible,.sda a:focus-visible { outline:3px solid #008bd0; outline-offset:2px; }
.sda [hidden] { display:none !important; }
.sda .btn-primary,.sda-phone button[type=submit],.sda-phone [data-save] { background:#194d65; color:#fff; }
.sda-filters { display:flex; gap:12px; align-items:end; flex-wrap:wrap; margin:16px 0; }
.sda-filters label { flex:1; min-width:180px; }
.sda-settings { border-bottom:1px solid #cbdbe2; padding-bottom:14px; }
.sda-settings summary { cursor:pointer; font-weight:bold; padding:12px 0; }
.sda-groups { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:12px 0; }
.sda-lessons { display:grid; grid-template-columns:repeat(auto-fit,minmax(95px,1fr)); gap:10px; border:1px solid #cbdbe2; padding:12px; margin:12px 0; }
.sda-lessons label { display:flex; align-items:center; min-height:36px; }
.sda-branch-copy { display:flex; flex-wrap:wrap; gap:4px; margin-top:8px; }
.sda .sda-branch-copy textarea { flex:1 1 90px; padding:6px; min-height:44px; height:44px; max-height:96px; font-variant-numeric:tabular-nums; }
.sda .sda-branch-copy button { padding:6px; }
.sda-history { margin-top:20px; border-top:1px solid #b7cbd6; padding-top:12px; }
.sda-history summary { cursor:pointer; font-weight:bold; padding:10px 0; }
.sda-history-list { max-height:500px; overflow:auto; }
.sda-history-list article { padding:12px 0; border-bottom:1px solid #cbdbe2; }
.sda-history-list header { border:0; margin:0; padding:0; flex-wrap:wrap; font-size:14px; }
.sda-history-list time { font-size:12px; }
.sda-history-list p { margin:8px 0; overflow-wrap:anywhere; }
.sda .sda-all-history { display:flex; align-items:center; min-height:44px; }
.sda .sda-export>[data-transfer] { display:block; }
.sda-transfer { width:100%; padding:12px 0; border-top:1px solid #cbdbe2; }
.sda-transfer p,.sda-history-numbers { white-space:normal; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.sda-transfer button { margin:8px; }
.sda table.sda-wide-table { table-layout:auto; }
.sda-wide-table td { min-width:180px; }
.sda .sda-wide-table th:first-child { min-width:60px; white-space:nowrap; overflow-wrap:normal; }
.sda-groups label { display:flex; align-items:start; gap:10px; padding:10px; background:#f3f7f9; }
.sda input[type=checkbox] { width:18px; height:18px; flex-shrink:0; margin:0; }
.sda-session-bar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); border-block:1px solid #b9cfd8; margin:18px 0; }
.sda-session-bar section { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:14px; background:#f3f8f9; }
.sda-session-bar section+section { border-left:1px solid #cbdbe2; }
.sda-session-bar section>div { display:flex; flex-wrap:wrap; gap:8px; }
.sda-session-bar section>span { font-size:13px; }
.sda-session-bar section>span:last-of-type { flex-basis:100%; }
.sda-table { overflow:auto; }
.sda table { width:100%; table-layout:fixed; border-collapse:collapse; font-size:14px; }
.sda th,.sda td { padding:12px 8px; border-bottom:1px solid #cbdbe2; text-align:left; vertical-align:top; overflow-wrap:anywhere; }
.sda th:first-child { width:70px; }
.sda thead { background:#194d65; color:white; }
.sda tbody tr:nth-child(even) { background:#f5f9fa; }
.sda-numbers { display:flex; flex-wrap:wrap; gap:6px; }
.sda .sda-arrived { text-decoration:line-through; background:#e7ecef; color:#667781; }
.sda .sda-new { border-color:#aa3449; color:#9e243a; }
.sda .sda-warning { border-color:#a36b14; background:#fff1d8; }
.sda-pending { color:#876014; font-size:13px; }
.sda-complete { color:#137562; }
.sda-error { color:#a9253c; background:#fff1f1; padding:10px; margin:10px 0; }
.sda-notice:not(:empty) { color:#176b59; padding:8px 0; }
.sda-export { margin-top:24px; padding-top:12px; border-top:2px solid #008b8a; }
.sda-export>div { display:flex; gap:12px; align-items:center; margin:10px 0; }
.sda-export label { max-width:420px; }
.sda-dialog { width:min(380px,calc(100vw - 24px)); max-height:90dvh; overflow:auto; padding:20px; border:1px solid #b7cbd6; border-radius:6px; }
.sda-dialog::backdrop { background:rgb(20 40 50 / 55%); }
.sda-dialog [data-qr] { width:220px; height:220px; margin:16px auto; }
.sda-dialog header button { width:44px; height:44px; }
.sda-dialog a { display:block; padding:12px 0; color:#194d65; }
.sda-phone { margin:0; background:#f0f5f7; }
.sda-phone main { width:100%; max-width:650px; min-height:100dvh; box-sizing:border-box; margin:auto; padding:12px; padding:12px max(12px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); }
.sda-phone .sda input { font-size:16px; }
.sda-phone h1 { font-size:20px; min-width:0; overflow-wrap:anywhere; }
.sda-phone #message,.sda-phone [data-head] { overflow-wrap:anywhere; }
.sda-phone button { touch-action:manipulation; min-width:0; white-space:normal; overflow-wrap:anywhere; }
.sda-phone header { position:sticky; top:0; background:#f0f5f7; z-index:1; }
.sda-phone #clock { min-width:50px; font-weight:bold; }
.sda-phone #connect { display:grid; gap:14px; padding:20px 0; }
.sda-phone [data-head] { font-size:14px; margin:12px 0; }
.sda-branch { border-bottom:1px solid #b7cbd6; padding:8px 0; scroll-margin-top:80px; }
.sda .sda-branch-heading { display:flex; width:100%; align-items:center; gap:14px; background:#fff; text-align:left; }
.sda-branch-heading strong { flex:0 0 auto; max-width:40%; overflow-wrap:anywhere; }
.sda-branch-heading span { min-width:0; font-weight:normal; overflow-wrap:anywhere; }
.sda .sda-done .sda-branch-heading { border-left:4px solid #198371; }
.sda-entry { padding:12px 0; }
.sda-entry [data-number-form] { display:grid; grid-template-columns:minmax(0,1fr) 72px; gap:8px; align-items:end; }
.sda-entry .sda-number-count { font-size:13px; margin:12px 0 6px; }
.sda-entry .sda-number-chips { display:flex; flex-wrap:wrap; gap:8px; }
.sda-number-chips button { background:#e3f0ec; border-color:#a7c6bc; font-variant-numeric:tabular-nums; }
.sda-entry-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:14px; }
.sda-entry-actions [data-next] { grid-column:1 / -1; background:#194d65; color:#fff; }
.sda-entry-actions [data-reload] { grid-column:1 / -1; }
.sda-phone [data-finish] { width:100%; margin-top:22px; }
@media(max-height:450px) { .sda-phone header { position:static; } }
@media(max-width:600px) {
  .sda-session-bar,.sda-groups { grid-template-columns:minmax(0,1fr); }
  .sda-session-bar section+section { border-left:0; border-top:1px solid #cbdbe2; }
  .sda th:first-child { width:52px; }
  .sda th,.sda td { padding:10px 4px; font-size:12px; }
  .sda-numbers button { padding:6px; min-width:44px; }
  .sda header { align-items:start; }
  .sda header>span { font-size:12px; }
}
