/* ================================================================
   TANGO MANAGER – Registration Form
   Modern · Clean · Light
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Serif+Display:ital@0;1&display=swap');

:root {
  --tm-bg:           #F7F6F3;
  --tm-surface:      #ffffff;
  --tm-border:       #E2DDD6;
  --tm-border-focus: #C4A882;
  --tm-text:         #1A1714;
  --tm-text-muted:   #7A756E;
  --tm-text-dim:     #B0AB A3;
  --tm-accent:       #C4A882;
  --tm-accent-dark:  #A8895F;
  --tm-accent-bg:    #F5EFE6;
  --tm-success:      #3D8B6E;
  --tm-success-bg:   #EBF6F1;
  --tm-error:        #C0392B;
  --tm-error-bg:     #FDECEA;
  --tm-radius:       12px;
  --tm-radius-sm:    8px;
  --tm-radius-lg:    18px;
  --tm-shadow:       0 2px 16px rgba(26,23,20,0.07);
  --tm-font:         'DM Sans', system-ui, sans-serif;
  --tm-font-serif:   'DM Serif Display', Georgia, serif;
  --tm-transition:   0.18s ease;
}

.tm-form-wrap {
  max-width: 680px;
  margin: 0 auto;
  font-family: var(--tm-font);
  color: var(--tm-text);
  padding: 12px;
}

/* Header */
.tm-form-header { text-align: center; padding: 36px 24px 24px; }
.tm-form-header h2 {
  font-family: var(--tm-font-serif);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 400;
  color: var(--tm-text);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.tm-form-header p { color: var(--tm-text-muted); font-size: 0.95rem; margin: 0; line-height: 1.6; }

/* Progress */
.tm-progress { height: 3px; background: var(--tm-border); border-radius: 999px; margin: 0 0 20px; overflow: hidden; }
.tm-progress-bar { height: 100%; background: linear-gradient(90deg, var(--tm-accent), var(--tm-accent-dark)); border-radius: 999px; transition: width 0.4s ease; width: 0%; }

/* Section */
.tm-section {
  background: var(--tm-surface);
  border-radius: var(--tm-radius);
  border: 1px solid var(--tm-border);
  padding: 24px;
  margin-bottom: 14px;
  box-shadow: var(--tm-shadow);
  animation: tmFadeIn 0.3s ease both;
}
@keyframes tmFadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

.tm-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--tm-accent-dark);
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--tm-border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tm-section-title::before { content:''; display:inline-block; width:3px; height:14px; background:var(--tm-accent); border-radius:2px; }

/* Fields */
.tm-field { margin-bottom: 20px; }
.tm-field:last-child { margin-bottom: 0; }
.tm-label { display:block; font-size:0.88rem; font-weight:600; color:var(--tm-text); margin-bottom:8px; line-height:1.4; }
.tm-label .req { color:var(--tm-accent); margin-left:3px; }
.tm-hint { font-size:0.78rem; color:var(--tm-text-muted); margin-top:5px; line-height:1.5; }

/* Inputs */
.tm-input, .tm-select, .tm-textarea {
  width: 100%; padding: 12px 16px;
  background: var(--tm-bg);
  border: 1.5px solid var(--tm-border);
  border-radius: var(--tm-radius-sm);
  font-family: var(--tm-font); font-size: 0.95rem; color: var(--tm-text);
  transition: border-color var(--tm-transition), box-shadow var(--tm-transition), background var(--tm-transition);
  box-sizing: border-box; -webkit-appearance: none; appearance: none; outline: none;
}
.tm-input:focus, .tm-select:focus, .tm-textarea:focus {
  border-color: var(--tm-border-focus);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(196,168,130,0.13);
}
.tm-input::placeholder { color: var(--tm-text-muted); }
.tm-textarea { resize:vertical; min-height:88px; line-height:1.6; }
.tm-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237A756E' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 42px;
  cursor: pointer;
}

/* Pill buttons */
.tm-pills { display:flex; flex-wrap:wrap; gap:8px; }
.tm-pill { position:relative; cursor:pointer; user-select:none; }
.tm-pill input { position:absolute; opacity:0; width:0; height:0; }
.tm-pill-label {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px;
  border: 1.5px solid var(--tm-border);
  border-radius: 999px;
  background: var(--tm-bg);
  font-size: 0.88rem; font-weight: 500;
  color: var(--tm-text-muted);
  transition: all var(--tm-transition);
  white-space: nowrap;
  cursor: pointer;
}
.tm-pill:hover .tm-pill-label { border-color: var(--tm-accent); color: var(--tm-text); }
.tm-pill input:checked + .tm-pill-label {
  background: var(--tm-accent-bg);
  border-color: var(--tm-accent);
  color: var(--tm-accent-dark);
  font-weight: 600;
  box-shadow: 0 0 0 3px rgba(196,168,130,0.15);
}
.tm-pills.yesno .tm-pill-label { min-width: 86px; justify-content: center; }

/* Two col grid */
.tm-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:520px) { .tm-grid-2 { grid-template-columns:1fr; gap:0; } }

