/* ===== RESET & BASE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f4f6f9;
  color: #1f2937;
  line-height: 1.5;
}

/* ===== HEADER ===== */
header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 24px;
}

header h1 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ===== NAV TABS ===== */
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab {
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
  transition: all 0.2s ease;
}

.tab:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.tab.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

/* ===== MAIN LAYOUT ===== */
main {
  padding: 24px;
}

section {
  display: none;
}

section.active {
  display: block;
}

/* ===== CARDS ===== */
.card {
  background: #ffffff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.card h2,
.card h3 {
  margin-bottom: 8px;
  font-weight: 600;
}

.muted {
  color: #6b7280;
  font-size: 14px;
}

/* ===== TOOLBAR ===== */
.toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

/* ===== BUTTONS ===== */
button {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

button:hover {
  background: #1e40af;
}

button.secondary {
  background: #e5e7eb;
  color: #111827;
}

button.secondary:hover {
  background: #d1d5db;
}

button.delete {
  background: #dc2626;
}

button.delete:hover {
  background: #b91c1c;
}

button.edit {
  background: #059669;
}

button.edit:hover {
  background: #047857;
}

/* ===== TABLES ===== */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  background: #f3f4f6;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: middle;
}

th {
  font-weight: 600;
  color: #374151;
}

tbody tr:hover {
  background: #f9fafb;
}

.actions {
  display: flex;
  gap: 6px;
}

/* ===== IMAGES ===== */
.thumb {
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

/* ===== FORMS ===== */
form {
  display: grid;
  gap: 12px;
}

label {
  font-size: 14px;
  font-weight: 500;
}

input,
textarea,
select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  background: #ffffff;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

textarea {
  resize: vertical;
}

/* ===== STATUS TAGS (optional) ===== */
.status-active {
  color: #065f46;
  font-weight: 500;
}

.status-inactive {
  color: #991b1b;
  font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  nav {
    overflow-x: auto;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .actions {
    flex-direction: column;
  }
}
