/* =========================
   VARIABLES
========================= */
:root{
  --brand:#145587;
  --brand2:#f0821e;

  --bg:#f6f8fb;
  --text:#0f172a;
  --muted:#64748b;

  --card:#ffffff;
  --border:#e2e8f0;

  --radius:14px;
  --shadow:0 6px 18px rgba(2, 6, 23, .06);

  --container:1080px;
  --pad:18px;

  --link:rgba(20,85,135,.95);
}

/* RESET */
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; height:100%; overflow-x: hidden;}

body{
  font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.45;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

main{ flex:1; }

a{ color:inherit; text-decoration:none; }
a:hover{ opacity:.92; }

.container{
  max-width:var(--container);
  margin:0 auto;
  padding:var(--pad);
}

/* ===== Embed mode (iframe) ===== */
body.is-embed .navbar,
body.is-embed .footer,
body.is-embed .messages{
  display:none !important;
}

body.is-embed main.container{
  padding:0 !important;
  max-width:none !important;
}

body.is-embed{
  background:transparent !important;
}

.file-thumb {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

/* Page title with icon */
.page-title{
  display:flex;
  align-items:center;
  gap:14px;
  margin:0 0 6px 0;
}

.page-title__icon{
  width:44px;
  height:44px;
  object-fit:contain;
  flex:0 0 auto;
}

.page-title__text{
  margin:0;
  color:var(--brand);
}

.to-top{
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 60;

  width: 46px;
  height: 46px;
  border-radius: 14px;

  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-weight: 900;
  color: var(--brand);

  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}

.to-top.is-show{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.to-top:hover{
  background: rgba(20,85,135,.06);
  opacity: 1;
}

/* =====================================
   iOS Safari fix — no zoom on inputs
===================================== */

@media (max-width: 920px){
  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }
}