/* TV-FFM App UI */
:root{
  --tvffm-card:#ffffff;
  --tvffm-text:#0f172a;
  --tvffm-muted:#64748b;
  --tvffm-line:#e5e7eb;
  --tvffm-accent:#ffcc00;
  --tvffm-radius:18px;
  --tvffm-shadow:0 12px 30px rgba(15,23,42,.10);
}
html,body{height:100%;}
body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--tvffm-text);
  background: linear-gradient(180deg,#eef4ff 0%, #f7f9fd 55%, #ffffff 100%);
}
.tvffm-app{
  min-height:100vh;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
  display:flex;
  justify-content:center;
}
.tvffm-app__inner{width:100%; max-width:980px;}
.tvffm-hero{
  background:linear-gradient(180deg,#eaf1ff 0%, #f6f8fc 100%);
  border:1px solid var(--tvffm-line);
  border-radius:var(--tvffm-radius);
  padding:18px;
  box-shadow: var(--tvffm-shadow);
  margin: 14px 0 14px;
}
.tvffm-brand{display:flex;gap:14px;align-items:center;}
.tvffm-badge{
  width:44px;height:44px;border-radius:14px;
  display:grid;place-items:center;
  background:var(--tvffm-accent);
  box-shadow: 0 10px 18px rgba(255,204,0,.28);
}
.tvffm-badge img{width:24px;height:24px;}
.tvffm-title{font-weight:900;font-size:20px;line-height:1.1;}
.tvffm-subtitle{margin-top:4px;color:var(--tvffm-muted);font-size:13px;}
.tvffm-note{
  margin-top:12px;
  background:rgba(255,255,255,.75);
  border:1px solid var(--tvffm-line);
  border-radius:14px;
  padding:12px 12px;
}
.tvffm-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}
@media (max-width: 860px){ .tvffm-grid{grid-template-columns:1fr;} }
.tvffm-card{
  background:var(--tvffm-card);
  border:1px solid var(--tvffm-line);
  border-radius:var(--tvffm-radius);
  padding:16px;
  box-shadow: var(--tvffm-shadow);
  margin-bottom:14px;
}
.tvffm-card__head{display:flex;align-items:center;gap:10px;margin-bottom:12px;}
.tvffm-card__head h3{margin:0;font-size:18px;font-weight:900;}
.tvffm-ic{
  width:34px;height:34px;border-radius:12px;
  display:grid;place-items:center;background:#f8fafc;border:1px solid var(--tvffm-line);
}
.tvffm-ic svg{width:18px;height:18px;fill:#0f172a;}
.tvffm-ic--small{width:28px;height:28px;border-radius:10px;}
.tvffm-field{margin-bottom:12px;}
.tvffm-field label{display:block;font-size:13px;font-weight:800;margin:0 0 6px;color:#111827;}
.tvffm-req{color:#ef4444;}
.tvffm-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
@media (max-width:520px){ .tvffm-row{grid-template-columns:1fr;} }
.tvffm-app input[type="text"],
.tvffm-app input[type="email"],
.tvffm-app input[type="date"],
.tvffm-app input[type="time"],
.tvffm-app select,
.tvffm-app textarea{
  width:100%;
  padding:12px;
  border:1px solid var(--tvffm-line);
  border-radius:14px;
  background:#fff;
  color:var(--tvffm-text);
  outline:none;
  transition: box-shadow .15s ease, border-color .15s ease;
  font-size:14px;
}
.tvffm-app textarea{resize:vertical; min-height:140px;}
.tvffm-app input:focus,
.tvffm-app select:focus,
.tvffm-app textarea:focus{
  border-color: rgba(59,130,246,.55);
  box-shadow: 0 0 0 4px rgba(59,130,246,.12);
}
.tvffm-checkgrid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:10px;
}
@media (max-width: 860px){ .tvffm-checkgrid{grid-template-columns: repeat(2, minmax(0,1fr));} }
@media (max-width: 520px){ .tvffm-checkgrid{grid-template-columns: 1fr;} }
.tvffm-check{
  display:flex;align-items:center;gap:10px;
  border:1px solid var(--tvffm-line);
  border-radius:14px;
  padding:10px 12px;
  background:#fff;
  cursor:pointer;
  user-select:none;
}
.tvffm-check input{width:18px;height:18px;}
.tvffm-check span{font-weight:700;color:#111827;font-size:14px;}
.tvffm-upload{
  border:2px dashed rgba(100,116,139,.35);
  border-radius:18px;
  background: linear-gradient(180deg, rgba(248,250,252,.9), rgba(255,255,255,1));
  position:relative;
  overflow:hidden;
}
.tvffm-upload__input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer;}
.tvffm-upload__inner{padding:18px;}
.tvffm-upload__title{font-weight:900;font-size:16px;}
.tvffm-upload__meta{margin-top:4px;color:var(--tvffm-muted);font-size:13px;}
.tvffm-upload.is-dragover{border-color: rgba(59,130,246,.65);box-shadow: 0 0 0 5px rgba(59,130,246,.10);}
.tvffm-filelist{margin-top:10px;display:flex;flex-wrap:wrap;gap:8px;}
.tvffm-filepill{display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:999px;background:#0f172a;color:#fff;font-size:12px;}
.tvffm-filepill small{opacity:.75;}
.tvffm-foot{display:flex;flex-direction:column;gap:12px;align-items:flex-start;margin: 10px 0 22px;}
.tvffm-consent{display:flex;gap:10px;align-items:flex-start;color:#111827;font-size:13px;}
.tvffm-consent input{margin-top:3px;width:18px;height:18px;}
.tvffm-btn{
  width:100%;
  background: var(--tvffm-accent);
  color:#111827;
  border:none;
  padding:14px 18px;
  border-radius:14px;
  font-weight:950;
  font-size:15px;
  cursor:pointer;
  box-shadow: 0 12px 22px rgba(255,204,0,.28);
  transition: transform .06s ease, filter .15s ease;
}
.tvffm-btn:active{transform: translateY(1px);}
.tvffm-btn:hover{filter: brightness(.98);}
.tvffm-privacy{display:flex;align-items:center;gap:10px;color:var(--tvffm-muted);font-size:12.5px;}
.tvffm-alert{
  margin: 12px 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--tvffm-line);
  box-shadow: var(--tvffm-shadow);
}
.tvffm-alert--success{background:#ecfdf5;border-color:#a7f3d0;color:#065f46;}
.tvffm-alert--error{background:#fef2f2;border-color:#fecaca;color:#991b1b;}
.tvffm-app *{box-sizing:border-box;}