/* Conditional blocks */
.tm-cond { display:none; }
.tm-cond.on {
  display: block;
  animation: tmSlide 0.22s ease both;
}
@keyframes tmSlide { from { opacity:0; transform:translateY(-5px); } to { opacity:1; transform:translateY(0); } }

.tm-sub {
  background: var(--tm-accent-bg);
  border: 1px solid var(--tm-border);
  border-left: 3px solid var(--tm-accent);
  border-radius: var(--tm-radius-sm);
  padding: 16px;
  margin-top: 12px;
}
.tm-sub .tm-field:last-child { margin-bottom:0; }

/* Pricing */
.tm-pricing {
  background: var(--tm-accent-bg);
  border: 1.5px solid var(--tm-accent);
  border-radius: var(--tm-radius);
  padding: 18px 20px;
  margin-top: 12px;
}
.tm-pricing h4 { font-size:0.72rem; font-weight:700; text-transform:uppercase; letter-spacing:0.08em; color:var(--tm-accent-dark); margin:0 0 12px; }
.tm-pr-row { display:flex; justify-content:space-between; align-items:center; padding:5px 0; font-size:0.88rem; color:var(--tm-text-muted); border-bottom:1px dashed var(--tm-border); }
.tm-pr-row:last-child { border:none; }
.tm-pr-row.total { font-weight:700; color:var(--tm-text); font-size:1rem; padding-top:10px; }
.tm-pr-row .val { font-weight:600; color:var(--tm-text); }
.tm-pr-row.total .val { color:var(--tm-accent-dark); font-size:1.1rem; }

/* Checkbox */
.tm-check { display:flex; align-items:flex-start; gap:12px; cursor:pointer; }
.tm-check input[type="checkbox"] {
  appearance:none; -webkit-appearance:none;
  width:20px; height:20px; min-width:20px;
  border:2px solid var(--tm-border); border-radius:5px;
  background:var(--tm-bg); cursor:pointer;
  transition:all var(--tm-transition); margin-top:1px;
  position:relative;
}
.tm-check input:checked { background:var(--tm-accent); border-color:var(--tm-accent); }
.tm-check input:checked::after { content:'✓'; position:absolute; color:#fff; font-size:11px; font-weight:700; top:50%; left:50%; transform:translate(-50%,-50%); }
.tm-check-text { font-size:0.87rem; line-height:1.6; color:var(--tm-text); }
.tm-check-text a { color:var(--tm-accent-dark); }

/* Submit */
.tm-submit-area { text-align:center; padding:8px 0 4px; }
.tm-btn {
  display:inline-flex; align-items:center; gap:10px;
  background:var(--tm-text); color:#fff;
  border:none; border-radius:999px;
  padding:16px 44px;
  font-family:var(--tm-font); font-size:1rem; font-weight:600;
  cursor:pointer; transition:all var(--tm-transition);
  box-shadow: 0 4px 20px rgba(26,23,20,0.15);
  letter-spacing:0.01em;
}
.tm-btn:hover:not(:disabled) { background:var(--tm-accent-dark); transform:translateY(-2px); box-shadow:0 8px 28px rgba(26,23,20,0.2); }
.tm-btn:active:not(:disabled) { transform:translateY(0); }
.tm-btn:disabled { opacity:0.5; cursor:not-allowed; transform:none; }
.tm-btn .spin { width:18px; height:18px; border:2.5px solid rgba(255,255,255,0.4); border-top-color:#fff; border-radius:50%; animation:tmSpin 0.7s linear infinite; display:none; }
.tm-btn.loading .spin { display:block; }
@keyframes tmSpin { to { transform:rotate(360deg); } }

/* Notices */
#tm-messages { margin-bottom:12px; }
.tm-notice { padding:13px 16px; border-radius:var(--tm-radius-sm); font-size:0.88rem; line-height:1.5; margin-bottom:8px; }
.tm-notice.err { background:var(--tm-error-bg); border-left:3px solid var(--tm-error); color:var(--tm-error); }

/* Success */
#tm-success { display:none; text-align:center; padding:48px 32px; background:var(--tm-surface); border-radius:var(--tm-radius-lg); border:1px solid var(--tm-border); animation:tmFadeIn 0.4s ease; }
.tm-ok-icon { width:70px; height:70px; background:var(--tm-success-bg); border-radius:50%; display:flex; align-items:center; justify-content:center; margin:0 auto 20px; font-size:2rem; }
#tm-success h3 { font-family:var(--tm-font-serif); font-size:1.6rem; font-weight:400; color:var(--tm-text); margin:0 0 10px; }
#tm-success p { color:var(--tm-text-muted); margin:0; line-height:1.6; }

/* Mobile */
@media (max-width:600px) {
  .tm-form-wrap { padding:6px; }
  .tm-section { padding:18px 16px; }
  .tm-form-header { padding:22px 16px 18px; }
  .tm-pills { gap:6px; }
  .tm-pill-label { padding:9px 14px; font-size:0.84rem; }
  .tm-btn { width:100%; justify-content:center; padding:15px; }
}
