/* Flitch Screen — shared visual system
   Presentation only: no JavaScript behaviour is defined here. */
:root {
  --f-bg: #050806;
  --f-panel: rgba(10, 17, 13, .78);
  --f-panel-strong: rgba(8, 14, 11, .92);
  --f-border: rgba(57, 255, 157, .16);
  --f-border-strong: rgba(57, 255, 157, .34);
  --f-green: #39ff9d;
  --f-green-2: #00e676;
  --f-text: #effff6;
  --f-muted: #7d9f8d;
  --f-muted-2: #4f6c5b;
  --f-danger: #ff5c7a;
  --f-radius: 18px;
  --f-radius-sm: 12px;
  --f-shadow: 0 24px 70px rgba(0,0,0,.38);
  --f-mono: 'Courier New', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --f-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--f-sans) !important; color: var(--f-text) !important; }

.bg-glow {
  background:
    radial-gradient(circle at 50% 8%, rgba(0,230,118,.13), transparent 32%),
    radial-gradient(circle at 90% 70%, rgba(0,180,120,.07), transparent 28%),
    linear-gradient(145deg, #020403 0%, #07100b 48%, #030604 100%) !important;
}
.bg-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/Designer.png') center/cover no-repeat;
  opacity: .055;
  mix-blend-mode: screen;
  pointer-events: none;
}
.bg-grid {
  opacity: .025 !important;
  background-size: 56px 56px !important;
}

main, .wrap { position: relative; z-index: 2 !important; }

.brand {
  font-family: var(--f-mono) !important;
  font-weight: 700;
  letter-spacing: .22em !important;
  text-shadow: 0 0 22px rgba(57,255,157,.12);
}
.brand span { color: var(--f-green) !important; }

.iris-wrap { filter: drop-shadow(0 0 28px rgba(57,255,157,.13)); }
.iris-ring.r1 { border-color: rgba(57,255,157,.14) !important; }
.iris-ring.r3 { border-color: var(--f-green) !important; box-shadow: 0 0 24px rgba(57,255,157,.28) !important; }
.logo-core { box-shadow: 0 0 28px rgba(57,255,157,.25) !important; border: 1px solid rgba(57,255,157,.35); }

.card, .choice-btn {
  background: linear-gradient(145deg, rgba(15,25,19,.82), rgba(7,13,10,.76)) !important;
  border: 1px solid var(--f-border) !important;
  border-radius: var(--f-radius) !important;
  box-shadow: var(--f-shadow), inset 0 1px 0 rgba(255,255,255,.025) !important;
  backdrop-filter: blur(18px) saturate(130%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}
.card { padding: 24px !important; }
.card:hover { border-color: rgba(57,255,157,.23) !important; }

input, select, textarea {
  background: rgba(2,7,4,.72) !important;
  border: 1px solid rgba(57,255,157,.14) !important;
  border-radius: var(--f-radius-sm) !important;
  min-height: 46px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--f-green) !important;
  box-shadow: 0 0 0 3px rgba(57,255,157,.08), 0 0 22px rgba(57,255,157,.07) !important;
  background: rgba(3,10,6,.88) !important;
}

label, .card h2, .choice-title, .install-steps-title {
  font-family: var(--f-mono) !important;
}
.card h2 {
  color: var(--f-text) !important;
  font-size: 13px !important;
  letter-spacing: .08em !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card h2::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--f-green);
  box-shadow: 0 0 12px rgba(57,255,157,.7);
  flex: 0 0 auto;
}

button, .choice-btn {
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease, filter .16s ease !important;
}
button {
  border-radius: var(--f-radius-sm) !important;
  min-height: 44px;
  font-family: var(--f-mono) !important;
  letter-spacing: .06em;
}
button:not(.ghost):not(.logout) {
  background: linear-gradient(135deg, #39ff9d, #00e676) !important;
  box-shadow: 0 8px 26px rgba(0,230,118,.18), inset 0 1px 0 rgba(255,255,255,.35) !important;
}
button:hover:not(:disabled), .choice-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}
button.ghost, .logout {
  background: rgba(255,255,255,.025) !important;
  border-color: rgba(57,255,157,.18) !important;
  color: var(--f-text) !important;
}
button.ghost:hover, .logout:hover { border-color: var(--f-green) !important; background: rgba(57,255,157,.055) !important; }
button.ghost.danger, button.danger { color: var(--f-danger) !important; border-color: rgba(255,92,122,.25) !important; }

