:root {
  --inocfw-topbar-bg: #3c444f;
  --inocfw-topbar-text: #d7dde6;
  --inocfw-sidebar-bg: #f6f7fb;
  --inocfw-sidebar-text: #6b7280;
  --inocfw-sidebar-active: #6c5ce7;
  --inocfw-body-bg: #f3f4f8;
  --inocfw-card-bg: #ffffff;
  --inocfw-border: #e6e9f0;
}

body {
  background: var(--inocfw-body-bg);
  color: #4b5563;
  font-family: "Nunito", system-ui, -apple-system, Segoe UI, sans-serif;
}

#wrapper {
  min-height: 100vh;
}

.navbar-custom {
  background: var(--inocfw-topbar-bg);
  height: 70px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1040;
}

.navbar-custom .topnav-menu .nav-link {
  color: var(--inocfw-topbar-text);
}

.navbar-custom .topnav-menu .nav-link:hover {
  color: #ffffff;
}

.logo-box {
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.logo-box .logo-lg {
  font-size: 1.1rem;
  color: #ffffff;
  letter-spacing: 0.04em;
}

.inocfw-search {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
  border-radius: 999px;
  padding: 6px 16px;
  width: 260px;
}

.inocfw-search::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.left-side-menu {
  position: fixed;
  top: 70px;
  bottom: 0;
  width: 250px;
  background: var(--inocfw-sidebar-bg);
  border-right: 1px solid var(--inocfw-border);
  overflow-y: auto !important;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #bcc5d4 transparent;
}

#left-side-menu-container {
  min-height: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.left-side-menu::-webkit-scrollbar {
  width: 8px;
}

.left-side-menu::-webkit-scrollbar-track {
  background: transparent;
}

.left-side-menu::-webkit-scrollbar-thumb {
  background: #c2c9d6;
  border-radius: 999px;
}

.left-side-menu .menu-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #9aa3b2;
  padding: 18px 24px 8px;
  margin: 0;
}

.side-nav {
  list-style: none;
  padding: 0 0 24px;
  margin: 0;
}

.side-nav .side-nav-item {
  margin: 2px 12px;
}

.side-nav .side-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--inocfw-sidebar-text);
  text-decoration: none;
  font-weight: 500;
}

.side-nav .side-nav-link .badge {
  margin-left: auto;
  background: #e4f7ef;
  color: #0f9d58;
  font-size: 0.72rem;
  border-radius: 8px;
}

.side-nav .side-nav-link:hover {
  background: #eef1f7;
  color: #475569;
}

.side-nav .side-nav-link.active {
  background: #ece9ff;
  color: var(--inocfw-sidebar-active);
  font-weight: 600;
}

.side-nav .side-nav-link.active i {
  color: var(--inocfw-sidebar-active);
}

.content-page {
  margin-left: 250px;
  margin-top: 70px;
  padding: 24px;
}

.page-title-box {
  margin-bottom: 24px;
}

.card {
  border: 1px solid var(--inocfw-border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
}

.widget-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.widget-soft-purple {
  background: rgba(108, 92, 231, 0.15);
  color: #6c5ce7;
}

.widget-soft-green {
  background: rgba(16, 185, 129, 0.16);
  color: #10b981;
}

.widget-soft-sky {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
}

.widget-soft-amber {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
}

.chart-placeholder {
  height: 320px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f6f7fb);
  border: 1px dashed #d7dce5;
}

.interface-card .card-body {
  min-height: 0;
  padding: 16px;
}

.status-badge {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  border-radius: 999px;
}

.status-up {
  background: #e6f9f1;
  color: #10b981;
}

.status-down {
  background: #fdeaea;
  color: #ef4444;
}

.status-unknown {
  background: #f1f5f9;
  color: #64748b;
}

.ip-pill {
  border-radius: 999px;
  border: 1px solid #e2e8f0;
}

.ip-pill:hover {
  border-color: #cbd5f5;
  background: #f8fafc;
}

.ip-pill-group {
  display: inline-flex;
  align-items: center;
}

.ip-pill-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.ip-edit-btn {
  cursor: pointer;
  padding-right: 26px;
}

.ip-delete-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 999px;
  line-height: 1;
  font-size: 12px;
}

.ip-add-btn {
  color: #6c5ce7;
}

.ip-add-btn:hover {
  color: #5b4fd6;
}

.ip-add-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ip-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.ip-modal.is-visible {
  display: flex;
}

.ip-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.ip-modal-dialog {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  width: min(420px, 92vw);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
  z-index: 1;
  padding: 16px 18px;
}

.ip-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ip-modal-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ip-modal-footer {
  margin-top: 16px;
}

.status-actions .btn {
  padding: 0;
}

.status-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid #cbd5f5;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #64748b;
}

.status-btn:hover {
  border-color: #b7bff0;
}

.status-btn-up {
  color: #22c55e;
}

.status-btn-down {
  color: #ef4444;
}

.status-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 991px) {
  .left-side-menu {
    left: -260px;
    z-index: 1060 !important;
    transition: left 0.2s ease-out;
    display: block;
    height: calc(100dvh - 70px);
    height: calc(100vh - 70px);
    max-height: calc(100dvh - 70px);
    max-height: calc(100vh - 70px);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
    touch-action: pan-y;
  }

  .content-page {
    margin-left: 0;
  }

  .inocfw-search {
    display: none;
  }

  body.sidebar-enable .left-side-menu {
    left: 0;
    display: block !important;
  }

  .left-side-menu .side-nav {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
  }

  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.28);
    z-index: 1045;
  }

  body.sidebar-enable .mobile-menu-overlay {
    display: block;
  }
}
