/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6fb;
  color: #1f2933;
}

/* Header */

.app-header {
  background: #111827;
  color: #fff;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-header-brand {
  font-weight: 600;
}

.app-header-back a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 13px;
}

.app-header-back a:hover {
  color: #e5e7eb;
}

.app-header-right {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-header-right a {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 14px;
}

.app-header-right a:hover {
  text-decoration: underline;
}

/* Layout */

.page {
  max-width: 1040px;
  margin: 24px auto 40px;
  padding: 0 16px;
}

h1 {
  font-size: 26px;
  margin: 0 0 8px;
}

h2 {
  font-size: 20px;
  margin: 0 0 8px;
}

.sub {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 20px;
}

/* Cards & grids */

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
  padding: 16px 18px;
  margin-bottom: 20px;
  border: 1px solid #e5e7eb;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.card-link {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all .15s ease;
}

.card-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.card-desc {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.4;
}

.empty {
  font-size: 14px;
  color: #6b7280;
}

/* Forms / buttons */

label {
  font-size: 14px;
  display: block;
  margin-bottom: 4px;
}

.input {
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.btn-primary {
  display: inline-block;
  border: none;
  cursor: pointer;
  padding: 9px 14px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.btn-primary:hover {
  opacity: 0.95;
}

.text-muted {
  color: #6b7280;
  font-size: 13px;
}

/* Auth layout */

.auth-wrap {
  max-width: 360px;
  margin: 10vh auto 40px;
  padding: 0 16px;
}

.auth-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
  padding: 20px 22px;
  border: 1px solid #e5e7eb;
}

.auth-title {
  font-size: 22px;
  margin: 0 0 12px;
}

.form-field {
  margin-bottom: 12px;
}

.error {
  margin: 8px 0 12px;
  color: #b00020;
  font-size: 14px;
}

/* Footer */

.app-footer {
  border-top: 1px solid #e5e7eb;
  padding: 12px 20px;
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
  margin-top: 24px;
}

/* Tables */

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}

.table thead {
  background: #f3f4f6;
}

.table th,
.table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  white-space: nowrap;
}

.table th {
  font-weight: 600;
  color: #4b5563;
}

.table tbody tr:hover {
  background: #f9fafb;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: #e5e7eb;
  color: #374151;
}

