/* WireMap Studio RC8 | Unified UI refinement; no backend or permission changes.
   Theme: retain existing navy (#15243a) and blue (#2563eb).
   Do not fetch external fonts: Windows/system Korean fonts are used. */
:root{
  --wm-font: Pretendard,"Noto Sans KR","Apple SD Gothic Neo","Malgun Gothic","Segoe UI",sans-serif;
  --wm-text:#223248;--wm-subtext:#60758c;--wm-border:#dce5f0;
  --wm-radius:10px;--wm-compact:40px;--wm-focus:#93b8f3;
  font-family:var(--wm-font);font-size:13px;letter-spacing:-.015em;
}
html{font-family:var(--wm-font);text-size-adjust:100%;-webkit-text-size-adjust:100%}
body{font-family:var(--wm-font);font-size:13px;line-height:1.55;color:var(--wm-text);-webkit-font-smoothing:antialiased}
button,input,select,textarea{font-family:inherit;letter-spacing:inherit}
button,select,input,textarea,summary{transition:border-color .14s,background-color .14s,box-shadow .14s}
:where(button,a,input,select,textarea,summary):focus-visible{outline:3px solid var(--wm-focus)!important;outline-offset:2px}
button:disabled{cursor:not-allowed}
/* Navigation */
.sidebar,.admin-nav{background:#15243a!important}
.sidebar{width:280px;min-width:280px}
.brand{height:72px;padding:16px 18px;gap:11px;border-bottom:1px solid #34465e}
.brand-icon{width:39px;height:39px;border-radius:10px;background:#2d68dc;flex-shrink:0}
.brand strong{font-size:16px;letter-spacing:-.35px;font-weight:750;line-height:1.3}
.brand small{font-size:10px;letter-spacing:-.02em;line-height:1.5;color:#9fb4d0}
.sidebar-scroll{padding:6px 14px 14px}
.sidebar .side-section{padding:14px 0}
.sidebar .section-title{margin-bottom:10px;font-size:12px;letter-spacing:0;color:#bbcbe0}
.building-block{background:#1e304b;border-color:#344b66;border-radius:10px;min-height:58px;margin-bottom:10px}
.building-block strong{font-size:13px}
.new-project-btn,.floor-line select,.small-square{min-height:40px;border-radius:8px}
.floor-line select{font-size:12px}
.sidebar .control-label{font-size:11px;margin-top:9px;color:#a5b6cd}
/* Replace repeated onboarding cards with an optional short reference. */
.quick-disclosure{padding:8px 0 12px!important;border-bottom:0!important}
.quick-disclosure>summary{list-style:none;border:1px solid #344b66;border-radius:9px;padding:10px 11px;color:#bfd1eb;font-size:12px;font-weight:700;cursor:pointer;background:#1b2e47}
.quick-disclosure>summary::-webkit-details-marker{display:none}
.quick-disclosure>summary::before{content:'?';display:inline-grid;place-items:center;margin-right:8px;width:20px;height:20px;border:1px solid #516986;border-radius:50%;font-size:11px;color:#d4e7ff}
.quick-disclosure[open]>summary{border-color:#6b99d8;background:#25436a}
.quick-disclosure .section-title{display:none}
.quick-disclosure .quick-link{margin-top:7px;margin-bottom:0;min-height:57px;padding:9px 10px}
.quick-disclosure .quick-link strong{font-size:12px}.quick-disclosure .quick-link small{font-size:11px}
.quick-disclosure .quick-help{margin-top:8px;min-height:33px;font-size:11px}
.nav-category{border-color:#34465d}
.nav-category summary{padding:12px 10px;min-height:63px;grid-template-columns:minmax(0,1fr) 22px;border-radius:9px;gap:3px}
.nav-category .category-label{font-size:13px;font-weight:700;letter-spacing:-.2px;color:#e4edfa}
.nav-category summary small{font-size:11px;line-height:1.4;letter-spacing:-.12px;color:#a1b3cb}
.nav-category .category-arrow{font-size:18px;color:#a1b3cc}
.nav-category summary:hover{background:#203853}
.nav-category[open] summary{background:#264566}
.nav-category[open] .category-label{color:white}
.nav-category[open] .category-arrow{color:#dbeafe}
.nav-category .category-body{padding:7px 4px 14px}
.category-subheading{padding:13px 7px 7px;color:#94acca;font-size:11px;font-weight:750;letter-spacing:0;border-top:1px solid #31445f;margin-top:9px}
.category-subheading:first-child{border:0;padding-top:3px;margin-top:0}
.tool-grid{gap:7px}
.tool{min-height:61px;padding:9px 4px;font-size:11.5px;gap:3px;border-radius:8px;background:#1e304b;border:1px solid #3a506d}
.tool span{font-size:19px;line-height:1.3}
.tool:hover,.device-type:hover{background:#2b476a}
.tool.active,.device-type.active{background:#244e82;border-color:#80b1f4}
.device-types{gap:7px}
.device-type{min-height:41px;border-radius:8px;gap:9px;padding:9px 10px;font-size:12px;background:#1e304b;border:1px solid #3a506d}
.device-type span{font-size:18px;width:20px;text-align:center}
.side-action{font-size:12px!important;color:#d7e2f1;border-radius:8px;padding:10px 9px!important;min-height:40px;line-height:1.5!important;white-space:normal;align-items:center}
.side-action:hover{background:#274361}
.side-action>span{font-size:16px;width:22px;flex:none}
.side-action>b{font-size:10px;font-weight:750;border-radius:5px;padding:3px 6px;white-space:nowrap}
.toggle-row{font-size:12px;line-height:1.5;min-height:30px;margin:5px 0}
.toggle-row input{width:15px;height:15px;flex-shrink:0}
.category-body .control-label{margin:14px 7px 7px}
.category-body select{min-height:39px;border:1px solid #455c76;border-radius:8px;color:#f0f5fb;background:#20324a;padding:7px 9px;width:100%;font-size:12px}
.category-body .side-range{width:calc(100% - 16px);margin:0 8px;accent-color:#80aaff}
.sidebar-foot{border-top-color:#34465e;min-height:55px;padding:12px 15px;color:#b7c7de;font-size:11px;gap:5px}
.sidebar-foot small{color:#97abc5;min-width:0;margin:0;display:block;padding:0;font-size:11px}
/* Main workspace */
.workspace{background:#f4f7fb}
.header{min-height:76px;padding:14px 24px;gap:16px;align-items:center;flex-wrap:wrap}
.header .title-area{min-width:0}
.breadcrumb{font-size:11px;color:#798da7;margin-bottom:4px}
.header h1{font-size:20px;line-height:1.3;font-weight:800;letter-spacing:-.55px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.header .proto{margin:0;font-size:10px;padding:4px 8px;letter-spacing:0;border-radius:6px}
.header-actions{gap:8px;flex-wrap:wrap;justify-content:flex-end}
.search{width:clamp(240px,26vw,360px);height:40px;background:#f8fafd;border-color:#d9e2ee;border-radius:9px}
.search input{font-size:12px;color:var(--wm-text)}
.btn,.top-overflow summary{display:inline-flex;align-items:center;justify-content:center;min-height:39px;padding:8px 13px;font-size:12px;border-radius:8px;font-weight:700;line-height:1.5}
.btn.primary{background:#2563eb;color:white}
.header-actions .save-main{min-height:40px;min-width:86px}
.top-overflow summary{min-height:40px;gap:7px}
.top-overflow-body{width:236px;top:46px;padding:9px;gap:0;border:1px solid #dbe4ed;box-shadow:0 15px 35px #172b4730}
.overflow-group{display:grid;gap:5px;padding:7px 4px}
.overflow-group+.overflow-group{border-top:1px solid #e6edf5;margin-top:5px;padding-top:11px}
.overflow-label{font-weight:750;font-size:11px;color:#73869d;padding:0 8px 3px}
.top-overflow-body .btn,.top-overflow-body a.btn{width:100%;justify-content:flex-start;min-height:37px;white-space:normal;font-size:12px}
.top-overflow-body .user-chip-sm{padding:5px 8px;font-size:11px;color:#526b87}
/* Primary actions - one predictable place for core editing */
.workflow-toolbar{margin:13px 24px 0;padding:12px 15px;min-height:70px;gap:19px;border-radius:11px}
.workflow-caption{flex:0 0 177px}.workflow-caption strong{font-size:13px;color:#243b56}
.workflow-caption span{font-size:11px;color:#6a7e95;line-height:1.45}
.workflow-actions{gap:8px;align-items:center}
.flow-btn{min-height:41px;padding:9px 15px;border-radius:8px;font-weight:750;font-size:12px;background:#f8fbff;border-color:#d7e1ed}
.flow-btn.is-active{background:#e3edff;border-color:#7cacf1;color:#164ba0;box-shadow:inset 0 0 0 1px #a4c4f7}
.flow-help{font-size:12px;font-weight:650;margin-left:auto;min-height:35px}
.stats{padding:12px 24px 12px;gap:10px}
.stat{padding:11px 15px;min-height:67px;border-radius:11px;gap:12px}
.stat-ico{width:38px;height:38px;flex:none;border-radius:9px;font-size:18px}
.stat small{font-size:11px;margin-bottom:1px;line-height:1.35;color:#60758d}
.stat strong{font-size:21px;line-height:1.3;font-weight:800;font-variant-numeric:tabular-nums}
.editor-zone{margin:0 24px;border-color:#dce5f0;border-radius:12px;min-height:490px}
.canvas-bar{min-height:57px;padding:10px 15px;gap:12px}
.canvas-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.canvas-heading strong{font-size:13px;color:#263e5a}
.canvas-heading small{font-size:11px;line-height:1.5;color:#72859a}
.canvas-bar-right{gap:7px;justify-content:flex-end}
.canvas-bar-right .btn.tiny{min-height:31px;padding:5px 10px}
.canvas-bar-right #zoom-value{min-width:37px;text-align:center;font-size:12px;font-variant-numeric:tabular-nums}
.edit-mode{font-size:11px;border-radius:6px;margin-right:1px;padding:6px 9px}
.canvas-wrap{background:#f9fbfe}
.canvas-footer{font-size:11px;line-height:1.5;gap:12px;flex-wrap:wrap}
.footer{font-size:11px;color:#8190a2;padding-top:12px;padding-bottom:12px}
/* Shared dialogs/forms | consistent rhythm and focus */
.modal{border-radius:15px;box-shadow:0 24px 70px #142a4738;max-width:min(720px,calc(100vw - 28px))}
.modal-head{border-bottom:1px solid #e6edf5}
.modal h2,.dialog h2{letter-spacing:-.45px;font-size:18px}
.modal-body,.dialog-body{font-size:13px;line-height:1.55}
.modal-body input,.modal-body select,.modal-body textarea,.dialog-body input,.dialog-body select,.dialog-body textarea{border-radius:8px;font-size:12px;min-height:39px}
.modal-body label,.field label{font-size:12px;font-weight:700}
.modal-actions,.dialog-actions{gap:8px}
.cable-advanced{background:#f8fbfe;border-color:#dae5f0}
.cable-advanced summary{font-size:12px}
/* Admin console - same spacing, typography and visual language */
.admin-body{font-size:13px}
.admin-nav{width:265px;min-height:100vh;padding:17px 13px}
.admin-nav .nav-brand{padding:6px 9px 19px;border-bottom:1px solid #34465d}
.nav-brand strong{font-size:15px}.nav-brand small{font-size:11px;line-height:1.45}
.admin-nav .nav-caption-group{margin:20px 7px 6px;padding:14px 8px 0;border-top:1px solid #34465d;color:#a2b7d0;font-size:11px;font-weight:750;letter-spacing:0}
.admin-nav .nav-caption-group:first-of-type{margin-top:13px;border-top:0;padding-top:0}
.nav-item{display:flex;align-items:center;min-height:42px;width:100%;text-align:left;border:0;border-left:3px solid transparent;border-radius:8px;margin:1px 0;padding:9px 12px;font-size:12px;color:#cbd8e7;line-height:1.45}
.nav-item:hover{background:#243d5c;color:white}
.nav-item.active{background:#294b75;color:white;border-left-color:#85b6ff}
.nav-bottom{gap:12px;padding:17px 10px 0;margin-top:auto;border-color:#34465d}
.nav-bottom a,.nav-bottom button{font-size:12px;min-height:28px;display:flex;align-items:center;color:#cad8ec}
.admin-head{min-height:115px;padding:22px 32px}
.admin-head h1{font-size:22px;letter-spacing:-.5px;font-weight:800}
.admin-head .muted{font-size:12px;margin:5px 0 0}
.admin-local-notice{margin:17px 32px -4px;background:#eef5ff;border:1px solid #cee0f5;border-radius:9px;padding:11px 15px;color:#335c8c;font-size:12px;line-height:1.5;font-weight:650}
.admin-local-notice::before{content:'●';color:#2861b1;margin-right:9px}
.admin-content{padding:23px 32px;max-width:1450px}
.cards{gap:12px;margin-bottom:17px}
.kpi,.panel{border:1px solid #dfe7f1;border-radius:11px;box-shadow:0 1px 2px #142f4b08}
.kpi{padding:18px 19px}.kpi small{font-size:12px;color:#637991}.kpi strong{font-size:26px;margin-top:6px;letter-spacing:-.6px;font-weight:800}
.panel{padding:20px 22px;margin-bottom:15px}
.panel-head{padding:0 0 13px;margin-bottom:12px;gap:12px}
.panel h2{font-size:15px;font-weight:800;letter-spacing:-.2px}
.panel p{font-size:12px;color:#5f7187;line-height:1.75}
.admin-content table{font-size:12px;line-height:1.5;min-width:580px}
.panel{overflow-x:auto}
th,td{padding:12px 12px}
th{font-size:12px;color:#586d85;font-weight:750;background:#f5f8fc;white-space:nowrap}
.tag{padding:5px 8px;font-size:11px}
.dialog{border-radius:13px}.dialog-head{padding:17px 21px;align-items:center}
.dialog-body{padding:22px}.dialog-actions{padding:15px 21px}
.dialog-body .field{gap:6px}
.dialog-body .field input,.dialog-body .field select{font-size:12px;min-height:39px}
.auth-body{font-family:var(--wm-font)}
.login-card{padding:36px 36px 30px;border-radius:16px;box-shadow:0 16px 45px #1e3a5c1a}
.login-card h1{font-size:26px;font-weight:800;letter-spacing:-.8px}
.login-card label{font-size:12px}.login-card input{min-height:43px;font-size:13px}
.login-card .notice{font-size:11px;line-height:1.8;color:#6e8298}
/* Devices and users with small screens should still access controls */
@media(max-width:1330px){.workflow-toolbar{align-items:flex-start;flex-direction:column;gap:8px}.workflow-caption{flex:none}.workflow-actions{width:100%}.header-actions .search{width:min(320px,34vw)}}
@media(max-width:1040px){.sidebar{width:252px;min-width:252px}.header{padding:13px 17px}.stats{padding:11px 17px}.editor-zone{margin:0 17px}.workflow-toolbar{margin:12px 17px 0}.admin-nav{width:228px}.admin-content{padding:22px}.admin-head{padding:22px}.admin-local-notice{margin:15px 22px -4px}}
@media(max-width:900px){.app{display:block}.sidebar{width:100%;min-width:0;height:auto;position:relative}.brand{height:auto;padding:12px 16px}.sidebar-scroll{max-height:360px;overflow:auto;padding:0 15px 14px}.sidebar .side-section{padding:12px 0}.quick-disclosure{max-width:none}.sidebar-foot{display:none}.header-actions{width:100%;justify-content:flex-start}.header-actions .search{width:min(400px,100%)}.workflow-toolbar{margin:10px 14px 0}.stats{padding:10px 14px;grid-template-columns:repeat(2,minmax(0,1fr))}.editor-zone{margin:0 14px}.admin-content{padding:18px}.admin-head{padding:17px}.admin-local-notice{margin:12px 18px -4px}}
@media(max-width:680px){.admin-nav{width:100%;min-height:auto}.admin-head{gap:10px}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-content table{min-width:520px}.panel{padding:15px}.workflow-actions .flow-btn{flex:1 1 calc(50% - 5px)}.workflow-actions .flow-help{margin-left:0}.workflow-toolbar{padding:12px}.header-actions .search{flex:1 1 100%;max-width:none}.canvas-bar-right{justify-content:flex-start}.modal-body,.dialog-body{padding:15px}}
@media(max-width:450px){.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.stat{min-height:64px;padding:9px;gap:7px}.stat-ico{width:30px;height:30px;font-size:15px}.stat strong{font-size:20px}.stat small{font-size:10.5px}.header h1{font-size:18px}.cards{gap:8px}.kpi{padding:13px}.kpi strong{font-size:21px}.login-card{padding:26px 22px}}
/* Resolve the legacy RC4 header stacking rule: desktop actions align on the same baseline. */
@media(min-width:1100px){
  .header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:18px}
  .header .title-area{flex:0 1 auto;min-width:0;margin:0}
  .header-actions{width:auto;flex:0 1 auto;flex-wrap:nowrap;justify-content:flex-end}
  .header .search{flex:0 1 auto;width:clamp(230px,26vw,365px);max-width:none}
}
@media(min-width:900px) and (max-width:1099px){
  .header{display:flex;flex-direction:column;align-items:stretch;gap:9px}
  .header-actions{width:100%;justify-content:flex-start}
}
/* Context-specific tool presentation: avoid one lonely 1/3-width button. */
#category-devices .tool-grid{grid-template-columns:1fr}
#category-devices .tool[data-tool="device"]{min-height:42px;display:flex;flex-direction:row;justify-content:flex-start;text-align:left;gap:10px;padding:7px 13px;font-size:12px}
#category-devices .tool[data-tool="device"] span{font-size:19px}
#category-cables .tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
