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

:root {
  --primary: #1a1a2e;
  --secondary: #16213e;
  --accent: #0f3460;
  --highlight: #e94560;
  --text: #eaeaea;
  --text-muted: #8892a0;
  --bg: #0f0f1a;
  --card-bg: #1a1a2e;
  --border: #2a2a4a;
}

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

.hidden {
  display: none !important;
}

/* Login */
.login-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card-bg);
  padding: 40px;
  border-radius: 12px;
  width: 100%;
  max-width: 360px;
  border: 1px solid var(--border);
}

.login-box h1 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 24px;
  color: var(--highlight);
}

#login-form input {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--secondary);
  color: var(--text);
  font-size: 14px;
}

#login-form input:focus {
  outline: none;
  border-color: var(--highlight);
}

#login-form button {
  width: 100%;
  padding: 12px;
  background: var(--highlight);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: opacity 0.2s;
}

#login-form button:hover {
  opacity: 0.9;
}

.error {
  color: var(--highlight);
  font-size: 14px;
  margin-top: 12px;
  text-align: center;
}

/* Dashboard */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}

header h1 {
  font-size: 20px;
  color: var(--highlight);
}

.header-actions {
  display: flex;
  gap: 12px;
}

.btn-secondary {
  padding: 8px 16px;
  background: var(--secondary);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

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

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Stats */
.stats-bar {
  display: flex;
  gap: 20px;
  padding: 20px 30px;
}

.stat-card {
  flex: 1;
  background: var(--card-bg);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--highlight);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Filters */
.filters {
  display: flex;
  gap: 12px;
  padding: 0 30px 20px;
}

.filters input,
.filters select {
  padding: 10px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
}

.filters input {
  flex: 1;
  max-width: 300px;
}

.filters input:focus,
.filters select:focus {
  outline: none;
  border-color: var(--highlight);
}

/* Table */
.table-container {
  padding: 0 30px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
}

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

th {
  background: var(--secondary);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--text-muted);
}

td {
  font-size: 14px;
}

tr:hover {
  background: var(--secondary);
}

.btn-view, .btn-delete {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  margin-right: 6px;
}

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

.btn-delete {
  background: transparent;
  border: 1px solid var(--highlight);
  color: var(--highlight);
}

.btn-delete:hover {
  background: var(--highlight);
  color: white;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 20px 30px;
}

#page-info {
  font-size: 14px;
  color: var(--text-muted);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--border);
}

.modal-content h2 {
  margin-bottom: 20px;
  color: var(--highlight);
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-muted);
}

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

.detail-row {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.detail-label {
  width: 120px;
  color: var(--text-muted);
  font-size: 13px;
}

.detail-value {
  flex: 1;
  font-size: 14px;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--accent);
  border-radius: 4px;
  font-size: 12px;
  margin: 2px;
}

/* Responsive */
@media (max-width: 768px) {
  .stats-bar {
    flex-direction: column;
  }

  .filters {
    flex-wrap: wrap;
  }

  .filters input {
    max-width: 100%;
    width: 100%;
  }

  header {
    flex-direction: column;
    gap: 15px;
  }

  .table-container {
    padding: 0 15px;
  }

  th, td {
    padding: 10px;
    font-size: 13px;
  }
}
