:root {
  /* Light Mode Variables */
  --bg-color: #f4f6f8;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --card-bg: #ffffff;
  --text-color: #333333;
  --text-muted: #666666;
  --border-color: #e0e0e0;
  --input-bg: #ffffff;
  --nav-bg: #ffffff;
  --success-color: #28a745;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  /* Dark Mode Variables */
  --bg-color: #181818;
  --card-bg: #242424;
  --text-color: #e0e0e0;
  --text-muted: #aaaaaa;
  --border-color: #333333;
  --input-bg: #2f2f2f;
  --nav-bg: #242424;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  transition: background-color 0.3s, color 0.3s;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  font-size: 14px;
}

/* Container Max Width 800px */
.app-container {
  width: 100%;
  max-width: 900px;
  background-color: var(--bg-color);
  display: flex;
  flex-direction: column;
  position: relative;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

/* Navigation */
nav {
  background-color: var(--nav-bg);
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
}

.logo {
  font-weight: bold;
  font-size: 16px;
  color: var(--text-color);
  text-decoration: none;
}

.logo span {
  color: #f70022;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Premium Badge in Navbar */
.nav-premium-badge {
  background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
  color: #000;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-premium-badge i {
  font-size: 10px;
}

/* Avatar */
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 12px;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
}

.avatar:hover {
  border-color: #f70022;
}
.avatar-lg {
  width: 80px;
  height: 80px;
  font-size: 30px;
}

/* Theme Toggle */
.theme-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: var(--card-bg);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  border-color: #f70022;
  color: #f70022;
}

/* Logout Button */
.btn-logout {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
  text-decoration: none;
}

.btn-logout:hover {
  border-color: var(--danger-color);
  color: var(--danger-color);
}

/* Animations */
@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}
.spin-anim {
  animation: spin 0.5s ease-in-out;
}

/* Buttons & Inputs */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.btn-primary {
  background-color: #f70022;
  color: white;
}
.btn-primary:hover {
  background-color: #d6001e;
}
.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
}
.btn-outline:hover {
  border-color: #f70022;
  color: #f70022;
}
.btn-danger {
  background-color: var(--danger-color);
  color: white;
}
.btn-danger:hover {
  opacity: 0.9;
}
.btn-success {
  background-color: var(--success-color);
  color: white;
}
.btn-sm {
  padding: 8px 8px;
  font-size: 11px;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-group {
  margin-bottom: 15px;
}
label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 12px;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px;
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  color: var(--text-color);
  font-size: 14px;
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #f70022;
}

/* Views */
.view-section {
  display: none;
  padding: 0;
  animation: fadeIn 0.4s ease;
  position: relative;
}

.view-section.active {
  display: block;
}

/* Maintenance Overlay */
.maintenance-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  backdrop-filter: blur(5px);
}

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