.tabs {
  padding: 5px;
  gap: 4px;
  border: 1px solid rgba(57,255,157,.1) !important;
  border-radius: 14px;
  background: rgba(0,0,0,.22);
}
.tab {
  border: 0 !important;
  border-radius: 10px;
  padding: 11px 8px !important;
  margin: 0 !important;
  transition: background .18s, color .18s;
}
.tab.active { background: rgba(57,255,157,.1); color: var(--f-green) !important; box-shadow: inset 0 0 0 1px rgba(57,255,157,.12); }

footer { color: var(--f-muted-2) !important; }
footer a { color: var(--f-muted) !important; border-bottom-color: rgba(125,159,141,.35) !important; }
footer a:hover { color: var(--f-green) !important; }

/* Landing / authentication */
body:has(.tabs) main { max-width: 440px !important; }
body:has(.tabs) .card { padding: 26px !important; }
body:has(.tabs) .brand { font-size: 15px; margin-bottom: 28px !important; }
body:has(.tabs) .iris-wrap { width: 138px; height: 138px; margin-bottom: 18px; }
body:has(.tabs) form { gap: 17px; }
body:has(.tabs) label { margin-bottom: 7px; }
body:has(.tabs) footer { margin-top: 28px; }

/* Dashboard */
body:has(.preview-img) .wrap { max-width: 820px !important; gap: 16px !important; }
body:has(.preview-img) header {
  padding: 14px 16px;
  border: 1px solid var(--f-border);
  border-radius: 16px;
  background: rgba(7,14,10,.68);
  box-shadow: 0 12px 35px rgba(0,0,0,.2);
  backdrop-filter: blur(14px);
}
body:has(.preview-img) .card { padding: 22px !important; }
body:has(.preview-img) .preview-wrap { gap: 15px; }
body:has(.preview-img) .preview-img {
  max-width: 310px !important;
  border-radius: 18px !important;
  border-color: rgba(57,255,157,.2) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,.45), 0 0 35px rgba(57,255,157,.06);
}
body:has(.preview-img) .status-row { padding: 8px 12px; border: 1px solid rgba(57,255,157,.1); border-radius: 999px; background: rgba(0,0,0,.2); }
body:has(.preview-img) .dot { width: 8px; height: 8px; }
body:has(.preview-img) .row { gap: 10px; }

/* Admin */
body:has(#dashWrap) .wrap { max-width: 920px !important; gap: 16px !important; }
body:has(#dashWrap) header {
  padding: 14px 16px;
  border: 1px solid var(--f-border);
  border-radius: 16px;
  background: rgba(7,14,10,.68);
  backdrop-filter: blur(14px);
}
body:has(#dashWrap) #loginCard { max-width: 430px !important; margin: 10vh auto 0 !important; }
body:has(#dashWrap) #loginWrap { min-height: 72vh; display:flex; align-items:center; }
body:has(#dashWrap) .row-item { padding: 14px 0; border-bottom-color: rgba(57,255,157,.09); }
body:has(#dashWrap) .badge { border-radius: 999px; padding: 5px 9px; }

/* Choice page */
body:has(.choice) main { max-width: 520px !important; }
body:has(.choice) .iris-wrap { width: 128px; height: 128px; }
body:has(.choice) .tagline { color: var(--f-muted) !important; margin-bottom: 28px !important; }
.choice { gap: 12px !important; }
.choice-btn { padding: 17px 18px !important; }
.choice-btn:hover { border-color: var(--f-border-strong) !important; box-shadow: 0 18px 45px rgba(0,0,0,.35), 0 0 24px rgba(57,255,157,.07) !important; }
.choice-icon { background: rgba(57,255,157,.08) !important; border: 1px solid rgba(57,255,157,.16); }
.install-steps { border-radius: 14px !important; background: rgba(4,9,6,.6) !important; }

/* Tutorial overlay */
#tutoOverlay { background: rgba(3,7,5,.97) !important; backdrop-filter: blur(18px); }
#tutoOverlay > div:first-child { background: rgba(7,14,10,.86); }

@media (min-width: 760px) {
  body:has(.preview-img) .wrap { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-items: start; }
  body:has(.preview-img) header, body:has(.preview-img) footer { grid-column: 1 / -1; }
  body:has(.preview-img) #previewCard { grid-row: span 2; }
  body:has(.preview-img) #previewCard .preview-img { max-width: 280px !important; }
}

@media (max-width: 600px) {
  body { padding-left: 14px !important; padding-right: 14px !important; }
  .card { padding: 18px !important; border-radius: 15px !important; }
  .row { flex-direction: column; align-items: stretch !important; }
  .row > div:first-child { width: 100%; }
  .row > button { width: 100%; }
  header { gap: 10px; }
  .brand { font-size: 12px !important; letter-spacing: .16em !important; }
}
