/* ISP360 NAS / RADIUS Devices — v1.0 Market Launch Polish
   Presentation-only layer. Existing NAS, RADIUS client and CoA logic remains authoritative. */

body{
  background:#f3f6fa;
  color:#183047;
  font-family:Inter,"Segoe UI",Arial,sans-serif;
  font-size:14px;
}

.main{
  margin-left:250px;
  padding:28px 30px 32px;
  max-width:1900px;
}

/* Summary cards */
.nas-v2-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:15px;
  margin-bottom:22px;
}

.nas-v2-card{
  position:relative;
  overflow:hidden;
  min-height:120px;
  padding:20px 21px;
  border:0;
  border-radius:14px;
  color:#fff;
  background:linear-gradient(115deg,#2456a5,#3875c9);
  box-shadow:0 7px 19px rgba(37,78,153,.13);
}

.nas-v2-card:nth-child(2){
  background:linear-gradient(115deg,#08766c,#159c8b);
}

.nas-v2-card:nth-child(3){
  background:linear-gradient(115deg,#6150aa,#8970c7);
}

.nas-v2-card:nth-child(4){
  background:linear-gradient(115deg,#ac6b20,#d39943);
}

.nas-v2-card:after{
  content:"";
  position:absolute;
  width:115px;
  height:115px;
  right:-30px;
  bottom:-47px;
  border:22px solid rgba(255,255,255,.06);
  border-radius:50%;
}

.nas-v2-label{
  position:relative;
  z-index:1;
  color:#eef6ff;
  font-size:10px;
  font-weight:700;
  letter-spacing:1.05px;
}

.nas-v2-value{
  position:relative;
  z-index:1;
  margin-top:13px;
  color:#fff;
  font-size:30px;
  font-weight:750;
  line-height:1.2;
  letter-spacing:-1px;
  font-variant-numeric:tabular-nums;
}

/* Panels */
.panel{
  background:#fff;
  border:1px solid #dfe7ef;
  border-radius:15px;
  padding:0;
  margin-bottom:20px;
  overflow:auto;
  box-shadow:0 4px 15px rgba(24,55,77,.035);
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  padding:18px 21px;
  margin:0;
  border-bottom:1px solid #edf1f5;
  background:#fff;
}

.topbar h2,
.panel > h2{
  margin:0;
  color:#19374e;
  font-size:15px;
  font-weight:700;
}

.topbar h2:before,
.panel > h2:before{
  content:"";
  display:inline-block;
  width:4px;
  height:17px;
  margin-right:11px;
  border-radius:3px;
  background:#258eab;
  vertical-align:-2px;
}

.panel > h2{
  padding:18px 21px;
  border-bottom:1px solid #edf1f5;
}

/* Buttons */
button{
  min-height:39px;
  border:1px solid #153b50;
  border-radius:8px;
  background:#153b50;
  color:#fff;
  padding:9px 13px;
  font:inherit;
  font-size:11px;
  font-weight:700;
  cursor:pointer;
  transition:.15s ease;
}

button:hover{
  background:#087c75;
  border-color:#087c75;
}

button.edit{
  background:#2456a5;
  border-color:#2456a5;
}

button.edit:hover{
  background:#1d477f;
  border-color:#1d477f;
}

button.danger{
  background:#a93c3c;
  border-color:#a93c3c;
}

button.danger:hover{
  background:#8b2f2f;
  border-color:#8b2f2f;
}

.secondary{
  background:#64748b;
  border-color:#64748b;
}

/* Tables */
table{
  width:100%;
  border-collapse:collapse;
  font-size:12px;
}

th{
  padding:13px 17px;
  background:#f7f9fc;
  border-bottom:1px solid #e8eef4;
  color:#587188;
  font-size:10px;
  font-weight:700;
  letter-spacing:.45px;
  text-transform:uppercase;
  white-space:nowrap;
}

td{
  padding:13px 17px;
  border-bottom:1px solid #edf2f6;
  color:#294258;
  vertical-align:middle;
  white-space:nowrap;
  font-size:12px;
}

tbody tr:hover{
  background:#f8fbfd;
}

.badge{
  display:inline-flex;
  align-items:center;
  min-height:25px;
  padding:5px 9px;
  border-radius:20px;
  font-size:10px;
  font-weight:700;
}

.ok{
  background:#e6f6ee;
  color:#237655;
}

.off{
  background:#feecec;
  color:#a13a3a;
}

.coa-ready-pill{
  background:#e6f6ee;
  color:#237655;
  font-size:9px;
  font-weight:700;
  padding:5px 9px;
  border-radius:20px;
}

.coa-off-pill{
  background:#eef2f6;
  color:#64748b;
  font-size:9px;
  font-weight:700;
  padding:5px 9px;
  border-radius:20px;
}

/* Modal */
.modal{
  background:rgba(15,35,55,.48);
  backdrop-filter:blur(2px);
}

.box{
  width:760px;
  max-width:94vw;
  max-height:92vh;
  overflow:auto;
  padding:25px;
  border-radius:16px;
  background:#fff;
  box-shadow:0 24px 60px rgba(15,35,55,.22);
}

.box h2,
.box h3{
  color:#18374e;
}

.grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:13px;
}

.field label{
  display:block;
  margin-bottom:6px;
  color:#587188;
  font-size:11px;
  font-weight:700;
}

input,
select,
textarea{
  width:100%;
  min-height:40px;
  padding:10px 12px;
  border:1px solid #d5e0e9;
  border-radius:8px;
  background:#fff;
  color:#213d54;
  font:inherit;
  font-size:12px;
  outline:none;
}

textarea{
  min-height:78px;
}

input:focus,
select:focus,
textarea:focus{
  border-color:#45a99f;
  box-shadow:0 0 0 3px rgba(69,169,159,.12);
}

.check{
  display:flex;
  align-items:center;
  gap:8px;
}

.check input{
  width:auto;
  min-height:auto;
}

.actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:18px;
}

/* Accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible{
  outline:3px solid #5ebdb5;
  outline-offset:3px;
}

/* Responsive */
@media(max-width:1100px){
  .main{
    padding:22px;
  }

  .nas-v2-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:768px){
  .main{
    margin-left:0!important;
    padding:65px 15px 20px;
  }

  .nas-v2-summary{
    grid-template-columns:1fr;
    gap:10px;
  }

  .nas-v2-card{
    min-height:104px;
    padding:18px;
  }

  .nas-v2-value{
    font-size:27px;
  }

  .topbar{
    align-items:flex-start;
    flex-direction:column;
    padding:16px;
  }

  .panel > h2{
    padding:16px;
  }

  .grid{
    grid-template-columns:1fr;
  }

  th,td{
    padding:12px 14px;
  }
}

@media(max-width:480px){
  .nas-v2-label{font-size:9px}
  .nas-v2-value{font-size:25px}
  .box{padding:18px}
}



/* ISP360 NAS V1 — FINAL sidebar/content alignment */
@media (min-width:701px){
  .main{
    margin-left:var(--sidebar-width) !important;
    width:auto !important;
    max-width:none !important;
    padding-left:24px !important;
    padding-right:24px !important;
  }
}

@media (max-width:700px){
  .main{
    margin-left:0 !important;
    width:100% !important;
    padding-left:15px !important;
    padding-right:15px !important;
  }
}