.card {
  background-color: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

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

.card-title {
  font-size: 16px;
  font-weight: 600;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
}
th {
  color: var(--text-muted);
  font-weight: 600;
}

/* Badges */
.badge {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 0;
  text-transform: uppercase;
}

.badge-offline {
  background-color: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}
.badge-online {
  background-color: rgba(40, 167, 69, 0.2);
  color: #28a745;
}
.badge-banned {
  background-color: rgba(220, 53, 69, 0.2);
  color: #dc3545;
}
.badge-premium {
  background-color: rgba(255, 215, 0, 0.2);
  color: #ffd700;
}
.badge-pending {
  background-color: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}
.badge-verified {
  background-color: rgba(40, 167, 69, 0.2);
  color: #28a745;
}
.badge-user {
  background-color: rgba(100, 149, 237, 0.2);
  color: #6495ed;
}
.badge-admin {
  background-color: rgba(247, 0, 34, 0.2);
  color: #f70022;
}
.badge-suspended {
  background-color: rgba(128, 128, 128, 0.2);
  color: #888888;
}

/* Apple Code Block */
.code-window {
  background-color: #121212;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #333;
  margin-top: 10px;
}

.code-header {
  background-color: #2d2d2d;
  padding: 8px 12px;
  display: flex;
  gap: 6px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot.red {
  background: #ff5f56;
}
.dot.yellow {
  background: #ffbd2e;
}
.dot.green {
  background: #27c93f;
}

pre {
  background-color: transparent;
  color: #0f0;
  padding: 15px;
  overflow-x: auto;
  font-size: 12px;
  margin: 0;
  font-family: "Courier New", Courier, monospace;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #333;
  color: #fff;
  padding: 12px 24px;
  border-radius: 4px;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-left: 4px solid #28a745;
  max-width: 350px;
}

.toast.error {
  border-left-color: #dc3545;
}
.toast.warning {
  border-left-color: #ffc107;
}
.toast.show {
  display: block;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Helpers */
.link {
  color: var(--text-color);
  text-decoration: none;
  font-size: 13px;
}
.link:hover {
  color: #f70022;
  text-decoration: none;
}
.text-center {
  text-align: center;
}
.mt-2 {
  margin-top: 10px;
}
.mb-2 {
  margin-bottom: 10px;
}
.mb-3 {
  margin-bottom: 15px;
}
.w-100 {
  width: 100%;
}

@media (max-width: 600px) {
  .app-container {
    border: none;
  }
  .nav-actions span {
    display: none;
  }
  table {
    font-size: 11px;
  }
  th,
  td {
    padding: 8px;
  }
  .nav-premium-badge {
    display: none;
  }
}

/* STEPPER STYLE */
.step-content {
  display: none;
}
.step-content.active {
  display: block;
  animation: fadeIn 0.3s;
}

.step-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  position: relative;
}

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

.step-dot {
  width: 30px;
  height: 30px;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-weight: bold;
  font-size: 12px;
  color: var(--text-muted);
}

.step-dot.active {
  border-color: #f70022;
  color: #f70022;
  background: var(--card-bg);
}
.step-dot.completed {
  background: #f70022;
  border-color: #f70022;
  color: white;
}

/* ADMIN TABS & SETTINGS */
.admin-tabs {
  display: flex;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.tab-btn {
  padding: 10px 15px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab-btn.active {
  color: #f70022;
  border-bottom-color: #f70022;
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #f70022;
}
input:focus + .slider {
  box-shadow: 0 0 1px #f70022;
}
input:checked + .slider:before {
  transform: translateX(20px);
}

/* Status indicator */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}

.status-dot.online {
  background-color: #28a745;
}
.status-dot.offline {
  background-color: #ffc107;
}
.status-dot.banned {
  background-color: #dc3545;
}

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: #f70022;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Copy button */
.copy-btn {
  padding: 4px 8px;
  font-size: 10px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 3px;
  cursor: pointer;
}

.copy-btn:hover {
  border-color: #f70022;
  color: #f70022;
}

.copy-btn.copied {
  background: #28a745;
  border-color: #28a745;
  color: white;
}

/* Accordion Styles */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.accordion-item {
  border: 1px solid var(--border-color);
  border-bottom: none;
  overflow: hidden;
}

.accordion-item:last-child {
  border-bottom: 1px solid var(--border-color);
}

.accordion-button {
  width: 100%;
  padding: 15px;
  background-color: var(--card-bg);
  border: none;
  cursor: pointer;
  text-align: left;
  font-weight: 500;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.3s;
  font-size: 14px;
}

.accordion-button:hover {
  background-color: rgba(247, 0, 34, 0.05);
}

.accordion-button.active {
  color: #f70022;
  background-color: rgba(247, 0, 34, 0.1);
}

.accordion-button i {
  transition: transform 0.3s;
}

.accordion-button.active i {
  transform: rotate(90deg);
}

.accordion-content {
  display: none;
  padding: 15px;
  background-color: var(--bg-color);
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  animation: slideDown 0.3s ease;
}

.accordion-content p {
  margin: 10px 0;
}

.accordion-content p:first-child {
  margin-top: 0;
}

.accordion-content p:last-child {
  margin-bottom: 0;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
  }
  to {
    opacity: 1;
    max-height: 1000px;
    overflow: visible;
  }
}

/* Expired License Styling */
.license-expired {
  text-decoration: line-through;
  color: #dc3545;
  font-weight: 500;
}

tr.expired-row {
  opacity: 0.65;
  background-color: rgba(220, 53, 69, 0.05);
}

.expired-badge {
  background-color: rgba(220, 53, 69, 0.3);
  color: #dc3545;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  border: 1px solid #dc3545;
}
