/* ===== SirenPanel CSS v2.0 ===== */
:root {
  --bg-primary: #0f0f14;
  --bg-secondary: #16161d;
  --bg-tertiary: #1c1c26;
  --bg-card: #1a1a24;
  --bg-hover: #22222e;
  --bg-active: #2a2a38;
  --border: #2a2a38;
  --border-light: #353545;

  --text-primary: #e4e4ef;
  --text-secondary: #9898b0;
  --text-muted: #6a6a82;

  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-light: rgba(124, 58, 237, 0.15);
  --accent-glow: rgba(124, 58, 237, 0.4);

  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.12);
  --discord: #5865F2;
  --minecraft: #55ff55;

  --sidebar-width: 260px;
  --sidebar-collapsed: 70px;
  --topbar-height: 60px;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --transition: 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
input, textarea, select, button { font-family: inherit; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== LOGIN ===== */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  background-image: radial-gradient(ellipse at 50% 0%, rgba(124, 58, 237, 0.12) 0%, transparent 60%);
}
.login-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 420px;
  max-width: 95vw;
  box-shadow: var(--shadow-lg);
}
.login-logo { text-align: center; margin-bottom: 36px; }
.login-logo .logo-icon { font-size: 48px; margin-bottom: 12px; }
.login-logo h1 { font-size: 28px; font-weight: 800; background: linear-gradient(135deg, var(--accent), #a855f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.login-logo p { color: var(--text-muted); margin-top: 4px; font-size: 14px; }
.login-form .form-group { margin-bottom: 20px; }
.login-form label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; font-weight: 500; }
.login-form input {
  width: 100%; padding: 12px 16px; background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary); font-size: 14px; transition: var(--transition);
}
.login-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.login-error { background: var(--danger-bg); color: var(--danger); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 4px 16px var(--accent-glow); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #16a34a; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: var(--warning); color: #000; }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-xs { padding: 8px 14px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; padding: 14px; }
.btn-icon { background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 6px; border-radius: var(--radius-sm); transition: var(--transition); font-size: 18px; display: flex; align-items: center; }
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-group { display: flex; gap: 8px; }

/* ===== APP LAYOUT ===== */
.app { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-width); background: var(--bg-secondary); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  transition: width 0.3s ease;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .user-details { display: none; }
.sidebar.collapsed .sidebar-logo { justify-content: center; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 12px; }
.sidebar.collapsed .user-info { justify-content: center; }

.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 16px; border-bottom: 1px solid var(--border);
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; }
.sidebar-logo .logo-icon { font-size: 26px; }
.sidebar-logo .logo-text { font-weight: 800; font-size: 18px; background: linear-gradient(135deg, var(--accent), #a855f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sidebar-toggle { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 18px; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 0; }
.nav-section { margin-bottom: 8px; }
.nav-section-title { display: block; padding: 8px 20px 4px; font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); font-weight: 700; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 20px;
  color: var(--text-secondary); font-size: 14px; font-weight: 500; transition: var(--transition);
  cursor: pointer; margin: 2px 8px; border-radius: var(--radius-sm);
}
.nav-item i { font-size: 20px; width: 22px; text-align: center; }
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--accent-light); color: var(--accent); }

.sidebar-footer { padding: 16px; border-top: 1px solid var(--border); }
.user-info { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: white;
  flex-shrink: 0;
}
.user-details { flex: 1; min-width: 0; }
.user-name { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); }
.user-role { display: block; font-size: 11px; color: var(--text-muted); text-transform: capitalize; }

/* Main Content */
.main-content {
  flex: 1; margin-left: var(--sidebar-width); transition: margin-left 0.3s ease;
}
.sidebar.collapsed ~ .main-content { margin-left: var(--sidebar-collapsed); }

/* Topbar */
.topbar {
  height: var(--topbar-height); display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; border-bottom: 1px solid var(--border); background: var(--bg-secondary);
  position: sticky; top: 0; z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.sidebar-mobile-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 22px; cursor: pointer; }
.page-title { font-size: 20px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.topbar-stats { display: flex; gap: 16px; }
.topbar-stat { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); padding: 6px 12px; background: var(--bg-tertiary); border-radius: var(--radius-sm); }
.topbar-stat i { font-size: 14px; }
.notification-bell { position: relative; cursor: pointer; padding: 8px; }
.notification-bell i { font-size: 20px; color: var(--text-secondary); }
.notification-badge {
  position: absolute; top: 2px; right: 2px; background: var(--danger);
  color: white; font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 10px; min-width: 16px; text-align: center;
}

