:root {
  /* Pro Pure Black & White Monochrome Theme */
  --icy: #e5e5e5;
  --baby: #ffffff;
  --energy: #ffffff;
  --sapphire: #ffffff;
  --ultrasonic: #d4d4d4;

  --bg: #000000;
  --bg-elevated: #070707;
  --bg-card: #0b0b0b;
  --bg-soft: #141414;
  --border: #222222;
  --text: #ffffff;
  --text-dim: #999999;
  --accent: #ffffff;
  --accent-2: #cccccc;
  --accent-grad: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
  --green: #22c55e;
  --green-bg: #071e10;
  --red: #ef4444;
  --red-bg: #260a0c;
  --yellow: #facc15;
  --yellow-bg: #241d04;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.85);
  --radius: 12px;
  font-size: 15px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
code { background: var(--bg-soft); padding: 1px 6px; border-radius: 5px; font-size: 0.9em; color: var(--accent-2); }
::selection { background: var(--baby); color: #071125; }

/* ---------------------------------------------------------------- shell */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex-shrink: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 18px 14px;
  position: sticky; top: 0; height: 100vh;
  z-index: 40;
  transition: transform .25s ease;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; padding: 6px 8px 22px; letter-spacing: -.01em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--accent-grad);
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px; color: white;
  box-shadow: var(--shadow-md); flex-shrink: 0;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; color: var(--text-dim); font-weight: 600; margin-bottom: 3px;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.nav-link:hover { background: var(--bg-soft); color: var(--text); transform: translateX(2px); }
.nav-link.active { background: #ffffff; color: #000000; box-shadow: var(--shadow-sm); }
.nav-spacer { flex: 1; }
.nav-user { padding: 12px 10px; border-top: 1px solid var(--border); }
.nav-user-name { font-weight: 700; font-size: 14px; }
.nav-logout { font-size: 12.5px; color: var(--text-dim); }
.nav-logout:hover { color: var(--red); }

.hamburger {
  display: none;
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-elevated); align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.hamburger span, .hamburger span::before, .hamburger span::after {
  display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; position: relative; transition: all .2s ease;
}
.hamburger span::before, .hamburger span::after { content: ""; position: absolute; left: 0; }
.hamburger span::before { top: -6px; }
.hamburger span::after { top: 6px; }
.sidebar-backdrop { display: none; }

.topbar { display: none; }

.content { flex: 1; min-width: 0; padding: 28px 36px 60px; }
.content-inner { max-width: 1180px; margin: 0 auto; width: 100%; }

.page-title { margin: 0 0 4px; font-size: 26px; letter-spacing: -.01em; }
.page-sub { margin: 0 0 22px; color: var(--text-dim); }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }

.flashes { margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.flashes-auth { max-width: 380px; margin: 24px auto 0; padding: 0 16px; }
.flash { padding: 11px 15px; border-radius: 10px; font-size: 14px; font-weight: 500; }
.flash-error { background: var(--red-bg); color: var(--red); border: 1px solid color-mix(in srgb, var(--red) 25%, transparent); }
.flash-success { background: var(--green-bg); color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 25%, transparent); }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 10px 18px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-elevated); color: var(--text); font-size: 14px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease, opacity .12s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-1.5px); box-shadow: var(--shadow-sm); border-color: var(--baby); }
.btn:active { transform: translateY(0) scale(.97); box-shadow: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background: var(--accent-grad); border-color: transparent; color: white; box-shadow: var(--shadow-sm); }
.btn-primary:hover { box-shadow: var(--shadow-md); }
.btn-danger { background: var(--red-bg); border-color: color-mix(in srgb, var(--red) 30%, transparent); color: var(--red); }
.btn-danger:hover { background: var(--red); color: white; border-color: var(--red); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }

/* ------------------------------------------------------------ dashboard */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tile {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  display: block; position: relative; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tile::before {
  content: ""; position: absolute; inset: 0; opacity: 0; background: var(--accent-grad);
  transition: opacity .18s ease; z-index: 0;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.tile:hover::before { opacity: 1; }
.tile-icon, .tile-name, .tile-desc { position: relative; z-index: 1; transition: color .18s ease; }
.tile-icon { font-size: 30px; margin-bottom: 12px; }
.tile-name { font-weight: 800; font-size: 18px; color: var(--text); margin-bottom: 4px; }
.tile-desc { color: var(--text-dim); font-size: 13.5px; }
.tile:hover .tile-name, .tile:hover .tile-desc { color: white; }

/* ----------------------------------------------------------------- cards */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.form-card { max-width: 560px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 15px; }
.form-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--text-dim); font-weight: 700; }
.form-card input[type=text], .form-card input[type=password], .form-card input[type=number], .form-card select, .form-card textarea {
  background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; color: var(--text); font-size: 14px; font-family: inherit;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.form-card input:focus, .form-card select:focus, .form-card textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.auth-check { flex-direction: row !important; align-items: center; gap: 8px !important; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.field-hint { color: var(--text-dim); font-size: 12.5px; margin: -4px 0 0; }
.danger-zone { border-color: color-mix(in srgb, var(--red) 30%, var(--border)); }
.danger-zone h3 { margin: 0 0 6px; color: var(--red); font-size: 15px; }

/* ------------------------------------------------------------------ auth */
.auth-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; background:
  radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--icy) 45%, transparent), transparent),
  radial-gradient(1000px 600px at 100% 110%, color-mix(in srgb, var(--sapphire) 22%, transparent), transparent), var(--bg); }
