@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;700;900&display=swap');

:root {
  --bg-dark: #F9FAFB; /* Update to light theme background */
  --bg-panel: #ffffff;
  --bg-sidebar: #fcf8ff;
  --accent-primary: #ba1a1a; /* Error/Admin red */
  --accent-secondary: #2D1F6E; /* Guardian Blue */
  --text-main: #1b1b20;
  --text-muted: #484551;
  --border-light: #E5E7EB;
  --primary-container: #2d1f6e;
  --on-primary-container: #968ade;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background-color: #F9FAFB;
  color: #1b1b20;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Tabs handled by JS */
.tab-content { display: none; animation: fadeIn 0.2s; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Sidebar Active Nav Item handled by CSS */
.nav-item {
  cursor: pointer;
}
.nav-item.active {
  background-color: var(--primary-container);
  color: #ffffff;
  font-weight: 700;
}
.nav-item.active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1;
}

/* Base Styles used in JS */
.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.badge.active { background: #e5ffe5; color: #166534; }
.badge.suspended { background: #fee2e2; color: #991b1b; }

.btn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
}
.btn-primary { background: #2D1F6E; color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-outline { border-color: #E5E7EB; color: #484551; background: transparent; }
.btn-outline:hover { background: #f6f2fa; color: #18015a; border-color: #c9c4d2; }
.btn-danger { background: #ba1a1a; color: white; }
.btn-danger:hover { background: #93000a; }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: center; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-content { background: #fff; border: 1px solid #E5E7EB; padding: 2rem; border-radius: 8px; width: 100%; max-width: 600px; position: relative; transform: translateY(20px); transition: transform 0.3s; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); }
.modal-overlay.active .modal-content { transform: translateY(0); }
.close-modal { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: #484551; font-size: 1.5rem; cursor: pointer; transition: color 0.2s; }
.close-modal:hover { color: #1b1b20; }

/* Toasts */
#toast-container { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; }
.toast {
  background: #ffffff;
  border-left: 4px solid #00e676;
  padding: 1rem 1.5rem;
  border-radius: 4px;
  color: #1b1b20;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-top: 1px solid #E5E7EB;
  border-right: 1px solid #E5E7EB;
  border-bottom: 1px solid #E5E7EB;
  animation: slideIn 0.3s forwards, fadeOut 0.3s 3s forwards;
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* General utility class for table cell vertical alignment */
table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: #797582; padding: 1rem 1.5rem; border-bottom: 1px solid #E5E7EB; text-align: left; }
table td { padding: 1rem 1.5rem; border-bottom: 1px solid #E5E7EB; vertical-align: middle; color: #1b1b20; }
table tr:last-child td { border-bottom: none; }

.form-input {
  background: #ffffff; border: 1px solid #E5E7EB; color: #1b1b20;
  padding: 0.5rem 1rem; border-radius: 4px; font-family: 'Inter'; width: 100%; transition: border-color 0.2s;
}
.form-input:focus { border-color: #2D1F6E; outline: none; }
