/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:   #0a0a0a;
  --white:   #ffffff;
  --gray-50: #fafafa;
  --gray-100:#f4f4f4;
  --gray-200:#e8e8e8;
  --gray-400:#aaaaaa;
  --gray-600:#666666;
  --gray-800:#333333;
  --accent:  #1C5FAD;
  --accent-dark: #164E8E;
  --accent-orange: #E87B1A;
  --accent-orange-dark: #c96813;
  --radius:  8px;
  --shadow:  0 2px 12px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);
  --transition: .18s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-100);
  color: var(--black);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== HEADER ===== */
.site-header {
  background: #1C5FAD;
  color: var(--white);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  flex-wrap: wrap;
  padding: 10px 0;
}
.header-brand {}
.brand-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.brand-address {
  font-size: .72rem;
  color: var(--gray-400);
  letter-spacing: .02em;
}

.header-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27,79,138,.35);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.35);
}
.btn-outline:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.6);
}
.btn-ghost {
  background: transparent;
  color: var(--black);
  border-color: var(--gray-200);
}
.btn-ghost:hover {
  background: var(--gray-100);
}
.btn-danger {
  background: #c0392b;
  color: white;
  border-color: #c0392b;
}
.btn-danger:hover { background: #a93226; border-color: #a93226; }

.btn.loading { opacity: .6; cursor: not-allowed; pointer-events: none; }
.btn.loading::after {
  content: '';
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-sm {
  padding: 5px 12px;
  font-size: .78rem;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
  border: 1.5px solid;
  transition: all var(--transition);
}
.btn-edit   { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn-edit:hover   { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-delete { background: #fff; color: #c0392b; border-color: #c0392b; }
.btn-delete:hover { background: #c0392b; color: #fff; }

/* ===== MAIN CONTENT ===== */
.main-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

.page-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: 6px;
}
.page-subtitle {
  color: var(--gray-600);
  font-size: .9rem;
  margin-bottom: 28px;
}

/* ===== FORM CARDS ===== */
.form-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
}
.card-header {
  background: #1C5FAD;
  color: var(--white);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h2, .card-header h3 {
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.card-body { padding: 22px 20px; }

/* ===== FORM ELEMENTS ===== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}
.form-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.form-full { grid-column: 1 / -1; }

.phone-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: nowrap;
}
.phone-row .phone-code {
  flex: 0 0 40%;
  min-width: 120px;
}
.phone-row .phone-number {
  flex: 0 0 60%;
  min-width: 160px;
}

@media (max-width: 520px) {
  .phone-row {
    flex-wrap: wrap;
  }
  .phone-row .phone-code,
  .phone-row .phone-number {
    flex: 0 0 100%;
    min-width: 0;
  }
}

.availability-calendar {
  overflow-x: auto;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 8px;
  background: #ffffff;
  margin-bottom: 16px;
}
.availability-calendar .calendar-grid {
  display: table;
  min-width: 100%;
  border-collapse: collapse;
}
.availability-calendar .calendar-row {
  display: table-row;
}
.availability-calendar .calendar-row.header {
  font-weight: 700;
  border-bottom: 1px solid var(--gray-200);
}
.availability-calendar .calendar-cell {
  display: table-cell;
  border-right: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
  text-align: center;
  padding: 3px 4px;
  font-size: .75rem;
}
.availability-calendar .calendar-cell.vehicle {
  text-align: left;
  min-width: 120px;
  font-weight: 600;
  color: #333;
  background: #f5f6fa;
}
.availability-calendar .calendar-cell.day {
  min-width: 24px;
}

.form-subsection {
  grid-column: 1 / -1;
  margin: 8px -20px 4px;
  padding: 10px 20px;
  background: var(--gray-100);
  border-left: 4px solid var(--accent-orange);
}
.form-subsection h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gray-800);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== ADDRESS AUTOCOMPLETE ===== */
.address-manual-hint {
  margin-top: 8px;
}
.address-manual-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--gray-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.address-manual-label:hover { color: var(--gray-800); }
.address-manual-label input[type="checkbox"] {
  width: 15px; height: 15px; cursor: pointer; accent-color: var(--gray-800);
}
.address-manual-fields {
  margin-top: 10px;
  padding: 14px 16px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}
.address-manual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
}
/* Google Places dropdown override */
.pac-container {
  font-family: 'Inter', sans-serif;
  border: 1px solid var(--gray-200);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
}
.pac-item { padding: 8px 12px; font-size: 0.88rem; cursor: pointer; }
.pac-item:hover { background: var(--gray-100); }
.pac-item-query { font-weight: 600; color: var(--gray-800); }

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--gray-600);
  letter-spacing: .03em;
  text-transform: uppercase;
}
.form-group label .req { color: #c0392b; margin-left: 2px; }

.form-group input,
.form-group select {
  padding: 10px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  font-size: .9rem;
  color: var(--black);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27,79,138,.10);
}
.form-group input::placeholder { color: var(--gray-400); }
select option { color: var(--black); }

.country-flag-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  font-size: 1.1rem;
  margin-left: 0.5rem;
}

/* ===== RADIO GROUP ===== */
.radio-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 9px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  transition: all var(--transition);
  font-size: .88rem;
  font-weight: 500;
  flex: 1;
  min-width: 130px;
  justify-content: center;
}
.radio-item:hover { border-color: var(--gray-400); }
.radio-item input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; }
.radio-item:has(input:checked) {
  border-color: var(--accent);
  background: #eef4fc;
  font-weight: 700;
}

