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

:root {
  --primary-color: #0d9488;
  --secondary-color: #14b8a6;
  --bg-gradient-start: #0f172a;
  --bg-gradient-end: #1e293b;
  --text-light: #f8fafc;
  --text-muted: #94a3b8;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --danger: #ef4444;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
  color: var(--text-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Glassmorphism containers */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Typography */
h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.5px;
}

h1 {
  font-size: 2.5rem;
  background: linear-gradient(to right, var(--secondary-color), #4ade80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

/* Auth Container */
#auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.login-box {
  width: 100%;
  max-width: 420px;
  animation: fadeUp 0.6s ease-out;
}

.input-group {
  margin-bottom: 24px;
  position: relative;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.input-group input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.input-group input:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1);
}

button {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-light);
  margin-top: 12px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
  width: auto;
  padding: 8px 16px;
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Dashboard Layout */
#dashboard-container {
  display: none;
  height: 100vh;
}

.sidebar {
  width: 280px;
  background: rgba(15, 23, 42, 0.8);
  border-right: 1px solid var(--glass-border);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  margin-bottom: 48px;
}

.user-info {
  margin-top: 24px;
  padding: 16px;
  background: var(--glass-bg);
  border-radius: 12px;
}

.role-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  background: rgba(20, 184, 166, 0.2);
  color: var(--secondary-color);
  margin-top: 8px;
}

.nav-links {
  list-style: none;
  flex: 1;
}

.nav-links li {
  margin-bottom: 8px;
}

.nav-links a {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.2s;
  font-weight: 600;
}

.nav-links a:hover, .nav-links a.active {
  background: var(--glass-bg);
  color: var(--text-light);
}

.main-content {
  flex: 1;
  padding: 48px;
  overflow-y: auto;
}

/* Role-specific sections */
.role-section {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

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

/* Data Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
}

.data-table th, .data-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}

.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Error messages */
#auth-error {
  color: var(--danger);
  font-size: 0.9rem;
  margin-top: 16px;
  text-align: center;
  min-height: 20px;
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Utilities */
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
