/* ============================================================
   apply.css — Infinit HRIS Apply Now Form
   Sidebar layout + vertical stepper + 2-col form grid
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; }

/* ── PAGE SHELL: sidebar + main side by side ── */
.apply-page {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  display: flex;
  min-height: 100vh;
  background: #f4f4f2;
}

/* ══════════════════════════════════════════
   LEFT SIDEBAR
══════════════════════════════════════════ */
.apply-sidebar {
  flex: 0 0 280px;
  width: 280px;
  min-height: 100vh;
  background: #1a1a1a;
  padding: 2.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

/* scrollbar for sidebar */
.apply-sidebar::-webkit-scrollbar { width: 4px; }
.apply-sidebar::-webkit-scrollbar-track { background: transparent; }
.apply-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.sidebar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff6c00;
  flex-shrink: 0;
}

.sidebar-brand span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #ff6c00;
}

.sidebar-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  margin: 0 0 0.3rem;
  line-height: 1.2;
}

.sidebar-sub {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  font-weight: 500;
  margin: 0 0 2rem;
  line-height: 1.5;
}

/* ── STEP NAV ── */
.step-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  cursor: default;
}

/* The vertical track column */
.step-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 28px;
}

/* Vertical connector lines */
.step-connector {
  width: 2px;
  flex: 1;
  min-height: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 1px;
}

.step-connector.invisible {
  background: transparent;
}

/* Active step — orange connectors both directions */
.step-item.active .step-connector {
  background: rgba(255, 108, 0, 0.35);
}

/* Done step — green connectors */
.step-item.done .step-connector {
  background: rgba(40, 167, 69, 0.3);
}

/* The numbered circle */
.step-bullet {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.step-bullet span {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  line-height: 1;
}

.step-item.active .step-bullet {
  background: #ff6c00;
  border-color: #ff6c00;
  box-shadow: 0 0 0 4px rgba(255,108,0,0.2);
}

.step-item.active .step-bullet span {
  color: #fff;
}

.step-item.done .step-bullet {
  background: rgba(40,167,69,0.2);
  border-color: #28a745;
}

.step-item.done .step-bullet span {
  color: #28a745;
}

/* Step text */
.step-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0 0.5rem;
  min-height: 48px;
  justify-content: center;
}

.step-name {
  font-size: 0.83rem;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  line-height: 1.3;
  transition: color 0.2s ease;
}

.step-item.active .step-name {
  color: #ffffff;
  font-weight: 700;
}

.step-item.done .step-name {
  color: rgba(255,255,255,0.6);
}

.step-status {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255,255,255,0.2);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.step-item.active .step-status {
  color: #ff6c00;
}

.step-item.done .step-status {
  color: #28a745;
}

/* ══════════════════════════════════════════
   RIGHT MAIN AREA
══════════════════════════════════════════ */
.apply-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── TOP BAR ── */
.apply-topbar {
  background: #ffffff;
  border-bottom: 1px solid #ececec;
  padding: 1.75rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.topbar-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: -0.4px;
  margin: 0 0 0.2rem;
  line-height: 1.1;
}

.topbar-sub {
  font-size: 0.85rem;
  color: #999;
  font-weight: 500;
  margin: 0;
}

.topbar-badge {
  background: rgba(255,108,0,0.1);
  color: #ff6c00;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255,108,0,0.2);
  white-space: nowrap;
}

/* ── FORM BODY ── */
.apply-body {
  padding: 2rem 2.5rem 3rem;
  flex: 1;
}

/* ── FORM SECTIONS ── */
.form-section {
  background: #ffffff;
  border-radius: 18px;
  padding: 1.75rem 2rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
}

.form-section-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.4rem;
  padding-bottom: 0.9rem;
  border-bottom: 2px solid #f3f3f3;
}

.form-section-label i {
  font-size: 0.9rem;
  color: #ff6c00;
  width: 30px;
  height: 30px;
  background: rgba(255,108,0,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.form-section-label span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #555;
}

/* ── 2-COLUMN GRID ── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.5rem;
}

.field-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field-wrap.col-span-2 {
  grid-column: span 2;
}

/* ── LABELS ── */
.field-wrap label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #555;
  margin: 0;
}

