/* Shared identity for the management console and its login page. */
.brand-lockup{display:flex;align-items:center;gap:14px;min-width:0}
.brand-mark{display:block;width:56px;height:56px;flex:0 0 auto;object-fit:contain}
.brand-copy{min-width:0}
.brand-copy h1{line-height:1.35}
.login-brand{margin-bottom:26px;gap:12px}
.login-brand h1{margin:0;font-size:20px;font-weight:700;letter-spacing:-.025em}
.login-brand .sub{margin:6px 0 0;line-height:1.55}
.login-note{margin:20px 0 0;color:var(--muted);font-size:12px;line-height:1.6;text-align:center}
.board-tools{flex-wrap:wrap}
.board-tools .bsearch{flex:1 1 220px;min-width:180px}
.toolbar input,.toolbar select,.form input,.form select,.form textarea,.tplrow input{min-width:0}
.tablewrap{max-width:100%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
.tcard,.lkcard,.rsbatch,.brand-copy{min-width:0}
.rsbatch .bhead>div:first-child{min-width:0;flex:1 1 280px}
.rsbatch h3,.rsbatch .bnote,.rrow .mk,.rrow .own{overflow-wrap:anywhere}
#tkTitle{display:flex;justify-content:space-between;align-items:center;gap:12px}
.ticket-title-main,.ticket-title-sub{min-width:0;overflow-wrap:anywhere}
.ticket-title-sub{color:var(--muted);font-weight:400;font-size:14px}
.tkrow{grid-template-columns:52px minmax(0,1fr)}
.tkrow input,.syncrow-field input,.syncrow-field select,.syncrow-field textarea{min-width:0}
@media(max-width:980px){
  .wrap{padding:24px}
  .rrow{
    grid-template-columns:24px minmax(0,1fr) 108px;
    grid-template-areas:"seq tb st" ". own mk" ". note note";
  }
}
@media(max-width:640px){
  .wrap{padding:20px 16px}
  header.top{gap:14px;margin-bottom:16px}
  .brand-lockup{gap:10px;max-width:100%}
  .brand-mark{width:48px;height:48px}
  .title h1{font-size:18px}
  .title p{font-size:12px}
  .stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;gap:8px}
  .stat{min-width:0;padding:10px 8px}
  .stat b{font-size:22px}
  .stat span{font-size:11px}
  .userbox{width:100%}
  #whoami{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;gap:2px}
  .tab{padding:9px 4px;font-size:13px;white-space:nowrap}
  .toolbar,.board-tools{padding:12px;gap:8px;align-items:stretch}
  .toolbar input[type=search]{width:100%;min-width:0;flex:1 1 100%}
  .toolbar select{min-width:0;flex:1 1 calc(50% - 4px)}
  .toolbar>.btn{flex:1 1 auto;padding:9px 10px}
  .toolbar>.spacer,.board-tools>.spacer{display:none}
  #viewBoard .board-tools>select,#viewBoard .board-tools>.bsearch{width:100%;min-width:0;flex:1 1 100%}
  #bCount{width:100%;line-height:1.6}
  #viewBoard .board-tools>.btn{flex:1 1 auto;white-space:normal}
  #viewLinks .board-tools{justify-content:space-between;align-items:center}
  .tcard,.rsbatch{padding:16px 14px}
  .tcard h4{font-size:16px;line-height:1.5}
  .lkgrid{grid-template-columns:minmax(0,1fr)}
  .lkcard .lkt{align-items:flex-start}
  .lkcard .lkname{min-width:0}
  .pager{gap:6px;justify-content:center;padding:10px 0}
  .pager button{padding:7px 10px}
  .empty{padding:32px 16px}
  .mask{padding:16px}
  .modal{max-height:calc(100dvh - 32px)}
  .modal h3{padding:16px}
  #tkTitle{flex-direction:column;align-items:flex-start;gap:6px}
  .form{padding:16px;grid-template-columns:minmax(0,1fr);gap:12px}
  .form .field.full{grid-column:1/-1}
  .modal .foot{padding:12px 16px;gap:8px;flex-wrap:wrap}
  .tkhead{padding:14px 16px 6px}
  .syncrow-head{flex-wrap:wrap;align-items:flex-start}
  .syncrow-title{width:100%}
  .steps{padding:4px 16px 8px}
  .step-row{
    grid-template-columns:22px minmax(0,1fr);
    grid-template-areas:"seq nm" ". st" ". own" ". note";
  }
  .step-row .nm{overflow-wrap:anywhere}
  .rsbatch .btotal{width:100%;min-width:0;margin-left:0;text-align:left}
  .rstage .shead .sbtns{width:100%;margin-left:0}
  .rstage .shead .sbtns button{flex:1;padding:8px 6px}
  .rrow{
    grid-template-columns:22px minmax(0,1fr);
    grid-template-areas:"seq tb" ". own" ". st" ". mk" ". note";
    padding:12px 10px;
  }
  .rrow .mk:empty{display:none}
  input[type=text],input[type=search],input[type=number],input[type=password],
  .form input,.form select,.form textarea,.step-row input[data-stepname],.step-row input[data-owner],
  .step-row input[data-note],.step-row select,.step-row .ct-agent-mode select,.rrow .note,.rrow select,.tplrow input,.tkrow input,
  .syncrow-field input,.syncrow-field select,.syncrow-field textarea{font-size:16px}
}
