:root {
  --primary: #4F46E5; /* Indigo/Blue */
  --primary-hover: #4338ca;
  --secondary: #7C3AED; /* Purple */
  --secondary-hover: #6d28d9;
  --bg-dark: #0f172a;
  --bg-panel: rgba(30, 41, 59, 0.7);
  --text-light: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(15, 23, 42, 0.6);
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

body {
  background: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(79, 70, 229, 0.15), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(124, 58, 237, 0.15), transparent 25%);
  color: var(--text-light);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3 { font-weight: 600; }
a { text-decoration: none; color: inherit; }

/* Utilities */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.gradient-text {
  background: linear-gradient(to right, #818cf8, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-size: 0.9rem;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.23);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: #818cf8;
}
.btn-outline:hover {
  background: rgba(79, 70, 229, 0.1);
}
.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Forms */
.form-group {
  margin-bottom: 1.2rem;
}
.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: white;
  transition: border-color 0.2s ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

/* Cards & Panels */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
}

/* Layout - Login */
.login-container {
  width: 100%;
  max-width: 400px;
  margin: auto;
  padding: 2rem;
}
.login-header {
  text-align: center;
  margin-bottom: 2rem;
}
.login-logo {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* Layout - Dashboard */
.sidebar {
  width: 260px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border-right: var(--glass-border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
  height: 100vh;
  position: fixed;
  z-index: 100;
}
.sidebar-header {
  padding: 0 1.5rem 2rem 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
}
.nav-menu {
  list-style: none;
  flex: 1;
}
.nav-item {
  margin-bottom: 0.5rem;
}
.nav-link {
  display: flex;
  align-items: center;
  padding: 0.8rem 1.5rem;
  color: var(--text-muted);
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.nav-link:hover, .nav-link.active {
  color: white;
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.1), transparent);
  border-left-color: var(--primary);
}
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 2rem 3rem;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

/* Tables */
.table-container {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
th {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.item-img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}

/* Modals/Forms inside page */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .form-grid { grid-template-columns: 1fr; }
  .full-width { grid-column: span 1; }
}

/* Badges */
.badge {
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-active { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-closed { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.alert-error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2); color: #fca5a5; }
.alert-success { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2); color: #6ee7b7; }
