/* Base */

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #0b1220, #1d4ed8);
  color: #e5e7eb;
}

main {
  padding: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* Top bar */

.topbar {
  background: #1e40af;
  color: #e5e7eb;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.topbar h1 {
  margin: 0;
  font-size: 1.4rem;
}

.user-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-controls button,
.user-controls a {
  background: #2563eb;
  color: #e5e7eb;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.user-controls button:hover,
.user-controls a:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

/* Cards / sections */

.filters,
.table-section,
.create-user {
  margin-top: 1.5rem;
  background: rgba(15, 23, 42, 0.95);
  padding: 1rem 1.25rem;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.filters h2,
.table-section h2,
.create-user h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

/* Filters */

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.filter-row label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.filter-row input[type="datetime-local"] {
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid #4b5563;
  background: #020617;
  color: #e5e7eb;
}

.filter-row button {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: none;
  background: #22c55e;
  color: #022c22;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

#export-csv {
padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: none;
  background: #22c55e;
  color: #022c22;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
#export-csv:hover {
  background: #16a34a;
  transform: translateY(-1px);
}
.filter-row button:hover {
  background: #16a34a;
  transform: translateY(-1px);
}

/* Tables */

.table-section {
  position: relative;
}

/* scrollable area */
.table-wrapper {
  max-height: 260px;
  overflow-y: auto;
  border-radius: 8px;
  border: 1px solid rgba(30, 64, 175, 0.7);
}

/* hide ugly scrollbars if you want, but keep basic ones */
.table-wrapper::-webkit-scrollbar {
  width: 7px;
}
.table-wrapper::-webkit-scrollbar-thumb {
  background: #1d4ed8;
  border-radius: 999px;
}

.table-section table {
  width: 100%;
  border-collapse: collapse;
  background: #020617;
}

.table-section table thead {
  position: sticky;
  top: 0;
  background: #111827;
  z-index: 1;
}

.table-section table th,
.table-section table td {
  border-bottom: 1px solid #1f2937;
  padding: 0.5rem 0.7rem;
  font-size: 0.9rem;
}

.table-section table th {
  text-align: left;
  font-weight: 600;
  color: #bfdbfe;
}

.table-section table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.8);
}

/* Create user */

#create-user-form input,
#create-user-form select {
  padding: 0.5rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 6px;
  border: 1px solid #4b5563;
  background: #020617;
  color: #e5e7eb;
}

#create-user-form button {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: none;
  background: #38bdf8;
  color: #0f172a;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

#create-user-form button:hover {
  background: #0ea5e9;
  transform: translateY(-1px);
}

#create-user-msg {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}
