/* WireMap Studio RC28 — visual language shared with Jinju Asset Manager.
   Changes only navigation, spacing and chrome; drawing coordinates are untouched. */
:root {
  --wm28-navy:#0d1b3a;
  --wm28-navy-top:#0f2148;
  --wm28-primary:#2257d6;
  --wm28-text:#172033;
  --wm28-muted:#6f7c91;
  --wm28-line:#e2e8f0;
  --wm28-bg:#f4f7fb;
  --wm28-radius:12px;
}
body {font-family:Pretendard,"Noto Sans KR","Malgun Gothic",system-ui,sans-serif;letter-spacing:-.1px}
body:not([data-theme="dark"]) {background:var(--wm28-bg)}
button,select,input {font-family:inherit}
button:focus-visible,select:focus-visible,input:focus-visible,a:focus-visible,summary:focus-visible {
  outline:3px solid #8ab4ff;outline-offset:2px;
}
/* Drawing / general dashboard: full-height navy navigation and white utility bar. */
.app {padding:0!important;gap:0!important;align-items:stretch!important;min-height:100vh;background:var(--wm28-bg)}
.app>.sidebar, body.wm-simple-mode .app>.sidebar {
  background:linear-gradient(180deg,var(--wm28-navy-top),#0b1733)!important;
  width:252px!important;min-width:252px!important;
  height:100vh!important;top:0!important;position:sticky!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;
}
.sidebar .brand {min-height:84px;padding:17px 18px;border-bottom:1px solid #294064}
.sidebar .brand-icon,.admin-nav .logo.small,.auth-body .logo {
  background:linear-gradient(135deg,#3171e5,#1b4cad)!important;
  box-shadow:0 5px 14px #071e5226;
}
.sidebar .brand strong,.admin-nav .nav-brand strong{font-size:15px;letter-spacing:-.25px}
.sidebar .brand small,.admin-nav .nav-brand small{font-size:11px;color:#b1c5e0}
.sidebar .sidebar-scroll{padding:12px 12px 20px}
.sidebar .side-section{border-color:#2a3d59}
.sidebar .section-title,.sidebar .category-subheading{letter-spacing:.02em;color:#a9c0e0}
.sidebar .nav-category{border-color:#293e60!important}
.sidebar .nav-category>summary {border-radius:9px!important;min-height:58px!important}
.sidebar .nav-category>summary:hover{background:#1a345d!important}
.sidebar .nav-category[open]>summary{background:#254678!important;box-shadow:inset 3px 0 0 #80b2ff!important}
.sidebar .nav-category>summary .category-label{color:#eef4ff;font-weight:750}
.sidebar .new-project-btn,.sidebar .side-action,.sidebar .tool{border-radius:9px}
.sidebar .sidebar-foot{background:#0a1630;border-top:1px solid #2a3d59}
.app .workspace{padding:0 24px 28px!important;gap:16px!important;min-width:0;flex:1}
.workspace>.header{
  position:sticky;top:0;z-index:12;min-height:80px;
  margin:0 -24px 0!important;padding:14px 24px!important;
  background:#fff!important;border-radius:0!important;
  border:0!important;border-bottom:1px solid var(--wm28-line)!important;
  box-shadow:0 4px 16px #203b5908!important;
}
.workspace .breadcrumb{color:#8190a4;font-size:11px}
.workspace .header h1{font-size:22px;color:var(--wm28-text);letter-spacing:-.7px}
.workspace .header .proto{background:#ebf2ff;color:#2859b9}
.workspace>.building-dashboard,.workspace>.workflow-toolbar,.workspace>.stats,
.workspace>.cable-visibility,.workspace>.editor-zone,.workspace>.rc25-metric-summary {
  border:1px solid var(--wm28-line)!important;background:#fff;
  border-radius:var(--wm28-radius)!important;box-shadow:0 5px 20px #1f2d4a08!important;
}
.workspace>.building-dashboard{margin-top:4px!important}
.workspace>.stats{gap:12px;padding:12px!important}
.workspace .stat{border-radius:10px;border-color:#edf1f7;background:#fff;min-height:78px}
.workspace .stat-ico{background:#ecf3ff;border-radius:10px}
.workspace .dash-controls{gap:10px}
.workspace .dash-controls label{font-size:12px;color:#63758e}
.workspace .dash-controls select,.workspace .search{border-color:#d8e2ef;background:#fff}
.workspace .workflow-toolbar{padding:13px 17px!important}
.workspace .flow-btn{border-radius:9px}
.workspace .cable-vis-chip{border-radius:9px}
.workspace .wm22-editor-label{padding:7px 2px!important}
.workspace .wm22-drawing-tip{color:#49668f;font-size:11px;font-weight:650}
.workspace .canvas-wrap{background:#f8fbff}
.workspace .canvas-hint {font-size:11px}
.workspace .btn.primary,.workspace .flow-btn.active{background:var(--wm28-primary);border-color:var(--wm28-primary);color:#fff}
.workspace .btn,.workspace .flow-btn{transition:background-color .15s ease,border-color .15s ease}
.workspace .btn:not(.primary):hover,.workspace .flow-btn:hover{background:#edf4ff;border-color:#a9c6f4}
.workspace .footer{border:0!important;box-shadow:none!important}
/* Administrator: same navy sidebar, light header and card spacing as main dashboard. */
.admin-body{background:var(--wm28-bg);align-items:stretch}
.admin-body>.admin-nav{
  position:sticky;top:0;align-self:flex-start;height:100vh;min-height:100vh;
  background:linear-gradient(180deg,var(--wm28-navy-top),#0b1733)!important;
  color:#e8f0fc!important;width:252px!important;min-width:252px!important;
  padding:17px 13px 20px!important;overflow-y:auto;
}
.admin-nav .nav-brand{padding:3px 9px 19px;min-height:65px;border-bottom:1px solid #2c4064}
.admin-nav .nav-caption{margin:22px 11px 8px;color:#93b2db;font-size:10px;font-weight:800;letter-spacing:.065em}
.admin-nav .nav-item{display:block;width:100%;text-align:left;color:#cedbf0!important;background:transparent!important;border:0!important;border-left:3px solid transparent!important;border-radius:8px;padding:12px 12px;font-size:13px;font-weight:700;min-height:44px}
.admin-nav .nav-item:hover{background:#1b3458!important;color:#fff!important}
.admin-nav .nav-item.active{background:#264777!important;color:#fff!important;border-left-color:#84b4ff!important}
.admin-nav .nav-bottom{border-top:1px solid #2c4064;margin-top:auto;padding:18px 11px 0}
.admin-nav .nav-bottom a,.admin-nav .nav-bottom button{color:#b7cbe7}
.admin-body>.admin-main{flex:1;min-width:0}
.admin-main>.admin-head{
  position:sticky;top:0;z-index:8;min-height:80px;padding:16px 28px!important;
  background:#fff!important;border:0!important;border-bottom:1px solid var(--wm28-line)!important;
  border-radius:0!important;box-shadow:0 4px 16px #203b5908!important;
}
.admin-head h1{font-size:22px;color:var(--wm28-text)}
.admin-head .user-chip{background:#edf4ff;border:1px solid #dbe8fa;border-radius:10px;padding:10px 13px}
.admin-main>.admin-local-notice{
  margin:20px 28px 0!important;padding:13px 17px!important;
  background:#ecf4ff!important;border:1px solid #d3e5ff!important;
  border-radius:10px!important;box-shadow:none!important;color:#2b527d;font-size:12px;
}
.admin-main>.admin-content{padding:18px 28px 32px!important;max-width:none!important;background:transparent!important;border:0!important;box-shadow:none!important}
.admin-content .cards{gap:14px;margin-bottom:18px}
.admin-content .kpi,.admin-content .panel{background:#fff;border:1px solid var(--wm28-line);border-radius:12px!important;box-shadow:0 5px 20px #1f2d4a08;padding:21px}
.admin-content .kpi small{color:#7c8aa2}
.admin-content .kpi strong{color:#17315a;font-weight:850}
.admin-content .panel-head{min-height:36px}
.admin-content th{background:#f7f9fc;color:#61758e}
.admin-content td{color:#263850}
.admin-content .btn.primary{background:var(--wm28-primary)!important;border-color:var(--wm28-primary)!important;color:#fff!important}
.admin-content .access-heading{border-radius:12px}
.admin-content .access-rule-row{border-color:#e9eef5}
/* Authentication and password change share the same brand system. */
.auth-body{background:radial-gradient(circle at 50% -10%,#dceafe,transparent 50%),var(--wm28-bg)!important;padding:24px}
.auth-body .login-card{width:min(440px,100%);border:1px solid var(--wm28-line);border-radius:15px!important;box-shadow:0 18px 60px #10234918!important;padding:36px}
.auth-body .login-card h1{color:#142742;font-size:27px}
.auth-body .login-card .notice{color:#77879d;text-align:left;line-height:1.8}
.auth-body .login-card .primary-btn{background:var(--wm28-primary);border-radius:10px;min-height:47px}
.auth-body .login-card input{border-radius:9px}
/* Respect the pre-existing opt-in dark mode within the drawing dashboard. */
html[data-theme="dark"] .app,html[data-theme="dark"] .workspace{background:#121b2b}
html[data-theme="dark"] .workspace>.header{background:#17212d!important;border-bottom-color:#30445a!important}
html[data-theme="dark"] .workspace>.building-dashboard,html[data-theme="dark"] .workspace>.workflow-toolbar,
html[data-theme="dark"] .workspace>.stats,html[data-theme="dark"] .workspace>.cable-visibility,
html[data-theme="dark"] .workspace>.editor-zone{background:#17212d!important;border-color:#30445a!important}
html[data-theme="dark"] .workspace .stat{background:#1b2938;border-color:#30445a}
html[data-theme="dark"] .workspace .header h1{color:#e7eef9}
@media(max-width:1100px){
  .app>.sidebar,body.wm-simple-mode .app>.sidebar{width:235px!important;min-width:235px!important}
  .admin-body>.admin-nav{width:235px!important;min-width:235px!important}
  .app .workspace{padding:0 15px 22px!important}
  .workspace>.header{margin:0 -15px!important;padding:12px 15px!important}
  .admin-main>.admin-local-notice{margin:15px 18px 0!important}
  .admin-main>.admin-content{padding:15px 18px 28px!important}
}
@media(max-width:900px){
  .app{display:block!important}
  .app>.sidebar,body.wm-simple-mode .app>.sidebar{
    position:relative!important;width:100%!important;min-width:0!important;
    height:auto!important;max-height:none!important;border-radius:0!important;
  }
  .sidebar .sidebar-scroll{max-height:none}
  .app .workspace{padding:0 12px 20px!important}
  .workspace>.header{margin:0 -12px!important;position:relative;padding:14px 12px!important}
  .admin-body{display:block}
  .admin-body>.admin-nav{position:relative;width:100%!important;min-width:0!important;height:auto;min-height:auto;padding:12px!important}
  .admin-nav .nav-caption{margin:12px 7px 5px}
  .admin-nav .nav-item{display:inline-flex;width:auto;min-height:39px;margin:3px 3px}
  .admin-nav .nav-bottom{margin-top:12px}
  .admin-main>.admin-head{position:relative}
}
@media(max-width:600px){
  .admin-main>.admin-head{padding:16px!important}
  .admin-main>.admin-local-notice{margin:12px!important}
  .admin-main>.admin-content{padding:12px!important}
  .admin-content .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .admin-content .kpi,.admin-content .panel{padding:15px}
  .auth-body .login-card{padding:27px 23px}
  .workspace .wm22-drawing-tip{display:block;font-size:10px}
}
