/* Kang Cek IPOS • Mockup edition 2.0 • Color palette based on logo K */
:root {
  --navy: #061631;
  --navy-2: #081c3b;
  --blue-deep: #002f89;
  --blue: #0066ea;
  --blue-bright: #087fff;
  --cyan: #00d5f5;
  --paper: #f9fbff;
  --ink: #163357;
  --muted: #7489a9;
  --line: #d9e3f3;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; }
body {
  min-width: 320px; min-height: 100vh; min-height: 100dvh; margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(ellipse 48% 54% at -4% -7%, rgba(12, 112, 253, .35), transparent 74%),
    radial-gradient(ellipse 43% 61% at 107% 100%, rgba(4, 91, 234, .56), transparent 75%),
    linear-gradient(113deg, #081b3c 0%, #05142c 49%, #071b39 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}
body::before {
  content: ""; pointer-events: none; position: fixed; z-index: 0; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='41' height='41' viewBox='0 0 41 41' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.5 15.5v10M15.5 20.5h10' stroke='%236999da' stroke-opacity='.115' stroke-width='1.2'/%3E%3C/svg%3E");
}
button, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, textarea:focus-visible { outline: 3px solid #31dff2; outline-offset: 3px; }
.stage { position: relative; z-index: 1; display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 32px 18px; }
.scan-card {
  width: min(704px, 100%); border: 1px solid #158dff; border-radius: 13px; overflow: hidden;
  background: var(--paper); box-shadow: 0 17px 58px rgba(0, 6, 27, .4), 0 0 34px rgba(0, 92, 220, .13);
}
.card-header {
  height: 76px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px 0 21px; color: #f6fbff;
  background: linear-gradient(108deg, #032d78 0%, #003b9a 49%, #0569f1 100%);
  position: relative; isolation: isolate;
}
.card-header::after {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: linear-gradient(120deg, transparent 45%, rgba(8, 179, 255, .13));
  clip-path: polygon(91% 0, 100% 0, 100% 100%, 80% 100%);
}
.brand { display: flex; align-items: center; gap: 15px; min-width: 0; }
.brand-logo { width: 60px; height: 60px; margin-left: -5px; object-fit: contain; }
h1 { font-size: 17px; font-weight: 800; letter-spacing: .25px; margin: 0; color: #fff; white-space: nowrap; }
.header-close, .dialog-close {
  display: grid; place-items: center; color: #fff; border: 0; background: transparent;
  width: 32px; height: 34px; padding: 5px; border-radius: 7px;
}
.header-close:hover, .dialog-close:hover { background: rgba(255,255,255,.13); }
.header-close svg, .dialog-close svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.card-content { padding: 29px 30px 24px; background: #fbfcff; }
#domainInput {
  display: block; width: 100%; height: 210px; min-height: 170px; padding: 18px 18px;
  resize: vertical; border: 2px solid #dae4f4; border-radius: 11px;
  outline: none; box-shadow: inset 0 0 13px rgba(14, 43, 94, .013);
  color: #213c5e; background: #f8fbff; font-size: 14px; font-weight: 500; line-height: 1.65;
  transition: border-color .15s, box-shadow .15s;
}
#domainInput::placeholder { color: #8094b4; opacity: 1; }
#domainInput:focus { border-color: #65adf7; box-shadow: 0 0 0 3px rgba(0, 135, 255, .09); }
#domainInput.invalid { border-color: #df7382; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 21px; }
.helper { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; gap: 2px; font-size: 10.5px; font-weight: 500; color: #6b80a0; line-height: 1.45; }
.helper.error { color: #ad374f; }
.scan-button {
  position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  gap: 12px; min-height: 54px; min-width: 226px; padding: 0 22px;
  border: 1px solid #00bfff; border-radius: 10px;
  color: #fff; font-size: 15px; font-weight: 700;
  background: linear-gradient(105deg, #002e9a 0%, #0361df 55%, #02cae7 100%);
  box-shadow: 0 5px 17px rgba(0, 104, 234, .27), 0 0 0 2px rgba(20, 188, 251, .06);
  transition: box-shadow .18s, transform .18s, filter .18s;
}
.scan-button:hover { transform: translateY(-1px); box-shadow: 0 7px 20px rgba(0, 104, 234, .34); filter: saturate(1.08); }
.scan-button:active { transform: translateY(0); }
.scan-button svg { width: 22px; height: 22px; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.site-footer {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 42px;
  padding: 0 16px; text-align: center; font-size: 12px; font-weight: 500;
  color: #8d9fb8; letter-spacing: .05px;
}
.site-footer a { font-weight: 600; color: #b0bdd1; text-decoration: none; }
.site-footer a:hover { color: #57c6fc; }
/* Scanner modal uses exactly the same palette */
.overlay { position: fixed; z-index: 20; inset: 0; display: none; justify-content: center; align-items: center; padding: 20px; background: rgba(3, 14, 33, .8); backdrop-filter: blur(6px); }
.overlay.is-open { display: flex; }
.result-dialog { display: flex; flex-direction: column; width: min(1080px,100%); height: min(780px,90dvh); overflow: hidden; border: 1px solid #198af3; border-radius: 13px; background: #fff; box-shadow: 0 25px 85px rgba(0,0,0,.5); }
.dialog-header { flex: 0 0 auto; height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; background: linear-gradient(105deg, #052b77, #0969e9); color: #fff; }
.dialog-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dialog-brand img { width: 37px; height: 37px; object-fit: contain; }
.dialog-brand strong { display: block; font-size: 13px; letter-spacing: .6px; }
.dialog-brand small { display: block; font-size: 10px; font-weight: 500; opacity: .85; margin-top: 3px; }
.dialog-actions { display: flex; align-items: center; gap: 12px; }
.open-button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 35px; padding: 0 12px; border: 1px solid rgba(255,255,255,.35); border-radius: 7px; background: rgba(255,255,255,.12); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.open-button:hover { background: rgba(255,255,255,.2); }
.open-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dialog-hint { padding: 10px 19px; color: #617899; background: #f0f6ff; border-bottom: 1px solid #dce5f4; font-size: 11px; line-height: 1.55; }
.frame-area { flex: 1; position: relative; min-height: 120px; }
.frame-area iframe { width: 100%; height: 100%; display: block; border: 0; background: #fff; }
.frame-message { position: absolute; z-index: 1; inset: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; text-align: center; padding: 25px; background: #f9fbff; color: #304d74; }
.frame-message span { color: #7a8da8; font-size: 12px; line-height: 1.6; }
.frame-message strong { font-size: 13px; }
.loader { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #e1ebfb; border-top-color: #087fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; z-index: 30; bottom: 28px; left: 50%; transform: translate(-50%, 12px); max-width: min(520px, calc(100vw - 35px)); background: #092b62; border: 1px solid #31acf5; color: #fff; padding: 11px 17px; border-radius: 9px; font-size: 12px; font-weight: 600; box-shadow: 0 12px 32px rgba(0,0,0,.3); opacity: 0; pointer-events: none; transition: transform .2s,opacity .2s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media(max-width: 600px) {
  .stage { padding: 20px 15px 70px; }
  .scan-card { border-radius: 12px; }
  .card-header { height: 69px; padding: 0 15px 0 11px; }
  .brand { gap: 9px; }
  .brand-logo { width: 51px; height: 51px; margin-left: -2px; }
  h1 { font-size: 15px; }
  .card-content { padding: 20px 19px 21px; }
  #domainInput { height: 202px; padding: 15px; font-size: 13px; }
  .card-bottom { flex-direction: column; align-items: stretch; gap: 17px; margin-top: 17px; }
  .helper { font-size: 10px; }
  .scan-button { width: 100%; min-height: 49px; }
  .site-footer { bottom: 24px; font-size: 10px; }
  .overlay { padding: 9px; }
  .result-dialog { height: 94dvh; border-radius: 10px; }
  .dialog-header { padding: 0 10px; }
  .dialog-brand strong { font-size: 11px; }
  .dialog-brand small { font-size: 9px; }
  .open-button { padding: 0 7px; font-size: 10px; min-height: 32px; }
  .open-button svg { display: none; }
  .dialog-actions { gap: 3px; }
  .dialog-hint { font-size: 10px; padding: 9px 12px; }
}
@media(max-height: 550px) and (min-width: 601px) { .stage { padding: 22px 18px 85px; } .site-footer { bottom: 16px; } }
@media(prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto!important; animation: none!important; transition: none!important; } }
