html,
body,
button,
input,
select,
textarea,
table {
  font-family:"Noto Sans Thai",ui-sans-serif,system-ui,sans-serif;
}

.noc-page-head{
  min-height:68px;
  padding:12px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  border-bottom:1.5px solid var(--line);
  background:#fff;
}

.noc-page-title h1{
  margin:0;
  font-size:22px;
  font-weight:800;
  line-height:1.2;
}

.noc-page-title p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:12.5px;
}

.noc-badge{
  padding:7px 12px;
  border-radius:18px;
  background:#e8f6fd;
  color:#087fb8;
  font-size:12px;
  font-weight:800;
}

.noc-dashboard-workspace{
  border-radius:12px;
}

.noc-summary-grid{
  margin-bottom:14px;
}

.summary-link{
  color:inherit;
  text-decoration:none;
}

.summary-link:hover{
  border-color:#8fb2c9;
  box-shadow:0 4px 12px rgba(30,75,110,.08);
}

.summary-icon{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:8px;
  background:rgba(255,255,255,.72);
  font-weight:850;
  color:var(--navy);
}

.summary-label{
  color:#58718a;
  font-size:12.5px;
  font-weight:700;
}

.summary-value{
  margin-top:2px;
  color:var(--ink);
  font-size:25px;
  line-height:1;
  font-weight:850;
}

.summary-note{
  margin-top:4px;
  color:#7b8fa3;
  font-size:11.5px;
}

.noc-runtime-ok{
  color:var(--green);
  font-size:19px;
}

.noc-section-title{
  margin:0 0 12px;
  font-size:16px;
  font-weight:800;
}

.quick-actions{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

.quick-action{
  min-height:64px;
  padding:11px 14px;
  border:1px solid #c8d8e4;
  border-radius:12px;
  background:#f8fbfd;
}

.quick-action strong{
  display:block;
  font-size:14px;
}

.quick-action span{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:12px;
}

.top-system-status{
  display:flex;
  align-items:center;
  gap:7px;
  height:36px;
  padding:0 12px;
  border:1px solid rgba(255,255,255,.24);
  border-radius:10px;
  color:#d8fff0;
  font-size:12px;
  font-weight:750;
}

.top-system-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#26ce78;
  box-shadow:0 0 0 3px rgba(38,206,120,.14);
}

.user-pop form{
  margin:0;
}

.user-pop button{
  font-family:"Noto Sans Thai",sans-serif;
}

.footer{
  padding:0 20px;
}

.noc-public{
  min-height:100vh;
  height:auto;
  display:block;
  overflow:auto;
  background:#eef6fb;
}

.login-stage{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
}

.login-card{
  width:min(420px,100%);
  padding:26px;
  border:1px solid #c8d8e4;
  border-radius:16px;
  background:#fff;
  box-shadow:0 14px 35px rgba(17,52,84,.12);
}

.login-brand{
  text-align:center;
  margin-bottom:22px;
}

.login-brand img{
  max-width:230px;
  max-height:70px;
  object-fit:contain;
}

.login-brand h1{
  margin:14px 0 0;
  font-size:21px;
}

.login-brand p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:12.5px;
}

.login-card input{
  width:100%;
  min-height:40px;
  padding:7px 10px;
  border:1px solid #b8cad8;
  border-radius:9px;
}

.login-card button{
  width:100%;
  min-height:40px;
  border:0;
  border-radius:9px;
  background:var(--cyan-dark);
  color:#fff;
  font-weight:800;
}

@media(max-width:900px){
  .quick-actions{grid-template-columns:1fr}
  .top-system-status{display:none}
}

/* =========================================================
   NOC HEADER / NAV REFINEMENT
   ========================================================= */

.primary-nav .nav-item{
  min-width:118px;
}

.primary-nav .nav-refresh{
  margin-left:auto;
  min-width:108px;
}