.auth-card { width: 100%; max-width: 380px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 15px; box-shadow: var(--shadow-lg); }
.auth-brand { justify-content: center; font-size: 20px; margin-bottom: 4px; }
.auth-sub { text-align: center; color: var(--text-dim); font-size: 13.5px; margin: 0 0 6px; }
.auth-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-dim); font-weight: 700; }
.auth-card input[type=text], .auth-card input[type=password] {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; color: var(--text); font-size: 14px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.auth-card input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.auth-switch { text-align: center; font-size: 13.5px; color: var(--text-dim); margin: 4px 0 0; }

.empty-state { text-align: center; padding: 70px 20px; color: var(--text-dim); }
.empty-state .btn { margin-top: 16px; }

/* --------------------------------------------------------------- servers */
.server-list { display: flex; flex-direction: column; gap: 9px; }
.server-row {
  display: flex; align-items: center; gap: 14px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 15px 18px; color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.server-row:hover { border-color: var(--baby); box-shadow: var(--shadow-sm); transform: translateX(2px); }
.server-row-status { width: 9px; height: 9px; border-radius: 50%; background: var(--text-dim); flex-shrink: 0; }
.server-row-status.on { background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 18%, transparent); animation: pulse-dot 2s infinite; }
.server-row-status.off { background: #B9C4D6; }
@keyframes pulse-dot { 0%,100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 18%, transparent); } 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--green) 8%, transparent); } }
.server-row-main { flex: 1; min-width: 0; }
.server-row-name { font-weight: 700; }
.server-row-meta { color: var(--text-dim); font-size: 12.5px; margin-top: 2px; }
.tag { font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.tag-auto { background: var(--bg-soft); color: var(--accent); margin-right: 6px; }
.tag-on { background: var(--green-bg); color: var(--green); }
.tag-off { background: var(--bg-soft); color: var(--text-dim); }

.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 4px; }
.type-grid-2 { grid-template-columns: repeat(2, 1fr); }
.type-grid-3 { grid-template-columns: repeat(3, 1fr); }
.type-card {
  border: 1.5px solid var(--border); border-radius: 12px; padding: 14px; text-align: center; cursor: pointer;
  background: var(--bg); font-size: 13.5px; font-weight: 700; transition: all .15s ease;
}
.type-card:hover { border-color: var(--baby); transform: translateY(-1px); }
.type-card input { display: none; }
.type-card:has(input:checked) { border-color: var(--accent); background: var(--bg-soft); color: var(--accent-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }

.status-pill { font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .02em; }
.status-pill.on { background: var(--green-bg); color: var(--green); }
.status-pill.off { background: var(--bg-soft); color: var(--text-dim); }
.server-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.autostart-toggle { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-dim); margin-left: 6px; font-weight: 600; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab-btn { background: none; border: none; color: var(--text-dim); font-weight: 700; font-size: 14px; padding: 11px 15px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; transition: color .15s ease; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.term-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.term-tabbar { display: flex; align-items: center; gap: 4px; overflow-x: auto; flex: 1; min-width: 0; }
.term-tab { display: inline-flex; align-items: center; background: var(--bg-soft); border: 1px solid var(--border); border-bottom: none; color: var(--text-dim); font-size: 12.5px; font-weight: 700; padding: 8px 10px 8px 13px; border-radius: 9px 9px 0 0; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.term-tab.active { color: var(--text); background: #0B1220; }
.term-tab-close { margin-left: 8px; opacity: .55; display: inline-flex; align-items: center; border-radius: 5px; padding: 2px; }
.term-tab-close:hover { opacity: 1; background: var(--red-bg); color: var(--red); }
.term-tab-add { background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-dim); border-radius: 9px; width: 32px; height: 32px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .12s ease; }
.term-tab-add:hover { background: var(--accent); color: white; border-color: var(--accent); transform: scale(1.05); }
.term-views { background: #0B1220; border: 1px solid var(--border); border-radius: 0 12px 12px 12px; padding: 8px; }
.term-view { display: none; height: min(58vh, 460px); }
.term-view.active { display: block; }

/* ---------------------------------------------------------- file manager */
.fm-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.fm-breadcrumb { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 160px; font-size: 13.5px; color: var(--text-dim); flex-wrap: wrap; }
.fm-breadcrumb a { color: var(--text-dim); font-weight: 600; }
.fm-breadcrumb a:hover { color: var(--accent); }
.fm-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.fm-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.fm-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.fm-table tr:last-child td { border-bottom: none; }
.fm-table tr:hover { background: var(--bg-soft); }
.fm-name { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.fm-name-text { color: var(--text); font-weight: 600; }
.fm-actions-cell { text-align: right; white-space: nowrap; }
.fm-actions-cell .btn { margin-left: 4px; }
.fm-drop { border: 2px dashed var(--border); border-radius: var(--radius); padding: 26px; text-align: center; color: var(--text-dim); margin-bottom: 14px; font-size: 13.5px; transition: all .15s ease; }
.fm-drop.dragover { border-color: var(--accent); color: var(--accent-2); background: var(--bg-soft); transform: scale(1.005); }

/* ---------------------------------------------------------------- modals */
.modal-backdrop { position: fixed; inset: 0; background: rgba(16, 27, 51, .5); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; animation: fade-in .15s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; padding: 22px; width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-lg); animation: pop-in .15s ease; max-height: 88vh; overflow: auto; }
.modal-wide { max-width: 860px; }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.modal h3 { margin: 0; font-size: 17px; }
.modal textarea { width: 100%; min-height: 380px; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 12px; font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px; resize: vertical; }
.modal input[type=text], .modal select { width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 9px; padding: 10px 12px; font-size: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.media-preview { display: flex; align-items: center; justify-content: center; background: #0B1220; border-radius: 12px; overflow: hidden; min-height: 200px; }
.media-preview img { max-width: 100%; max-height: 70vh; display: block; }
.media-preview video { max-width: 100%; max-height: 70vh; display: block; }
.media-preview audio { width: 100%; margin: 30px 20px; }
.media-fallback { color: var(--text-dim); text-align: center; padding: 40px 20px; font-size: 13.5px; }

.toast-wrap { position: fixed; bottom: calc(20px + var(--up-offset, 0px)); right: 20px; left: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 200; pointer-events: none; }
.toast { background: var(--bg-card); border: 1px solid var(--border); border-left: 3px solid var(--accent); padding: 11px 16px; border-radius: 10px; font-size: 13.5px; box-shadow: var(--shadow-lg); animation: toast-in .18s ease; max-width: 340px; pointer-events: auto; }
.toast.error { border-left-color: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- media (responsive) */
@media (min-width: 1600px) {
  .content-inner { max-width: 1320px; }
}

@media (max-width: 900px) {
  .shell { display: block; }
  .topbar {
    display: flex; align-items: center; gap: 12px; justify-content: space-between;
    padding: 12px 16px; background: var(--bg-elevated); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 30;
  }
  .topbar .brand { padding: 0; font-size: 15px; }
  /* the topbar itself was flipping to display:flex on mobile, but the
     hamburger button inside it was still sitting on its desktop default of
     display:none -- so the ONLY way to open the drawer never appeared. Every
     page's topbar showed a brand + bell with no working way back to nav. */
  .hamburger { display: flex; }
  .sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; width: 260px;
    transform: translateX(-100%); box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open {
    display: block; position: fixed; inset: 0; background: rgba(16,27,51,.45); z-index: 39;
  }
  .content { padding: 18px 16px 50px; }
  .page-title { font-size: 22px; }
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .type-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ------------------------------------------------------------------ icons */
.icon { display: inline-block; vertical-align: -3px; flex-shrink: 0; }
.nav-icon { opacity: .85; }
.btn .icon { vertical-align: -3px; }
.btn-icon { padding: 7px; width: 32px; height: 32px; }
.btn-icon .icon { vertical-align: middle; margin: 0; }
.btn-icon-danger:hover { background: var(--red-bg); color: var(--red); border-color: transparent; }
.fm-file-icon { color: var(--accent); opacity: .85; display: inline-flex; }
.fm-breadcrumb .icon { vertical-align: -2px; margin: 0 2px; opacity: .55; }
.brand-mark-svg { flex-shrink: 0; box-shadow: var(--shadow-md); border-radius: 9px; }

/* ------------------------------------------------------- sidebar / drawer */
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 4px; }
.drawer-close { display: none; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text-dim); align-items: center; justify-content: center; cursor: pointer; }
.nav-bell-row { display: flex; align-items: center; gap: 10px; padding: 4px 12px 10px; color: var(--text-dim); font-weight: 600; font-size: 13.5px; }
body.no-scroll { overflow: hidden; }

/* -------------------------------------------------------- notification bell */
.bell-btn { position: relative; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-dim); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .12s ease; flex-shrink: 0; }
.bell-btn:hover { color: var(--accent); border-color: var(--baby); transform: translateY(-1px); }
.bell-badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--red); color: white; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--bg-elevated); }
.notif-dropdown {
  position: fixed; width: 320px; max-width: calc(100vw - 24px); max-height: 70vh; overflow: auto;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  z-index: 120; animation: pop-in .15s ease;
}
.notif-dropdown-head { font-weight: 800; font-size: 13.5px; padding: 12px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-card); }
.notif-dropdown-body { display: flex; flex-direction: column; }
.notif-item { display: flex; flex-direction: column; gap: 3px; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text); }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-soft); }
.notif-item.unread { background: var(--bg-soft); }
.notif-item.unread .notif-msg { font-weight: 700; }
.notif-msg { font-size: 13.5px; }
.notif-time { font-size: 11px; color: var(--text-dim); }
.notif-empty { padding: 24px 16px; text-align: center; color: var(--text-dim); font-size: 13px; }

