:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #0f172a;
  --primary2: #1d4ed8;
  --danger: #dc2626;
  --ok: #059669;
  --warn: #d97706;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

.app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 430px;
  background: var(--card);
  border-radius: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 70px rgba(15, 23, 42, .12);
}

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

.logo {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f172a, #2563eb);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
}

h1, h2, h3 {
  margin: 0;
}

h1 {
  font-size: 22px;
}

h2 {
  font-size: 20px;
  margin-bottom: 12px;
}

h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 760px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
}

.topbar {
  background: var(--primary);
  color: white;
  border-radius: 0 0 24px 24px;
  padding: 16px;
  margin-bottom: 18px;
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-pill {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
}

input, select, textarea, button {
  font-family: inherit;
  font-size: 14px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  background: #fff;
  outline: none;
}

textarea {
  min-height: 82px;
  resize: vertical;
}

label {
  display: block;
  font-size: 13px;
  color: #374151;
  margin-bottom: 6px;
}

.field {
  margin-bottom: 12px;
}

button {
  border: 0;
  border-radius: 14px;
  padding: 11px 14px;
  background: var(--primary2);
  color: white;
  cursor: pointer;
  font-weight: 700;
}

button.secondary {
  background: #e5e7eb;
  color: #111827;
}

button.danger {
  background: var(--danger);
}

button.ok {
  background: var(--ok);
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.kpi {
  border-radius: 16px;
  padding: 15px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.kpi .num {
  font-size: 24px;
  font-weight: 900;
  margin-top: 5px;
}

.list {
  display: grid;
  gap: 10px;
}

.item {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 12px;
  background: #fff;
}

.item-title {
  font-weight: 800;
  margin-bottom: 6px;
}

.badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  background: #eef2ff;
  color: #3730a3;
  margin: 2px;
}

.msg {
  margin: 12px 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f9fafb;
  white-space: pre-wrap;
}

.msg.ok {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
}

.msg.err {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 14px 0;
}

.small {
  font-size: 12px;
}