.primary-nav .nav-icon{
  width:21px;
  height:21px;
  color:var(--menu-icon,#8fd9ff);
}

.primary-nav .nav-icon svg{
  width:21px;
  height:21px;
  stroke:currentColor;
  stroke-width:1.9;
}

.nav-dashboard{--menu-icon:#66d2ff}
.nav-customers{--menu-icon:#ffd166}
.nav-sites{--menu-icon:#65df9b}
.nav-routers{--menu-icon:#bd9cff}
.nav-monitoring{--menu-icon:#ff8585}
.nav-history{--menu-icon:#78c7ff}
.nav-support{--menu-icon:#ffb05e}
.nav-reports{--menu-icon:#5ed7c8}
.nav-refresh{--menu-icon:#a6e56d}

.primary-nav .nav-item.active .nav-icon{
  filter:drop-shadow(0 0 4px rgba(255,255,255,.20));
}

.primary-nav .nav-item.disabled .nav-icon{
  opacity:.70;
}

.language button{
  font-family:"Noto Sans Thai",sans-serif;
}

/* =========================================================
   SHARED ENTITY 2-TAB WORKFLOW
   Radius NAS authority adapted to AomTang NOC
   ========================================================= */

.entity-workspace{
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:#fff;
  border:1px solid #d7e3e9;
  border-radius:14px;
  box-shadow:0 4px 16px rgba(35,58,74,.05);
}

.entity-title-bar{
  flex:0 0 auto;
  min-height:54px;
  padding:8px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:#fff;
  border-bottom:1px solid #e2e8f0;
}

.entity-title-main{
  font-size:.94rem;
  font-weight:700;
  color:#1e293b;
}

.entity-subtitle{
  margin-top:1px;
  font-size:.78rem;
  font-weight:400;
  color:#64748b;
}

.entity-tab-row{
  flex:0 0 54px;
  min-height:54px;
  display:flex;
  align-items:stretch;
  background:#f8fafc;
  border-bottom:1px solid #e2e8f0;
}

.entity-sub-tabs{
  display:flex;
  align-items:stretch;
  gap:12px;
  padding:0 14px;
}

.entity-sub-tab{
  min-height:54px;
  padding:0 15px;
  display:flex;
  align-items:center;
  color:#64748b;
  font-size:.80rem;
  font-weight:500;
  white-space:nowrap;
  border-bottom:3px solid transparent;
}

.entity-sub-tab:hover{
  color:var(--cyan-dark);
}

.entity-sub-tab.active{
  color:var(--cyan-dark);
  font-weight:700;
  border-bottom-color:var(--cyan);
}

.entity-tab-actions{
  min-height:54px;
  margin-left:auto;
  padding:8px 14px 8px 20px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
}

.entity-action{
  height:36px;
  min-height:36px;
  padding:0 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  border:1px solid #bdd0de;
  border-radius:6px;
  background:#fff;
  color:#17304b;
  font-size:.80rem;
  font-weight:650;
}

.entity-action.primary{
  min-width:142px;
  color:#fff;
  background:var(--cyan-dark);
  border-color:var(--cyan-dark);
}

.entity-body{
  flex:1 1 auto;
  min-height:0;
  padding:10px 14px 12px;
  overflow:auto;
  background:#eef2f4;
}

.entity-table-shell{
  overflow:hidden;
  background:#fff;
  border:1px solid #d7e3e9;
  border-radius:12px;
  box-shadow:0 3px 12px rgba(35,58,74,.04);
}

.entity-table{
  width:100%;
  table-layout:fixed;
  border-collapse:collapse;
  font-size:.82rem;
}

.entity-table th,
.entity-table td{
  border-right:1px solid #d5e0e6;
  border-bottom:1px solid #d5e0e6;
}

.entity-table th:last-child,
.entity-table td:last-child{
  border-right:0;
}

.entity-table thead th{
  height:31px;
  padding:4px 7px;
  background:#e3eef3;
  color:#435d6e;
  font-size:.78rem;
  font-weight:700;
  line-height:1.05;
  text-align:center;
}

.entity-table tbody td{
  height:27px;
  padding:3px 8px;
  color:#2b4050;
  font-size:.82rem;
  font-weight:500;
  line-height:1.05;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.entity-table tbody tr:nth-child(odd) td{background:#fff}
.entity-table tbody tr:nth-child(even) td{background:#f7fafb}
.entity-table tbody tr:hover td{background:#edf7f7}

.entity-link{
  color:#0087c9;
  font-weight:600;
}

.entity-link:hover{
  color:#0369a1;
  text-decoration:underline;
}

.entity-empty{
  height:180px !important;
  text-align:center;
  color:#64748b !important;
  background:#fff !important;
}

.entity-form-card{
  max-width:760px;
  padding:18px;
  background:#fff;
  border:1px solid #d7e3e9;
  border-radius:12px;
}

.entity-form-card form p{
  margin:0 0 13px;
}

.entity-form-card label{
  display:block;
  margin-bottom:4px;
  color:#435d6e;
  font-size:.78rem;
  font-weight:700;
}

.entity-form-card input,
.entity-form-card select,
.entity-form-card textarea{
  width:100%;
  min-height:38px;
  padding:6px 9px;
  border:1px solid #b8cad8;
  border-radius:7px;
  background:#fff;
}

.entity-form-actions{
  margin-top:18px;
  display:flex;
  gap:8px;
}