/* ---------------------------------------------------- modal close + media */
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text-dim); display: flex;
  align-items: center; justify-content: center; cursor: pointer; z-index: 2;
}
.modal-close:hover { background: var(--red-bg); color: var(--red); border-color: transparent; }
.modal { position: relative; }
.media-preview.zoomed { overflow: auto; cursor: zoom-out; }
.media-preview.zoomed img { max-width: none; max-height: none; width: auto; cursor: zoom-out; transform: scale(2); transform-origin: top left; }
.media-preview img { cursor: zoom-in; }
.media-preview:fullscreen, .media-preview:-webkit-full-screen { background: #000; min-height: 100vh; }
.media-preview:fullscreen img, .media-preview:-webkit-full-screen img { max-height: 100vh; }
.media-preview:fullscreen video, .media-preview:-webkit-full-screen video { max-height: 100vh; }

/* ------------------------------------------------------------ root toggle */
.root-toggle {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-elevated); font-size: 12.5px; font-weight: 700;
  color: var(--text-dim); cursor: pointer; user-select: none; transition: all .12s ease;
}
.root-toggle input { display: none; }
.root-toggle .icon { opacity: .8; }
.root-toggle:has(input:checked) { background: var(--red-bg); color: var(--red); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.root-toggle:has(input:checked) .icon { opacity: 1; }

.type-icon-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }

