/* assets/ui.css */
:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --primary: #1d4ed8;     /* blue */
  --primary-press: #1645c6;
  --ring: rgba(29, 78, 216, 0.35);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(17,24,39,0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
}

.center-wrap {
  min-height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  padding: 32px 16px;
}

.brand {
  text-align: center;
  margin-bottom: 18px;
}

.brand h1 {
  font-size: 40px;
  line-height: 1.1;
  margin: 0;
  letter-spacing: .3px;
}

.brand .subtitle {
  color: var(--muted);
  margin-top: 6px;
  font-size: 15px;
}

.card {
  width: 100%;
  max-width: 560px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  border: 1px solid #eef2f7;
}

.card h2 {
  margin: 0 0 16px 0;
  font-size: 22px;
}

.form-row { margin-bottom: 14px; }
label { display: block; font-size: 14px; margin-bottom: 6px; }
input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid #d6dbe6;
  background: #fff;
  outline: none;
  transition: box-shadow .15s, border-color .15s, background .15s;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
}

.btn {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 0;
  color: #fff;
  background: var(--primary);
  border-radius: 10px;
  cursor: pointer;
  transition: transform .02s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:hover { background: var(--primary-press); }

.help {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.flash { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.flash.error { color: #b91c1c; background: #fee2e2; border: 1px solid #fecaca; }
.flash.ok    { color: #065f46; background: #d1fae5; border: 1px solid #a7f3d0; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid #eef2f7; text-align: left; }
.table th { color: #4b5563; font-weight: 600; }

.topbar {
  max-width: 960px;
  width: 100%;
  margin: 0 auto 18px auto;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--muted);
}
.topbar a { color: var(--primary); text-decoration: none; }
.footer {
  color: var(--muted);
  font-size: 13px;
  margin-top: 20px;
}
/* Standardize login card size */
.card.login-card {
  max-width: 400px;       /* same width for both user/admin */
  min-height: 360px;      /* same height for both */
  width: 100%;            /* responsive scaling */
  margin: 0 auto;         /* center horizontally */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
