/* SeriFlix PWA 2.0 — visual independente restrito ao app instalado no celular. */
#sf-app-shell { display: none !important; }
html.sf-pwa-standalone { color-scheme: dark; }
@media (max-width: 980px) {
  html.sf-pwa-standalone body {
    padding-top: calc(65px + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
  }
  html.sf-pwa-standalone #sf-app-shell { display: block !important; }
  html.sf-pwa-standalone .sf-pwa-install { display: none !important; }
  html.sf-app-modal-open, html.sf-app-modal-open body { overflow: hidden !important; }
}
#sf-app-shell, #sf-app-shell * { box-sizing: border-box; }
#sf-app-shell { --sfa-bg: #141018; --sfa-panel: #1d1722; --sfa-red: #d33b50; --sfa-gold: #f3d6aa; --sfa-ink: #fff4f6; --sfa-muted: #bbaeba; color: var(--sfa-ink); font: 14px/1.4 system-ui,-apple-system,"Segoe UI",sans-serif; }
#sf-app-shell a, #sf-app-shell button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
#sf-app-shell a { text-decoration: none; }
#sf-app-shell button { font-family: inherit; cursor: pointer; }
#sf-app-shell svg { width: 22px; height: 22px; flex: none; display: block; }
#sf-app-shell [hidden] { display: none !important; }
#sf-app-shell :focus-visible { outline: 2px solid var(--sfa-gold); outline-offset: 3px; }
#sf-app-shell .sf-app-bar {
  position: fixed; left: 0; right: 0; top: 0; z-index: 90500;
  height: calc(65px + env(safe-area-inset-top, 0px));
  padding: calc(7px + env(safe-area-inset-top, 0px)) 16px 7px;
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  background: linear-gradient(110deg,#17101b 0%,#20121c 64%,#30141f 100%);
  border-bottom: 1px solid rgba(242,202,159,.18); box-shadow: 0 8px 24px rgba(9,6,12,.24);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
#sf-app-shell .sf-app-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: #fff; }
#sf-app-shell .sf-app-brand img { width: 37px; height: 37px; border-radius: 11px; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 2px 12px rgba(0,0,0,.2); }
#sf-app-shell .sf-app-brand-label { font-weight: 900; letter-spacing: -.7px; font-size: 20px; line-height: 1.05; white-space: nowrap; }
#sf-app-shell .sf-app-brand-label > span { color: #f14a59; }
#sf-app-shell .sf-app-brand-label small { display: block; font-size: 9px; letter-spacing: .08px; color: #c8b8c3; font-weight: 500; line-height: 1.4; margin-top: 3px; }
#sf-app-shell .sf-app-actions { display: flex; align-items: center; gap: 5px; flex: none; }
#sf-app-shell .sf-app-iconbutton { display: inline-grid; place-items: center; min-width: 43px; height: 43px; padding: 0; border: 1px solid transparent; background: transparent; border-radius: 13px; color: #fff; }
#sf-app-shell .sf-app-iconbutton:hover { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.08); }
#sf-app-shell .sf-app-iconbutton[aria-pressed="true"] { background: #46232f; color: var(--sfa-gold); }
#sf-app-shell .sf-app-iconbutton[aria-pressed="true"] svg { fill: #b62e44; }
#sf-app-shell .sf-app-language { display: inline-grid; place-items: center; min-width: 40px; height: 37px; padding: 0 7px; color: var(--sfa-gold); border-radius: 10px; border: 1px solid rgba(243,214,170,.34); font-size: 11px; font-weight: 800; letter-spacing: .5px; }
#sf-app-shell .sf-app-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90500;
  min-height: calc(72px + env(safe-area-inset-bottom, 0px));
  padding: 7px 7px calc(7px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: stretch; justify-content: space-around;
  background: linear-gradient(180deg,#1b1520 0%,#0e0b13 100%);
  border-top: 1px solid rgba(243,214,170,.19);
  box-shadow: 0 -11px 25px rgba(3,1,5,.26);
}
#sf-app-shell .sf-app-navitem {
  flex: 1; min-width: 0; min-height: 57px; padding: 6px 2px 5px;
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: transparent; border: none; border-radius: 11px;
  color: #bcaebb; font-size: 10px; font-weight: 600; line-height: 1.1; text-align: center; letter-spacing: -.1px;
}
#sf-app-shell .sf-app-navitem > svg { width: 22px; height: 22px; transition: transform .16s ease; }
#sf-app-shell .sf-app-navitem:active > svg { transform: scale(.9); }
#sf-app-shell .sf-app-navitem[aria-current="page"] { color: #ffdde2; background: linear-gradient(180deg,rgba(209,53,75,.17),rgba(209,53,75,.06)); }
#sf-app-shell .sf-app-navitem[aria-current="page"]::before { content: ""; position: absolute; height: 3px; width: 21px; border-radius: 0 0 10px 10px; background: #eb435b; top: -7px; left: calc(50% - 10px); }
#sf-app-shell .sf-app-navitem[aria-current="page"] > svg { color: #f14b61; }
#sf-app-shell .sf-app-counter { font-style: normal; display: grid; place-items: center; font-size: 9px; font-weight: 800; color: white; background: #c8344b; min-width: 15px; height: 15px; border-radius: 8px; padding: 1px 3px; position: absolute; right: max(5px,calc(50% - 24px)); top: 0; }
#sf-app-shell .sf-app-overlay { position: fixed; inset: 0; background: rgba(5,3,8,.75); z-index: 91000; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; padding-top: env(safe-area-inset-top, 0px); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
#sf-app-shell .sf-app-panel { width: 100%; max-height: min(84vh,800px); overflow-y: auto; overscroll-behavior: contain; padding: 22px 20px calc(28px + env(safe-area-inset-bottom, 0px)); border-radius: 23px 23px 0 0; background: linear-gradient(160deg,#251a29,#151019); border-top: 1px solid rgba(244,207,159,.25); box-shadow: 0 -20px 50px rgba(0,0,0,.35); color: #f9f5f9; }
#sf-app-shell .sf-app-panelhead { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
#sf-app-shell .sf-app-panelhead h2 { color: #fff; font: 800 22px/1.3 system-ui,-apple-system,"Segoe UI",sans-serif; margin: 0; }
#sf-app-shell .sf-app-overline { font-size: 10px; letter-spacing: 1.8px; color: #f1b89c; font-weight: 700; }
#sf-app-shell .sf-app-close { flex: none; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; color: #fff; background: rgba(255,255,255,.08); font-size: 28px; line-height: 1; }
#sf-app-shell .sf-app-searchform { display: flex; flex-direction: column; gap: 11px; }
#sf-app-shell .sf-app-searchform input { width: 100%; min-height: 52px; font-size: 16px; background: #0f0b13; border: 1px solid #664252; border-radius: 13px; padding: 12px 14px; color: #fff; }
#sf-app-shell .sf-app-searchform input::placeholder { color: #b6a5b2; }
#sf-app-shell .sf-app-searchform button { min-height: 48px; background: #c6344b; border: none; border-radius: 12px; padding: 11px 15px; color: #fff; font-weight: 800; font-size: 15px; }
#sf-app-shell .sf-app-note { margin: -8px 0 22px; color: var(--sfa-muted); font-size: 12px; line-height: 1.5; }
#sf-app-shell .sf-app-empty { border: 1px dashed rgba(235,184,195,.25); padding: 25px 18px; border-radius: 13px; color: #cbbdc7; font-size: 13px; text-align: center; }
#sf-app-shell .sf-app-favrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
#sf-app-shell .sf-app-favlink { flex: 1; min-width: 0; color: #fff; font-size: 14px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
#sf-app-shell .sf-app-remove { flex: none; padding: 10px; min-height: 40px; color: #ffadb7; background: rgba(204,55,79,.12); border: 1px solid rgba(204,55,79,.34); border-radius: 9px; font-size: 11px; font-weight: 750; }
#sf-app-shell .sf-app-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(90px + env(safe-area-inset-bottom, 0px)); z-index: 92000; width: max-content; max-width: min(90vw,340px); background: #342331; border: 1px solid rgba(242,206,170,.25); border-radius: 13px; color: white; padding: 12px 18px; text-align: center; box-shadow: 0 12px 30px rgba(0,0,0,.32); font-size: 12px; font-weight: 650; }
@media (max-width: 360px) {
  #sf-app-shell .sf-app-bar { padding-left: 11px; padding-right: 11px; }
  #sf-app-shell .sf-app-brand-label { font-size: 18px; }
  #sf-app-shell .sf-app-brand-label small { font-size: 8px; }
  #sf-app-shell .sf-app-actions { gap: 1px; }
  #sf-app-shell .sf-app-iconbutton { min-width: 39px; }
  #sf-app-shell .sf-app-language { min-width: 34px; }
  #sf-app-shell .sf-app-navitem { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  #sf-app-shell, #sf-app-shell * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
/* SeriFlix PWA 2.4: little bell badge. Notifications center inherits sheet/modals. */
#sf-app-shell .sf-notify-open { position:relative; }
#sf-app-shell .sf-notify-badge { position:absolute; top:2px; right:0; min-width:15px; height:15px; background:#df405a; color:#fff; border-radius:9px; padding:1px 3px; font-size:9px; font-style:normal; font-weight:850; }
