/* Dashboard Styles */
:root {
  --primary-color: #38bdf8;
  --primary-hover: #0ea5e9;
  --secondary-color: #6b7280;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --dark-bg: #111827;
  --darker-bg: #0f172a;
  --card-bg: #1e293b;
  --sidebar-bg: #0f172a;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --border-color: #334155;
  --input-bg: #1e293b;
  --glow-color: rgba(56, 189, 248, 0.5);
}

body[data-theme="light"] {
  --primary-color: #0ea5e9;
  --primary-hover: #0284c7;
  --secondary-color: #6b7280;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --dark-bg: #f9fafb;
  --darker-bg: #f3f4f6;
  --card-bg: #ffffff;
  --sidebar-bg: #f3f4f6;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --border-color: #e5e7eb;
  --input-bg: #f9fafb;
  --glow-color: rgba(14, 165, 233, 0.3);
}

/* General Styles */
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
    "Helvetica Neue", sans-serif;
  color: var(--text-primary);
  background-color: var(--dark-bg);
  transition: background-color 0.3s ease, color 0.3s ease;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

body[data-animations="disabled"] * {
  transition: none !important;
  animation: none !important;
}

body[data-saving-mode="enabled"] .network-canvas {
  opacity: 0.3;
}

/* Dashboard Layout */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 10;
}

/* Sidebar */
.dashboard-sidebar {
  width: 250px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

body[data-sidebar-position="right"] .dashboard-sidebar {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid var(--border-color);
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  display: flex;
  align-items: center;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--primary-color), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px var(--glow-color);
}