.req {
  color: #ff4444;
  font-weight: 700;
}

/* ── INPUTS & SELECTS ── */
.apply-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 11px;
  border: 2px solid #e8e8e8;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1a1a1a;
  background: #fafafa;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  height: auto;
}

.apply-input:focus {
  border-color: #ff6c00;
  box-shadow: 0 0 0 3px rgba(255,108,0,0.1);
  background: #fff;
}

.apply-input::placeholder { color: #c8c8c8; }

.apply-input.is-valid  { border-color: #28a745; background: #fff; }
.apply-input.is-invalid { border-color: #dc3545; background: #fff; }

select.apply-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

/* ── VALIDATION ── */
.invalid-feedback {
  font-size: 0.75rem;
  color: #dc3545;
  font-weight: 600;
  min-height: 1rem;
  margin-top: 0.1rem;
}

/* ── ACTION BUTTONS ── */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
}

.btn-exit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 11px;
  border: 2px solid #e8e8e8;
  background: #fff;
  color: #666;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-exit:hover {
  border-color: #dc3545;
  color: #dc3545;
  background: rgba(220,53,69,0.04);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-next {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 11px;
  border: none;
  background: #ff6c00;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.btn-next:hover {
  background: #e55e00;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255,108,0,0.35);
}

.btn-next:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .apply-sidebar { flex: 0 0 240px; width: 240px; }
  .apply-body { padding: 1.5rem 1.75rem 2.5rem; }
}

@media (max-width: 768px) {
  .apply-page { flex-direction: column; }

  .apply-sidebar {
    position: static;
    width: 100%;
    height: auto;
    min-height: unset;
    padding: 1.5rem 1.25rem 1rem;
    flex-direction: column;
  }

  .step-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0;
    padding-bottom: 0.5rem;
  }

  .step-item {
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    min-width: 70px;
    text-align: center;
  }

  .step-track {
    flex-direction: row;
    width: auto;
  }

  .step-connector { min-height: unset; height: 2px; min-width: 20px; width: auto; }
  .step-info { min-height: unset; padding: 0; align-items: center; }
  .step-name { font-size: 0.65rem; }
  .step-status { display: none; }

  .apply-topbar { padding: 1.25rem 1.25rem; }
  .apply-body { padding: 1rem 1rem 2rem; }
  .form-section { padding: 1.25rem 1rem; }
}

@media (max-width: 540px) {
  .form-grid { grid-template-columns: 1fr; }
  .field-wrap.col-span-2 { grid-column: span 1; }
  .topbar-title { font-size: 1.2rem; }
}

/* ══════════════════════════════════════════
   TABLE STYLES (Family Background etc.)
══════════════════════════════════════════ */

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.table-hint {
  font-size: 0.85rem;
  color: #999;
  font-weight: 500;
  margin: 0;
}

.btn-add-record {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  border: none;
  background: #ff6c00;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  letter-spacing: 0.2px;
}

.btn-add-record:hover {
  background: #e55e00;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255,108,0,0.3);
}

/* ── APPLY TABLE ── */
.apply-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1.5px solid #ececec;
}

.apply-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  font-family: inherit;
}

.apply-table thead tr {
  background: #f9f9f8;
  border-bottom: 2px solid #ececec;
}

.apply-table th {
  padding: 0.75rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #888;
  white-space: nowrap;
  text-align: left;
}

.apply-table td {
  padding: 0.85rem 1rem;
  color: #333;
  font-weight: 500;
  border-bottom: 1px solid #f3f3f3;
  vertical-align: middle;
}

.apply-table tbody tr:last-child td {
  border-bottom: none;
}

.apply-table tbody tr:hover {
  background: #fafafa;
}

.table-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(255,108,0,0.1);
  color: #ff6c00;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.btn-table-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1.5px solid #ffe0e0;
  background: #fff5f5;
  color: #dc3545;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-table-delete:hover {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
  transform: scale(1.08);
}

