/* ==========================================================================
   DORAEMON HOSTING V18 — ORANGE + GREEN PREMIUM INFRASTRUCTURE DESIGN SYSTEM
   - Primary Orange (#F97316): Primary CTAs, active navigation, brand highlights
   - Premium Green (#22C55E): Running servers, healthy nodes, success & live glow
   - Scaled-up readable typography, touch-friendly 48-54px controls, 20-24px icons
   - Glowing File & Folder Manager with subtle hover, green selection & orange focus
   ========================================================================== */
:root {
  --bg: #080a0f;
  --bg-subtle: #0d111a;
  --surface: #121723;
  --surface-2: #182032;
  --surface-hover: #202a40;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(249, 115, 22, 0.36);

  /* Brand Orange (Primary Actions) */
  --accent: #f97316;
  --accent-hover: #fb923c;
  --accent-2: #ea580c;
  --accent-soft: rgba(249, 115, 22, 0.14);
  --accent-fg: #fb923c;
  --accent-on: #ffffff;

  /* Premium Green (Live / Healthy / Running) */
  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.15);
  --green-glow: 0 0 18px rgba(34, 197, 94, 0.16);
  --green-border: rgba(34, 197, 94, 0.38);

  --pro-grad: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  --pro-grad-hover: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  --pro-green-grad: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

html[data-theme="light"] {
  --bg: #fdf8f2;
  --bg-subtle: #f7eee3;
  --surface: #fffcf7;
  --surface-2: #f4e8d8;
  --surface-hover: #ecd9c2;
  --border: rgba(154, 52, 18, 0.14);
  --border-strong: rgba(234, 88, 12, 0.36);
  --green: #16a34a;
  --green-soft: rgba(22, 163, 74, 0.13);
  --green-glow: 0 0 16px rgba(22, 163, 74, 0.14);
  --green-border: rgba(22, 163, 74, 0.34);
}

/* Balanced Orange + Green Atmospheric Canvas */
body {
  font-size: 16px !important;
  background-image:
    radial-gradient(ellipse 70% 40% at 14% -8%, rgba(249, 115, 22, 0.11), transparent 65%),
    radial-gradient(ellipse 55% 36% at 88% 6%, rgba(34, 197, 94, 0.09), transparent 62%) !important;
}
html[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse 70% 40% at 14% -8%, rgba(234, 88, 12, 0.08), transparent 65%),
    radial-gradient(ellipse 55% 36% at 88% 6%, rgba(22, 163, 74, 0.07), transparent 62%) !important;
}

/* Scaled Typography & Controls */
h1, .page-title, .auth-title { font-size: clamp(30px, 3.2vw, 40px) !important; }
h2, .section-title { font-size: clamp(22px, 2.4vw, 29px) !important; }
.btn, button.btn, a.btn { min-height: 48px !important; padding: 12px 20px !important; font-size: 15px !important; }
.btn-sm, button.btn-sm, a.btn-sm { min-height: 40px !important; padding: 8px 15px !important; font-size: 14px !important; }
.input, .select, textarea.input { min-height: 48px !important; font-size: 15.5px !important; }
.ic { width: 20px !important; height: 20px !important; }
.ic-sm { width: 17px !important; height: 17px !important; }

/* Subtle Green Glow for Live / Running / Healthy Indicators */
.badge-online, .status-running, .status-online {
  background: var(--green-soft) !important;
  color: var(--green) !important;
  border: 1px solid var(--green-border) !important;
  box-shadow: var(--green-glow) !important;
}
.btn-success, button[data-power="start"] {
  background: var(--pro-green-grad) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: var(--green-glow) !important;
}

/* Premium Glowing File & Folder Manager Rows */
.file-row, .fm-row, .file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px !important;
  margin-bottom: 8px;
  border-radius: 13px !important;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.16s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.18s var(--ease);
}
.file-row:hover, .fm-row:hover, .file-item:hover {
  background: var(--surface-2);
  border-color: rgba(34, 197, 94, 0.36);
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.14), 0 6px 18px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}
.file-row:focus-within, .fm-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.file-row.selected, .fm-row.selected {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.08);
  box-shadow: var(--green-glow);
}
.file-ic-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.file-ic-badge.is-folder {
  background: var(--accent-soft);
  border-color: rgba(249, 115, 22, 0.30);
}
.file-ic-badge.is-code {
  background: var(--green-soft);
  border-color: var(--green-border);
}

/* Loading Skeleton for Fast Perceived Rendering */
@keyframes dhShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.dh-skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: dhShimmer 1.4s infinite linear;
  border-radius: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .dh-skeleton, .badge-online .dot { animation: none !important; }
}
