/* WHH Auth - Wrathell, Hunt and Associates branding */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Roboto:wght@400;500;700&display=swap');

:root {
  --primary: #1b429a;
  --primary-hover: #0b223e;
  --primary-light: #81c8ff;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --success: #16a34a;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #696a6c;
  --gray-700: #374151;
  --gray-900: #0c233f;
  --radius: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 20px;
}

header {
  text-align: center;
  margin-bottom: 32px;
}

.logo {
  display: inline-block;
}

.logo img {
  height: 56px;
  width: auto;
}

.logo-text {
  font-family: 'DM Serif Display', serif;
  font-size: 14px;
  color: var(--gray-500);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

/* Card */
.card {
  background: white;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.card h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--gray-900);
}

.card h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  margin-bottom: 4px;
  color: var(--gray-900);
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 4px;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 15px;
  transition: border-color 0.15s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 66, 154, 0.15);
}

.form-group small {
  display: block;
  color: var(--gray-500);
  font-size: 12px;
  margin-top: 4px;
}

.form-group.checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 400;
}

.form-group.checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s;
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-100);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: var(--danger-hover);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  width: auto;
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-error {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: var(--success);
  border: 1px solid #bbf7d0;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: var(--gray-500);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--gray-200);
}

.divider span {
  padding: 0 12px;
}

/* Links */
.links {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
}

.links a {
  color: var(--primary);
  text-decoration: none;
  margin: 0 8px;
}

.links a:hover {
  text-decoration: underline;
}

/* Account page */
.account-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.account-info {
  margin-bottom: 16px;
}

.account-info p {
  margin-bottom: 4px;
  font-size: 14px;
}

/* List items */
.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item small {
  display: block;
  color: var(--gray-500);
  font-size: 12px;
}

/* Utility */
hr {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 24px 0;
}

.subtitle {
  color: var(--gray-500);
  font-size: 14px;
  margin-bottom: 16px;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--gray-500);
  font-size: 14px;
}

.badge {
  display: inline-block;
  background: #d6e4f7;
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

section {
  margin-bottom: 8px;
}

/* App list on account page */
.app-list {
  margin: 12px 0;
}

.app-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
}

.app-item:last-child {
  border-bottom: none;
}

.app-name a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

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

.app-roles {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 12px;
}

.table th,
.table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.table th {
  font-weight: 600;
  color: var(--gray-700);
  background: var(--gray-50);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tbody tr:hover {
  background: var(--gray-50);
}

/* Small select (for inline role dropdowns) */
.select-sm {
  padding: 4px 8px;
  font-size: 13px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: white;
  cursor: pointer;
}

.select-sm:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 66, 154, 0.15);
}

/* Password rules checklist */
.pw-rules {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  font-size: 12px;
  color: var(--gray-500);
}

.pw-rules li {
  padding: 2px 0 2px 20px;
  position: relative;
}

.pw-rules li::before {
  content: '\2022';
  position: absolute;
  left: 6px;
}

.pw-rules li.pass {
  color: var(--success);
}

.pw-rules li.pass::before {
  content: '\2713';
}

.pw-rules li.fail {
  color: var(--danger);
}

.pw-rules li.fail::before {
  content: '\2717';
}

.pw-match-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
}

/* Admin wide container */
.container-wide {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}