/* ── EMPTY STATE ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 2rem;
  text-align: center;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(255,108,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  font-size: 1.5rem;
  color: #ff6c00;
}

.empty-title {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 0.3rem;
}

.empty-sub {
  font-size: 0.85rem;
  color: #aaa;
  margin: 0;
  font-weight: 500;
}

/* ── DISABLED NEXT BUTTON ── */
.btn-next-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

/* ══════════════════════════════════════════
   MODAL STYLES
══════════════════════════════════════════ */

.apply-modal-content {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.15);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Success modal specific styles */
#successModal .apply-modal-header h4 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

#successModal .modal-content {
  border-radius: 24px;
}

#successModal .apply-modal-body {
  padding: 2.5rem 2rem !important;
}

#successModal .btn-modal-save {
  background: #28a745 !important;
  border-color: #28a745 !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#successModal .btn-modal-save:hover {
  background: #218838 !important;
  border-color: #1e7e34 !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(40,167,69,0.4);
}

#countdown {
  background: #28a745;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 800;
  font-size: 1.1rem;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Ensure consistent button disabled state */
.btn-submit-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #ccc !important;
}

@media (max-width: 540px) {
  #successModal .apply-modal-body {
    padding: 2rem 1.5rem !important;
  }
  
  #successModal .btn-modal-save {
    min-width: 100%;
    margin-top: 1rem;
  }
}

.apply-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.75rem 1.1rem;
  border-bottom: 2px solid #f3f3f3;
  background: #fff;
}

.apply-modal-header h4 {
  font-size: 1rem;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.apply-modal-header h4 i {
  color: #ff6c00;
  font-size: 0.95rem;
}

.apply-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1.5px solid #ececec;
  background: #f9f9f8;
  color: #888;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.apply-modal-close:hover {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

.apply-modal-body {
  padding: 1.5rem 1.75rem;
  background: #fff;
}

.apply-modal-body p {
  font-size: 0.92rem;
  color: #555;
  line-height: 1.6;
  margin: 0;
}

.apply-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 1rem 1.75rem 1.4rem;
  background: #fff;
  border-top: 1.5px solid #f3f3f3;
}

/* Modal 2-col grid */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
}

.modal-grid .field-wrap.col-span-2 {
  grid-column: span 2;
}

/* Modal buttons */
.btn-modal-cancel {
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  border: 1.5px solid #e8e8e8;
  background: #fff;
  color: #666;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-cancel:hover {
  border-color: #999;
  color: #333;
}

.btn-modal-save {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: 10px;
  border: none;
  background: #ff6c00;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-save:hover {
  background: #e55e00;
  box-shadow: 0 6px 18px rgba(255,108,0,0.3);
}

.btn-modal-delete {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: 10px;
  border: none;
  background: #dc3545;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-modal-delete:hover {
  background: #c82333;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(220,53,69,0.3);
}

@media (max-width: 540px) {
  .modal-grid { grid-template-columns: 1fr; }
  .modal-grid .field-wrap.col-span-2 { grid-column: span 1; }
  .apply-modal-body { padding: 1.25rem; }
  .apply-modal-footer { padding: 1rem 1.25rem; }
  .table-toolbar { flex-direction: column; align-items: flex-start; }
}

/* ── UTILITY ── */
.text-muted-sm {
  font-size: 0.78rem;
  color: #aaa;
  font-weight: 500;
  font-style: italic;
}

.field-hint {
  font-size: 0.7rem;
  font-weight: 500;
  color: #aaa;
  margin-left: 0.3rem;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
}

/* ══════════════════════════════════════════
   QUESTIONNAIRE STYLES (Other Information)
══════════════════════════════════════════ */

.questionnaire-intro {
  font-size: 0.88rem;
  color: #888;
  font-weight: 500;
  margin: -0.5rem 0 1.5rem;
  line-height: 1.5;
}

.question-card {
  border: 1.5px solid #f0f0f0;
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
  background: #fafafa;
  transition: border-color 0.2s ease;
}

.question-card:hover {
  border-color: rgba(255, 108, 0, 0.2);
  background: #fff;
}

