* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  background: #f5f7fa;
  color: #333;
  line-height: 1.5;
}

nav {
  background: #1e293b;
  color: white;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

nav a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
}

nav a:hover { color: white; }

nav .brand {
  font-weight: 700;
  font-size: 18px;
  color: white;
  margin-right: 12px;
}

nav .spacer { flex: 1; }

main {
  max-width: 1000px;
  margin: 32px auto;
  padding: 0 24px;
}

h1 { color: #0f172a; }
h2 { color: #1e293b; border-bottom: 2px solid #e2e8f0; padding-bottom: 8px; }

.card {
  background: white;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  background: #0066cc;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
}

.btn:hover { background: #0055aa; }
.btn.secondary { background: #64748b; }
.btn.danger { background: #dc2626; }

input, select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

label {
  display: block;
  margin-top: 12px;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

form { margin-top: 16px; }
form .btn { margin-top: 16px; }

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
}

th { background: #f1f5f9; font-weight: 600; }
tr:hover { background: #f8fafc; }

.flash {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 14px;
}
.flash.error { background: #fee2e2; color: #991b1b; }
.flash.warning { background: #fef3c7; color: #92400e; }
.flash.success { background: #dcfce7; color: #166534; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.grid a.card {
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.grid a.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}


/* Home button in nav */
nav .home-btn {
  background: #0066cc;
  color: white !important;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.15s;
}

nav .home-btn:hover {
  background: #0055aa;
}