/* ===== VEHICLE SELECT ===== */
.vehicle-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.vehicle-box select { flex: 1; min-width: 220px; }

/* ===== PRICING BOX ===== */
.pricing-box {
  display: none;
  background: var(--accent);
  color: var(--white);
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 16px;
}
.pricing-box h3 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-400);
  margin-bottom: 10px;
}
.pricing-rows { display: flex; flex-direction: column; gap: 6px; }
.pricing-row {
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
}
.pricing-row.total {
  border-top: 1px solid rgba(255,255,255,.2);
  padding-top: 8px;
  margin-top: 2px;
  font-size: 1rem;
  font-weight: 700;
}
.pricing-duration {
  font-size: .78rem;
  color: var(--gray-400);
  margin-bottom: 6px;
}

/* ===== SIGNATURE ===== */
.sig-area { position: relative; }
.sig-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--gray-400);
  font-size: .83rem;
  pointer-events: none;
  transition: opacity .2s;
}
canvas#signatureCanvas {
  display: block;
  width: 100%;
  height: 180px;
  border: 2px dashed var(--gray-200);
  border-radius: 8px;
  cursor: crosshair;
  background: var(--white);
  touch-action: none;
}
canvas#signatureCanvas:active { border-color: var(--accent); }
.sig-controls {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

/* ===== FEEDBACK ===== */
.feedback {
  display: none;
  padding: 14px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 20px;
}
.feedback.success { background: #e8f8f0; color: #1a7a45; border: 1.5px solid #a3e3be; }
.feedback.error   { background: #fdf2f2; color: #c0392b; border: 1.5px solid #f5c6c6; }

/* ===== DROPOFF OPTIONS ===== */
.dropoff-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}
.dropoff-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropoff-option:hover { border-color: var(--gray-400); }
.dropoff-option:has(input:checked) {
  border-color: var(--accent);
  background: #eef4fc;
}
.dropoff-option input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.dropoff-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dropoff-option-text strong { font-size: 0.95rem; }
.dropoff-option-text .field-hint { margin-top: 2px; }

/* ===== FIELD HINT ===== */
.field-hint {
  display: block;
  margin-top: 5px;
  font-size: 0.78rem;
  color: var(--gray-500);
  font-style: italic;
  line-height: 1.4;
}

/* ===== CERTIFICATION CHECKBOX ===== */
.cert-check-wrap {
  margin: 20px 0 12px;
  padding: 14px 18px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
}
.cert-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--gray-700);
  line-height: 1.45;
}
.cert-label input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ===== GENERATE BUTTON ===== */
.generate-wrap { text-align: center; margin-top: 8px; }
.generate-wrap .btn { padding: 14px 40px; font-size: 1rem; letter-spacing: .02em; }

/* ===== THANK YOU OVERLAY ===== */
.thankyou-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}
.thankyou-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 36px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.thankyou-card h2 {
  margin: 0 0 16px;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gray-900);
}
.thankyou-card p {
  margin: 0 0 28px;
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.6;
}
.thankyou-card .btn { padding: 12px 32px; }