.sidebar-user {
  padding: 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 0.75rem;
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 10px var(--glow-color);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info {
  flex: 1;
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.user-tag {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  color: var(--text-secondary);
  position: relative;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.nav-item.active {
  background-color: rgba(56, 189, 248, 0.1);
  color: var(--primary-color);
  font-weight: 500;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--primary-color);
  box-shadow: 0 0 10px var(--glow-color);
}

.nav-item i {
  margin-right: 0.75rem;
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

.logout-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.logout-button:hover {
  background-color: rgba(239, 68, 68, 0.2);
}

.logout-button i {
  margin-right: 0.5rem;
}

/* Main Content */
.dashboard-content {
  flex: 1;
  margin-left: 250px;
  padding: 1.5rem;
  min-height: 100vh;
  position: relative;
  z-index: 10;
}

body[data-sidebar-position="right"] .dashboard-content {
  margin-left: 0;
  margin-right: 250px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.header-title h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(90deg, var(--primary-color), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px var(--glow-color);
}

/* Dashboard Sections */
.dashboard-section {
  display: none;
}

.dashboard-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stats Cards */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background-color: var(--card-bg);
  border-radius: 0.5rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1), 0 0 10px var(--glow-color);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgba(56, 189, 248, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  color: var(--primary-color);
}

.stat-info {
  flex: 1;
}

.stat-info h3 {
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
  color: var(--text-secondary);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Recent Servers */
.recent-servers {
  background-color: var(--card-bg);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.servers-table-container {
  overflow-x: auto;
}

.servers-table {
  width: 100%;
  border-collapse: collapse;
}

.servers-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.servers-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.servers-table tr:last-child td {
  border-bottom: none;
}

.server-name-cell {
  display: flex;
  align-items: center;
}

.server-name-cell i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

.server-status {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.server-status.running {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.server-status.starting {
  background-color: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.server-status.stopped {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.server-actions {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  width: 32px;
  height: 32px;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--input-bg);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.action-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

.action-btn.view:hover {
  background-color: var(--primary-color);
}

.action-btn.console:hover {
  background-color: var(--secondary-color);
}

/* Servers Grid */
.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.server-card {
  background-color: var(--card-bg);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.server-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1), 0 0 10px var(--glow-color);
}

.server-card-header {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.server-name {
  display: flex;
  align-items: center;
  font-weight: 600;
}

.server-name i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

.server-card-body {
  padding: 1rem;
}

.server-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.detail-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.detail-value {
  font-size: 0.875rem;
  font-weight: 500;
}

.resource-bar {
  height: 6px;
  background-color: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.resource-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.resource-fill.cpu {
  background-color: var(--primary-color);
}

.resource-fill.memory {
  background-color: var(--warning-color);
}

.resource-fill.disk {
  background-color: var(--success-color);
}

.server-card-footer {
  padding: 1rem;
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid var(--border-color);
}

/* Account Info */
.account-info-card {
  background-color: var(--card-bg);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.card-content {
  padding: 1.5rem;
  position: relative;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.info-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.info-label i {
  margin-right: 0.5rem;
  width: 16px;
  text-align: center;
}

.info-value {
  font-weight: 500;
}

.password-field {
  display: flex;
  align-items: center;
}

.password-field span {
  flex: 1;
  margin-right: 0.5rem;
}

.account-type {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Password Change Form */
.password-change-form {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background-color: var(--input-bg);
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  display: none;
  animation: slideDown 0.3s ease;
}

.password-change-form.show {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-header {
  margin-bottom: 1rem;
}

.form-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.375rem;
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--glow-color);
}

.form-message {
  margin: 1rem 0;
  padding: 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.form-message.success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-message.error {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

/* Settings */
.settings-card {
  background-color: var(--card-bg);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

.settings-group {
  margin-bottom: 2rem;
}

.settings-group:last-child {
  margin-bottom: 0;
}

.settings-group h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.setting-item:last-child {
  margin-bottom: 0;
}

.setting-label {
  font-size: 0.875rem;
}

.setting-control {
  min-width: 120px;
}

.form-select {
  width: 100%;
  padding: 0.5rem;
  border-radius: 0.375rem;
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1rem;
  padding-right: 2rem;
}

.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-color: var(--border-color);
  transition: 0.4s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.settings-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: var(--card-bg);
  border-radius: 0.5rem;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.close-modal {
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.close-modal:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
}

.server-info {
  margin-bottom: 1.5rem;
}

.server-info .info-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 0.75rem;
}

.server-info .info-label {
  width: 120px;
  font-weight: 500;
}

.server-info .info-value {
  flex: 1;
}

.server-info .info-value.running {
  color: #10b981;
}

.server-info .info-value.starting {
  color: #f59e0b;
}

.server-info .info-value.stopped {
  color: #ef4444;
}

.server-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.action-result {
  padding: 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  display: none;
}

.action-result.success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.action-result.error {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  border: none;
  font-size: 0.875rem;
}

.btn i {
  margin-right: 0.5rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-hover);
  box-shadow: 0 0 10px var(--glow-color);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #4b5563;
}

.btn-success {
  background-color: var(--success-color);
  color: white;
}

.btn-success:hover:not(:disabled) {
  background-color: #059669;
}

.btn-warning {
  background-color: var(--warning-color);
  color: white;
}

.btn-warning:hover:not(:disabled) {
  background-color: #d97706;
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background-color: #dc2626;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

/* Loading */
.loading-row {
  text-align: center;
}

.loading-container,
.error-container,
.empty-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
  gap: 1rem;
}

.loading-container i,
.error-container i,
.empty-container i {
  font-size: 3rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.empty-container h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.empty-container p {
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
}

.loading-spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid rgba(56, 189, 248, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
  margin-right: 0.75rem;
}

.loading-spinner-sm {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Notification */
.notification {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: var(--card-bg);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 0 10px var(--glow-color);
  border: 1px solid var(--border-color);
  z-index: 1000;
  transform: translateX(calc(100% + 1.5rem));
  transition: transform 0.3s ease;
  max-width: 350px;
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  border-left: 4px solid var(--success-color);
}

.notification.error {
  border-left: 4px solid var(--danger-color);
}

.notification.info {
  border-left: 4px solid var(--primary-color);
}

.notification-content {
  display: flex;
  align-items: center;
}

.notification-content i {
  margin-right: 0.75rem;
  font-size: 1.25rem;
}

.notification.success i {
  color: var(--success-color);
}

.notification.error i {
  color: var(--danger-color);
}

.notification.info i {
  color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard-sidebar {
    transform: translateX(-100%);
    z-index: 1000;
    width: 80%;
    max-width: 250px;
  }

  body[data-sidebar-position="right"] .dashboard-sidebar {
    transform: translateX(100%);
  }

  .dashboard-sidebar.show {
    transform: translateX(0);
  }

  .dashboard-content {
    margin-left: 0;
    margin-right: 0;
    padding: 1rem;
  }

  .stats-cards {
    grid-template-columns: 1fr;
  }

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

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

  .server-actions {
    flex-wrap: wrap;
  }

  .modal-content {
    max-width: 90%;
    margin: 0 1rem;
  }

  /* Improve mobile navigation */
  .nav-item {
    padding: 1rem 1.5rem;
  }

  /* Make buttons larger on mobile for better touch targets */
  .btn {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }

  /* Adjust table for mobile */
  .servers-table th,
  .servers-table td {
    padding: 0.5rem;
  }

  /* Hide less important columns on mobile */
  .servers-table th:nth-child(3),
  .servers-table td:nth-child(3),
  .servers-table th:nth-child(4),
  .servers-table td:nth-child(4) {
    display: none;
  }

  /* Make server cards more compact */
  .server-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  /* Adjust form elements for mobile */
  .form-group input {
    padding: 0.875rem;
  }

  /* Make notification more visible on mobile */
  .notification {
    width: calc(100% - 2rem);
    right: 1rem;
    max-width: none;
  }
}

/* For very small screens */
@media (max-width: 480px) {
  .dashboard-content {
    padding: 0.75rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-icon {
    width: 40px;
    height: 40px;
  }

  .stat-value {
    font-size: 1.25rem;
  }

  .server-card-footer {
    flex-direction: column;
  }

  .server-card-footer .btn {
    width: 100%;
  }

  .account-actions {
    flex-direction: column;
  }

  .account-actions .btn {
    width: 100%;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }
}

/* Scroll to top button */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.2s ease;
  border: none;
  z-index: 100;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 0 10px var(--glow-color);
}

.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
}

.scroll-top-btn:hover {
  background-color: var(--primary-hover);
}

/* Empty message */
.empty-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.empty-message i {
  font-size: 3rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.empty-message span {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* Error message */
.error-message {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
}

.error-message i {
  margin-right: 0.5rem;
}

/* Password Options Modal */
.password-options {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem 0;
}

.btn-block {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
}

.option-divider {
  position: relative;
  text-align: center;
  margin: 0.5rem 0;
}

.option-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--border-color);
  z-index: 1;
}

.option-divider span {
  position: relative;
  display: inline-block;
  padding: 0 1rem;
  background-color: var(--card-bg);
  color: var(--text-muted);
  z-index: 2;
}

/* New Password Form */
.password-form {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 400px;
  background-color: var(--card-bg);
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  padding: 1.5rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.password-form.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.form-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  background-color: var(--input-bg);
  color: var(--text-color);
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-group input:focus {
  border-color: var(--primary-color);
  outline: none;
}

.form-hint {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-message {
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  display: none;
}

.form-message.error {
  background-color: rgba(220, 38, 38, 0.1);
  color: #ef4444;
  border: 1px solid rgba(220, 38, 38, 0.2);
  display: block;
}

.form-message.success {
  background-color: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
  display: block;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 101;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .dashboard-content {
    padding-top: 4rem;
  }
}

/* Dashboard container */
.dashboard-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.dashboard-header {
  background-color: var(--card-bg);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.dashboard-header .logo h1 {
  font-size: 1.5rem;
  margin: 0;
  background: linear-gradient(90deg, var(--primary-color), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dashboard-header .user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  text-decoration: none;
  font-size: 0.875rem;
  transition: background-color 0.2s ease;
}

.logout-btn:hover {
  background-color: rgba(239, 68, 68, 0.2);
}

/* Fix for mobile sidebar */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 80%;
    max-width: 300px;
    z-index: 1000;
    background-color: var(--sidebar-bg);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
  }
}