/* Page Container */
.page-container { padding: 24px; min-height: calc(100vh - var(--topbar-height)); max-width: 100%; overflow-x: hidden; }

/* ===== CARDS ===== */
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: var(--transition);
}
.card:hover { border-color: var(--border-light); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 20px; overflow: hidden; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--border); }

/* ===== GRID ===== */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* ===== STAT CARDS ===== */
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; align-items: flex-start; gap: 16px; transition: var(--transition);
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.stat-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
}
.stat-icon.purple { background: var(--accent-light); color: var(--accent); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.blue { background: var(--info-bg); color: var(--info); }
.stat-icon.orange { background: var(--warning-bg); color: var(--warning); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-info h4 { font-size: 24px; font-weight: 800; line-height: 1.2; }
.stat-info p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ===== SERVER CARDS ===== */
.server-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: var(--transition); cursor: pointer;
}
.server-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.server-card-header {
  padding: 16px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border);
}
.server-card-icon { font-size: 28px; }
.server-card-info { flex: 1; }
.server-card-info h4 { font-size: 15px; font-weight: 600; }
.server-card-info .server-type { font-size: 12px; color: var(--text-muted); text-transform: capitalize; }
.server-card-body { padding: 16px 20px; }
.server-card-body .server-detail { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 13px; }
.server-card-body .server-detail .label { color: var(--text-muted); }
.server-card-footer { padding: 12px 20px; display: flex; gap: 8px; border-top: 1px solid var(--border); }

/* Status badges */
.status-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
  border-radius: 20px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.status-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; }