/* ===== ADMIN — LOGIN ===== */
#loginScreen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--gray-100);
}
.login-card {
  background: var(--white);
  border-radius: 16px;
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  text-align: center;
  border: 1px solid var(--gray-200);
}
.login-logo { font-size: 1.4rem; font-weight: 800; letter-spacing: .06em; margin-bottom: 4px; }
.login-sub  { color: var(--gray-600); font-size: .82rem; margin-bottom: 28px; }
.login-card h2 { font-size: 1.1rem; margin-bottom: 20px; font-weight: 700; }
.login-card input {
  width: 100%; padding: 12px; border: 2px solid var(--gray-200);
  border-radius: 8px; font-size: 1rem; text-align: center;
  letter-spacing: .1em; margin-bottom: 14px;
  transition: border-color var(--transition);
}
.login-card input:focus { outline: none; border-color: var(--accent); }
.login-error {
  display: none; color: #c0392b; font-size: .83rem;
  margin-bottom: 10px; font-weight: 600;
}
.login-denied {
  display: none; color: #c0392b; font-size: .85rem;
  background: #fff0f0; border: 1px solid #f5c6cb;
  border-radius: 8px; padding: 12px 16px;
  margin-bottom: 16px; line-height: 1.5;
}
.btn-google {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; width: 100%; padding: 13px 20px;
  background: #fff; border: 2px solid var(--gray-200);
  border-radius: 10px; font-size: .95rem; font-weight: 600;
  color: #3c4043; cursor: pointer; transition: all var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.btn-google:hover { border-color: #4285F4; box-shadow: 0 2px 8px rgba(66,133,244,.2); }
.btn-google svg { flex-shrink: 0; }
.btn-google.loading { opacity: .6; pointer-events: none; }
.login-spinner {
  display: none; width: 20px; height: 20px;
  border: 2px solid var(--gray-200); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* User badge in admin header */
.user-badge {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.12); border-radius: 8px;
  padding: 6px 12px;
}
.user-badge img {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); object-fit: cover;
}
.user-badge-info { line-height: 1.25; }
.user-badge-name  { font-size: .78rem; font-weight: 600; color: #fff; }
.user-badge-role  { font-size: .68rem; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .04em; }

/* Roles tab table */
.roles-table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.roles-table th { background: var(--accent); color: #fff; padding: 10px 14px; text-align: left; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.roles-table td { padding: 10px 14px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.roles-table tr:last-child td { border-bottom: none; }
.roles-table tr:hover td { background: var(--gray-50); }
.role-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .74rem; font-weight: 700; letter-spacing: .03em; }
.role-badge.superadmin { background: #fff3e0; color: #e67e00; border: 1px solid #ffe0b2; }
.role-badge.admin      { background: var(--accent-light, #eef4fc); color: var(--accent); border: 1px solid #c5d9f5; }

/* ===== ADMIN DASHBOARD ===== */
#dashboard { display: none; }

.admin-header {
  background: #1C5FAD;
  color: var(--white);
  padding: 0 24px;
}
.admin-header-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 48px; gap: 16px; padding: 8px 0;
}
.admin-brand { font-size: 1.1rem; font-weight: 800; letter-spacing: .06em; }
.admin-brand small { display: block; font-size: .68rem; color: var(--gray-400); font-weight: 400; }

.admin-content { max-width: 1100px; margin: 0 auto; padding: 28px 16px 64px; }

/* Tabs */
.tabs {
  display: flex; gap: 0; margin-bottom: 28px;
  border-bottom: 2px solid var(--gray-200);
}
.tab-btn {
  padding: 12px 22px; background: none; border: none; cursor: pointer;
  font-size: .88rem; font-weight: 600; color: var(--gray-600);
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: all var(--transition);
}
.tab-btn:hover { color: var(--accent); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== ADMIN TABLES ===== */
.section-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; gap: 12px;
}
.section-toolbar h3 { font-size: 1rem; font-weight: 700; }

.table-wrap { overflow-x: auto; border-radius: 10px; box-shadow: var(--shadow); border: 1px solid var(--gray-200); }

table {
  width: 100%; border-collapse: collapse;
  background: var(--white); font-size: .85rem;
}
thead { background: var(--accent); color: var(--white); }
thead th { padding: 11px 14px; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; text-align: left; }
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
tbody tr:hover { background: var(--gray-50); }
tbody tr:last-child td { border-bottom: none; }
td.empty { text-align: center; color: var(--gray-400); font-style: italic; padding: 32px; }

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 500;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-box {
  background: var(--white);
  border-radius: 14px;
  padding: 28px 28px 24px;
  width: 100%; max-width: 600px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow-y: auto;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 22px;
}
.modal-header h3 { font-size: 1.05rem; font-weight: 800; }
.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 1.3rem; color: var(--gray-600); line-height: 1;
  padding: 2px 6px; border-radius: 4px;
}
.modal-close:hover { background: var(--gray-100); color: var(--black); }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.modal-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
.modal-full { grid-column: 1 / -1; }
.field-label {
  font-size: .75rem; font-weight: 600; color: var(--gray-600);
  text-transform: uppercase; letter-spacing: .03em; margin-bottom: 5px; display: block;
}
.modal-grid input, .modal-grid select {
  width: 100%; padding: 9px 11px;
  border: 1.5px solid var(--gray-200); border-radius: 6px;
  font-size: .88rem; color: var(--black);
  transition: border-color var(--transition);
}
.modal-grid input:focus, .modal-grid select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27,79,138,.10);
}
.rate-group { background: var(--gray-50); border-radius: 8px; padding: 12px; }
.rate-group-title {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  color: var(--gray-600); letter-spacing: .04em; margin-bottom: 10px;
}
.rate-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ===== SETTINGS ===== */
.settings-card {
  background: var(--white); border-radius: 12px;
  border: 1px solid var(--gray-200); box-shadow: var(--shadow);
  padding: 24px; max-width: 480px;
}
.settings-card h3 { font-size: .95rem; font-weight: 800; margin-bottom: 18px; }