.question-text {
  font-size: 0.92rem;
  color: #333;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 1rem;
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  background: #ff6c00;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 6px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  margin-top: 2px;
}

.question-sub-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.question-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.question-sub-row:last-of-type {
  border-bottom: none;
}

.question-sub-label {
  font-size: 0.88rem;
  color: #444;
  font-weight: 500;
  line-height: 1.5;
  flex: 1;
}

.radio-group {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  color: #555;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1.5px solid #e8e8e8;
  background: #fff;
  transition: all 0.2s ease;
  white-space: nowrap;
  margin: 0;
}

.radio-label:has(input:checked) {
  border-color: #ff6c00;
  background: rgba(255, 108, 0, 0.08);
  color: #ff6c00;
}

.radio-label input[type="radio"] {
  width: 14px;
  height: 14px;
  accent-color: #ff6c00;
  cursor: pointer;
}

.question-details-row {
  padding: 0.25rem 0 0.5rem;
}

.question-details-row .apply-input {
  font-size: 0.88rem;
  padding: 0.7rem 1rem;
}

@media (max-width: 640px) {
  .question-sub-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .question-text { flex-direction: column; gap: 0.4rem; }
}

/* ══════════════════════════════════════════
   TERMS OF SERVICE STYLES
══════════════════════════════════════════ */

/* Sidebar progress bar (final step) */
.sidebar-progress {
  margin-top: auto;
  padding-top: 1.5rem;
}

.sidebar-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.sidebar-progress-fill {
  height: 100%;
  width: 100%;
  background: #28a745;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.sidebar-progress-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #28a745;
  letter-spacing: 0.5px;
}

/* Completion banner */
.tos-completion-banner {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  background: linear-gradient(135deg, rgba(40,167,69,0.07) 0%, rgba(40,167,69,0.03) 100%);
  border: 1.5px solid rgba(40,167,69,0.2);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.tos-completion-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(40,167,69,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #28a745;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.tos-completion-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 0.2rem;
}

.tos-completion-sub {
  font-size: 0.84rem;
  color: #666;
  font-weight: 500;
  margin: 0;
  line-height: 1.5;
}

/* Terms body */
.tos-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1.75rem;
}

/* Individual clause */
.tos-clause {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid #f3f3f3;
  align-items: flex-start;
}

.tos-clause:last-child {
  border-bottom: none;
}

.tos-clause-number {
  font-size: 0.7rem;
  font-weight: 800;
  color: #ff6c00;
  background: rgba(255,108,0,0.08);
  border: 1.5px solid rgba(255,108,0,0.15);
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 3px;
}

.tos-clause-content h4 {
  font-size: 0.88rem;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 0.45rem;
  letter-spacing: -0.1px;
}

.tos-clause-content p {
  font-size: 0.88rem;
  color: #555;
  font-weight: 400;
  line-height: 1.75;
  margin: 0;
}

/* Agree checkbox */
.tos-agree-wrap {
  background: #f9f9f8;
  border: 1.5px solid #ececec;
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  margin-top: 0.5rem;
}

.tos-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  cursor: pointer;
  margin: 0;
}

.tos-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.tos-checkbox-custom {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid #d0d0d0;
  background: #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  transition: all 0.2s ease;
  position: relative;
}

.tos-checkbox:checked + .tos-checkbox-custom {
  background: #ff6c00;
  border-color: #ff6c00;
}

.tos-checkbox:checked + .tos-checkbox-custom::after {
  content: '';
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
  display: block;
}

.tos-checkbox-text {
  font-size: 0.9rem;
  color: #444;
  font-weight: 500;
  line-height: 1.55;
}

.tos-checkbox-text strong {
  color: #1a1a1a;
  font-weight: 700;
}

/* Submit button */
.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2.25rem;
  border-radius: 11px;
  border: none;
  background: #28a745;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.btn-submit:hover {
  background: #218838;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(40,167,69,0.35);
}

.btn-submit:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-submit.btn-submit-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 640px) {
  .tos-clause { flex-direction: column; gap: 0.65rem; }
  .tos-completion-banner { flex-direction: column; }
}