/* ==========================================================================
   Apple HIG Light Theme & Ultra-Responsive Activity Monitor
   Node Control Panel - service.node2.aldih.com
   ========================================================================== */

:root {
  --bg-body: #f2f2f7;
  --bg-sidebar: #ffffff;
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.06);
  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  --card-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.03);

  --apple-blue: #007aff;
  --apple-blue-hover: #0062cc;
  --apple-red: #ff3b30;
  --apple-green: #34c759;
  --apple-purple: #af52de;
  --apple-orange: #ff9500;
  --apple-teal: #30b0c7;

  --text-main: #1c1c1e;
  --text-muted: #8e8e93;
  --text-sub: #a2a2a7;

  --sidebar-width: 270px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.sidebar-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  z-index: 99;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 100;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header {
  padding: 1.6rem 1.4rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--apple-blue) 0%, #0056b3 100%);
  box-shadow: 0 6px 16px rgba(0, 122, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: transform 0.3s ease;
}

.brand-icon:hover {
  transform: scale(1.05) rotate(-3deg);
}

.brand-info h2 {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.brand-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-section {
  padding: 1.5rem 1rem;
  flex: 1;
}

.nav-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-sub);
  margin-bottom: 0.85rem;
  padding-left: 0.75rem;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0.85rem 1rem;
  color: #48484a;
  text-decoration: none;
  border-radius: 16px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item a:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.04);
  transform: translateX(4px);
}

.nav-item.active a {
  color: var(--apple-blue);
  background: rgba(0, 122, 255, 0.08);
  font-weight: 800;
}

.nav-item.active a i {
  color: var(--apple-blue);
}

.sidebar-footer {
  padding: 1.25rem 1.4rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--apple-blue), var(--apple-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.user-role {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-logout {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  color: var(--apple-red);
  background: rgba(255, 59, 48, 0.1);
  transform: scale(1.06);
}

/* ==================== MAIN WRAPPER ==================== */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-header {
  height: 76px;
  background: rgba(242, 242, 247, 0.85);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.2rem;
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-toggle-sidebar {
  display: none;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  color: var(--text-main);
  cursor: pointer;
  padding: 8px;
  border-radius: 12px;
}

.page-title-group h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.info-chip.location {
  background: rgba(255, 59, 48, 0.08);
  border-color: rgba(255, 59, 48, 0.2);
  color: var(--apple-red);
}

.info-chip.status-online {
  background: rgba(52, 199, 89, 0.08);
  border-color: rgba(52, 199, 89, 0.2);
  color: #248a3d;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--apple-green);
  box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.8);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.8); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(52, 199, 89, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}

.content-body {
  padding: 2.2rem;
  flex: 1;
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
  animation: applePop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes applePop {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==================== APPLE CARDS ==================== */
.apple-card {
  background: var(--card-bg);
  border-radius: 24px;
  padding: 1.6rem;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-card:hover {
  box-shadow: var(--card-shadow-hover);
}

.server-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #ffffff 0%, #f9f9fb 100%);
  border-radius: 28px;
  padding: 1.8rem;
  margin-bottom: 2rem;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.banner-flag {
  font-size: 2.8rem;
  background: #f2f2f7;
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.banner-details h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.banner-details p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.health-meter-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--card-border);
  padding: 10px 20px;
  border-radius: 20px;
}

.health-score-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--apple-green);
}

.health-score-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-sub);
}

.ip-pills {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ip-pill {
  padding: 10px 16px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
}

.ip-pill-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-sub);
}

.ip-pill-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--apple-blue);
  font-family: 'SF Mono', 'Courier New', monospace;
}

.quick-actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.btn-pill-action {
  padding: 0.75rem 1.4rem;
  border-radius: 9999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  color: var(--text-main);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-pill-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.15);
}

.btn-pill-action:active {
  transform: translateY(0) scale(0.97);
}