.status-running { background: var(--success-bg); color: var(--success); }
.status-running::before { background: var(--success); animation: pulse 2s infinite; }
.status-stopped { background: var(--danger-bg); color: var(--danger); }
.status-stopped::before { background: var(--danger); }
.status-starting { background: var(--warning-bg); color: var(--warning); }
.status-starting::before { background: var(--warning); animation: pulse 1s infinite; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ===== CONSOLE ===== */
.console-container {
  background: #0d0d0d; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}
.console-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: var(--bg-tertiary); border-bottom: 1px solid var(--border);
}
.console-header h4 { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.console-header .console-actions { display: flex; gap: 8px; }
.console-output {
  height: 500px; overflow-y: auto; padding: 12px 16px; font-size: 12px; line-height: 1.7;
}
.console-line { white-space: pre-wrap; word-wrap: break-word; }
.console-line.info { color: #60a5fa; }
.console-line.error, .console-line.stderr { color: #f87171; }
.console-line.warn { color: #fbbf24; }
.console-line.command { color: #a78bfa; }
.console-line .time { color: var(--text-muted); margin-right: 8px; font-size: 10px; }
.console-input {
  display: flex; border-top: 1px solid var(--border);
}
.console-input input {
  flex: 1; padding: 12px 16px; background: #111; border: none; color: var(--text-primary);
  font-family: inherit; font-size: 13px;
}
.console-input input:focus { outline: none; }
.console-input button { padding: 12px 20px; background: var(--accent); border: none; color: white; font-size: 13px; cursor: pointer; font-weight: 600; }

/* ===== CONSOLE TAB BAR ===== */
.console-tab-bar {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.console-tab {
  padding: 10px 24px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}
.console-tab:hover {
  color: var(--text-primary);
}
.console-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.console-tab-panel {
  min-height: calc(100vh - var(--topbar-height) - 180px);
}

/* Files fullscreen view */
.console-files-fullscreen {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.console-files-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Server Process Stats */
.server-process-stats {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 12px;
}
.server-stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}
.server-stats-header h4 {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.server-stat-maxram {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
.server-stats-body {
  padding: 14px 16px;
  display: flex;
  gap: 24px;
  align-items: stretch;
}
.server-stat-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.server-stat-item:last-child {
  flex: 0 0 auto;
  min-width: 80px;
  align-items: center;
  justify-content: center;
}
.server-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.server-stat-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.server-stat-bar-wrap .progress-bar {
  flex: 1;
  min-width: 0;
  height: 10px;
}
.server-stat-value {
  font-size: 13px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  min-width: 60px;
  text-align: right;
}
@media (max-width: 768px) {
  .server-stats-body {
    flex-direction: column;
    gap: 12px;
  }
  .server-stat-item:last-child {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}



/* ===== FILE MANAGER ===== */
.file-manager { display: flex; flex-direction: column; height: calc(100vh - var(--topbar-height) - 48px); }
.file-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
}
.breadcrumb { display: flex; align-items: center; gap: 4px; font-size: 13px; flex-wrap: wrap; }
.breadcrumb-item {
  padding: 4px 8px; border-radius: 4px; cursor: pointer; color: var(--text-secondary);
  transition: var(--transition);
}
.breadcrumb-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.breadcrumb-item.active { color: var(--accent); font-weight: 600; }
.breadcrumb-sep { color: var(--text-muted); }

.file-list {
  flex: 1; overflow-y: auto; background: var(--bg-card); border: 1px solid var(--border);
  border-top: none; border-radius: 0 0 var(--radius) var(--radius);
}
.file-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: var(--transition);
}
.file-item:hover { background: var(--bg-hover); }
.file-item.selected { background: var(--accent-light); }
.file-item i { font-size: 20px; width: 24px; text-align: center; }
.file-item i.folder { color: #fbbf24; }
.file-item i.file { color: var(--text-muted); }
.file-item .file-name { flex: 1; font-size: 13px; font-weight: 500; }
.file-item .file-size { font-size: 12px; color: var(--text-muted); min-width: 80px; text-align: right; }
.file-item .file-date { font-size: 12px; color: var(--text-muted); min-width: 150px; text-align: right; }
.file-item .file-actions { display: flex; gap: 4px; flex-wrap: wrap; }

/* Move Dir Browser */
.move-dir-item:hover { background: var(--bg-secondary); }

/* File Editor */
.file-editor {
  height: calc(100vh - var(--topbar-height) - 100px);
}
.file-editor textarea {
  width: 100%; height: 100%; padding: 16px; background: #0d0d0d; border: none;
  color: var(--text-primary); font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 13px; line-height: 1.6; resize: none; tab-size: 4;
}
.file-editor textarea:focus { outline: none; }

/* ===== TABLE ===== */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); background: var(--bg-tertiary); border-bottom: 1px solid var(--border); }
td { padding: 12px 16px; font-size: 13px; border-bottom: 1px solid var(--border); }
tr:hover td { background: var(--bg-hover); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 14px; background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary); font-size: 13px; transition: var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light);
}
.form-group select { cursor: pointer; }
.form-group textarea { min-height: 100px; resize: vertical; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 24px; transition: var(--transition);
}
.toggle-slider::before {
  content: ''; position: absolute; height: 18px; width: 18px; left: 2px; bottom: 2px;
  background: var(--text-muted); border-radius: 50%; transition: var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); background: white; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.modal {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  width: 600px; max-width: 95vw; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.modal.modal-lg { width: 800px; }
.modal.modal-xl { width: 1000px; }
.modal.modal-xxl { width: 1200px; max-width: 95vw; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 700; flex: 1; }
.modal-external-editor-btn {
  flex-shrink: 0;
  background: var(--accent-light) !important;
  color: var(--accent) !important;
  border: 1px solid var(--accent) !important;
  font-size: 12px !important;
  transition: var(--transition);
}
.modal-external-editor-btn:hover {
  background: var(--accent) !important;
  color: white !important;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ===== TOAST ===== */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 2000; display: flex; flex-direction: column-reverse; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); min-width: 300px; max-width: 450px;
  animation: slideIn 0.3s ease; font-size: 13px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast.info { border-left: 3px solid var(--info); }
.toast i { font-size: 18px; }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast.info i { color: var(--info); }
.toast .toast-msg { flex: 1; }
.toast .toast-close { cursor: pointer; color: var(--text-muted); }

@keyframes slideIn { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }

/* ===== NOTIFICATION PANEL ===== */
.notification-panel {
  position: fixed; top: var(--topbar-height); right: 0; width: 360px;
  background: var(--bg-card); border-left: 1px solid var(--border);
  height: calc(100vh - var(--topbar-height)); z-index: 90; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.notification-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.notification-header h3 { font-size: 15px; font-weight: 600; }
.notification-list .notification-item { padding: 12px 20px; border-bottom: 1px solid var(--border); font-size: 13px; }
.notification-item .notif-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ===== PROGRESS BAR ===== */
.progress-bar { height: 8px; background: var(--bg-tertiary); border-radius: 4px; overflow: hidden; }
.progress-bar .progress-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.progress-fill.green { background: linear-gradient(90deg, #22c55e, #4ade80); }
.progress-fill.yellow { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.progress-fill.red { background: linear-gradient(90deg, #ef4444, #f87171); }
.progress-fill.purple { background: linear-gradient(90deg, var(--accent), #a855f7); }

/* ===== TABS ===== */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab {
  padding: 12px 24px; font-size: 14px; font-weight: 500; color: var(--text-muted);
  cursor: pointer; border-bottom: 2px solid transparent; transition: var(--transition);
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 48px; color: var(--text-muted); margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }

/* ===== LOADING ===== */
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; }
.spinner {
  width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== MONITORING ===== */
.metric-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; min-width: 0; overflow: hidden;
}
.metric-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.metric-header h4 { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.metric-value { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.metric-label { font-size: 12px; color: var(--text-muted); word-break: break-word; }

/* ===== SERVER LIST (Pterodactyl style) ===== */
.server-list { display: flex; flex-direction: column; gap: 8px; }
.server-list-item {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; display: flex; align-items: center; gap: 20px;
  transition: var(--transition); cursor: pointer;
}
.server-list-item:hover { border-color: var(--accent); background: var(--bg-hover); }
.server-list-icon { font-size: 30px; flex-shrink: 0; }
.server-list-name { flex: 1; min-width: 0; }
.server-list-name h4 { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-list-name p { font-size: 13px; color: var(--text-muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-list-stats { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.server-list-stat { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-secondary); white-space: nowrap; }
.server-list-stat i { font-size: 16px; }
.server-list-stat .ram-bar { width: 100px; height: 8px; background: var(--bg-tertiary); border-radius: 4px; overflow: hidden; display: inline-block; vertical-align: middle; }
.server-list-stat .ram-fill { height: 100%; border-radius: 4px; }
.server-list-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 768px) {
  .server-list-stats { display: none; }
  .server-list-item { flex-wrap: wrap; }
}

/* ===== SERVER DRAG & DROP REORDER ===== */
.server-list-item[draggable="true"] { cursor: grab; }
.server-list-item[draggable="true"]:active { cursor: grabbing; }
.server-list-item.dragging { opacity: 0.4; border: 1px dashed var(--accent); }
.server-list-item.drag-over { border-color: var(--primary); background: var(--accent-light); box-shadow: 0 0 0 2px var(--primary); }

/* ===== SERVER DETAIL TABS ===== */
.server-detail-tabs { scrollbar-width: thin; }
.server-detail-tabs::-webkit-scrollbar { height: 4px; }
.server-detail-tabs .server-tab { font-size: 12px; color: var(--text-secondary); background: none; border: none; padding: 6px 12px; white-space: nowrap; cursor: pointer; transition: var(--transition); }
.server-detail-tabs .server-tab:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.server-detail-tabs .server-tab.active { color: var(--primary); font-weight: 600; }
.server-tab-content { animation: fadeIn 0.2s ease; }

/* ===== PLUGIN CARDS ===== */
.plugin-platform-btn { font-size: 12px; padding: 4px 12px; }
.plugin-platform-btn.active { background: var(--primary); color: white; }
.plugin-card:hover { border-color: var(--accent) !important; }

/* ===== RESOURCE RANGE BTNS ===== */
.resource-range-btn { font-size: 11px; padding: 3px 10px; }
.resource-range-btn.active { background: var(--primary); color: white; }

/* ===== LOG FILE BTNS ===== */
.log-file-btn { font-size: 11px; }
.log-file-btn.active { background: var(--primary); color: white; }

/* ===== PLAYER WORLD MAP ===== */
.map-tooltip {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-primary);
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  white-space: nowrap;
  max-width: 250px;
}

/* ===== TPS CARDS ===== */
.tps-card { transition: var(--transition); }
.tps-card:hover { border-color: var(--accent) !important; transform: translateY(-2px); }

/* ===== PLAYER PROFILE ===== */
.player-chip { transition: all 0.15s !important; }
.player-chip:hover { border-color: var(--primary) !important; background: var(--accent-light) !important; }

/* ===== DRAG & DROP ===== */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 40px;
  text-align: center; cursor: pointer; transition: var(--transition);
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent); background: var(--accent-light);
}
.upload-zone i { font-size: 40px; color: var(--text-muted); margin-bottom: 12px; }
.upload-zone p { color: var(--text-secondary); font-size: 14px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .grid[style*="repeat(5"] { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid[style*="repeat(5"] { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%); position: fixed; z-index: 200;
    width: var(--sidebar-width) !important;
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; }
  .sidebar-mobile-toggle { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .topbar-stats { display: none; }
  .page-container { padding: 16px; }
}
