:root {
  color-scheme: dark;
  --bg: #03101b;
  --card: #071c2c;
  --card2: #09263b;
  --line: rgba(86, 221, 255, .2);
  --text: #effaff;
  --muted: #8daabb;
  --cyan: #55e6ff;
  --mint: #48edbb;
  --amber: #ffc766;
  --danger: #ff7894;
}

* { box-sizing: border-box; }
[data-protected-media],
[data-protected-image] {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
[data-protected-image] { pointer-events: none; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(40, 196, 229, .16), transparent 35%),
    linear-gradient(180deg, #041522, #020b12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.tte-shell {
  width: min(1080px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 max(32px, env(safe-area-inset-bottom));
}

.tte-header {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(5, 23, 37, .92);
  box-shadow: 0 20px 70px rgba(0, 0, 0, .28);
}
.tte-header-identity {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 70px;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  padding: 18px 24px 15px;
  text-align: center;
}
.tte-header-logo {
  width: 62px;
  height: 70px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 3px rgba(98, 233, 255, .95))
    drop-shadow(0 0 10px rgba(32, 207, 255, .78))
    drop-shadow(0 0 22px rgba(37, 105, 255, .48));
}
.tte-header-copy { min-width: 0; width: 100%; }
.tte-header-copy h1,
.tte-header-copy p { margin: 0; white-space: nowrap; }
.tte-header-copy h1 {
  color: #f5fcff;
  font-size: clamp(22px, 3.45vw, 38px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: clamp(.035em, .22vw, .11em);
  text-shadow: 0 0 16px rgba(85, 230, 255, .24);
}
.tte-header-copy p {
  margin-top: 8px;
  color: var(--cyan);
  font-size: clamp(11px, 1.55vw, 17px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: clamp(.02em, .16vw, .08em);
}
.tte-header-divider {
  display: block;
  width: calc(100% - 48px);
  height: 2px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #25d6ff 15%, #82f3ff 50%, #25d6ff 85%, transparent);
  box-shadow: 0 0 7px rgba(32, 207, 255, .9), 0 0 17px rgba(24, 113, 255, .52);
}
.tte-header-media,
.tte-header-media img { display: block; width: 100%; }
.tte-header-media img { height: auto; object-fit: cover; border-top: 1px solid rgba(85, 230, 255, .13); }

.tte-status-card {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(8, 37, 57, .96), rgba(5, 23, 36, .96));
}
.tte-status-icon {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(85, 230, 255, .35);
  border-radius: 18px;
  color: var(--cyan);
  font-size: 25px;
  font-weight: 900;
  background: rgba(85, 230, 255, .08);
}
.tte-status-card h2,
.tte-status-card p { margin: 0; }
.tte-status-card h2 { font-size: 21px; }
.tte-status-card #tteStatusMessage { margin-top: 4px; color: var(--muted); font-size: 13px; }
.tte-status-card.is-valid { border-color: rgba(72, 237, 187, .42); }
.tte-status-card.is-valid .tte-status-icon { border-color: rgba(72, 237, 187, .5); color: var(--mint); background: rgba(72, 237, 187, .09); }
.tte-status-card.is-draft { border-color: rgba(255, 199, 102, .44); }
.tte-status-card.is-draft .tte-status-icon { border-color: rgba(255, 199, 102, .55); color: var(--amber); background: rgba(255, 199, 102, .09); }
.tte-status-card.is-invalid { border-color: rgba(255, 120, 148, .44); }
.tte-status-card.is-invalid .tte-status-icon { border-color: rgba(255, 120, 148, .55); color: var(--danger); background: rgba(255, 120, 148, .09); }

.tte-eyebrow { margin: 0 0 5px !important; color: var(--cyan); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.tte-content { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; margin-top: 18px; }
.tte-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, var(--card2), var(--card));
  box-shadow: 0 20px 55px rgba(0, 0, 0, .22);
}
.tte-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 15px; border-bottom: 1px solid rgba(86, 221, 255, .13); }
.tte-card-heading h2,
.tte-card-heading p { margin: 0; }
.tte-card-heading h2 { font-size: 20px; }
.tte-card-heading p:not(.tte-eyebrow) { margin-top: 4px; color: var(--muted); }
.tte-badge { padding: 7px 10px; border: 1px solid currentColor; border-radius: 999px; color: var(--mint); font-size: 10px; font-weight: 800; white-space: nowrap; }
.tte-badge.is-draft { color: var(--amber); }
.tte-badge.is-invalid { color: var(--danger); }
.tte-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 16px; margin: 17px 0 0; }
.tte-detail { min-width: 0; }
.tte-detail dt { margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.tte-detail dd { margin: 0; color: var(--text); font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.tte-detail.is-wide { grid-column: 1 / -1; }
.tte-proof-frame { position: relative; margin-top: 17px; overflow: hidden; border: 1px solid rgba(72, 237, 187, .26); border-radius: 14px; background: #fff; }
.tte-proof-frame img { display: block; width: 100%; height: auto; }
.tte-proof-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg, transparent 45%, rgba(255, 255, 255, .08), transparent 55%); }
.tte-proof-note { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.tte-proof-note.is-loading { color: var(--cyan); }
.tte-proof-note.is-loading::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; animation: tte-pulse 1s ease-in-out infinite alternate; }
.tte-security-note { margin-top: 18px; padding: 17px 19px; border: 1px solid rgba(255, 199, 102, .2); border-radius: 16px; color: #d8c08c; background: rgba(255, 199, 102, .045); }
.tte-security-note strong { font-size: 12px; }
.tte-security-note p { margin: 5px 0 0; font-size: 12px; line-height: 1.55; }
body.is-draft::before { content: "DRAF - PRATINJAU"; position: fixed; z-index: 5; left: 50%; top: 49%; transform: translate(-50%, -50%) rotate(-25deg); pointer-events: none; color: rgba(255, 199, 102, .1); font-size: clamp(42px, 9vw, 120px); font-weight: 900; letter-spacing: .04em; white-space: nowrap; }

@keyframes tte-pulse { to { opacity: .28; transform: scale(.75); } }

@media (max-width: 760px) {
  .tte-shell { width: min(calc(100% - 18px), 680px); padding-top: 9px; }
  .tte-header { border-radius: 16px; }
  .tte-header-identity { grid-template-columns: 46px minmax(0, 1fr) 46px; gap: 7px; padding: 13px 10px 11px; }
  .tte-header-logo { width: 43px; height: 50px; }
  .tte-header-copy h1 { font-size: clamp(12px, 4.15vw, 22px); letter-spacing: .025em; }
  .tte-header-copy p { margin-top: 6px; font-size: clamp(6.5px, 2.25vw, 12px); letter-spacing: .015em; }
  .tte-header-divider { width: calc(100% - 24px); margin-bottom: 8px; }
  .tte-status-card { align-items: flex-start; padding: 16px; }
  .tte-status-icon { width: 47px; height: 47px; border-radius: 14px; }
  .tte-status-card h2 { font-size: 17px; }
  .tte-content { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
  .tte-card { padding: 17px; border-radius: 16px; }
  .tte-card-heading { align-items: flex-start; flex-direction: column; }
  .tte-detail-grid { grid-template-columns: 1fr; }
  .tte-detail.is-wide { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .tte-proof-note.is-loading::before { animation: none; }
}
