:root {
  --bg-dark: #121212;
  --bg-surface: #1e1e1e;
  --bg-glass: rgba(255, 255, 255, 0.05);
  --text-main: #f5f5f5;
  --text-muted: #a0a0a0;
  --accent: #6C5CE7;
  --accent-hover: #5A4AD1;
  --danger: #ff4757;
  --danger-hover: #ff6b81;
  --border: rgba(255, 255, 255, 0.1);
  --input-bg: #2d2d2d;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3 {
  margin-top: 0;
  font-weight: 600;
}

/* Nav */
nav {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-main);
  text-decoration: none;
}

nav .links a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 1.5rem;
  font-weight: 500;
  transition: color 0.2s;
}

nav .links a:hover {
  color: var(--text-main);
}

/* Layout */
.container {
  padding: 2rem;
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* Auth containers */
.auth-container {
  max-width: 400px;
  margin: 4rem auto;
  padding: 2.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.register-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Forms */
.form-group {
  margin-bottom: 1.2rem;
  display: flex;
  flex-direction: column;
}

.form-row {
  display: flex;
  gap: 1.5rem;
}
.form-row .form-group {
  flex: 1;
}

label {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-weight: 500;
}

input, select, textarea {
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.8rem;
  border-radius: 6px;
  font-size: 1rem;
  transition: border 0.3s, box-shadow 0.3s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.2);
}

button, .btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s, transform 0.1s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

button:hover, .btn:hover {
  background: var(--accent-hover);
}
button:active, .btn:active {
  transform: scale(0.98);
}

.btn-danger {
  background: var(--danger);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}
.btn-danger:hover {
  background: var(--danger-hover);
}

form.inline-form {
  display: inline;
}

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

.filters-bar {
  display: flex;
  gap: 1rem;
  background: var(--bg-surface);
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 2rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.filters-bar .form-group {
  margin-bottom: 0;
  min-width: 150px;
}

/* Data Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  background: var(--bg-surface);
  border-radius: 8px;
  border: 1px solid var(--border);
}

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

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

th {
  color: var(--text-muted);
  font-weight: 600;
  background: var(--bg-glass);
}

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

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.actions {
  display: flex;
  gap: 0.5rem;
}
.actions .btn {
  padding: 0.5rem 0.8rem;
  font-size: 0.85rem;
}

/* Flash Messages */
.flash-messages {
  max-width: 1400px;
  margin: 1rem auto 0;
  padding: 0 2rem;
  width: 100%;
  box-sizing: border-box;
}
.alert {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.alert.success { background: rgba(46, 213, 115, 0.1); border: 1px solid rgba(46, 213, 115, 0.4); color: #2ed573; }
.alert.error { background: rgba(255, 71, 87, 0.1); border: 1px solid rgba(255, 71, 87, 0.4); color: var(--danger); }

[data-theme="light"] {
  --bg-dark: #f0f2f5;
  --bg-surface: #ffffff;
  --bg-glass: rgba(0, 0, 0, 0.05);
  --text-main: #2d3436;
  --text-muted: #636e72;
  --accent: #6C5CE7;
  --accent-hover: #5A4AD1;
  --danger: #ff4757;
  --danger-hover: #ff6b81;
  --border: rgba(0, 0, 0, 0.1);
  --input-bg: #fdfdfd;
}

