* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #111827;
  color: #e5e7eb;
  font-family: Arial, sans-serif;
}

.server-management {
  min-height: 100vh;
  padding: 32px;
}

.sm-header {
  max-width: 1400px;
  margin: 0 auto 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.sm-eyebrow {
  font-size: 12px;
  letter-spacing: 3px;
  opacity: .6;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
}

.sm-header p {
  margin: 0;
  opacity: .65;
}

.sm-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #1f2937;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  background: #6b7280;
}

.status-ok .status-dot,
.healthy {
  color: #86efac;
}

.status-ok .status-dot {
  background: #22c55e;
}

.status-error .status-dot {
  background: #ef4444;
}

.sm-grid {
  max-width: 1400px;
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.sm-card,
.sm-feature,
.sm-panel {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 24px;
}

.sm-card {
  min-height: 160px;
}

.card-icon,
.feature-icon {
  font-size: 28px;
  margin-bottom: 14px;
}

.sm-card h2,
.sm-feature h2 {
  margin-bottom: 12px;
}

.sm-panel {
  max-width: 1400px;
  margin: 0 auto 24px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.panel-header p {
  margin: 0;
  opacity: .6;
}

button {
  border: 1px solid #4b5563;
  background: #374151;
  color: #fff;
  padding: 10px 16px;
  border-radius: 7px;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: #4b5563;
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.container-list {
  border-top: 1px solid #374151;
}

.container-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #374151;
}

.sm-feature p {
  min-height: 48px;
  opacity: .65;
}

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

  .sm-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .server-management {
    padding: 18px;
  }
}

/* ============================================================
   UPDATE MANAGER
   ============================================================ */

.update-manager {
  overflow: hidden;
}

.update-selector {
  margin-bottom: 24px;
}

.update-selector label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.update-selector-row {
  display: flex;
  gap: 12px;
}

.update-selector select {
  flex: 1;
  min-width: 0;
  border: 1px solid #4b5563;
  background: #111827;
  color: #fff;
  padding: 11px 14px;
  border-radius: 7px;
}

.update-progress-area {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #374151;
}

.update-progress-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.update-progress-step {
  margin-top: 5px;
  opacity: .55;
  font-size: 13px;
}

.update-progress-percent {
  font-size: 22px;
}

.update-progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #111827;
  overflow: hidden;
  border: 1px solid #374151;
}

.update-progress-bar {
  height: 100%;
  background: #22c55e;
  transition: width .35s ease;
}

.update-console-area {
  margin-top: 24px;
}

.update-console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.update-console-header > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.update-console-status {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 5px;
  background: #374151;
  opacity: .8;
}

.update-console {
  height: 320px;
  overflow-y: auto;
  padding: 14px;
  background: #0b0f16;
  border: 1px solid #374151;
  border-radius: 8px;
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
}

.update-console-line {
  display: grid;
  grid-template-columns: 80px 70px 1fr;
  gap: 10px;
  padding: 5px 0;
  line-height: 1.5;
}

.update-console-time {
  opacity: .4;
}

.update-console-level {
  font-weight: 700;
}

.update-console-success .update-console-level {
  color: #86efac;
}

.update-console-warning .update-console-level {
  color: #facc15;
}

.update-console-error .update-console-level {
  color: #f87171;
}

.update-console-message {
  white-space: pre-wrap;
  word-break: break-word;
}

.update-result {
  margin-top: 20px;
  padding: 18px;
  border-radius: 8px;
  line-height: 1.7;
}

.update-result-success {
  border: 1px solid #166534;
  background: #052e16;
}

.update-result-error {
  border: 1px solid #991b1b;
  background: #450a0a;
}

.update-result-note {
  margin-top: 10px;
  opacity: .7;
  font-size: 13px;
}

@media (max-width: 700px) {

  .update-selector-row {
    flex-direction: column;
  }

  .update-console-line {
    grid-template-columns: 65px 60px 1fr;
    gap: 6px;
    font-size: 11px;
  }

}

/* =========================================================
   VPS RESOURCE MONITOR
   ========================================================= */

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.resource-card {
  padding: 18px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
}

.resource-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  opacity: .8;
}

.resource-value {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}

.resource-bar {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}

.resource-bar-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  transition: width .4s ease;
  background: currentColor;
}

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