.btn-pill-action.primary {
  background: linear-gradient(135deg, var(--apple-blue) 0%, #0056b3 100%);
  color: white;
  box-shadow: 0 6px 18px rgba(0, 122, 255, 0.25);
  border: none;
}

.grid-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.metric-card {
  position: relative;
  overflow: hidden;
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.metric-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.metric-icon-bg {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-red { background: rgba(255, 59, 48, 0.1); color: var(--apple-red); }
.icon-blue { background: rgba(0, 122, 255, 0.1); color: var(--apple-blue); }
.icon-emerald { background: rgba(52, 199, 89, 0.1); color: var(--apple-green); }
.icon-purple { background: rgba(175, 82, 222, 0.1); color: var(--apple-purple); }

.metric-value {
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.metric-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.progress-bar-bg {
  height: 8px;
  width: 100%;
  background: #e5e5ea;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 1rem;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.fill-red { background: linear-gradient(90deg, #ff3b30, #ff6b63); }
.fill-blue { background: linear-gradient(90deg, #007aff, #5ac8fa); }
.fill-emerald { background: linear-gradient(90deg, #34c759, #70e08b); }
.fill-purple { background: linear-gradient(90deg, #af52de, #d783ff); }

.grid-2col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.8rem;
}

@media (max-width: 1024px) {
  .grid-2col { grid-template-columns: 1fr; }
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 12px;
}

.section-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

/* ==================== SYSTEMD SERVICES (/system) ==================== */
.services-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-input-wrapper i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.6rem;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
  border-radius: 16px;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
}

.search-input:focus {
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.services-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service-card {
  background: #ffffff;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover {
  box-shadow: var(--card-shadow-hover);
}

.service-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 220px;
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(0, 122, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--apple-blue);
  flex-shrink: 0;
}

.service-info h3 {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.service-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.service-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: capitalize;
  flex-shrink: 0;
}

.status-active {
  background: rgba(52, 199, 89, 0.12);
  color: #248a3d;
  border: 1px solid rgba(52, 199, 89, 0.3);
}

.status-inactive {
  background: rgba(142, 142, 147, 0.12);
  color: #636366;
  border: 1px solid rgba(142, 142, 147, 0.3);
}

.status-failed {
  background: rgba(255, 59, 48, 0.12);
  color: var(--apple-red);
  border: 1px solid rgba(255, 59, 48, 0.3);
}

.service-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
  border-radius: 12px;
}

/* ==================== FORM ADD SERVICE (/system/add-new) ==================== */
.form-card {
  max-width: 680px;
  margin: 0 auto;
  padding: 2.2rem;
  border-radius: 28px;
}

.form-group {
  margin-bottom: 1.6rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}

.form-control {
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: #f9f9fb;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-control:focus {
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
  background: #ffffff;
}

.unit-suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.unit-tag {
  padding: 6px 14px;
  background: rgba(0, 122, 255, 0.06);
  border: 1px solid rgba(0, 122, 255, 0.15);
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--apple-blue);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.unit-tag:hover {
  background: var(--apple-blue);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.25);
}

/* ==================== SERVER STATUS (/status) CARDS & RESPONSIVE ==================== */
.status-spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.status-spec-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 14px;
}

.spec-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.spec-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-sub);
  margin-bottom: 2px;
}

.spec-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.spec-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.storage-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.storage-card-item {
  background: #f9f9fb;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.storage-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.storage-mount-badge {
  font-size: 0.85rem;
  font-weight: 800;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 4px 10px;
  border-radius: 10px;
  color: var(--apple-blue);
}

.storage-size-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.process-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.proc-item-card {
  background: #f9f9fb;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.proc-info-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.proc-pid-chip {
  font-family: 'SF Mono', 'Courier New', monospace;
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.05);
  padding: 4px 8px;
  border-radius: 8px;
  color: #48484a;
  flex-shrink: 0;
}

.proc-name-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proc-metrics-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cpu-badge-pill {
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.cpu-high { background: rgba(255, 59, 48, 0.12); color: var(--apple-red); }
.cpu-normal { background: rgba(0, 122, 255, 0.1); color: var(--apple-blue); }

.ports-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.port-item-card {
  background: #f9f9fb;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.port-badge {
  font-family: 'SF Mono', monospace;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--apple-blue);
  background: #ffffff;
  padding: 4px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.protocol-chip {
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(52, 199, 89, 0.12);
  color: #248a3d;
  padding: 4px 8px;
  border-radius: 8px;
}

.cpu-cores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.core-card {
  background: #f9f9fb;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 12px;
  border-radius: 16px;
  text-align: center;
}

.inset-card {
  background: #f9f9fb;
  border-radius: 18px;
  padding: 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
  animation: applePop 0.3s ease;
}

.modal-container {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 28px;
  width: 100%;
  max-width: 950px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.modal-header {
  padding: 1.2rem 1.8rem;
  background: #f9f9fb;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.log-terminal {
  padding: 1.5rem;
  background: #1c1c1e;
  color: #f2f2f7;
  font-family: 'SF Mono', 'Courier New', monospace;
  font-size: 0.84rem;
  line-height: 1.6;
  overflow-y: auto;
  flex: 1;
  white-space: pre-wrap;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  padding: 0.95rem 1.4rem;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==================== RESPONSIVE MEDIA QUERIES ==================== */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.15);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .btn-toggle-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .grid-2col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .top-header {
    padding: 0 1rem;
    height: 68px;
  }
  .content-body {
    padding: 1rem;
  }
  .server-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 1.25rem;
  }
  .banner-flag {
    width: 54px;
    height: 54px;
    font-size: 2.2rem;
  }
  .banner-details h3 {
    font-size: 1.15rem;
  }
  .quick-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-pill-action {
    justify-content: center;
  }
  .service-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .service-meta {
    width: 100%;
  }
  .service-actions {
    width: 100%;
    justify-content: flex-start;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .btn-service-del {
    grid-column: span 2;
  }
  .status-spec-grid {
    grid-template-columns: 1fr;
  }
  .proc-item-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .proc-metrics-right {
    width: 100%;
    justify-content: space-between;
  }
  .form-card {
    padding: 1.5rem;
  }
}
