/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

body {
  background: radial-gradient(circle at top left, #f7f8fa, #e8eaef);
  color: #1e1a34;
  font-size: 16px;
  line-height: 1.6;
  padding: 2rem;
}


/* Layout Containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.card {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* Headings */
h1, h2, h3, h4 {
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1e1a34;
  letter-spacing: -0.03em;
}

/* Forms */
form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

label {
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: #1e1a34;
  display: block;
}

form select {
  padding: 0.6rem 1rem;
  border-radius: 12px;
  border: 1px solid #ccc;
}
form label {
  font-weight: 500;
  margin-right: 0.5rem;
}


input, select, textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  border: 1px solid #ddd;
  background: rgba(255, 255, 255, 0.95);
  transition: all 0.2s;
  font-size: 1rem;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #7f3035;
  box-shadow: 0 0 0 4px rgba(127, 48, 53, 0.15);
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%231e1a34' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #7f3035, #1e1a34);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  text-decoration: none;
}

.btn:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.btn-wrapper {
  text-align: center;
  margin-top: 2rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background: #f0f1f5;
  color: #1e1a34;
  font-weight: 600;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.toggle {
  position: relative;
  width: 50px;
  height: 28px;
  background: #ccc;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.3s ease;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle.active {
  background: #7f3035;
}

.toggle.active::after {
  transform: translateX(22px);
  background: #fff;
}
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.checklist-item input[type="checkbox"] {
  transform: scale(1.2);
}
.status-card {
  background: rgba(255, 255, 255, 0.75);
  border-left: 6px solid #7f3035;
  padding: 1.5rem;
  border-radius: 16px;
}

.status-card .success {
  color: #1b5e20;
}

.status-card .error {
  color: #b71c1c;
}

.status-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: white;
}

.status-badge.pending {
  background: #757575;
}

.status-badge.approved {
  background: #2e7d32;
}

.status-badge.rejected {
  background: #b71c1c;
}

.status-badge.under-review {
  background: #f9a825;
  color: #1e1a34;
}

.status-badge.reimbursed {
  background: #1e1a34;
}
.reimbursement-total {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 1rem;
}

.reimbursement-table td {
  vertical-align: top;
}
.inline-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}
.form-group {
  margin-bottom: 1.5rem;
}

.inline-group {
  gap: 1.5rem;
}
/* green border on status-card.success */
.status-card.success {
  border-left-color: #1b5e20;
}

/* red border on status-card.error (optional override) */
.status-card.error {
  border-left-color: #b71c1c;
}
/* status‐card overrides to match admin/edit_user.php */

.card.status-card.success {
  background: #eafaf1;
  border-left: 4px solid #2ecc71;
  color: #2e7d32;
}

.card.status-card.error {
  background: #fef0f0;
  border-left: 4px solid #e74c3c;
  color: #b00020;
}
/* Onboarding structure */

/* ==== Onboarding & shared form helpers (consolidated) ==== */

/* Layout helpers */
.stack { display: grid; gap: 1.25rem; }
.form-grid { display: grid; gap: 1rem; }
.form-grid.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.form-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Tabs with ✅/❌ markers in the text */
.tabs { display: flex; gap: .5rem; flex-wrap: wrap; }
.tabs a {
  padding: .5rem .75rem;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid transparent;
  background: #f6f7f9;
}
.tabs a.active {
  font-weight: 600;
  background: rgba(0,0,0,.05);
}

/* Alerts (success) */
.error-message.success {
  color: #2e7d32;
  background: rgba(46,125,50,.08);
  border-radius: 8px;
  padding: .75rem 1rem;
}

/* Signature pad — light grey container + crisp inner canvas */
.sigpad {
  background: #f5f5f5;
  border: 2px solid #bdbdbd;
  border-radius: 10px;
  padding: .75rem;
}
.sigpad-label {
  font-size: .9rem;
  font-weight: 600;
  color: #222;
  margin-bottom: .5rem;
  text-align: center;
}
.sigpad canvas {
  width: 100%;
  max-width: 720px;
  height: 160px;
  background: #ffffff;
  border: 1px solid #444;
  border-radius: 6px;
  display: block;
  margin: 0 auto;
}
.sig-actions { display: flex; justify-content: center; margin-top: .5rem; }

/* Spacing helper under the welcome text */
.mb-lg { margin-bottom: 1.5rem; }

/* Checkbox behavior like edit_user (inline checkbox + text) */
form label input[type="checkbox"] {
  width: auto;
  margin-right: .5rem;
  vertical-align: middle;
}

/* (Optional) slightly larger hit-area on checkboxes */
form label input[type="checkbox"] { transform: translateY(1px); }

/* Optional: visual nudge for completed tabs */
.tabs a.done { background: #e8f5e9; border-color: #2e7d32; }




/* =======================================================
   Mobile Patch (safe) — only applies on small screens
   ======================================================= */
@media (max-width: 640px) {
  /* Page gutters */
  .container { padding-left: 12px; padding-right: 12px; }
  .card { margin: 12px auto; padding: 14px; border-radius: 18px; }
  .card > h1, .card > h2, .card > h3 { margin-top: 2px; margin-bottom: 10px; }

  /* Stack fields and prevent overflow */
  .form-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .form-row.two-up { grid-template-columns: 1fr; }  /* override any two-up on phones */

  /* Inputs fit the screen and avoid iOS zoom jump */
  input, select, textarea, button { 
    font-size: 16px; 
    max-width: 100%; 
    min-width: 0; 
  }
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="date"],
  input[type="number"],
  select,
  textarea { 
    width: 100%; 
    padding-left: 12px; 
    padding-right: 12px;
  }
  select { padding-right: 40px; } /* room for native arrow */

  /* Buttons feel right on mobile */
  .btn,
  button[type="submit"],
  button,
  a.button {
    height: 40px;
    padding: 9px 12px;
  }
  .btn-lg { height: 44px; padding: 11px 14px; }
  .btn-sm { height: 36px; padding: 8px 10px; }

  /* Header buttons spacing */
  .header .btn, .navbar .btn { margin: 0 6px; }
}

/* Tablets: allow two-up where space permits */
@media (min-width: 641px) and (max-width: 768px) {
  .form-row.two-up { grid-template-columns: 1fr 1fr; gap: 14px; }
  .container { padding-left: 18px; padding-right: 18px; }
}