@media (max-width: 900px) {
  .drawer-close { display: flex; }
  /* topbar's own bell already covers mobile -- don't duplicate it inside the drawer */
  .nav-bell-row { display: none; }
}

@media (min-width: 901px) {
  .topbar { display: none !important; }
}

@media (max-width: 640px) {
  .fm-table thead { display: none; }
  .fm-table, .fm-table tbody, .fm-table tr, .fm-table td { display: block; width: 100%; }
  .fm-table tr { border-bottom: 1px solid var(--border); padding: 10px 4px; }
  .fm-table td { border-bottom: none; padding: 3px 10px; }
  .fm-table td[data-label]:not(:empty)::before { content: attr(data-label); display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); margin-top: 4px; }
  .fm-table td.fm-name-cell::before { content: none; }
  .fm-actions-cell { text-align: left; padding-top: 6px !important; }
  .fm-actions-cell .btn { margin: 4px 6px 0 0; }
  .modal { max-width: 100%; }
  .toast-wrap { left: 12px; right: 12px; bottom: calc(12px + var(--up-offset, 0px)); align-items: stretch; }
  .toast { max-width: none; }
}

/* ------------------------------------------------------- upload panel */
.up-panel {
  position: fixed; right: 20px; bottom: 20px; width: 380px; max-width: calc(100vw - 24px);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-lg); z-index: 150; overflow: hidden;
  animation: pop-in .18s ease; display: flex; flex-direction: column; max-height: min(70vh, 560px);
}
.up-panel[hidden] { display: none; }
.up-head { display: flex; align-items: center; gap: 8px; padding: 12px 10px 8px 14px; }
.up-head-icon {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--accent-grad); color: #fff;
}
.up-panel:not(.done):not(.has-errors) .up-head-icon .icon { animation: up-bob 1.2s ease-in-out infinite; }
@keyframes up-bob { 0%,100% { transform: translateY(1px); } 50% { transform: translateY(-2px); } }
.up-panel.done .up-head-icon { background: var(--green); }
.up-panel.has-errors .up-head-icon { background: var(--red); }
.up-title { flex: 1; min-width: 0; font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-icon-btn {
  width: 28px; height: 28px; border-radius: 8px; border: none; background: transparent; color: var(--text-dim);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; padding: 0;
  transition: background .12s ease, color .12s ease;
}
.up-icon-btn:hover { background: var(--bg-soft); color: var(--text); }
.up-icon-btn[hidden] { display: none; }
.up-toggle .icon { transform: rotate(90deg); transition: transform .18s ease; }
.up-panel.collapsed .up-toggle .icon { transform: rotate(-90deg); }

.up-overall { padding: 0 14px 10px; }
.up-bar { height: 8px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }
.up-bar-fill {
  height: 100%; width: 0; border-radius: inherit; background: var(--accent-grad);
  transition: width .25s linear; position: relative; overflow: hidden;
}
.up-panel:not(.done):not(.has-errors) .up-bar-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  animation: up-shine 1.4s linear infinite;
}
@keyframes up-shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.up-panel.done .up-bar-fill { background: var(--green); }
.up-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 7px; font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.up-pct { font-weight: 800; color: var(--text); }
.up-speed { color: var(--accent); font-weight: 700; }
.up-stats span:empty { display: none; }

