/* =========================================================
   FA-NET footer / server status
   left | center | security
   ========================================================= */

#systemFooter .system-footer-inner{
  width:100% !important;
  max-width:none !important;

  display:grid !important;
  grid-template-columns:190px minmax(0,1fr) 190px !important;

  align-items:center !important;
  gap:16px !important;

  padding:0 18px !important;
  box-sizing:border-box !important;
}

/* 左端 */
#systemFooter .sv8-left{
  grid-column:1;
  display:flex;
  justify-content:flex-start;
  align-items:center;
  min-width:0;
}

/* 中央 */
#systemFooter .sv8-center{
  grid-column:2;

  display:flex;
  justify-content:center;
  align-items:center;
  gap:18px;

  min-width:0;
  text-align:center;
}

#systemFooter .sv8-center .system-footer-text{
  min-width:0;
}

/* 右側 SiteLock */
#systemFooter #eaSiteLockFooter{
  grid-column:3;
  display:flex !important;
  justify-content:flex-end !important;
  align-items:center !important;
  margin:0 !important;
  min-width:0;
}

/* サーバー状態ボタン */
#systemFooter .sv8{
  position:static !important;
  transform:none !important;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  margin:0 !important;
  padding:8px 12px;

  border:1px solid #cbd5e1;
  border-radius:7px;

  background:#fff;
  color:#166534;

  font-size:12px;
  font-weight:800;
  line-height:1.2;

  white-space:nowrap;
  cursor:pointer;
}

#systemFooter .sv8:hover{
  background:#f0fdf4;
  border-color:#86b99a;
}

/* タブレット */
@media(max-width:900px){
  #systemFooter .system-footer-inner{
    grid-template-columns:150px minmax(0,1fr) 150px !important;
    gap:10px !important;
  }

  #systemFooter .sv8-center{
    gap:10px;
  }
}

/* スマホ */
@media(max-width:650px){
  #systemFooter .system-footer-inner{
    grid-template-columns:1fr auto !important;
    grid-template-areas:
      "status security"
      "center center" !important;
    row-gap:7px !important;
  }

  #systemFooter .sv8-left{
    grid-area:status;
  }

  #systemFooter .sv8-center{
    grid-area:center;
  }

  #systemFooter #eaSiteLockFooter{
    grid-area:security;
  }

  #systemFooter .sv8{
    font-size:11px;
    padding:6px 9px;
  }
}

/* ===== server status detail modal ===== */

.sv8-modal{
  position:fixed;
  inset:0;
  z-index:999999;
  background:rgba(15,23,42,.48);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.sv8-modal.hidden{
  display:none;
}

.sv8-dialog{
  width:min(1100px,96vw);
  max-height:90vh;
  overflow:auto;
  background:#fff;
  border-radius:12px;
  box-shadow:0 20px 60px rgba(0,0,0,.24);
}

.sv8-dialog-head{
  position:sticky;
  top:0;
  z-index:2;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:18px 22px;
  background:#fff;
  border-bottom:1px solid #dbe3ea;
}

.sv8-dialog-head h2{
  margin:0;
  font-size:24px;
}

.sv8-dialog-head p{
  margin:4px 0 0;
  color:#64748b;
}

#sv8Close{
  border:0;
  background:transparent;
  font-size:30px;
  cursor:pointer;
}

.sv8-body{
  padding:20px 22px 24px;
}

.sv8-status-banner{
  padding:12px 16px;
  margin-bottom:16px;
  border-radius:8px;
  font-size:18px;
  font-weight:800;
}

.sv8-status-banner.normal{
  background:#ecfdf3;
  color:#166534;
}

.sv8-status-banner.warning{
  background:#fff7ed;
  color:#9a3412;
}

.sv8-status-banner.critical{
  background:#fef2f2;
  color:#991b1b;
}

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

.sv8-section{
  border:1px solid #dbe3ea;
  border-radius:9px;
  overflow:hidden;
  background:#fff;
}

.sv8-section h3{
  margin:0;
  padding:10px 13px;
  background:#f5f8fb;
  border-bottom:1px solid #dbe3ea;
  font-size:15px;
}

.sv8-row{
  display:grid;
  grid-template-columns:minmax(160px,1fr) minmax(120px,1fr);
  gap:16px;
  padding:8px 13px;
  border-bottom:1px solid #edf1f4;
}

.sv8-row:last-child{
  border-bottom:0;
}

.sv8-row span{
  color:#64748b;
}

.sv8-row strong{
  text-align:right;
  font-variant-numeric:tabular-nums;
}

.sv8-security-note,
.sv8-public-note{
  margin-top:16px;
  padding:11px 13px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:7px;
  color:#64748b;
  font-size:12px;
}

.sv8-loading,
.sv8-error{
  padding:30px;
  text-align:center;
}

.sv8-error{
  color:#b91c1c;
}

@media(max-width:760px){
  .sv8-grid{
    grid-template-columns:1fr;
  }

  .sv8-modal{
    padding:8px;
  }

  .sv8-dialog{
    width:100%;
    max-height:95vh;
  }
}
