/* Admin Panel Styles */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
  min-height: 100vh;
}

.admin-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  height: fit-content;
  position: sticky;
  top: 20px;
}

.admin-sidebar h2 {
  font-size: 20px;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.admin-nav {
  list-style: none;
}

.admin-nav li {
  margin-bottom: 4px;
}

.admin-nav a {
  display: block;
  padding: 10px 15px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  font-weight: 500;
}

.admin-nav a:hover {
  background: var(--input-bg);
  color: var(--text-primary);
  text-decoration: none;
}

.admin-nav a.active {
  background: var(--accent);
  color: white;
}

.admin-main {
  min-width: 0;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.admin-header h1 {
  font-size: 28px;
  color: var(--text-primary);
}

.admin-actions {
  display: flex;
  gap: 10px;
}

/* Panels / Tabs content */
.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

/* Cards */
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 20px;
}

.admin-card h3 {
  color: var(--text-primary);
  margin-bottom: 15px;
  font-size: 18px;
}

/* Tables */
.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.admin-table td {
  color: var(--text-secondary);
}

.admin-table tr:hover td {
  background: var(--bg-card-hover);
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

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

.btn-primary:hover {
  opacity: 0.9;
}

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

.btn-danger:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: var(--input-bg);
  color: var(--text-secondary);
  border-color: var(--input-border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Toggle switch */
.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--input-bg);
  border-radius: 12px;
  transition: 0.3s;
}

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

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

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

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 14px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 9999;
  animation: slideIn 0.3s ease;
}

.toast-success { background: var(--green); }
.toast-error { background: var(--red); }

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

/* Log entries */
.log-entry {
  padding: 10px 15px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-family: 'Cascadia Code', 'Fira Code', monospace;
}

.log-entry:last-child { border-bottom: none; }
.log-time { color: var(--text-dim); margin-right: 10px; }
.log-type { font-weight: 600; margin-right: 10px; }

/* Responsive */
@media (max-width: 768px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: static;
  }
}