.up-list { overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--border); }
.up-list:empty { display: none; }
.up-panel.collapsed .up-list, .up-panel.collapsed .up-foot { display: none; }
.up-row { padding: 9px 10px 9px 14px; border-bottom: 1px solid var(--border); }
.up-row:last-child { border-bottom: none; }
.up-row-top { display: flex; align-items: center; gap: 8px; }
.up-row-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-row-status { font-size: 11.5px; color: var(--text-dim); white-space: nowrap; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 4px; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.up-row-cancel { width: 24px; height: 24px; }
.up-row-bar { height: 4px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; margin-top: 6px; margin-right: 32px; }
.up-row-fill { height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .25s linear; }
.up-row.is-done .up-row-fill { background: var(--green); }
.up-row.is-done .up-row-status { color: var(--green); }
.up-row.is-error .up-row-fill { background: var(--red); width: 100% !important; opacity: .5; }
.up-row.is-error .up-row-status { color: var(--red); white-space: normal; }
.up-row.is-queued { opacity: .6; }
.up-row.is-finishing .up-row-fill { animation: pulse-fill 1s ease-in-out infinite; }
@keyframes pulse-fill { 50% { opacity: .5; } }

.up-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 10px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-dim); }
.up-foot .btn[hidden] { display: none; }

@media (max-width: 640px) {
  /* bottom sheet on phones: full width, clear of the home indicator */
  .up-panel {
    left: 8px; right: 8px; bottom: 8px; width: auto; max-width: none;
    max-height: 55vh; border-radius: 16px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .up-icon-btn { width: 34px; height: 34px; }
  .up-row-cancel { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .up-head-icon .icon, .up-bar-fill::after, .up-row.is-finishing .up-row-fill { animation: none !important; }
}

/* `display:flex` on .bell-badge was beating the [hidden] attribute, so an
   unread count of 0 still showed as a red "0" bubble */
.bell-badge[hidden] { display: none; }

/* ---------------------------------------------------------------- Admin / Host controls */
.admin-section { margin-top: 32px; }
.admin-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.admin-section-title { font-size: 16px; font-weight: 700; margin: 0; }
.badge-admin {
  background: var(--accent-grad); color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em;
}
.systemd-card { padding: 18px 20px; }
.systemd-card-body { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.systemd-info { display: flex; align-items: center; gap: 14px; }
.systemd-icon { font-size: 24px; }
.systemd-title { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.systemd-desc { font-size: 13px; color: var(--text-dim); }
.systemd-ctrl { display: flex; align-items: center; gap: 14px; }

/* Switch slider */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--border); transition: .25s; border-radius: 24px;
}
.switch .slider::before {
  position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
  background-color: white; transition: .25s; border-radius: 50%;
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ---------------------------------------------------------------- Server Header & Links */
.server-title-container { display: flex; align-items: center; gap: 14px; }
.server-icon-wrap {
  width: 48px; height: 48px; border-radius: 10px; overflow: hidden; background: var(--bg-soft);
  border: 1px solid var(--border); flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.server-icon-img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.server-url-badge { display: inline-flex; align-items: center; gap: 6px; }
.server-url-badge code { font-size: 12px; }
.btn-copy-inline { padding: 2px 8px; font-size: 11px; }
.server-icon-mini {
  width: 36px; height: 36px; border-radius: 7px; object-fit: cover;
  image-rendering: pixelated; margin-right: 6px; flex-shrink: 0;
}
.btn-copy-mini { padding: 4px 8px; font-size: 11px; }

/* ---------------------------------------------------------------- Minecraft MOTD & Appearance */
.mc-color-toolbar {
  display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; padding: 10px;
  background: var(--bg-soft); border-radius: 8px; border: 1px solid var(--border);
}
.mc-color-btn, .mc-style-btn {
  border: 1px solid rgba(0,0,0,0.15); border-radius: 4px; padding: 3px 7px;
  font-size: 11px; font-weight: 700; cursor: pointer; transition: transform .1s ease;
  font-family: inherit;
}
.mc-color-btn:hover, .mc-style-btn:hover { transform: scale(1.08); }
.mc-color-divider { width: 1px; height: 20px; background: var(--border); margin: 0 4px; align-self: center; }
.mc-style-btn { background: var(--bg-elevated); color: var(--text); border: 1px solid var(--border); }

/* Live MC Server list ping card */
.mc-ping-preview-label { font-size: 12.5px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
.mc-ping-preview {
  display: flex; gap: 12px; padding: 12px 14px; border-radius: 6px;
  background: #111111; color: #ffffff; font-family: monospace, sans-serif;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.8); border: 2px solid #2a2a2a;
  min-height: 74px;
}
.mc-ping-icon {
  width: 64px; height: 64px; border-radius: 4px; overflow: hidden;
  background: #222; flex-shrink: 0;
}
.mc-ping-icon img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.mc-ping-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.mc-ping-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.mc-ping-title { font-weight: bold; font-size: 14px; color: #ffffff; }
.mc-ping-stats { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #888888; }
.mc-ping-bars { font-size: 14px; }
.mc-ping-motd { font-size: 13px; line-height: 1.4; word-break: break-word; min-height: 36px; white-space: pre-wrap; }

/* Icon manager */
.icon-manager-row { display: flex; align-items: center; gap: 18px; margin-top: 10px; }
.icon-preview-box {
  width: 64px; height: 64px; border-radius: 8px; overflow: hidden;
  border: 2px solid var(--border); background: var(--bg-soft);
}
.icon-preview-box img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.icon-controls { display: flex; gap: 8px; align-items: center; }

/* ---------------------------------------------------------------- Modrinth Mods & Packs */
.addons-search-card { padding: 16px; margin-bottom: 16px; background: var(--bg-card); border-color: var(--border); }
.addons-search-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.addons-search-row input, .addons-search-row select {
  height: 42px; min-width: 0; padding: 0 13px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--bg-soft); color: var(--text); font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.addons-search-row input::placeholder { color: var(--text-dim); opacity: .8; }
.addons-search-row input:focus, .addons-search-row select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.addons-search-row .input-search { flex: 1 1 280px; min-width: 220px; }
.addons-search-row #modrinth-type { flex: 0 1 150px; }
.addons-search-row .addons-version-filter { flex: 0 1 130px; }
.addons-search-row .addons-loader-filter { flex: 0 1 140px; }
.addons-search-row #btn-modrinth-search { border-radius: 12px; }
.addons-filters-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.addons-view-tabs { display: flex; gap: 6px; }
.addons-view-tabs .btn.active { background: var(--bg-soft); color: var(--accent); font-weight: 700; }

.addons-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px; margin-top: 14px;
}
.addon-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease;
}
.addon-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.addon-card-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.addon-icon { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.addon-icon-placeholder {
  width: 44px; height: 44px; border-radius: 8px; background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
}
.addon-card-meta { flex: 1; min-width: 0; }
.addon-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addon-badges { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 11px; }
.addon-tag { background: var(--bg-soft); color: var(--text-dim); padding: 1px 6px; border-radius: 4px; text-transform: capitalize; }
.tag-req { background: #fee2e2; color: #dc2626; padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.tag-opt { background: #ecfdf5; color: #059669; padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.addon-downloads { color: var(--text-dim); margin-left: auto; font-size: 11px; }
.addon-desc {
  font-size: 12.5px; color: var(--text-dim); line-height: 1.4;
  margin: 0 0 12px; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.addon-card-foot { display: flex; justify-content: flex-end; align-items: center; }

.addons-loading, .addons-empty {
  padding: 36px 16px; text-align: center; color: var(--text-dim); font-size: 14px; grid-column: 1 / -1;
}
.mc-loader-option { display: flex; align-items: center; justify-content: center; gap: 7px; }
.recommended-badge {
  padding: 3px 7px; border-radius: 999px; background: var(--green-bg); color: var(--green);
  font-size: 10px; font-weight: 800; line-height: 1.2;
}

@media (max-width: 600px) {
  .addons-search-row .input-search { flex-basis: 100%; }
  .addons-search-row #modrinth-type { flex: 1 1 45%; }
  .addons-search-row .addons-version-filter,
  .addons-search-row .addons-loader-filter { flex: 1 1 45%; }
  .addons-search-row #btn-modrinth-search { flex: 1 1 100%; }
}

/* Installed addons list */
.installed-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.installed-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; background: var(--bg-soft); border-radius: 8px; border: 1px solid var(--border);
}
.installed-row-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.installed-type-badge {
  font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px;
  background: var(--accent); color: white;
}
.installed-type-badge.resourcepack { background: #8b5cf6; }
.installed-name { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.installed-size { font-size: 12px; color: var(--text-dim); flex-shrink: 0; }

/* ---------------------------------------------------------------- Players */
.players-card { padding: 18px; }
.players-nav-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.players-tab-toggles { display: flex; gap: 6px; }
.players-tab-toggles .btn.active { background: var(--bg-soft); color: var(--accent); font-weight: 700; }
.players-list { display: flex; flex-direction: column; gap: 8px; }
.player-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
}
.player-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.player-avatar { width: 36px; height: 36px; border-radius: 6px; image-rendering: pixelated; flex-shrink: 0; }
.player-name { font-weight: 700; font-size: 14px; margin-right: 6px; }
.player-tag {
  font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px;
  text-transform: uppercase; margin-right: 4px;
}
.player-tag.on { background: #dcfce7; color: #166534; }
.player-tag.off { background: var(--bg-soft); color: var(--text-dim); }
.player-tag.banned { background: #fee2e2; color: #991b1b; }
.player-tag.op { background: #fef3c7; color: #92400e; }
.player-uuid { font-size: 11px; color: var(--text-dim); font-family: monospace; }
.player-ban-reason { font-size: 12px; color: var(--text); margin-top: 2px; }
.player-ban-meta { font-size: 11px; color: var(--text-dim); }
.player-actions { display: flex; gap: 6px; flex-shrink: 0; }


/* --------------------------------------- VEXO HOSTING Black & White Pro UI */
.btn-primary { background: #ffffff !important; color: #000000 !important; border: 1px solid #ffffff !important; font-weight: 700; }
.btn-primary:hover { background: #e2e2e2 !important; color: #000000 !important; }
.btn-ghost { background: #0d0d0d; color: #ffffff; border: 1px solid #2b2b2b; }
.btn-ghost:hover { background: #1a1a1a; border-color: #444; }
.btn-xs { padding: 4px 9px; font-size: 12px; border-radius: 6px; }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 8px; }

.brand-logo-img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; border: 1px solid #2a2a2a; }
.brand-name { font-weight: 900; font-size: 15px; letter-spacing: .12em; line-height: 1.1; }
.brand-sub { font-size: 10px; letter-spacing: .22em; color: #888; font-family: monospace; }
.auth-logo-wrap { display: flex; justify-content: center; margin-bottom: 14px; }
.auth-logo-img { width: 150px; height: 150px; object-fit: cover; border-radius: 12px; border: 1px solid #262626; }
.auth-card { background: #080808 !important; border: 1px solid #222 !important; }

.topbar-right { display: flex; align-items: center; gap: 8px; }
.sidebar-wallet {
  margin: 0 4px 14px; padding: 10px 12px; border-radius: 10px;
  background: #0d0d0d; border: 1px solid #222;
  display: flex; flex-direction: column; gap: 6px;
}
.wallet-row { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; }
.wallet-label { color: #888; font-weight: 700; letter-spacing: .08em; font-family: monospace; }
.wallet-val { color: #fff; font-weight: 800; font-family: monospace; }

.vip-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  background: #ffffff; color: #000000;
  font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  width: fit-content;
}
.nav-tag {
  margin-left: auto; font-size: 10px; padding: 1px 6px; border-radius: 4px;
  background: #1c1c1c; color: #aaa; border: 1px solid #333; font-family: monospace;
}
.nav-link-vdx { border: 1px dashed #333; margin-top: 6px; }
.nav-user-email { font-size: 11.5px; color: #777; overflow: hidden; text-overflow: ellipsis; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: #0a0a0a; border: 1px solid #222; border-radius: 12px; padding: 18px; }
.stat-label { font-size: 11px; color: #888; letter-spacing: .1em; font-weight: 700; font-family: monospace; }
.stat-value { font-size: 28px; font-weight: 900; margin: 6px 0 2px; color: #fff; }
.stat-unit { font-size: 14px; color: #777; font-weight: 600; }
.stat-note { font-size: 12px; color: #888; }

.panel-card { background: #0a0a0a; border: 1px solid #222; border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.panel-card h2 { margin: 0 0 6px; font-size: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.muted { color: #888; font-size: 13.5px; margin: 0; }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 16px; }
.shop-item { background: #0f0f0f; border: 1px solid #242424; border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 10px; justify-content: space-between; }
.shop-title { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shop-desc { font-size: 13px; color: #999; line-height: 1.45; }
.shop-boost-form { display: flex; flex-direction: column; gap: 8px; }
.shop-boost-form select { background: #050505; color: #fff; border: 1px solid #2a2a2a; border-radius: 7px; padding: 7px 10px; }

.dev-badge { font-size: 10px; padding: 2px 7px; border-radius: 999px; background: #1e1e1e; color: #facc15; border: 1px solid #443a0a; font-family: monospace; letter-spacing: .06em; }
.vip-price { font-size: 20px; font-weight: 800; color: #fff; }
.vip-perks-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.perk-chip { background: #141414; border: 1px solid #2b2b2b; padding: 5px 11px; border-radius: 8px; font-size: 12.5px; font-family: monospace; }

.vdx-users-list { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.vdx-user-row { background: #0e0e0e; border: 1px solid #242424; border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.vdx-user-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.vdx-user-actions { display: flex; gap: 8px; }
.vdx-user-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.vdx-user-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #aaa; }
.vdx-user-fields input { background: #050505; color: #fff; border: 1px solid #2a2a2a; border-radius: 7px; padding: 8px 10px; }
.vdx-user-checks { display: flex; flex-wrap: wrap; gap: 14px; }

.tag-suspended { background: #260a0c; color: #ef4444; border: 1px solid #55161a; }
.cf-turnstile-wrap { margin: 12px 0; display: flex; justify-content: center; }
.flash-info { background: #111; color: #ddd; border: 1px solid #2e2e2e; }

/* --------------------------------------- ASCII Terminal-Pro Black & White */
:root {
  --radius: 3px;
  --mono: ui-monospace, "JetBrains Mono", "Fira Code", "Cascadia Code", Menlo, Consolas, monospace;
}

body {
  background: #000000;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  font-family: var(--mono);
  letter-spacing: -0.01em;
}

.sidebar {
  background: #030303 !important;
  border-right: 1px solid #2b2b2b !important;
}

.card, .panel-card, .stat-card, .shop-item, .server-row, .vdx-user-row {
  border-radius: 3px !important;
  border: 1px solid #2c2c2c !important;
  background: #050505 !important;
  position: relative;
}

.panel-card::before, .auth-card::before {
  content: "+------------------------------------------------------------------+";
  display: block;
  font-size: 10px;
  color: #3a3a3a;
  overflow: hidden;
  white-space: nowrap;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.nav-link {
  border-radius: 3px !important;
  font-size: 13px;
  border: 1px solid transparent;
}
.nav-link:hover {
  background: #0d0d0d !important;
  border-color: #2e2e2e;
  transform: none !important;
}
.nav-link.active {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #ffffff !important;
}
.nav-link.active::before {
  content: "> ";
  font-weight: 900;
}

.btn {
  border-radius: 3px !important;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
}

input, select, textarea {
  border-radius: 3px !important;
  font-family: var(--mono) !important;
  background: #000000 !important;
  color: #ffffff !important;
  border: 1px solid #333333 !important;
}
input:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: #ffffff !important;
}

/* Auth Page Pro ASCII */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.auth-card {
  width: 100%;
  max-width: 430px;
  background: #050505 !important;
  border: 1px solid #383838 !important;
  border-radius: 3px !important;
  padding: 26px 26px 24px !important;
  box-shadow: 0 0 0 1px #111, 0 24px 60px rgba(0, 0, 0, 0.95) !important;
}
.auth-ascii-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #888;
  border-bottom: 1px dashed #2a2a2a;
  padding-bottom: 10px;
  margin-bottom: 16px;
}
.auth-ascii-status { color: #22c55e; }
.auth-logo-img {
  width: 165px;
  height: 165px;
  border-radius: 3px !important;
  border: 1px solid #333 !important;
}
.auth-sub {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin: 0 0 18px;
}
.auth-card label {
  font-size: 12px;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.auth-footer-ascii {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed #262626;
  font-size: 11px;
  color: #666;
  text-align: center;
}

/* vdx Admin Panel */
.vdx-selector-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px;
  background: #090909;
  border: 1px solid #333;
  border-radius: 3px;
  margin-bottom: 16px;
}
.vdx-selector-bar label {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.vdx-selector-bar select {
  padding: 10px 12px;
  font-size: 13.5px;
}
.vdx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-top: 12px;
}
.vdx-table th, .vdx-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #1e1e1e;
  text-align: left;
}
.vdx-table th {
  color: #888;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.vdx-table tr:hover td { background: #0c0c0c; }

.auth-or {
  text-align: center;
  font-size: 11px;
  color: #555;
  margin: 12px 0;
  letter-spacing: 0.14em;
}
.btn-google {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #0a0a0a !important;
  color: #ffffff !important;
  border: 1px dashed #666666 !important;
  text-align: center;
  padding: 10px 14px;
}
.btn-google:hover {
  background: #141414 !important;
  border-color: #ffffff !important;
}
