/* Skipperfly Home Builder — shared by the login renderer and the control-panel editor */
html.hb-on body.auth .auth-wrap { visibility: hidden }
.hb-stage { position: relative; overflow: hidden; direction: rtl; isolation: isolate; background: #0b1620; color: #fff }
.hb-stage.hb-live { position: fixed; inset: 0; z-index: 5 }
.hb-bg, .hb-ov { position: absolute; inset: 0; z-index: 0 }
.hb-bg { background-size: cover; background-position: center }
.hb-bg.hb-anim { background: radial-gradient(1200px 600px at 70% 10%, #1aa0b455, transparent 60%), radial-gradient(900px 500px at 10% 90%, #e0a23c33, transparent 60%), linear-gradient(135deg, #0b1620, #102a3a); animation: hbbg 18s ease-in-out infinite alternate }
@keyframes hbbg { to { background-position: 30% 20%, 70% 80%, 0 0 } }
.hb-layer { position: absolute; inset: 0; z-index: 1 }
.hb-el { position: absolute; box-sizing: border-box; display: flex; align-items: center; justify-content: center }
.hb-el > .hb-in { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; box-sizing: border-box }
.hb-el.t-text > .hb-in, .hb-el.t-clock > .hb-in { display: block; white-space: pre-wrap; overflow-wrap: anywhere; height: auto }
.hb-el.t-image img, .hb-el.t-logo img { width: 100%; height: 100%; display: block }
.hb-el.t-icon svg { width: 62%; height: 62%; stroke: currentColor }
.hb-el.t-badge > .hb-in { gap: .45em; border-radius: 999px; padding: 0 1em; white-space: nowrap; overflow: hidden }
.hb-el.t-badge svg { width: 1.25em; height: 1.25em; stroke: currentColor; flex: none }
.hb-el.hidden { display: none }
.hb-form { position: absolute; z-index: 3 }
.hb-form .hb-card { position: relative; border-radius: var(--hb-fr, 18px); background: var(--hb-fbg, #fff); color: var(--hb-ftx, #1b1f24); box-shadow: 0 30px 80px #0006; overflow: hidden }
.hb-form.s-glass .hb-card { background: color-mix(in srgb, var(--hb-fbg, #fff) 16%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); border: 1px solid #ffffff38; color: var(--hb-ftx, #fff) }
.hb-form.s-minimal .hb-card { background: transparent; box-shadow: none }
.hb-form .auth-form { width: 100% !important; max-width: none !important; min-height: 0 !important; height: auto !important; background: transparent !important; box-shadow: none !important; padding: clamp(18px, 2.4vw, 34px) !important; color: inherit !important; display: flex; flex-direction: column; gap: 10px }
.hb-form .auth-form .auth-head h1, .hb-form .auth-form .lead, .hb-form .auth-form .org, .hb-form .auth-form label, .hb-form .auth-foot { color: inherit !important }
.hb-form .auth-form .lead, .hb-form .auth-foot, .hb-form .auth-form .org { opacity: .78 }
.hb-form .btn.primary { background: var(--hb-facc, #0e5b66) !important; border-color: var(--hb-facc, #0e5b66) !important; color: #fff !important }
.hb-form.s-glass .input { background: #ffffff1c !important; border-color: #ffffff40 !important; color: inherit !important }
.hb-form.no-logo .auth-logo, .hb-form.no-head .auth-head { display: none !important }
/* preview mock form (editor) */
.hb-mock { padding: 8% 7%; display: flex; flex-direction: column; gap: 6% }
.hb-mock b { font-size: 1.25em }
.hb-mock i { display: block; height: 2.2em; border-radius: .5em; background: currentColor; opacity: .14 }
.hb-mock u { display: block; height: 2.4em; border-radius: .55em; background: var(--hb-facc, #0e5b66); text-decoration: none }
.hb-mock .lg { width: 2.6em; height: 2.6em; border-radius: .6em; background: var(--hb-facc, #0e5b66); opacity: .9 }
/* mobile flow */
.hb-stage.hb-mob .hb-layer { display: none }
.hb-flow { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 28px 18px 24px; min-height: 100%; box-sizing: border-box; justify-content: center }
.hb-flow .hb-el { position: relative !important; left: auto !important; top: auto !important; transform: none !important; max-width: 100% }
.hb-flow .hb-form { position: relative; width: 100% !important; max-width: 440px; left: auto !important; top: auto !important }
/* animations */
.hb-a-fade { animation: hbfade .9s both }
.hb-a-up { animation: hbup .9s cubic-bezier(.2, .8, .2, 1) both }
.hb-a-zoom { animation: hbzoom .9s cubic-bezier(.2, .8, .2, 1) both }
.hb-a-float > .hb-in { animation: hbfloat 5s ease-in-out infinite }
.hb-a-pulse > .hb-in { animation: hbpulse 2.4s ease-in-out infinite }
.hb-a-spin > .hb-in { animation: hbspin 30s linear infinite }
@keyframes hbfade { from { opacity: 0 } }
@keyframes hbup { from { opacity: 0; translate: 0 40px } }
@keyframes hbzoom { from { opacity: 0; scale: .85 } }
@keyframes hbfloat { 50% { translate: 0 -10px } }
@keyframes hbpulse { 50% { scale: 1.06; filter: brightness(1.15) } }
@keyframes hbspin { to { rotate: 360deg } }
@media (prefers-reduced-motion: reduce) { .hb-stage * { animation: none !important } }

/* ───────────── editor (control panel) ───────────── */
.hbx { display: grid; grid-template-columns: 210px minmax(0, 1fr) 300px; gap: 12px; align-items: start }
@media (max-width: 1250px) { .hbx { grid-template-columns: 190px minmax(0, 1fr); } .hbx-props { grid-column: 1 / -1 } }
.hbx .card { padding: 12px }
.hbx-tools .tl { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; font: inherit; margin-bottom: 6px; text-align: start }
.hbx-tools .tl:hover { border-color: var(--primary); background: var(--primary-soft) }
.hbx-tools .tl svg { width: 18px; height: 18px }
.hbx-h { display: flex; align-items: center; gap: 6px; font-weight: 700; margin: 4px 0 10px; font-size: var(--fs-s, 13px) }
.hbx-h small { font-weight: 400; color: var(--text-3) }
.hbx-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px }
.hbx-bar .grow { flex: 1 }
.hbx-dev { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden }
.hbx-dev button { border: 0; background: var(--surface); padding: 6px 12px; cursor: pointer; color: var(--text-2); font: inherit }
.hbx-dev button.on { background: var(--primary); color: var(--on-primary, #fff) }
.hbx-area { background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 22px 22px; border: 1px solid var(--border); border-radius: 14px; padding: 18px; display: flex; justify-content: center; overflow: auto; min-height: 420px }
.hbx-frame { position: relative; box-shadow: var(--shadow-lg); border-radius: 10px; overflow: hidden; flex: none }
.hbx-frame.mob { border-radius: 28px; border: 8px solid #111 }
.hbx-sel { position: absolute; z-index: 20; border: 1.5px solid #3b82f6; box-shadow: 0 0 0 1px #fff8; pointer-events: none }
.hbx-sel i { position: absolute; width: 11px; height: 11px; background: #fff; border: 1.5px solid #3b82f6; border-radius: 3px; pointer-events: auto }
.hbx-sel i[data-h=nw] { left: -6px; top: -6px; cursor: nwse-resize } .hbx-sel i[data-h=ne] { right: -6px; top: -6px; cursor: nesw-resize }
.hbx-sel i[data-h=sw] { left: -6px; bottom: -6px; cursor: nesw-resize } .hbx-sel i[data-h=se] { right: -6px; bottom: -6px; cursor: nwse-resize }
.hbx-sel i[data-h=e] { right: -6px; top: calc(50% - 6px); cursor: ew-resize } .hbx-sel i[data-h=w] { left: -6px; top: calc(50% - 6px); cursor: ew-resize }
.hbx-sel i[data-h=rot] { left: calc(50% - 6px); top: -30px; border-radius: 50%; cursor: grab }
.hbx-sel b { position: absolute; left: 50%; top: -24px; width: 1px; height: 18px; background: #3b82f6 }
.hbx-guide { position: absolute; z-index: 19; background: #ec4899; pointer-events: none }
.hbx-guide.v { width: 1px; top: 0; bottom: 0 } .hbx-guide.h { height: 1px; left: 0; right: 0 }
.hbx-frame .hb-el, .hbx-frame .hb-form { cursor: move }
.hbx-frame .hb-el.locked { cursor: not-allowed }
.hbx-props .field { margin-bottom: 9px }
.hbx-props .field > label { font-size: 12px; color: var(--text-2); display: block; margin-bottom: 4px }
.hbx-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px } .hbx-g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px } .hbx-g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px }
.hbx-col { display: flex; gap: 6px; align-items: center }
.hbx-col input[type=color] { width: 38px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); flex: none }
.hbx-sec { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px }
.hbx-seg { display: flex; flex-wrap: wrap; gap: 4px } .hbx-seg button { flex: 1; min-width: 0; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 6px 4px; cursor: pointer; font: inherit; font-size: 12px; color: var(--text-2) }
.hbx-seg button.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 700 }
.hbx-layers { max-height: 260px; overflow: auto } .hbx-ly { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 12.5px }
.hbx-ly:hover { background: var(--surface-2) } .hbx-ly.on { background: var(--primary-soft); color: var(--primary); font-weight: 700 }
.hbx-ly .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap } .hbx-ly button { border: 0; background: none; padding: 2px; cursor: pointer; color: var(--text-3); display: inline-flex }
.hbx-ly svg { width: 15px; height: 15px }
.hbx-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px } .hbx-pre { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--surface); padding: 0; font: inherit; color: var(--text) }
.hbx-pre:hover { border-color: var(--primary) } .hbx-pre .th { height: 64px; position: relative } .hbx-pre span { display: block; padding: 6px 8px; font-size: 12px; font-weight: 600 }
.hbx-ld { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px } .hbx-ld button { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 7px 4px; font: inherit; font-size: 11.5px; cursor: pointer; color: var(--text-2) }
.hbx-ld button.on { border-color: var(--warning, #E0A23C); background: color-mix(in srgb, var(--warning, #E0A23C) 14%, transparent); color: var(--text); font-weight: 700 }
.hbx-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; max-height: 52vh; overflow: auto }
.hbx-media .m { position: relative; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; cursor: pointer; aspect-ratio: 1; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 14px 14px }
.hbx-media .m img { width: 100%; height: 100%; object-fit: contain } .hbx-media .m:hover { outline: 2px solid var(--primary) }
.hbx-media .m button { position: absolute; top: 4px; left: 4px; border: 0; border-radius: 6px; background: #000a; color: #fff; padding: 3px; cursor: pointer; display: inline-flex }
.hbx-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; max-height: 50vh; overflow: auto }
.hbx-icons button { aspect-ratio: 1; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; cursor: pointer; color: var(--text); display: flex; align-items: center; justify-content: center }
.hbx-icons button:hover { border-color: var(--primary); color: var(--primary) } .hbx-icons svg { width: 20px; height: 20px }
.hbx-dirty { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--warning) } .hbx-dirty::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor }

/* 4.21 — «نسيت كلمة المرور؟» link on the login form */
.auth-forgot{display:block;margin:14px auto 0;border:0;background:none;color:var(--primary);font:inherit;font-size:13.5px;cursor:pointer;padding:4px 8px;border-radius:8px}
.auth-forgot:hover{background:var(--primary-soft);text-decoration:underline}
/* the show-password button sits on the left of an LTR field: keep the dots clear of it */
.auth .pw .input{padding-left:46px}
