/* IDPro24 admin console — shared design system for ORG_ADMIN-facing pages
   (member list/form/import, org settings, login, forgot-password). */

:root {
  --brand: #1B4D3E;
  --brand-dark: #123329;
  --brand-light: #E6F0EC;
  --bg: #F6F4EF;
  --surface: #FFFFFF;
  --border: #E4DFD3;
  --text: #1A1A2E;
  --text-secondary: #6B6F76;
  --text-faint: #9A9E9C;
  --danger: #C0392B;
  --danger-bg: #FCE8E6;
  --success: #1B7A3D;
  --success-bg: #E6F4EA;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(18, 23, 21, 0.05), 0 1px 3px rgba(18, 23, 21, 0.04);
  --shadow-md: 0 10px 28px rgba(18, 23, 21, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Topbar ---------- */
.topbar {
  background: var(--brand);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 2px 10px rgba(18, 23, 21, 0.14);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-logo { height: 26px; display: block; flex-shrink: 0; }
.topbar-divider { width: 1px; height: 20px; background: rgba(255,255,255,0.25); flex-shrink: 0; }
.topbar-title { color: #fff; font-size: 14px; font-weight: 600; letter-spacing: 0.1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-nav { display: flex; align-items: center; gap: 4px; }
.topbar-nav a, .topbar-nav button {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s ease, color 0.15s ease;
}
.topbar-nav a:hover, .topbar-nav button:hover { background: rgba(255,255,255,0.12); color: #fff; }
.topbar-nav form { display: inline; }

/* ---------- Layout ---------- */
.wrap { max-width: 960px; margin: 32px auto; padding: 0 20px 48px; }
.wrap.narrow { max-width: 480px; }
.wrap.medium { max-width: 620px; }

.page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-header h1 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin: 0; color: var(--text); }
.page-header .actions { display: flex; gap: 10px; }

h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 4px; color: var(--text); }
h3 { font-size: 15px; font-weight: 700; margin: 24px 0 10px; color: var(--text); }

/* ---------- Card / surface ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  font-family: var(--font);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: var(--brand-light); color: var(--brand-dark); }
.btn-secondary:hover { background: #DCEAE3; }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-danger:hover { background: #F8D9D5; }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }

/* ---------- Forms ---------- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin: 16px 0 6px; }
label:first-of-type { margin-top: 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="file"], select, textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus,
input[type="date"]:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}
input[readonly] { background: var(--bg); color: var(--text-secondary); }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.checkbox-row input[type="checkbox"] { width: auto; accent-color: var(--brand); }
.checkbox-row label { margin: 0; font-weight: 500; color: var(--text); }
.hint { font-size: 12.5px; color: var(--text-faint); margin-top: 6px; line-height: 1.5; }
.error-msg { color: var(--danger); font-size: 13px; background: var(--danger-bg); padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; }
.success-msg { color: var(--success); font-size: 13px; background: var(--success-bg); padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; }

.color-row { display: flex; gap: 8px; align-items: stretch; }
.color-row input[type="text"] { flex: 1; }
.color-row input[type="color"] { width: 44px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface); }

/* ---------- Links ---------- */
a.back { font-size: 13px; color: var(--text-secondary); text-decoration: none; font-weight: 600; }
a.back:hover { color: var(--text); }

/* ---------- Table ---------- */
table.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
table.data-table th, table.data-table td { padding: 13px 16px; text-align: left; font-size: 13.5px; border-bottom: 1px solid var(--border); }
table.data-table th { background: var(--bg); color: var(--text-secondary); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; }
table.data-table tbody tr:last-child td { border-bottom: none; }
table.data-table tbody tr { transition: background 0.12s ease; }
table.data-table tbody tr:hover { background: var(--bg); }
table.data-table .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
table.data-table .actions a { font-size: 12.5px; color: var(--brand); text-decoration: none; font-weight: 600; }
table.data-table .actions a:hover { text-decoration: underline; }
table.data-table .actions form { display: inline-flex; }
table.data-table .actions select { font-size: 12px; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--border); font-family: var(--font); }
table.data-table .actions button { font-size: 12px; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-family: var(--font); color: var(--text-secondary); }
table.data-table .actions button:hover { background: var(--bg); }

/* ---------- Status pill ---------- */
.status-pill { display: inline-block; padding: 4px 11px; border-radius: 20px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; }
.status-pill.ACTIVE { background: var(--success-bg); color: var(--success); }
.status-pill.SUSPENDED, .status-pill.EXPIRED { background: var(--danger-bg); color: var(--danger); }

/* ---------- Auth screens (login / forgot-password) ---------- */
.auth-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 30% 20%, var(--brand-light) 0%, var(--bg) 55%); padding: 24px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px 32px; width: 340px; box-shadow: var(--shadow-md); }
.auth-card .auth-logo { height: 34px; display: block; margin: 0 auto 18px; }
.auth-card h1 { font-size: 19px; font-weight: 700; margin: 0 0 22px; color: var(--text); text-align: center; letter-spacing: -0.01em; }
.auth-footer { text-align: center; margin-top: 18px; }
.auth-footer a { font-size: 13px; color: var(--brand); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ---------- Misc ---------- */
pre.code-block { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; font-size: 12px; overflow-x: auto; }

@media (max-width: 760px) {
  .topbar { padding: 12px 16px; }
  .topbar-title { display: none; }
  .wrap { padding: 0 14px 32px; }
}
