/* ============================================================
   MoonServ — Panel Interior CSS v4 (White Theme)
   ============================================================ */

/* ─── TOP NAV ─── */
.panel-topnav {
  position:fixed; top:0; left:0; right:0; z-index:100;
  background:rgba(255,255,255,.92); backdrop-filter:blur(24px) saturate(1.4);
  -webkit-backdrop-filter:blur(24px) saturate(1.4);
  border-bottom:1px solid #e5e7eb; height:76px;
}
.topnav-inner {
  max-width:1400px; margin:0 auto; padding:0 24px;
  display:flex; align-items:center; height:100%; gap:16px;
}
.topnav-brand {
  display:flex; align-items:center; gap:10px; text-decoration:none;
  color:var(--tx); font-weight:800; font-size:20px; margin-right:24px;
}
.topnav-links { display:flex; gap:4px; flex:1; }
.topnav-links > a, .topnav-dropdown > a {
  color:var(--tx2); font-size:14px; font-weight:600;
  padding:10px 18px; border-radius:var(--r);
  transition:all .2s; text-decoration:none;
  display:inline-flex; align-items:center; gap:8px;
}
.topnav-links > a:hover, .topnav-dropdown > a:hover { background:#f0f2f5; color:#111827; }
.topnav-links > a.active, .topnav-dropdown > a.active { background:#eef2ff; color:#6366f1; font-weight:700; }

/* ─── DROPDOWN ─── */
.topnav-dropdown { position:relative; }
.topnav-dropdown .dropdown-menu {
  display:none; position:absolute; top:calc(100% + 6px); left:0;
  min-width:200px; background:#ffffff;
  border:1px solid #e5e7eb; border-radius:var(--r);
  box-shadow:0 8px 40px rgba(0,0,0,.1); padding:8px; z-index:500;
}
.topnav-dropdown.open .dropdown-menu { display:block; animation:slideDown .2s ease; }
.dropdown-right { left:auto; right:0; }
.dropdown-menu a, .dropdown-btn {
  display:flex; align-items:center; gap:10px;
  width:100%; text-align:left; padding:10px 14px;
  color:var(--tx2); font-size:13px; font-weight:500;
  border-radius:8px; transition:.2s; text-decoration:none;
  background:none; border:none; cursor:pointer; font-family:var(--font);
  line-height:1.4;
}
.dropdown-menu a:hover, .dropdown-btn:hover { background:var(--bg2); color:var(--tx); }
.dropdown-header {
  padding:10px 14px; font-weight:700; font-size:14px;
  color:var(--tx); border-bottom:1px solid var(--bdr); margin-bottom:4px;
}
.dropdown-divider { height:1px; background:var(--bdr); margin:4px 0; }
.dropdown-btn-logout { color:var(--rd) !important; }
.dropdown-btn-logout:hover { background:var(--rdbg) !important; }
.logout-form { margin:0; padding:0; }

.topnav-user { display:flex; align-items:center; gap:14px; margin-left:auto; }
.topnav-balance {
  font-family:var(--mono); font-size:14px; font-weight:700; color:var(--gr);
  padding:8px 16px; border-radius:10px;
  border:1px solid rgba(16,185,129,.2);
  background:var(--grbg);
  display:flex; align-items:center; gap:6px; transition:.2s;
}
.topnav-balance:hover { border-color:rgba(16,185,129,.35); background:rgba(16,185,129,.1); }
a.topnav-balance { text-decoration:none; color:var(--gr); }
.topnav-avatar {
  width:40px; height:40px; border-radius:50% !important;
  background:linear-gradient(135deg, #6366f1, #8b5cf6);
  display:flex; align-items:center; justify-content:center;
  color:#fff; text-decoration:none;
  cursor:pointer; transition:all .25s; flex-shrink:0;
  box-shadow:0 2px 8px rgba(99,102,241,.25);
  overflow:hidden !important; position:relative;
  -webkit-clip-path: circle(50%);
  clip-path: circle(50%);
}
.topnav-avatar img { width:40px; height:40px; object-fit:cover; display:block; border-radius:50% !important; }
.topnav-avatar:hover { transform:scale(1.1); box-shadow:0 4px 16px rgba(99,102,241,.35); }
.topnav-avatar svg { width:22px; height:22px; stroke:#ffffff !important; fill:none !important; }
.mobile-toggle { display:none; background:none; border:none; color:var(--tx); cursor:pointer; line-height:0; }

@media(max-width:900px) {
  .mobile-toggle { display:block; }
  .topnav-links { display:none; }
  .topnav-links.open {
    display:flex; flex-direction:column; position:absolute;
    top:56px; left:0; right:0; background:var(--card);
    border-bottom:1px solid var(--bdr); padding:12px; z-index:100;
    box-shadow:var(--shadow-md);
  }
  .topnav-dropdown .dropdown-menu { position:static; box-shadow:none; border:none; }
}

/* ─── PANEL MAIN ─── */
.panel-layout {
  min-height:100vh; position:relative;
  background:linear-gradient(160deg,#fafafe 0%,#f3f0ff 20%,#f0f4ff 40%,#f5fafe 60%,#faf5ff 80%,#fafafe 100%);
  background-size:300% 300%;
  animation:panelBg 20s ease infinite;
}
.panel-layout::before {
  content:''; position:fixed; top:-200px; right:-200px;
  width:500px; height:500px;
  background:radial-gradient(circle,rgba(99,102,241,.04) 0%,transparent 70%);
  border-radius:50%; pointer-events:none;
  animation:float1 12s ease-in-out infinite;
}
.panel-layout::after {
  content:''; position:fixed; bottom:-150px; left:-150px;
  width:400px; height:400px;
  background:radial-gradient(circle,rgba(139,92,246,.03) 0%,transparent 70%);
  border-radius:50%; pointer-events:none;
  animation:float2 15s ease-in-out infinite;
}
@keyframes panelBg { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }
@keyframes float1 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-30px,20px) scale(1.1)} }
@keyframes float2 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(20px,-30px) scale(1.1)} }
.panel-main { padding:90px 24px 24px; max-width:1400px; margin:0 auto; position:relative; z-index:1; }
.panel-container { min-height:60vh; }