/* =========================================================
   VPS RESOURCE CARDS - MODERN
   ========================================================= */

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.resource-card {
  position: relative;
  padding: 20px;
  min-height: 145px;
  box-sizing: border-box;

  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;

  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,.045),
      rgba(255,255,255,.015)
    );

  box-shadow:
    0 8px 25px rgba(0,0,0,.12);

  overflow: hidden;
}

.resource-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background:
    linear-gradient(
      120deg,
      transparent 20%,
      rgba(255,255,255,.035) 50%,
      transparent 80%
    );

  opacity: .5;
}

.resource-title {
  position: relative;
  z-index: 1;

  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  margin-bottom: 12px;

  opacity: .75;
}

.resource-value {
  position: relative;
  z-index: 1;

  font-size: 28px;
  line-height: 1;
  font-weight: 800;

  margin-bottom: 6px;
}

.resource-card .resource-value::first-line {
  font-weight: 800;
}

.resource-bar {
  position: relative;
  z-index: 1;

  width: 100%;
  height: 9px;

  margin-top: 15px;

  overflow: hidden;
  border-radius: 999px;

  background: rgba(255,255,255,.08);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.25);
}

.resource-bar-fill {
  width: 0%;
  height: 100%;

  border-radius: inherit;

  background:
    linear-gradient(
      90deg,
      #22c55e,
      #84cc16,
      #eab308,
      #f97316
    );

  transition:
    width .7s cubic-bezier(.22,1,.36,1);

  box-shadow:
    0 0 10px rgba(34,197,94,.25);
}

.resource-detail {
  position: relative;
  z-index: 1;

  margin-top: 8px;

  font-size: 12px;
  line-height: 1.4;

  opacity: .6;
}

.resource-status {
  position: absolute;
  top: 20px;
  right: 20px;

  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;

  opacity: .65;
}

.resource-card.resource-warning .resource-bar-fill {
  background:
    linear-gradient(
      90deg,
      #eab308,
      #f97316
    );
}

.resource-card.resource-critical .resource-bar-fill {
  background:
    linear-gradient(
      90deg,
      #f97316,
      #ef4444
    );

  box-shadow:
    0 0 12px rgba(239,68,68,.35);
}

@media (max-width: 700px) {

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

  .resource-card {
    min-height: 135px;
  }

}


/* =========================================================
   DISK DETAILS
   ========================================================= */

.resource-details-button {
  position: relative;
  z-index: 2;

  width: 100%;
  margin-top: 15px;
  padding: 9px 12px;

  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;

  background: rgba(255,255,255,.045);
  color: inherit;

  font-size: 12px;
  font-weight: 700;

  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

.resource-details-button:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.16);
}

.disk-details {
  position: relative;
  z-index: 2;

  margin-top: 14px;
  padding-top: 14px;

  border-top: 1px solid rgba(255,255,255,.07);
}

.disk-details[hidden] {
  display: none;
}

.disk-detail-row {
  margin-bottom: 12px;
}

.disk-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;

  margin-bottom: 5px;

  font-size: 12px;
}

.disk-detail-name {
  font-weight: 700;
}

.disk-detail-size {
  opacity: .65;
}

.disk-detail-bar {
  width: 100%;
  height: 6px;

  overflow: hidden;
  border-radius: 999px;

  background: rgba(255,255,255,.07);
}

.disk-detail-fill {
  height: 100%;
  border-radius: inherit;

  background: linear-gradient(
    90deg,
    #64748b,
    #94a3b8
  );

  transition: width .5s ease;
}

.disk-detail-section {
  margin-bottom: 18px;
}

.disk-detail-section-title {
  margin-bottom: 10px;

  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .7px;

  opacity: .45;
}

.disk-analyze-button {
  width: 100%;
  margin-top: 5px;
  padding: 9px 12px;

  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;

  background: rgba(255,255,255,.035);
  color: inherit;

  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.disk-analyze-button:hover {
  background: rgba(255,255,255,.07);
}

.disk-total-summary {
  margin-bottom: 16px;
  padding: 12px;

  border-radius: 9px;
  background: rgba(255,255,255,.035);

  font-size: 12px;
  line-height: 1.6;
}

.disk-total-summary strong {
  font-size: 15px;
}


/* =========================================================
   VPS RESOURCES → STATUS PANELS SPACING
   ========================================================= */

.resource-grid {
  margin-bottom: 22px !important;
}

.resource-card {
  box-sizing: border-box;
}

.sm-grid {
  margin-top: 0 !important;
}

