* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f7fb;
  color: #1f2937;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  background: #0f172a;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.topbar-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
}

.brand-subtitle {
  font-size: 13px;
  color: #cbd5e1;
}

.nav {
  display: flex;
  gap: 16px;
}

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

.page {
  padding: 32px 0 48px;
}

.card {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.auth-card {
  max-width: 480px;
  margin: 24px auto 0;
}

h1 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 28px;
}

.muted {
  color: #64748b;
}

.form-grid {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

label {
  font-size: 14px;
  font-weight: 600;
}

input {
  height: 46px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 15px;
}

.btn {
  height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: #2563eb;
  color: white;
}

.btn-success {
  background: #16a34a;
  color: white;
}

.btn-warning {
  background: #f59e0b;
  color: white;
}

.btn-danger {
  background: #dc2626;
  color: white;
}

.btn-small {
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.auth-note {
  margin-top: 16px;
  font-size: 14px;
}

.auth-note a {
  color: #2563eb;
  text-decoration: none;
}

.flash-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.flash {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
}

.flash-success { background: #dcfce7; color: #166534; }
.flash-danger  { background: #fee2e2; color: #991b1b; }
.flash-warning { background: #fef3c7; color: #92400e; }
.flash-info    { background: #dbeafe; color: #1d4ed8; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.stat-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
}

.stat-label {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
}

.info-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 18px;
  border-radius: 16px;
}

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

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  min-width: 1100px;
}

.table th,
.table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.table th {
  background: #f8fafc;
}

.action-group {
  display: grid;
  gap: 8px;
}

@media (max-width: 768px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 20px;
  }
}