/* ─── PAGE HEADER ─── */
.page-header { margin-bottom:24px; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.page-title { font-size:24px; font-weight:800; letter-spacing:-0.5px; }
.page-subtitle { font-size:14px; color:var(--tx2); margin-top:4px; }
.breadcrumb { font-size:13px; color:var(--tx3); }
.breadcrumb a { color:var(--tx2); }

/* ─── STATS ─── */
.stats-row { display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:16px; margin-bottom:24px; }
.stat-card {
  background:#ffffff;
  border:1px solid #e5e7eb; border-radius:var(--rl); padding:20px;
}
.stat-card-label { font-size:12px; color:#6b7280; text-transform:uppercase; letter-spacing:1px; margin-bottom:6px; }
.stat-card-value { font-size:26px; font-weight:800; font-family:var(--mono); color:#111827; }
.stat-card-value.green { color:#10b981; }
.stat-card-value.red { color:#ef4444; }
.stat-card-value.accent { color:#6366f1; }

/* ─── SERVER LIST ─── */
.table-card {
  background:#ffffff;
  border:2px solid #d1d5db; border-radius:var(--rl); overflow:hidden;
  box-shadow:0 1px 4px rgba(0,0,0,.04);
}
.table-card-header {
  padding:16px 20px; border-bottom:2px solid #e5e7eb;
  display:flex; align-items:center; justify-content:space-between;
  background:#f9fafb;
}
.table-card-title { font-weight:700; font-size:15px; color:#111827; }
table.dt { width:100%; border-collapse:collapse; }
table.dt th {
  text-align:left; padding:12px 16px;
  font-size:11px; font-weight:700; text-transform:uppercase;
  letter-spacing:1px; color:#6b7280; border-bottom:2px solid #e5e7eb;
  background:#f9fafb;
}
table.dt td { padding:14px 16px; font-size:14px; border-bottom:1px solid #e5e7eb; vertical-align:middle; color:#111827; }
table.dt tbody tr { transition:all .2s; cursor:pointer; }
table.dt tbody tr:hover { background:#eef2ff; box-shadow:inset 3px 0 0 #6366f1; }
table.dt tbody tr:last-child td { border-bottom:none; }

/* ─── BADGES ─── */
.badge { display:inline-flex; align-items:center; gap:5px; padding:4px 10px; border-radius:20px; font-size:12px; font-weight:700; }
.badge-online { background:var(--grbg); color:var(--gr); }
.badge-stopped { background:var(--rdbg); color:var(--rd); }
.badge-installing { background:var(--orbg); color:var(--or); }
.badge-expired { background:var(--bg2); color:var(--tx3); }
.badge-open { background:var(--orbg); color:var(--or); }
.badge-answered { background:var(--grbg); color:var(--gr); }
.badge-closed { background:var(--bg2); color:var(--tx3); }
.badge-admin { background:var(--acbg); color:var(--ac); }
.badge-user { background:var(--bg2); color:var(--tx2); }
.dot { width:7px; height:7px; border-radius:50%; display:inline-block; }
.dot-online { background:var(--gr); box-shadow:0 0 6px var(--gr); }
.dot-stopped { background:var(--rd); }

/* ─── SERVER DETAIL ─── */
.detail-header {
  display:flex; align-items:center; gap:16px; margin-bottom:24px; padding:20px;
  background:#ffffff; border:1.5px solid #e5e7eb; border-radius:var(--rl); flex-wrap:wrap;
}
.detail-icon {
  width:56px; height:56px; border-radius:14px;
  display:flex; align-items:center; justify-content:center; font-size:28px; flex-shrink:0;
}
.detail-info { flex:1; min-width:0; }
.detail-name { font-size:22px; font-weight:800; }
.detail-ip { font-size:13px; color:var(--tx3); font-family:var(--mono); }

.detail-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:16px; margin-bottom:24px; }
.metric-card {
  background:#ffffff;
  border:1.5px solid #e5e7eb; border-radius:var(--rl); padding:20px;
}
.metric-label { font-size:12px; color:var(--tx3); text-transform:uppercase; letter-spacing:1px; margin-bottom:6px; }
.metric-value { font-size:22px; font-weight:800; font-family:var(--mono); }
.metric-bar { height:6px; background:var(--bg2); border-radius:3px; overflow:hidden; margin-top:8px; }
.metric-fill { height:100%; border-radius:3px; transition:width .8s ease; }

/* ─── TABS ─── */
.tabs {
  display:flex; gap:6px; margin-bottom:24px; overflow-x:auto;
  padding:6px; background:#f3f4f6; border-radius:14px;
}
.tab-btn {
  padding:10px 20px; font-size:14px; font-weight:600;
  color:#6b7280; cursor:pointer; border:none;
  background:transparent; border-radius:10px;
  transition:all .25s cubic-bezier(.4,0,.2,1);
  font-family:var(--font); white-space:nowrap;
  position:relative;
}
.tab-btn:hover {
  color:#111827; background:rgba(255,255,255,.6);
  transform:translateY(-1px);
}
.tab-btn.active {
  color:#6366f1; background:#ffffff;
  box-shadow:0 2px 8px rgba(0,0,0,.06);
  font-weight:700;
}

/* ─── TICKET CHAT ─── */
.ticket-messages { display:flex; flex-direction:column; gap:12px; margin-bottom:20px; }
.ticket-msg {
  padding:14px 18px; border-radius:var(--rl); max-width:85%;
  font-size:14px; line-height:1.6;
}
.ticket-msg-user { background:var(--acbg); align-self:flex-end; border:1px solid rgba(99,102,241,.1); }
.ticket-msg-admin { background:var(--bg2); align-self:flex-start; border:1px solid var(--bdr); }
.ticket-msg-meta { font-size:11px; color:var(--tx3); margin-top:6px; }

/* ─── CHART ─── */
.chart-bars { display:flex; align-items:flex-end; gap:10px; height:180px; }
.chart-bar { flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; }
.chart-bar-val { font-size:10px; font-family:var(--mono); color:var(--gr); }
.chart-bar-fill { width:100%; border-radius:6px 6px 0 0; min-height:6px; background:linear-gradient(180deg,var(--ac),rgba(99,102,241,.2)); transition:height .8s ease; }
.chart-bar-label { font-size:11px; color:var(--tx3); }

/* ─── PROFILE ─── */
.profile-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
@media(max-width:768px) { .profile-grid { grid-template-columns:1fr; } }
.promo-input { display:flex; gap:8px; }

/* ─── TOPUP ─── */
.topup-amounts { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.topup-btn {
  padding:12px 20px; border-radius:var(--r); border:1.5px solid #e5e7eb;
  background:#ffffff; color:#111827;
  cursor:pointer; font-family:var(--mono); font-size:15px; font-weight:700; transition:.25s;
}
.topup-btn:hover { border-color:#10b981; color:#10b981; background:rgba(16,185,129,.06); }
.topup-btn.active { border-color:#10b981; color:#10b981; background:rgba(16,185,129,.06); box-shadow:0 0 0 1px #10b981; }

/* ─── MODAL ─── */
.modal-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,.25); backdrop-filter:blur(6px);
  display:flex; align-items:center; justify-content:center; z-index:999;
  animation:fadeIn .2s ease;
}
.modal-box {
  background:var(--card); border:1px solid var(--bdr2);
  border-radius:20px; padding:32px; max-width:480px; width:90%;
  box-shadow:var(--shadow-lg); animation:scaleIn .3s ease both;
}

/* ─── TOAST ─── */
.toast-notification {
  position:fixed; bottom:24px; right:24px; z-index:9999; max-width:400px;
  padding:14px 20px; border-radius:var(--rl);
  font-family:var(--font); font-size:14px; font-weight:600;
  box-shadow:var(--shadow-lg); animation:toastIn .3s ease;
}
.toast-success { background:var(--grbg); color:var(--gr); border:1px solid rgba(16,185,129,.15); }
.toast-error { background:var(--rdbg); color:var(--rd); border:1px solid rgba(239,68,68,.15); }

/* ─── UTILS ─── */
.flex { display:flex; }
.flex-wrap { flex-wrap:wrap; }
.gap-8 { gap:8px; } .gap-12 { gap:12px; } .gap-16 { gap:16px; } .gap-20 { gap:20px; }
.mt-16 { margin-top:16px; } .mt-24 { margin-top:24px; }
.mb-16 { margin-bottom:16px; } .mb-24 { margin-bottom:24px; }
.mono { font-family:var(--mono); }
.text-2 { color:var(--tx2); } .text-3 { color:var(--tx3); }
.text-green { color:var(--gr); } .text-red { color:var(--rd); }
.fw-700 { font-weight:700; }
.fs-13 { font-size:13px; } .fs-12 { font-size:12px; }

/* ─── MOBILE ─── */
.mobile-bottom-nav {
  display:none; position:fixed; bottom:0; left:0; right:0; z-index:200;
  background:rgba(255,255,255,.95); backdrop-filter:blur(24px);
  -webkit-backdrop-filter:blur(24px);
  border-top:1px solid #e5e7eb;
  padding:4px 6px; padding-bottom:env(safe-area-inset-bottom, 4px);
}
.mobile-bottom-nav a {
  flex:1; display:flex; flex-direction:column; align-items:center;
  gap:2px; padding:8px 4px; border-radius:10px;
  font-size:10px; font-weight:600; color:var(--tx3);
  text-decoration:none; transition:.2s;
}
.mobile-bottom-nav a.active { color:var(--ac); background:var(--acbg); }
.mobile-bottom-nav .nav-icon { display:flex; align-items:center; justify-content:center; height:22px; }

@media(max-width:768px) {
  .mobile-bottom-nav { display:flex; }
  .topnav-links { display:none !important; }
  .topnav-brand .nav-title { display:none; }
  .panel-main { padding-bottom:80px !important; padding-left:8px !important; padding-right:8px !important; padding-top:68px !important; }
  .panel-topnav { height:56px; }
  .topnav-inner { padding:0 12px; }
  .hide-mobile { display:none !important; }
  .stats-row { grid-template-columns:1fr 1fr !important; gap:8px !important; }
  .detail-grid { grid-template-columns:1fr 1fr !important; gap:8px !important; }
  .profile-grid { grid-template-columns:1fr !important; }
  .config-grid { grid-template-columns:1fr !important; }
  .page-title { font-size:20px; }
  .page-header { flex-direction:column; align-items:flex-start; gap:8px; }
  .order-summary { position:static !important; }
  .detail-header { flex-direction:column; align-items:flex-start; padding:14px; gap:10px; }
  .detail-name { font-size:18px; }
  .detail-actions { display:flex; flex-wrap:wrap; gap:6px; width:100%; }
  .detail-actions .btn { flex:1; min-width:0; font-size:12px; padding:8px 10px; justify-content:center; }
  /* Tabs scrollable */
  .tabs { padding:4px; gap:2px; margin-bottom:16px; -webkit-overflow-scrolling:touch; }
  .tab-btn { padding:8px 12px; font-size:12px; }
  /* Metric cards */
  .metric-card { padding:12px; }
  .metric-label { font-size:10px; }
  .metric-value { font-size:18px; }
  /* Console */
  .console-output { font-size:11px !important; max-height:300px !important; }
  /* Tables */
  table.dt th, table.dt td { padding:8px 10px; font-size:12px; }
  table.dt .hide-mobile { display:none !important; }
  /* Cards */
  .card { border-radius:12px !important; }
  .card-header { padding:12px 14px !important; font-size:14px !important; }
  .card-body { padding:14px !important; }
  /* Server list table - make responsive */
  .server-table-mobile { display:block; }
  /* Buttons */
  .btn-sm { font-size:12px; padding:6px 10px; }
  /* File manager */
  .file-row { padding:10px 12px; gap:8px; }
  .file-actions { display:flex; gap:2px; }
  .file-actions .btn { padding:4px 6px !important; }
  /* Modal */
  .modal-box { width:95% !important; max-width:none !important; padding:20px !important; border-radius:16px !important; }
  /* Balance card */
  .topnav-balance { font-size:12px !important; padding:6px 10px !important; }
  /* Avatar */
  .topnav-avatar { width:32px !important; height:32px !important; }
  /* Stat cards */
  .stat-card { padding:14px; }
  .stat-card-value { font-size:20px; }
  .stat-card-label { font-size:10px; }
}

@media(max-width:480px) {
  .news-grid { grid-template-columns:1fr !important; }
  .stats-row { grid-template-columns:1fr 1fr !important; }
  .detail-grid { grid-template-columns:1fr !important; }
  .metric-value { font-size:16px; }
  .detail-name { font-size:16px; }
  .tab-btn { padding:6px 8px; font-size:11px; }
  .profile-hero-content { padding:16px !important; }
  .profile-hero-name { font-size:18px !important; }
  .profile-hero-stats { flex-wrap:wrap; }
  .profile-hero-stat { min-width:70px; padding:8px 12px; }
  .profile-hero-stat-val { font-size:18px; }
  /* Order page */
  .game-card { padding:12px !important; }
  .game-card-title { font-size:13px !important; }
  /* File manager compact */
  .file-name { font-size:13px; }
  .card-header { flex-wrap:wrap; }
}

/* ═══ PROFILE HERO ═══ */
.profile-hero {
  position:relative; border-radius:20px; overflow:hidden;
  background:#ffffff; border:1.5px solid #e5e7eb;
}
.profile-hero-bg {
  position:absolute; inset:0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(99,102,241,.06), transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(6,182,212,.04), transparent 50%);
  z-index:0;
}
.profile-hero-content {
  position:relative; z-index:1;
  display:flex; align-items:center; gap:24px;
  padding:32px; flex-wrap:wrap;
}
.profile-avatar {
  width:80px; height:80px; border-radius:20px;
  background:linear-gradient(135deg, #6366f1, #8b5cf6);
  display:flex; align-items:center; justify-content:center;
  color:#fff;
  box-shadow:0 4px 20px rgba(99,102,241,.3); flex-shrink:0;
}
.profile-avatar svg { width:36px; height:36px; }
.profile-hero-info { flex:1; min-width:200px; }
.profile-hero-name { font-size:26px; font-weight:800; letter-spacing:-.5px; margin-bottom:8px; }
.profile-hero-meta { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.profile-hero-date { font-size:13px; color:var(--tx2); display:inline-flex; align-items:center; gap:6px; }
.profile-hero-stats { display:flex; gap:16px; margin-left:auto; }
.profile-hero-stat {
  text-align:center; padding:12px 20px;
  background:#f9fafb; border-radius:12px;
  border:1.5px solid #e5e7eb; min-width:90px;
}
.profile-hero-stat-val { font-size:22px; font-weight:800; font-family:var(--mono); }
.profile-hero-stat-val.green { color:var(--gr); }
.profile-hero-stat-val.accent { color:var(--ac); }
.profile-hero-stat-label { font-size:11px; color:var(--tx3); text-transform:uppercase; letter-spacing:.5px; margin-top:2px; }

.profile-info-row { display:flex; justify-content:space-between; align-items:center; padding:12px 0; border-bottom:1px solid var(--bdr); }
.profile-info-label { font-size:14px; color:var(--tx2); }
.profile-info-val { font-size:14px; font-weight:700; }

.input-with-icon { position:relative; display:flex; align-items:center; }
.input-icon { position:absolute; left:14px; color:var(--tx3); font-size:14px; font-weight:700; z-index:1; pointer-events:none; }
.input-pl { padding-left:32px !important; }

@media(max-width:768px) {
  .profile-hero-content { flex-direction:column; align-items:flex-start; gap:16px; }
  .profile-hero-stats { margin-left:0; width:100%; justify-content:space-between; }
  .profile-hero-stat { flex:1; }
  .profile-avatar { width:64px; height:64px; font-size:22px; border-radius:16px; }
  .profile-hero-name { font-size:22px; }
}

/* ═══ FILE MANAGER ═══ */
.file-row {
  display:flex; align-items:center; gap:12px;
  padding:12px 20px; border-bottom:1px solid var(--bdr);
  font-size:14px; transition:.15s; cursor:default;
}
.file-row:last-child { border-bottom:none; }
.file-row-dir, .file-row-back { cursor:pointer; }
.file-row-dir:hover, .file-row-back:hover { background:var(--acbg); }
.file-name { flex:1; font-weight:600; }
.file-size { min-width:80px; text-align:right; }
.file-date { min-width:100px; text-align:right; }
@media(max-width:600px) { .file-size, .file-date { display:none; } }

/* ═══ IP COPY ═══ */
.ip-copy {
  cursor:pointer; position:relative;
  color:#4b5563; transition:all .2s;
  border-radius:6px; padding:2px 6px; margin:-2px -6px;
}
.ip-copy:hover { background:#eef2ff; color:#4f46e5; }
.ip-copy-hint { font-size:12px; opacity:0.4; transition:opacity .2s; }
.ip-copy:hover .ip-copy-hint { opacity:1; }

/* ═══ DRAG & DROP ZONE ═══ */
.drop-zone {
  position:relative; min-height:100px; padding:0;
}
.drop-zone-overlay {
  display:none; position:absolute; inset:0; z-index:10;
  background:rgba(99,102,241,0.08);
  border:3px dashed #6366f1;
  border-radius:12px;
  align-items:center; justify-content:center;
  flex-direction:column;
  backdrop-filter:blur(2px);
  animation:dropPulse 1.5s ease-in-out infinite;
}
@keyframes dropPulse {
  0%,100% { border-color:#6366f1; background:rgba(99,102,241,0.08); }
  50% { border-color:#818cf8; background:rgba(99,102,241,0.14); }
}
.drop-zone-overlay.active { display:flex; }
.drop-zone-content {
  display:flex; flex-direction:column; align-items:center; gap:8px;
  pointer-events:none;
}
.drop-zone-text {
  font-size:18px; font-weight:700; color:#6366f1;
  text-align:center;
}
.drop-zone-sub {
  font-size:13px; color:#818cf8;
}
/* Upload progress */
.upload-progress-bar {
  display:flex; align-items:center; gap:12px;
  padding:8px 16px; background:var(--bg2);
  border-bottom:1px solid var(--bdr);
}
.upload-progress-track {
  flex:1; height:6px; background:var(--bdr); border-radius:3px; overflow:hidden;
}
.upload-progress-fill {
  height:100%; background:linear-gradient(90deg,#6366f1,#818cf8);
  border-radius:3px; transition:width 0.3s; width:0;
}
.upload-progress-text {
  font-size:12px; color:var(--t2); white-space:nowrap; min-width:180px;
}
.file-check { width:16px; height:16px; accent-color:#6366f1; flex-shrink:0; }
.show-mobile { display:none; }
@media(max-width:768px) { .show-mobile { display:block; } }

/* ═══ ORDER PAGE ═══ */
.config-grid {
  display:grid; grid-template-columns:1fr 380px; gap:24px; align-items:start;
}
.config-section { margin-bottom:24px; }
.config-label {
  font-size:13px; font-weight:700; color:#4b5563;
  text-transform:uppercase; letter-spacing:0.5px;
  margin-bottom:10px;
}
.opt-row {
  display:flex; flex-wrap:wrap; gap:10px;
}

/* Order Summary Card */
.order-summary {
  background:#ffffff; border:2px solid #d1d5db;
  border-radius:20px; padding:28px;
  position:sticky; top:88px;
  box-shadow:0 2px 12px rgba(0,0,0,.04);
}
.order-title {
  font-size:18px; font-weight:800; letter-spacing:-0.3px;
  margin-bottom:20px; padding-bottom:16px;
  border-bottom:2px solid #e5e7eb;
}
.order-row {
  display:flex; justify-content:space-between; align-items:center;
  padding:10px 0;
  border-bottom:1px solid #f3f4f6;
  font-size:14px;
}
.order-label { color:#6b7280; }
.order-val { font-weight:700; color:#111827; }
.order-total {
  display:flex; justify-content:space-between; align-items:center;
  padding:16px 0 0;
  margin-top:8px;
  border-top:2px solid #e5e7eb;
  font-size:16px; font-weight:800;
}
.order-price {
  font-size:28px; font-weight:800;
  font-family:var(--mono); color:#10b981;
  letter-spacing:-1px;
}

/* Navigation badges */
.nav-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(239,68,68,.4);
  animation: badgePulse 2s infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}


/* IP Badge */
.ip-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg2);
  border: 1px solid var(--bdr);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--tx1);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.ip-badge:hover {
  background: var(--ac);
  color: #fff;
  border-color: var(--ac);
}


/* Drag & drop files */
.drag-handle {
  cursor: grab;
  color: #cbd5e1;
  font-size: 16px;
  padding: 4px;
  margin-right: 4px;
  user-select: none;
  transition: color .15s;
  line-height: 1;
}
.drag-handle:hover { color: var(--ac); }
.drag-handle:active { cursor: grabbing; }
.file-row.dragging { opacity: 0.3; background: var(--ac) !important; }
.file-row.drag-over { background: #6366f115 !important; outline: 2px dashed var(--ac); outline-offset: -2px; }
.file-row-back.drag-over { background: #6366f115 !important; outline: 2px dashed var(--ac); outline-offset: -2px; }


/* ═══ MOONSERV MOBILE FIX v1 — полный адаптив панели ═══ */
@media (max-width:768px) {
  html, body { overflow-x:hidden; }
  .panel-layout, .panel-main, .panel-container { max-width:100%; overflow-x:hidden; }

  /* Верхнее меню раскрывается по бургеру (перебивает display:none !important) */
  .panel-topnav .topnav-links.open {
    display:flex !important; flex-direction:column;
    position:fixed; top:56px; left:0; right:0;
    max-height:calc(100vh - 56px); overflow-y:auto;
    background:#fff; border-bottom:1px solid #e5e7eb;
    box-shadow:0 12px 40px rgba(0,0,0,.14);
    padding:10px; gap:4px; z-index:300;
  }
  .panel-topnav .topnav-links.open > a,
  .panel-topnav .topnav-links.open .topnav-dropdown > a {
    width:100%; padding:14px 16px; font-size:15px; border-radius:12px;
  }
  .topnav-links.open .topnav-dropdown { width:100%; }
  .topnav-links.open .topnav-dropdown .dropdown-menu {
    position:static !important; box-shadow:none !important; border:none !important;
    background:transparent; min-width:0; padding:4px 0 4px 10px;
  }
  .topnav-links.open .topnav-dropdown .dropdown-menu a {
    padding:12px 14px; font-size:14px; border-radius:10px;
  }

  /* Консоль */
  .console { max-height:46vh; }
  .console-input { display:flex; gap:8px; margin-top:10px; }
  .console-input .input { flex:1; min-width:0; }
  .console-input .btn { white-space:nowrap; }

  /* Таблицы: горизонтальный скролл вместо обрезки */
  .table-card { overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .table-card table.dt { min-width:520px; }

  /* Шапка сервера: кнопки на всю ширину */
  .detail-header .flex.gap-8 { width:100%; flex-wrap:wrap; }
  .detail-header .flex.gap-8 .btn { flex:1; min-width:110px; justify-content:center; }

  /* Инпуты 16px — iOS не зумит; крупнее тапы */
  .input, select.input, textarea.input { font-size:16px; }
  .btn { min-height:42px; }
}
