/* XTTM Portal — style chung (module 051). Mobile-first, like-app. */
:root {
  --primary: #306fb6; --primary-h: #21548f; --green: #10b981; --amber: #f59e0b;
  --ink: #16233b; --muted: #64748b; --line: #e2e8f0; --bg: #f4f7fb; --card: #ffffff;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.55; min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
.wrap { max-width: 1020px; margin: 0 auto; padding: 0 16px; }

/* Header sticky like-app */
.xttm-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.xttm-header .bar { display: flex; align-items: center; gap: 10px; height: 58px; }
.xttm-header img { width: 34px; height: 34px; border-radius: 8px; object-fit: contain; }
.xttm-header .name { font-weight: 800; font-size: 13.5px; letter-spacing: .02em; }
.xttm-header .spacer { flex: 1; }
.xttm-lang { display: flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.xttm-lang button {
  border: 0; background: transparent; padding: 5px 11px; font-weight: 700; font-size: 12px;
  color: var(--muted); cursor: pointer; font-family: inherit;
}
.xttm-lang button.on { background: var(--primary); color: #fff; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 12px; border: 1px solid transparent;
  font-family: inherit; font-weight: 800; font-size: 15px; cursor: pointer; transition: all .15s;
  text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-h); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { filter: brightness(.93); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }

/* Hero */
.hero { padding: 46px 0 26px; text-align: center; }
.hero h1 { font-size: clamp(26px, 5vw, 40px); font-weight: 800; letter-spacing: -.02em; color: var(--primary); }
.hero .sub { max-width: 640px; margin: 14px auto 0; font-size: 16px; color: var(--muted); }
.hero .invite {
  max-width: 680px; margin: 18px auto 0; padding: 14px 18px; font-size: 14.5px;
  background: #eef5fc; border: 1px solid #d3e3f5; border-radius: var(--radius);
}

/* CTA cards */
.cta-grid { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 22px 0; }
@media (min-width: 720px) { .cta-grid { grid-template-columns: 1fr 1fr; } }
.cta {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 1px 3px rgba(22,35,59,.05); transition: all .15s;
}
.cta:hover { box-shadow: 0 8px 24px rgba(22,35,59,.10); transform: translateY(-2px); }
.cta .tag {
  align-self: flex-start; border-radius: 99px; font-size: 11.5px; font-weight: 800;
  padding: 4px 12px; letter-spacing: .03em;
}
.cta-a .tag { background: #fef3c7; color: #92400e; }
.cta-b .tag { background: #d1fae5; color: #065f46; }
.cta p { font-size: 14.5px; color: #334155; flex: 1; }

/* Steps */
.steps { padding: 10px 0 28px; }
.steps h2 { text-align: center; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); margin-bottom: 16px; }
.steps ol { list-style: none; display: grid; gap: 10px; grid-template-columns: 1fr; padding: 0; }
@media (min-width: 720px) { .steps ol { grid-template-columns: repeat(4, 1fr); } }
.steps li {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start;
}
.steps .n {
  flex: none; width: 26px; height: 26px; border-radius: 99px; background: var(--primary);
  color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.trust { text-align: center; font-size: 12.5px; color: var(--muted); max-width: 640px; margin: 0 auto; padding: 0 0 30px; }

/* Footer */
.xttm-footer { border-top: 1px solid var(--line); background: #fff; padding: 22px 0 34px; font-size: 12.5px; color: var(--muted); }
.xttm-footer .org { font-weight: 800; color: var(--ink); margin-bottom: 6px; }

/* Forms */
.sheet {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 20px; max-width: 640px; margin: 22px auto; box-shadow: 0 1px 3px rgba(22,35,59,.05);
}
.banner { border-radius: 12px; padding: 12px 16px; font-size: 14px; margin-bottom: 18px; }
.banner-a { background: #fef3c7; border: 1px solid #fde68a; color: #78350f; }
.banner-b { background: #d1fae5; border: 1px solid #a7f3d0; color: #064e3b; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=password] {
  width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 15px; background: #fff; color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(48,111,182,.14); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field .err { display: none; font-size: 12px; color: #dc2626; margin-top: 4px; font-weight: 700; }
.field.bad input { border-color: #dc2626; }
.field.bad .err { display: block; }

/* Upload */
.up-box { border: 1.5px dashed #b9cde5; border-radius: 12px; padding: 14px; margin-bottom: 10px; background: #f8fbfe; }
.up-box .lbl { font-size: 13px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.up-file { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 0; }
.up-file .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-file .rm { border: 0; background: #fee2e2; color: #b91c1c; border-radius: 7px; padding: 2px 9px; cursor: pointer; font-weight: 800; }
.up-note { font-size: 12px; color: var(--muted); margin: 6px 0 14px; }
input[type=file] { font-size: 13px; font-family: inherit; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; margin: 16px 0; }
.consent input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--primary); }

/* Status pills */
.pill { display: inline-block; border-radius: 99px; font-size: 11px; font-weight: 800; padding: 3px 10px; }
.pill-new { background: #dbeafe; color: #1e40af; }
.pill-reviewing { background: #fef3c7; color: #92400e; }
.pill-contacted { background: #d1fae5; color: #065f46; }
.pill-closed { background: #e2e8f0; color: #475569; }
.pill-a { background: #fef3c7; color: #92400e; }
.pill-b { background: #d1fae5; color: #065f46; }

/* Portal */
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.pcard h3 { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--primary); margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 13.5px; }
.kv .k { color: var(--muted); font-size: 12px; }
table.ft { width: 100%; border-collapse: collapse; font-size: 13px; }
table.ft th { text-align: left; font-size: 11.5px; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.ft td { padding: 8px; border-bottom: 1px solid #eef2f7; }
.msg { border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin: 10px 0; display: none; }
.msg.on { display: block; }
.msg-err { background: #fee2e2; color: #991b1b; }
.msg-ok { background: #d1fae5; color: #065f46; }

/* Success screen */
.done { text-align: center; padding: 30px 10px; }
.done .ic { font-size: 52px; }
.done h2 { color: var(--green); margin: 8px 0; }
.done p { max-width: 480px; margin: 0 auto 20px; font-size: 14.5px; }
.done .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.center-note { text-align: center; font-size: 13px; color: var(--muted); padding: 12px 0 30px; }
.progress { height: 6px; border-radius: 99px; background: #e2e8f0; overflow: hidden; margin: 12px 0; display: none; }
.progress.on { display: block; }
.progress i { display: block; height: 100%; width: 0%; background: var(--primary); transition: width .3s; }
