:root {
  --color-primary: #212A31;
  --color-secondary: #2E3944;
  --color-accent: #124E66;
  --color-light: #748D92;
  --color-text-light: #D3D9D4;
  --color-text: #D3D9D4;
  --color-bg: #212A31;
  --color-card: #2E3944;
  --color-border: rgba(211, 217, 212, 0.2);
  --color-success: #10b981;
  --color-error: #ef4444;
  --color-warning: #f59e0b;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Navbar */
.navbar {
  background: var(--color-primary);
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--color-text-light);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-link:hover {
  color: var(--color-text);
}

/* Main Content */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* Dashboard */
.dashboard {
  animation: fadeIn 0.5s ease-in;
}

.page-title {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.stat-card {
  background: var(--color-card);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(18, 78, 102, 0.3);
  border-color: var(--color-accent);
}

.stat-card h3 {
  color: var(--color-text-light);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: bold;
  color: var(--color-text);
  margin: 1rem 0;
}

.stat-link {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.stat-link:hover {
  color: #748D92;
}

/* Page Container */
.page-container {
  animation: fadeIn 0.5s ease-in;
}

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

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

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

.btn-primary:hover {
  background: var(--color-light);
  transform: translateY(-2px);
}

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

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

.btn-danger {
  background: var(--color-error);
  color: var(--color-text);
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Table */
.table-container {
  background: var(--color-card);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  margin-top: 2rem;
}

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

.data-table thead {
  background: var(--color-primary);
}

.data-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 2px solid var(--color-border);
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-light);
}

.data-table tbody tr {
  transition: background 0.2s;
}

.data-table tbody tr:hover {
  background: rgba(211, 217, 212, 0.1);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(33, 42, 49, 0.9);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--color-card);
  padding: 2rem;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  animation: slideUp 0.3s;
}

.modal-content h2 {
  margin-bottom: 1.5rem;
}

.close {
  float: right;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  color: var(--color-text-light);
  transition: color 0.3s;
}

.close:hover {
  color: var(--color-text);
}

/* Forms */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input[type="text"],
input[type="number"],
input[type="email"],
textarea {
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-primary);
  color: var(--color-text);
  font-size: 1rem;
  transition: border-color 0.3s;
}

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

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

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.alert-error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid var(--color-error);
  color: var(--color-error);
}

.alert-success {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid var(--color-success);
  color: var(--color-success);
}

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

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .nav-menu {
    flex-direction: column;
    gap: 1rem;
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .data-table {
    font-size: 0.875rem;
  }
  
  .data-table th,
  .data-table td {
    padding: 0.5rem;
  }
}