/* ===== BADGE ===== */
.badge {
  display: inline-block; padding: 3px 10px;
  background: var(--accent); color: var(--white);
  border-radius: 20px; font-size: .72rem; font-weight: 700;
  margin-left: 8px;
}
.badge-success {
  background: #22c55e; color: var(--white);
}
.badge-error {
  background: #ef4444; color: var(--white);
}

/* ===== TOGGLE SWITCH ===== */
.toggle-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-slider {
  display: inline-block;
  width: 48px;
  height: 28px;
  background: #ccc;
  border-radius: 20px;
  position: relative;
  transition: background var(--transition);
  flex-shrink: 0;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: left var(--transition);
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-slider {
  background: #22c55e;
}
.toggle-switch input:checked + .toggle-slider::after {
  left: 22px;
}

/* ===== SEARCH ===== */
.search-bar {
  display: flex; gap: 10px; align-items: center;
}
.search-bar input {
  padding: 8px 12px; border: 1.5px solid var(--gray-200);
  border-radius: 8px; font-size: .87rem; width: 240px;
}

.address-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  box-shadow: 0 8px 14px rgba(0,0,0,0.12);
  max-height: 190px;
  overflow-y: auto;
  font-size: 0.9rem;
}

.address-dropdown-item {
  padding: 8px 10px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  color: #232323;
}
.address-dropdown-item:last-child {
  border-bottom: none;
}
.address-dropdown-item:hover {
  background: #f1f5f9;
}
  transition: border-color var(--transition);
}
.search-bar input:focus { outline: none; border-color: var(--black); }

/* ===== DIVIDER ===== */
.divider { height: 1px; background: var(--gray-200); margin: 20px 0; }

/* ===== TOOLTIP ===== */
.hint {
  font-size: .74rem; color: var(--gray-400); margin-top: 4px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid.three { grid-template-columns: 1fr; }
  .address-manual-grid { grid-template-columns: 1fr; }
  .radio-group { flex-direction: column; }
  .radio-item { min-width: unset; }
  .modal-grid { grid-template-columns: 1fr; }
  .header-inner { min-height: 56px; }
  .brand-name { font-size: 1.15rem; }
  .main-content { padding: 20px 12px 48px; }
  .tabs { overflow-x: auto; }
  .tab-btn { padding: 10px 14px; font-size: .8rem; white-space: nowrap; }
}
