/* =====================================================================
   ====== WIZARD UI - تصميم الويزارد الجديد (5 خطوات) ======
   يُحمّل بعد smart_calc.css ليتجاوز أي تعارض
   ===================================================================== */

/* ====== Reset legacy layout ====== */
body.wizard-active {
    background: #edf3fb !important;
    background-image:
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.07) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.07) 0px, transparent 50%) !important;
    background-attachment: fixed !important;
}
body.wizard-active .public-beta-ribbon,
body.wizard-active .header-banner,
body.wizard-active .public-only-note { display: none !important; }

/* كل الحاويات القديمة تختفي */
#wizardRoot { max-width: 980px; margin: 0 auto; padding: 24px 16px 56px; }
#hiddenFormsRoot { position: absolute; left: -99999px; top: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

/* ====== Top Bar ====== */
.wiz-top-bar {
    background: linear-gradient(135deg, #0f172a, #1e40af);
    color: #fff; padding: 14px 20px;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.wiz-top-inner { max-width: 980px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wiz-brand { display: flex; align-items: center; gap: 10px; }
.wiz-logo-icon {
    width: 42px; height: 42px; border-radius: 11px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    display: flex; align-items: center; justify-content: center; font-size: 22px;
    box-shadow: 0 4px 12px rgba(249,115,22,0.4);
}
.wiz-titles h1 { font-size: 1.05rem; font-weight: 900; margin: 0; color:#fff; }
.wiz-titles span { font-size: 0.72rem; opacity: 0.7; font-weight: 600; }
.wiz-brand-badge {
    background: rgba(249,115,22,0.18); color: #fdba74;
    border: 1px solid rgba(249,115,22,0.3);
    padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 0.8rem;
}
.wiz-btn-glass {
    background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px; padding: 6px 12px; font-weight: 700; cursor: pointer;
}
.wiz-btn-glass:hover { background: rgba(255,255,255,0.2); color:#fff; }

/* ====== Screens ====== */
.wiz-screen { animation: wizSlideIn 0.4s ease; }
.wiz-screen.is-hidden { display: none !important; }
@keyframes wizSlideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ====== Card container ====== */
.wiz-card {
    background: #fff; border-radius: 20px; padding: 32px 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.06); border: 1px solid rgba(255,255,255,0.6);
}

/* ====== Stepper ====== */
.wiz-stepper {
    background: #fff; border-radius: 18px; padding: 18px 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.06); margin-bottom: 22px;
}
.wiz-stepper-track { display: flex; align-items: center; gap: 0; }
.wiz-step-node {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px;
    position: relative; cursor: pointer; z-index: 2;
}
.wiz-step-circle {
    width: 44px; height: 44px; border-radius: 50%;
    background: #fff; border: 3px solid #cbd5e1; color: #94a3b8;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 1.05rem; transition: all 0.35s ease;
}
.wiz-step-node.active .wiz-step-circle {
    background: #2563eb; border-color: #2563eb; color: #fff;
    box-shadow: 0 0 0 6px rgba(37,99,235,0.15); transform: scale(1.08);
}
.wiz-step-node.done .wiz-step-circle { background: #16a34a; border-color: #16a34a; color: #fff; }
.wiz-step-label { font-size: 0.74rem; font-weight: 800; color: #64748b; text-align: center; transition: color 0.3s; }
.wiz-step-node.active .wiz-step-label { color: #2563eb; }
.wiz-step-node.done .wiz-step-label { color: #16a34a; }
.wiz-step-connector {
    flex: 0 0 auto; width: 24px; height: 4px; border-radius: 999px;
    background: #e2e8f0; margin-top: -22px; transition: background 0.35s;
}
.wiz-step-connector.filled { background: #16a34a; }
.wiz-step-title-bar {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 16px; padding-top: 14px; border-top: 1px dashed #e2e8f0;
}
.wiz-step-title-bar h3 { font-size: 1.15rem; font-weight: 900; margin: 0; color: #0f172a; }
.wiz-step-counter {
    background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe;
    padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: 0.8rem;
}

/* ====== Field groups ====== */
.wiz-field-title { font-size: 1.05rem; font-weight: 800; color: #1e40af; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.wiz-field-sub { font-size: 0.85rem; color: #64748b; margin-bottom: 22px; }

/* ====== Choice cards ====== */
.wiz-choice-row { display: grid; gap: 14px; margin-bottom: 24px; }
.wiz-choice-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.wiz-choice-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.wiz-choice-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 640px) {
    .wiz-choice-row.cols-2, .wiz-choice-row.cols-3, .wiz-choice-row.cols-4 { grid-template-columns: 1fr; }
}
.wiz-choice-card {
    border: 2px solid #e2e8f0; border-radius: 14px; padding: 18px 16px;
    cursor: pointer; transition: all 0.25s; text-align: center;
    background: #fff; position: relative; user-select: none;
}
.wiz-choice-card:hover { border-color: #93c5fd; background: #f8faff; transform: translateY(-2px); }
.wiz-choice-card.selected {
    border-color: #2563eb; background: #eff6ff;
    box-shadow: 0 6px 18px rgba(37,99,235,0.15);
}
.wiz-choice-card .ch-icon { font-size: 1.8rem; margin-bottom: 8px; color: #2563eb; }
.wiz-choice-card .ch-title { font-weight: 800; font-size: 0.95rem; color: #0f172a; }
.wiz-choice-card .ch-sub { font-size: 0.78rem; color: #64748b; margin-top: 4px; }
.wiz-choice-card.selected .ch-icon { color: #1d4ed8; }
.wiz-choice-card .check-mark {
    position: absolute; top: 8px; left: 8px;
    width: 22px; height: 22px; border-radius: 50%; background: #2563eb;
    color: #fff; display: none; align-items: center; justify-content: center; font-size: 0.8rem;
}
.wiz-choice-card.selected .check-mark { display: flex; }

/* ====== Floor cards ====== */
.wiz-floor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 768px) { .wiz-floor-grid { grid-template-columns: 1fr; } }
.wiz-floor-card { border: 2px solid #e2e8f0; border-radius: 16px; padding: 18px; background: #fff; transition: border 0.25s; }
.wiz-floor-card.is-fixed { border-color: #bfdbfe; background: #eff6ff; }
.wiz-floor-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.wiz-floor-emoji { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; background: #f1f5f9; }
.wiz-floor-name { font-weight: 900; font-size: 1rem; color: #0f172a; }
.wiz-floor-tag { font-size: 0.72rem; color: #64748b; font-weight: 700; }
.wiz-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ====== Preview box ====== */
.wiz-preview-box {
    background: linear-gradient(135deg, #f0f7ff, #e0ecff);
    border: 1px solid #bfdbfe; border-radius: 16px; padding: 20px; margin-top: 24px;
}
.wiz-preview-box .pv-title { font-weight: 900; color: #1e40af; font-size: 0.95rem; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.wiz-arch-panel {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid #bfdbfe;
    border-radius: 18px;
    background: linear-gradient(135deg, #f8fbff, #eef6ff);
}
.wiz-arch-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}
.wiz-arch-pill {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border: 1px solid #bfdbfe;
    background: #fff;
    color: #1e40af;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.78rem;
    font-weight: 900;
}
.wiz-arch-fields {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 12px;
}
.wiz-compact-choices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.wiz-compact-choices .wiz-choice-card {
    padding: 13px 12px;
    border-radius: 12px;
}
.wiz-compact-choices .wiz-choice-card .ch-icon {
    font-size: 1.35rem;
    margin-bottom: 5px;
}
.wiz-service-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.wiz-service-chip {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.78rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.2s;
}
.wiz-service-chip:hover {
    border-color: #93c5fd;
    background: #f8fbff;
    transform: translateY(-1px);
}
.wiz-service-chip.selected {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37,99,235,0.12);
}
@media (max-width: 992px) {
    .wiz-arch-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wiz-arch-head { flex-direction: column; }
    .wiz-arch-pill { white-space: normal; }
}
@media (max-width: 640px) {
    .wiz-arch-fields,
    .wiz-compact-choices { grid-template-columns: 1fr; }
}
.wiz-plot-tools {
    display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 7px; margin: -4px 0 10px;
}
.wiz-plot-mode-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
    background: rgba(37,99,235,0.10); color: #1e40af; border: 1px solid rgba(37,99,235,0.22);
    font-size: 0.76rem; font-weight: 900;
}
.wiz-plot-tool-btn,
.wiz-plot-reset {
    width: 30px; height: 30px; border-radius: 8px; border: 1px solid #cbd5e1;
    background: #fff; color: #1e40af; display: inline-flex; align-items: center; justify-content: center;
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.wiz-plot-tool-btn:hover,
.wiz-plot-reset:hover { transform: translateY(-1px); border-color: #93c5fd; background: #eff6ff; }
.wiz-plot-tool-btn i,
.wiz-plot-reset i { font-size: 0.92rem; line-height: 1; }
.wiz-plot-hint {
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.72rem;
    font-weight: 900;
}
@media (max-width: 640px) {
    .wiz-plot-tools { justify-content: center; }
    .wiz-plot-mode-chip { width: 100%; justify-content: center; }
    .wiz-plot-hint { width: 100%; text-align: center; border-radius: 8px; }
}
.wiz-plot-visual {
    position: relative; width: min(100%, 760px); height: 160px; margin: 0 auto;
    display: flex; align-items: center; justify-content: center; overflow: visible;
    transition: width 0.28s ease, height 0.28s ease;
}
.wiz-plot-svg {
    width: 100%; height: 100%; display: block; overflow: visible; touch-action: none;
    filter: drop-shadow(0 8px 14px rgba(15,23,42,0.07));
}
.wiz-plot-svg text { display: none; }
.wiz-built-label-html {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    color: #1e3a8a; font-weight: 900; font-size: 0.84rem; line-height: 1.2;
    background: rgba(255,255,255,0.62); border: 1px solid rgba(147,197,253,0.45);
    padding: 4px 9px; border-radius: 999px; pointer-events: none; z-index: 1;
    box-shadow: 0 4px 10px rgba(15,23,42,0.08); white-space: nowrap;
}
.wiz-built-area {
    background: repeating-linear-gradient(45deg, rgba(37,99,235,0.25), rgba(37,99,235,0.25) 8px, rgba(37,99,235,0.4) 8px, rgba(37,99,235,0.4) 16px);
    border: 2px solid #2563eb; border-radius: 6px; display: flex; align-items: center; justify-content: center;
    color: #1e3a8a; font-weight: 900; font-size: 0.85rem; transition: all 0.4s ease;
}
.wiz-irregular-edge {
    stroke: rgba(37, 99, 235, 0);
    stroke-width: 10;
    vector-effect: non-scaling-stroke;
    fill: none;
    cursor: crosshair;
    pointer-events: stroke;
}
.wiz-irregular-edge:hover {
    stroke: rgba(37, 99, 235, 0.22);
}
.wiz-irregular-handle {
    fill: #ffffff; stroke: #2563eb; stroke-width: 2.5; vector-effect: non-scaling-stroke;
    cursor: grab; filter: drop-shadow(0 2px 3px rgba(15,23,42,0.25));
}
.wiz-irregular-handle:active { cursor: grabbing; }
.wiz-irregular-point.selected .wiz-irregular-handle {
    fill: #dbeafe;
    stroke: #1d4ed8;
    stroke-width: 3.2;
}
.wiz-irregular-handle-core {
    fill: #2563eb; pointer-events: none;
}
.wiz-dim-top, .wiz-dim-side {
    position: absolute; font-size: 0.74rem; font-weight: 800; color: #475569;
    background: #fff; padding: 2px 8px; border-radius: 6px; border: 1px solid #cbd5e1;
    z-index: 2; white-space: nowrap;
}
.wiz-dim-top { top: -12px; left: 50%; transform: translateX(-50%); }
.wiz-dim-side { right: -50px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
    .wiz-dim-side { right: -42px; }
    .wiz-built-label-html { font-size: 0.78rem; padding: 4px 8px; }
}

/* ====== Slider ====== */
.wiz-ratio-row { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.wiz-ratio-row .form-range { flex: 1; }
.wiz-ratio-badge {
    min-width: 64px; text-align: center; background: #2563eb; color: #fff;
    padding: 6px 10px; border-radius: 8px; font-weight: 900; font-size: 0.9rem;
}
.wiz-net-badge {
    min-width: 110px; text-align: center; background: #f1f5f9; color: #1e293b;
    border: 1px solid #cbd5e1; padding: 6px 10px; border-radius: 8px; font-weight: 700; font-size: 0.82rem;
}

/* ====== Nav buttons ====== */
.wiz-nav-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 12px;
    width: min(100%, 520px); margin: 24px auto 0; padding: 0;
    background: transparent; border-radius: 0;
    box-shadow: none;
    border: 0;
    position: static;
    backdrop-filter: none;
}
.btn-wiz {
    width: 100%; min-height: 52px; border: none; border-radius: 14px;
    padding: 12px 18px; font-weight: 900; font-size: 0.96rem; line-height: 1;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    white-space: nowrap;
}
.btn-wiz i { font-size: 1.15rem; line-height: 1; }
.btn-wiz-next { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; }
.btn-wiz-next:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(37,99,235,0.35); color:#fff; }
.btn-wiz-next:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-wiz-back { background: #eef4fb; color: #334155; border: 1px solid #dbe4ef; }
.btn-wiz-back:hover:not(:disabled) { background: #e2eaf5; color: #0f172a; }
.btn-wiz-back:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-wiz-calc { background: linear-gradient(135deg, #16a34a, #15803d); color: #fff; }
.btn-wiz-calc:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(22,163,74,0.35); color:#fff; }
@media (max-width: 520px) {
    .wiz-nav-bar { width: 100%; gap: 8px; padding: 0; }
    .btn-wiz { min-height: 48px; padding: 11px 12px; font-size: 0.9rem; }
}

/* ====== Welcome ====== */
.wiz-welcome-hero { text-align: center; padding: 48px 20px; }
.wiz-welcome-hero .wave { font-size: 3.5rem; margin-bottom: 16px; }
.wiz-welcome-hero h2 { font-size: 1.9rem; font-weight: 900; color: #0f172a; margin-bottom: 10px; }
.wiz-welcome-hero p { color: #64748b; font-size: 1.05rem; max-width: 480px; margin: 0 auto 24px; }
.wiz-welcome-features { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 28px 0; }
.wiz-feature {
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 14px 18px; display: flex; align-items: center; justify-content: center; gap: 10px;
    font-weight: 800; font-size: 0.88rem; color: #334155; min-width: 138px;
    transition: all 0.25s;
}
.wiz-feature:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(37,99,235,0.1); border-color: #bfdbfe; }
.wiz-feature i { color: #2563eb; font-size: 1.1rem; flex-shrink: 0; }
.wiz-feature-title { font: inherit; line-height: 1.2; }
.wiz-feature-desc { display: none; }
.public-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 6px auto 18px;
    max-width: 760px;
}
.public-stat-card {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid #dbeafe;
    border-bottom: 4px solid #2563eb;
    border-radius: 14px;
    padding: 14px 12px;
    min-width: 0;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}
.public-stat-card:nth-child(2) { border-bottom-color: #16a34a; }
.public-stat-card:nth-child(3) { border-bottom-color: #f59e0b; }
.public-stat-card span {
    display: block;
    font-size: 1.55rem;
    line-height: 1.1;
    color: #0f172a;
    font-weight: 900;
}
.public-stat-card small {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-weight: 800;
    font-size: 0.76rem;
}

/* ====== Footer ====== */
.wiz-footer {
    background: linear-gradient(135deg, #0f172a, #1e40af);
    color: #dbeafe; margin-top: 40px; padding: 26px 20px 22px;
    border-top: 1px solid rgba(96,165,250,0.22);
}
.wiz-footer-inner {
    max-width: 980px; margin: 0 auto;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px;
}
.wiz-footer-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.wiz-footer-logo-card {
    width: 132px; height: 72px; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid rgba(191,219,254,0.65);
    border-radius: 12px; padding: 8px 12px; text-decoration: none;
    box-shadow: 0 14px 34px rgba(15,23,42,0.22);
}
.wiz-footer-logo-card img { width: 100%; height: 100%; object-fit: contain; display: block; }
.wiz-footer-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wiz-footer-kicker { color: #93c5fd; font-size: 0.74rem; font-weight: 800; }
.wiz-footer-meta strong { color: #fff; font-size: 0.98rem; line-height: 1.35; }
.wiz-footer-meta span:last-child { color: #bad2ef; font-size: 0.78rem; font-weight: 700; }
.wiz-footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.wiz-footer-link {
    color: #dbeafe; text-decoration: none; font-size: 0.82rem; font-weight: 800;
    display: inline-flex; align-items: center; gap: 7px; transition: all 0.2s;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(148,163,184,0.22);
    border-radius: 10px; padding: 8px 11px; white-space: nowrap;
}
.wiz-footer-link:hover {
    color: #fff; background: rgba(37,99,235,0.22); border-color: rgba(96,165,250,0.45);
    transform: translateY(-1px);
}
.wiz-footer-link i { color: #60a5fa; font-size: 0.95rem; }
.wiz-footer-link:hover i { color: #86efac; }
.wiz-footer-copy {
    grid-column: 1 / -1; text-align: center; font-size: 0.74rem; color: #8aa4c5;
    border-top: 1px solid rgba(255,255,255,0.08); padding-top: 13px; margin-top: 4px;
    letter-spacing: 0.3px;
}
@media (max-width: 760px) {
    .wiz-footer-inner { grid-template-columns: 1fr; text-align: center; }
    .wiz-footer-main { justify-content: center; flex-wrap: wrap; }
    .wiz-footer-links { justify-content: center; }
}
.wiz-btn-start {
    background: linear-gradient(135deg, #16a34a, #15803d); color: #fff;
    border: none; border-radius: 14px; padding: 16px 44px; font-size: 1.1rem; font-weight: 900;
    box-shadow: 0 10px 28px rgba(22,163,74,0.3); transition: all 0.25s; cursor: pointer;
}
.wiz-btn-start:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(22,163,74,0.4); color: #fff; }
.wiz-recent-row {
    margin-top: 30px; padding: 14px 18px; background: #fff7ed; border: 1px solid #fed7aa;
    border-radius: 12px; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: #9a3412; font-size: 0.85rem;
}

/* ====== Advanced toggle ====== */
.wiz-adv-toggle {
    display: flex; align-items: center; justify-content: space-between;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 16px; cursor: pointer; margin-bottom: 14px;
}
.wiz-adv-toggle:hover { background: #f1f5f9; }
.wiz-adv-body { display: none; }
.wiz-adv-body.open { display: block; animation: wizFadeIn 0.3s; }

/* ====== Price grid ====== */
.wiz-price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .wiz-price-grid { grid-template-columns: 1fr; } }
.wiz-price-item { background: #0f172a; border-radius: 14px; padding: 14px; color: #fff; }
.wiz-price-item .pi-lbl { font-size: 0.8rem; color: #94a3b8; font-weight: 700; margin-bottom: 6px; }
.wiz-price-item input { background: #1e293b; border: 1px solid #334155; color: #fff; border-radius: 8px; font-weight: 800; }

.wiz-hint-box {
    background: #eff6ff; border: 1px solid #bfdbfe; border-right: 4px solid #2563eb;
    border-radius: 10px; padding: 12px 14px; font-size: 0.84rem; color: #1e40af; font-weight: 700; margin-bottom: 20px;
    display: flex; align-items: center; gap: 8px;
}

/* ====== Sub-cards (two-column row: concrete + brick) ====== */
.wiz-row-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
@media (max-width: 700px) { .wiz-row-2col { grid-template-columns: 1fr; } }
.wiz-sub-card {
    border: 2px solid #e2e8f0; border-radius: 14px; padding: 16px; background: #fff;
    transition: border 0.25s, box-shadow 0.25s;
}
.wiz-sub-card:hover { border-color: #cbd5e1; box-shadow: 0 4px 14px rgba(0,0,0,0.05); }
.wiz-sub-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.wiz-sub-emoji { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.wiz-sub-title { font-weight: 900; font-size: 0.98rem; color: #0f172a; line-height: 1.1; }
.wiz-sub-desc { font-size: 0.74rem; color: #64748b; font-weight: 600; }

/* ====== Spotlight AI cards (تأثيرات تلفت النظر - شيك وموديرن) ====== */
.wiz-ai-banner {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #fff; padding: 14px 18px; border-radius: 14px; margin-bottom: 18px;
    font-weight: 800; font-size: 0.92rem; display: flex; align-items: center; gap: 10px;
    border-right: 4px solid #f97316; position: relative; overflow: hidden;
    line-height: 1.6;
}
.wiz-ai-banner::before {
    content: ''; position: absolute; top: 0; right: 0; width: 60%; height: 100%;
    background: radial-gradient(circle at 80% 50%, rgba(249,115,22,0.18), transparent 60%);
}
.wiz-ai-banner i {
    color: #f97316; font-size: 1.15rem; animation: wizTwinkle 1.8s ease-in-out infinite;
    position: relative; z-index: 1; flex-shrink: 0;
}
.wiz-ai-banner { isolation: isolate; }
.wiz-ai-banner-summary { border-right-color: #f59e0b; background: linear-gradient(135deg, #1f2937, #0f172a); }
.wiz-ai-banner-summary::before { background: radial-gradient(circle at 80% 50%, rgba(245,158,11,0.18), transparent 60%); }
.wiz-ai-banner-summary i { color: #fbbf24; }
.wiz-ai-banner-compare { border-right-color: #2563eb; background: linear-gradient(135deg, #172554, #0f172a); }
.wiz-ai-banner-compare::before { background: radial-gradient(circle at 80% 50%, rgba(37,99,235,0.24), transparent 60%); }
.wiz-ai-banner-compare i { color: #60a5fa; }
.wiz-ai-banner-consult { border-right-color: #8b5cf6; background: linear-gradient(135deg, #2e1065, #111827); }
.wiz-ai-banner-consult::before { background: radial-gradient(circle at 80% 50%, rgba(139,92,246,0.24), transparent 60%); }
.wiz-ai-banner-consult i { color: #c4b5fd; }
.wiz-ai-banner-cost { border-right-color: #16a34a; background: linear-gradient(135deg, #064e3b, #0f172a); }
.wiz-ai-banner-cost::before { background: radial-gradient(circle at 80% 50%, rgba(22,163,74,0.24), transparent 60%); }
.wiz-ai-banner-cost i { color: #86efac; }
.wiz-ai-banner-blueprint { border-right-color: #60a5fa; background: linear-gradient(135deg, #0f172a, #1e40af); }
.wiz-ai-banner-blueprint::before { background: radial-gradient(circle at 82% 50%, rgba(96,165,250,0.28), transparent 62%); }
.wiz-ai-banner-blueprint i { color: #93c5fd; }
.wiz-ai-banner-decor { border-right-color: #8b5cf6; background: linear-gradient(135deg, #312e81, #111827); }
.wiz-ai-banner-decor::before { background: radial-gradient(circle at 80% 50%, rgba(139,92,246,0.24), transparent 60%); }
.wiz-ai-banner-decor i { color: #c4b5fd; }
.wiz-ai-banner-4d { border-right-color: #f59e0b; background: linear-gradient(135deg, #78350f, #0f172a); }
.wiz-ai-banner-4d::before { background: radial-gradient(circle at 80% 50%, rgba(245,158,11,0.24), transparent 60%); }
.wiz-ai-banner-4d i { color: #fcd34d; }
@media (max-width: 640px) {
    .wiz-ai-banner { align-items: flex-start; padding: 12px 14px; font-size: 0.84rem; }
}
@keyframes wizTwinkle { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(1.25); } }

.wiz-spotlight-card {
    background: #fff; border-radius: 16px; padding: 22px; margin-bottom: 16px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.07); height: 100%;
    border: 1px solid rgba(255,255,255,0.6); position: relative;
    transition: transform 0.35s, box-shadow 0.35s;
}
.wiz-spotlight-card:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(0,0,0,0.12); }

/* side gradient bar */
.wiz-spotlight-card::before {
    content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 5px; border-radius: 16px 0 0 16px;
}
.wiz-spotlight-blue::before { background: linear-gradient(180deg, #2563eb, #60a5fa); }
.wiz-spotlight-red::before  { background: linear-gradient(180deg, #dc2626, #fb7185); }

/* soft glow pulsing in background */
.wiz-spotlight-glow {
    position: absolute; top: -40px; left: -40px; width: 160px; height: 160px; border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,0.16), transparent 70%);
    filter: blur(8px); animation: wizGlowPulse 3s ease-in-out infinite;
}
.wiz-spotlight-glow-red { background: radial-gradient(circle, rgba(220,38,38,0.14), transparent 70%); }
@keyframes wizGlowPulse { 0%,100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.2); } }

/* shimmer sweep (لمعة بتعدي على الكرت) */
.wiz-spotlight-card::after {
    content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.45) 50%, transparent 70%);
    transform: skewX(-20deg); pointer-events: none; animation: wizShimmer 4.5s ease-in-out infinite;
}
.wiz-spotlight-red::after { animation-delay: 2.2s; }
@keyframes wizShimmer { 0% { left: -120%; } 60%,100% { left: 140%; } }

/* AI chip badge (عايم فوق الكرت) */
.wiz-ai-chip {
    position: absolute; top: 12px; left: 12px; z-index: 3;
    background: linear-gradient(135deg, #2563eb, #1e40af); color: #fff;
    padding: 4px 11px; border-radius: 999px; font-size: 0.66rem; font-weight: 900; letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(37,99,235,0.4); display: inline-flex; align-items: center; gap: 4px;
}
.wiz-ai-chip-red { background: linear-gradient(135deg, #dc2626, #991b1b); box-shadow: 0 3px 10px rgba(220,38,38,0.4); }

/* pulsing icon circle */
.wiz-icon-pulse {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
    background: linear-gradient(135deg, #eff6ff, #dbeafe); color: #2563eb;
    margin-left: 10px; position: relative; animation: wizIconFloat 2.8s ease-in-out infinite;
}
.wiz-icon-pulse-red { background: linear-gradient(135deg, #fef2f2, #fee2e2); color: #dc2626; }
.wiz-icon-pulse::after {
    content: ''; position: absolute; inset: -4px; border-radius: 14px;
    border: 2px solid rgba(37,99,235,0.4); animation: wizRing 2.2s ease-out infinite;
}
.wiz-icon-pulse-red::after { border-color: rgba(220,38,38,0.4); }
@keyframes wizIconFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes wizRing {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ====== Stock market toggle (بورصة الحديد) ====== */
.wiz-stock-toggle {
    margin-top: 20px; border-radius: 16px; padding: 16px 20px; cursor: pointer;
    background: linear-gradient(135deg, #0f172a, #1e40af); color: #fff;
    position: relative; overflow: hidden; transition: all 0.3s;
    border: 1px solid rgba(96,165,250,0.28);
    box-shadow: 0 6px 22px rgba(15,23,42,0.22);
}
.wiz-stock-toggle:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(30,64,175,0.26); }
.wiz-stock-toggle.is-open { border-color: rgba(147,197,253,0.55); }

/* soft glow pulsing */
.wiz-stock-glow {
    position: absolute; top: -30px; left: -30px; width: 140px; height: 140px; border-radius: 50%;
    background: radial-gradient(circle, rgba(96,165,250,0.25), transparent 70%);
    filter: blur(8px); animation: wizGlowPulse 3s ease-in-out infinite;
}
/* shimmer sweep */
.wiz-stock-toggle::after {
    content: ''; position: absolute; top: 0; left: -120%; width: 50%; height: 100%;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.12) 50%, transparent 70%);
    transform: skewX(-20deg); pointer-events: none; animation: wizShimmer 5s ease-in-out infinite;
}

.wiz-stock-head { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.wiz-stock-icon-pulse {
    width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1d4ed8;
    position: relative; animation: wizIconFloat 2.8s ease-in-out infinite;
}
.wiz-stock-icon-pulse::after {
    content: ''; position: absolute; inset: -4px; border-radius: 13px;
    border: 2px solid rgba(147,197,253,0.45); animation: wizRing 2.2s ease-out infinite;
}
.wiz-stock-title-wrap { flex: 1; }
.wiz-stock-title { font-weight: 900; font-size: 1rem; color: #fff; display: block; }
.wiz-stock-sub { font-size: 0.74rem; color: #94a3b8; font-weight: 600; }
.wiz-stock-chip {
    background: rgba(96,165,250,0.18); color: #bfdbfe; border: 1px solid rgba(147,197,253,0.36);
    padding: 4px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 800;
    display: inline-flex; align-items: center; gap: 4px;
}
.wiz-stock-chip i { animation: wizTwinkle 1.8s ease-in-out infinite; }
.wiz-stock-chevron { color: #94a3b8; font-size: 0.9rem; transition: transform 0.3s; }
.wiz-stock-toggle.is-open .wiz-stock-chevron { color: #bfdbfe; }

.wiz-stock-body { display: none; margin-top: 10px; }
.wiz-stock-body.open { display: block; animation: wizFadeIn 0.35s; }

/* ====== Number stepper (stairs etc.) ====== */
.wiz-number-stepper {
    display: flex; align-items: center; justify-content: center; gap: 0;
    background: #fff; border: 2px solid #e2e8f0; border-radius: 16px;
    padding: 8px; max-width: 280px; margin-top: 8px;
}
.wiz-stepper-btn {
    width: 52px; height: 52px; border: none; border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #1e40af); color: #fff;
    font-size: 1.4rem; font-weight: 900; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; flex-shrink: 0;
}
.wiz-stepper-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(37,99,235,0.35); }
.wiz-stepper-btn:active { transform: translateY(0); }
.wiz-stepper-display { flex: 1; text-align: center; padding: 0 16px; }
.wiz-stepper-value { font-size: 2.4rem; font-weight: 900; color: #0f172a; line-height: 1; }
.wiz-stepper-unit { display: block; font-size: 0.78rem; color: #64748b; font-weight: 700; margin-top: 2px; }

/* ====== Concrete mini-settings (pump/mixer) ====== */
.wiz-mini-settings {
    background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 12px;
    padding: 14px; margin-top: 12px; max-width: none;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.wiz-concrete-setting { min-width: 0; }
.wiz-concrete-setting label {
    display: flex; align-items: center; gap: 6px; min-height: 22px;
    margin-bottom: 6px !important;
}
.wiz-concrete-setting .input-group,
.wiz-concrete-setting .form-select { min-height: 40px; }
@media (max-width: 640px) {
    .wiz-mini-settings { grid-template-columns: 1fr; }
}

/* ====== Advanced settings grid ====== */
.wiz-advanced-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 8px;
}
@media (min-width: 768px) { .wiz-advanced-grid { grid-template-columns: repeat(4, 1fr); } }
.wiz-adv-card {
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px;
    transition: border 0.25s;
}
.wiz-adv-card:hover { border-color: #93c5fd; }
.wiz-adv-label {
    font-size: 0.78rem; font-weight: 800; color: #475569; margin-bottom: 8px;
    display: flex; align-items: center; gap: 6px;
}
.wiz-adv-label i { color: #2563eb; }

/* ====== Results ====== */
.wiz-results-hero { text-align: center; margin-bottom: 26px; }
.wiz-check-circle {
    width: 64px; height: 64px; border-radius: 50%; background: #16a34a; color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 12px;
    box-shadow: 0 0 0 8px rgba(22,163,74,0.15);
}
.wiz-results-hero h2 { font-weight: 900; font-size: 1.5rem; margin: 0 0 6px; }
.wiz-pill-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
@media (max-width: 640px) { .wiz-pill-row { grid-template-columns: 1fr; } }
.wiz-res-pill {
    background: #fff; border-radius: 14px; padding: 18px; text-align: center;
    border: 1px solid #e2e8f0; border-bottom: 4px solid #2563eb; box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.wiz-res-pill.r-danger { border-bottom-color: #ef4444; }
.wiz-res-pill.r-success { border-bottom-color: #16a34a; }
.wiz-res-pill .lbl { font-size: 0.82rem; font-weight: 700; color: #64748b; }
.wiz-res-pill .val { font-size: 1.8rem; font-weight: 900; margin: 4px 0; }
.wiz-total-banner {
    background: linear-gradient(135deg, #dc2626, #991b1b); color: #fff;
    border-radius: 18px; padding: 26px; text-align: center; margin-bottom: 26px;
    box-shadow: 0 10px 30px rgba(220,38,38,0.25);
}
.wiz-total-banner .t-lbl { font-weight: 700; opacity: 0.9; font-size: 0.95rem; }
.wiz-total-banner .t-val { font-size: 2.4rem; font-weight: 900; margin-top: 4px; }
.wiz-tabs-nav { display: flex; gap: 8px; border-bottom: 2px solid #e2e8f0; margin-bottom: 18px; flex-wrap: wrap; }
.wiz-tab-btn {
    --tab-accent: #2563eb; --tab-bg: rgba(37,99,235,0.10); --tab-border: rgba(37,99,235,0.28);
    --tab-glow: rgba(37,99,235,0.22); --tab-delay: 0s;
    border: 1px solid transparent; background: transparent; padding: 12px 20px; font-weight: 800; color: #64748b;
    cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; font-size: 0.92rem;
    transition: transform 0.2s, color 0.2s, background 0.2s, box-shadow 0.2s, border-color 0.2s;
    border-radius: 10px 10px 0 0; position: relative; overflow: hidden;
    animation: wizTabBreath 3s ease-in-out infinite; animation-delay: var(--tab-delay);
}
.wiz-tab-analysis { --tab-accent: #2563eb; --tab-bg: rgba(37,99,235,0.11); --tab-border: rgba(37,99,235,0.34); --tab-glow: rgba(37,99,235,0.26); --tab-delay: 0s; }
.wiz-tab-cost { --tab-accent: #16a34a; --tab-bg: rgba(22,163,74,0.12); --tab-border: rgba(22,163,74,0.34); --tab-glow: rgba(22,163,74,0.24); --tab-delay: .35s; }
.wiz-tab-blueprint { --tab-accent: #0ea5e9; --tab-bg: rgba(14,165,233,0.13); --tab-border: rgba(14,165,233,0.34); --tab-glow: rgba(14,165,233,0.24); --tab-delay: .7s; }
.wiz-tab-decor { --tab-accent: #8b5cf6; --tab-bg: rgba(139,92,246,0.12); --tab-border: rgba(139,92,246,0.34); --tab-glow: rgba(139,92,246,0.24); --tab-delay: 1.05s; }
.wiz-tab-4d { --tab-accent: #f59e0b; --tab-bg: rgba(245,158,11,0.13); --tab-border: rgba(245,158,11,0.36); --tab-glow: rgba(245,158,11,0.24); --tab-delay: 1.4s; }
.wiz-tab-btn i { color: var(--tab-accent); }
.wiz-tab-btn::after {
    content: ''; position: absolute; right: 22%; left: 22%; bottom: 3px; height: 2px;
    background: var(--tab-accent); border-radius: 999px; opacity: 0;
    transform: scaleX(0.42); transform-origin: center;
    animation: wizTabUnderlinePulse 3.2s ease-in-out infinite;
    animation-delay: var(--tab-delay); pointer-events: none;
}
.wiz-tab-btn:hover {
    color: var(--tab-accent); background: var(--tab-bg); border-color: var(--tab-border);
    transform: translateY(-1px); box-shadow: 0 3px 10px rgba(15,23,42,0.06);
}
.wiz-tab-btn.active {
    color: var(--tab-accent); border-color: var(--tab-border); border-bottom-color: var(--tab-accent);
    background: linear-gradient(180deg, #fff, var(--tab-bg));
    box-shadow: 0 3px 10px rgba(15,23,42,0.07);
    animation: wizTabActiveBreath 2.2s ease-in-out infinite;
}
.wiz-tab-btn:hover::after { opacity: 0.95; transform: scaleX(1); }
.wiz-tab-btn.active::after {
    opacity: 1; transform: scaleX(1);
    animation: wizActiveUnderlinePulse 2.4s ease-in-out infinite;
}
.wiz-tab-panel { display: none; animation: wizFadeIn 0.3s; }
.wiz-tab-panel.active { display: block; }
@keyframes wizFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes wizTabBreath {
    0%, 100% { background-color: transparent; border-color: transparent; }
    50% { background-color: var(--tab-bg); border-color: var(--tab-border); }
}
@keyframes wizTabActiveBreath {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@keyframes wizTabUnderlinePulse {
    0%, 100% { opacity: 0; transform: scaleX(0.42); }
    45%, 55% { opacity: 0.52; transform: scaleX(0.86); }
}
@keyframes wizActiveUnderlinePulse {
    0%, 100% { opacity: 0.78; transform: scaleX(0.82); }
    50% { opacity: 1; transform: scaleX(1); }
}

/* ====== Sub-tabs (inside Quantities & Analysis) ====== */
.wiz-subtabs-wrap { background: transparent; }
.wiz-subtabs-nav {
    display: flex; gap: 6px; background: #f1f5f9; padding: 6px;
    border-radius: 14px; margin-bottom: 18px; flex-wrap: wrap;
}
.wiz-subtab-btn {
    --subtab-accent: #2563eb; --subtab-bg: rgba(37,99,235,0.12);
    --subtab-border: rgba(37,99,235,0.34); --subtab-glow: rgba(37,99,235,0.22);
    --subtab-delay: 0s;
    flex: 1; min-width: 120px;
    border: 1px solid transparent; background: transparent; padding: 11px 14px;
    font-weight: 800; color: #64748b; cursor: pointer;
    border-radius: 10px; font-size: 0.88rem;
    transition: transform 0.2s, color 0.2s, background 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    position: relative; overflow: hidden;
    animation: wizSubtabBreath 3s ease-in-out infinite; animation-delay: var(--subtab-delay);
}
.wiz-subtab-summary { --subtab-accent: #f59e0b; --subtab-bg: rgba(245,158,11,0.12); --subtab-border: rgba(245,158,11,0.36); --subtab-glow: rgba(245,158,11,0.24); --subtab-delay: 0s; }
.wiz-subtab-compare { --subtab-accent: #2563eb; --subtab-bg: rgba(37,99,235,0.12); --subtab-border: rgba(37,99,235,0.34); --subtab-glow: rgba(37,99,235,0.24); --subtab-delay: .25s; }
.wiz-subtab-smart { --subtab-accent: #f97316; --subtab-bg: rgba(249,115,22,0.13); --subtab-border: rgba(249,115,22,0.36); --subtab-glow: rgba(249,115,22,0.24); --subtab-delay: .5s; }
.wiz-subtab-consult { --subtab-accent: #8b5cf6; --subtab-bg: rgba(139,92,246,0.13); --subtab-border: rgba(139,92,246,0.36); --subtab-glow: rgba(139,92,246,0.24); --subtab-delay: .75s; }
.wiz-subtab-btn i { color: var(--subtab-accent, #2563eb); opacity: 0.95; }
.wiz-subtab-btn::after {
    content: ''; position: absolute; right: 24%; left: 24%; bottom: 5px; height: 2px;
    background: var(--subtab-accent); border-radius: 999px; opacity: 0;
    transform: scaleX(0.42); transform-origin: center;
    animation: wizSubtabUnderlinePulse 3.2s ease-in-out infinite;
    animation-delay: var(--subtab-delay); pointer-events: none;
}
.wiz-subtab-btn:hover {
    color: var(--subtab-accent, #2563eb);
    background: var(--subtab-bg, rgba(255,255,255,0.6));
    border-color: var(--subtab-border, transparent);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(15,23,42,0.06);
}
.wiz-subtab-btn.active {
    background: linear-gradient(180deg, #fff, var(--subtab-bg, #eff6ff));
    color: var(--subtab-accent, #2563eb);
    border-color: var(--subtab-border, #bfdbfe);
    box-shadow: 0 3px 10px rgba(15,23,42,0.07);
    animation: wizSubtabActiveBreath 2.2s ease-in-out infinite;
}
.wiz-subtab-btn:hover::after { opacity: 0.95; transform: scaleX(1); }
.wiz-subtab-btn.active::after {
    opacity: 1; transform: scaleX(1);
    animation: wizActiveUnderlinePulse 2.4s ease-in-out infinite;
}
.wiz-subtab-panel { display: none; animation: wizFadeIn 0.3s; }
.wiz-subtab-panel.active { display: block; }
@keyframes wizSubtabBreath {
    0%, 100% { background-color: transparent; border-color: transparent; }
    50% { background-color: var(--subtab-bg); border-color: var(--subtab-border); }
}
@keyframes wizSubtabActiveBreath {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@keyframes wizSubtabUnderlinePulse {
    0%, 100% { opacity: 0; transform: scaleX(0.42); }
    45%, 55% { opacity: 0.5; transform: scaleX(0.86); }
}
@media (prefers-reduced-motion: reduce) {
    .wiz-tab-btn, .wiz-tab-btn.active, .wiz-tab-btn::after,
    .wiz-subtab-btn, .wiz-subtab-btn.active, .wiz-subtab-btn::after { animation: none; }
}

/* ====== Results: make legacy results full-width & clean ====== */
.wiz-results-panel .glass-card { box-shadow: none !important; border: 1px solid #e2e8f0 !important; margin-bottom: 16px !important; }
.wiz-results-panel .row { --bs-gutter-x: 16px; }
.wiz-results-panel .section-title { font-size: 1.1rem; }
.wiz-results-panel .col-xl-6, .wiz-results-panel .col-xl-4 { width: 100% !important; max-width: 100% !important; }
.public-feedback-card {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 18px;
    margin-top: 20px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}
.public-feedback-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.public-feedback-head strong {
    display: block;
    color: #0f172a;
    font-size: 1.08rem;
    font-weight: 900;
}
.public-feedback-head span {
    display: block;
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 700;
    margin-top: 3px;
}
.public-stars {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 999px;
    padding: 6px 10px;
}
.public-star-btn {
    border: 0;
    background: transparent;
    color: #cbd5e1;
    width: 28px;
    height: 28px;
    line-height: 1;
    font-size: 1.35rem;
    cursor: pointer;
    transition: transform 0.16s ease, color 0.16s ease;
}
.public-star-btn:hover,
.public-star-btn.active {
    color: #f59e0b;
    transform: translateY(-1px);
}
.public-feedback-fields {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(170px, 0.8fr) auto;
    gap: 10px;
    align-items: stretch;
}
.public-feedback-fields textarea,
.public-feedback-fields input {
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 11px 12px;
    font-weight: 700;
    background: #f8fafc;
    min-width: 0;
}
.public-feedback-fields textarea:focus,
.public-feedback-fields input:focus {
    outline: 0;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    background: #fff;
}
.public-feedback-fields button {
    border: 0;
    border-radius: 12px;
    padding: 0 18px;
    background: #1d4ed8;
    color: #fff;
    font-weight: 900;
    min-width: 150px;
}
.public-feedback-fields button:disabled {
    opacity: 0.7;
    cursor: wait;
}
.public-feedback-status {
    display: none;
    margin-top: 12px;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 0.88rem;
    font-weight: 800;
}
.public-feedback-status.ok {
    display: block;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #bbf7d0;
}
.public-feedback-status.warn {
    display: block;
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}
.public-feedback-status a {
    color: inherit;
    text-decoration: underline;
    font-weight: 900;
}

.wiz-action-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.wiz-action-row .btn { flex: 1; min-width: 130px; font-weight: 800; }

/* ====== Welcome drawing review uploader ====== */
.wiz-start-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.wiz-btn-review {
    border: 1px solid #bfdbfe;
    background: linear-gradient(180deg, #ffffff, #eff6ff);
    color: #1d4ed8;
    padding: 15px 24px;
    border-radius: 14px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.wiz-btn-review:hover {
    transform: translateY(-2px);
    border-color: #2563eb;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.18);
}

.wiz-drawing-review-panel {
    margin: 22px auto 0;
    max-width: 900px;
    direction: rtl;
    text-align: initial;
    background: #f8fbff;
    border: 1px solid #bfdbfe;
    border-radius: 18px;
    padding: 18px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.wiz-review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.wiz-review-head strong {
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 900;
}

.wiz-review-head span {
    display: block;
    color: #64748b;
    font-size: 0.84rem;
    margin-top: 4px;
    font-weight: 700;
}

.wiz-ground-program {
    background: rgba(255,255,255,0.62);
    border: 1px dashed #bfdbfe;
    border-radius: 12px;
    padding: 10px;
}
.wiz-ground-program .form-select,
.wiz-ground-program .form-control {
    min-height: 34px;
}

.wiz-site-program-panel {
    margin-top: -6px;
    margin-bottom: 22px;
    background: linear-gradient(135deg, #f8fbff, #eef6ff);
    border: 1px dashed #93c5fd;
    border-radius: 14px;
    padding: 14px;
}

.wiz-site-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    border: 1px solid #bfdbfe;
    background: #fff;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.74rem;
    font-weight: 900;
}

/* ====== Architectural review inside blueprints ====== */
.wiz-architectural-review {
    direction: rtl;
    text-align: right;
    border: 1px solid #bfdbfe;
    border-right: 5px solid #2563eb;
    background: linear-gradient(180deg, #ffffff, #eff6ff);
    border-radius: 14px;
    padding: 14px;
}
.wiz-architectural-review.warn {
    border-color: #fed7aa;
    border-right-color: #f59e0b;
    background: linear-gradient(180deg, #ffffff, #fff7ed);
}
.wiz-architectural-review.danger {
    border-color: #fecaca;
    border-right-color: #ef4444;
    background: linear-gradient(180deg, #ffffff, #fff1f2);
}
.wiz-arch-review-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.wiz-arch-review-head strong {
    display: block;
    color: #0f172a;
    font-weight: 900;
    font-size: 1rem;
}
.wiz-arch-review-head span {
    display: block;
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 700;
    margin-top: 4px;
}
.wiz-arch-verdict {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #bfdbfe;
    background: #ffffff;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 900;
    white-space: nowrap;
}
.wiz-architectural-review.warn .wiz-arch-verdict {
    border-color: #fdba74;
    color: #b45309;
}
.wiz-architectural-review.danger .wiz-arch-verdict {
    border-color: #fca5a5;
    color: #dc2626;
}
.wiz-arch-review-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}
.wiz-arch-review-metrics div {
    background: rgba(255,255,255,0.78);
    border: 1px solid #dbeafe;
    border-radius: 10px;
    padding: 9px 10px;
}
.wiz-arch-review-metrics b {
    display: block;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 900;
}
.wiz-arch-review-metrics span {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
    margin-top: 2px;
}
.wiz-arch-review-split,
.wiz-arch-review-good {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.wiz-arch-review-split span,
.wiz-arch-review-good span {
    background: #ffffff;
    border: 1px solid #dbeafe;
    color: #1e293b;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 0.78rem;
    font-weight: 800;
}
.wiz-arch-review-good span {
    color: #047857;
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.wiz-arch-review-body {
    display: grid;
    gap: 7px;
}
.wiz-arch-review-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: rgba(255,255,255,0.72);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 9px 10px;
    color: #1e293b;
    font-size: 0.86rem;
    font-weight: 800;
}
.wiz-arch-review-item.ok i { color: #16a34a; }
.wiz-arch-review-item.info i { color: #2563eb; }
.wiz-arch-review-item.warn i { color: #f59e0b; }
.wiz-arch-review-item.danger i { color: #dc2626; }
@media (max-width: 900px) {
    .wiz-arch-review-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wiz-arch-verdict { white-space: normal; }
}
@media (max-width: 520px) {
    .wiz-arch-review-metrics { grid-template-columns: 1fr; }
}

.wiz-upload-zone {
    display: flex;
    min-height: 118px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px dashed #60a5fa;
    border-radius: 16px;
    background: #eff6ff;
    color: #1d4ed8;
    cursor: pointer;
    text-align: center;
    font-weight: 900;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.wiz-upload-zone:hover {
    background: #dbeafe;
    border-color: #2563eb;
    transform: translateY(-1px);
}

.wiz-upload-zone i { font-size: 2rem; }
.wiz-upload-zone small { color: #64748b; font-weight: 800; }

.wiz-review-inputs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.wiz-review-inputs label {
    display: block;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 900;
    margin-bottom: 5px;
}

.drawing-compare-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 7px;
    padding: 9px 11px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #ffffff;
}

@media (max-width: 768px) {
    .wiz-start-actions { flex-direction: column; align-items: stretch; }
    .wiz-review-inputs { grid-template-columns: 1fr; }
    .public-stats-grid { grid-template-columns: 1fr; }
    .public-feedback-fields { grid-template-columns: 1fr; }
    .public-feedback-fields button { min-height: 46px; }
}

@media (max-width: 640px) {
    .drawing-compare-line { align-items: flex-start; flex-direction: column; }
}

/* ====== Print ====== */
@media print {
    .wiz-top-bar, .wiz-stepper, .wiz-nav-bar, .wiz-btn-start, .public-feedback-card { display: none !important; }
    .wiz-screen.is-hidden { display: block !important; }
    .wiz-tabs-nav { display: none !important; }
    .wiz-tab-panel { display: block !important; }
    .wiz-tab-panel { page-break-after: always; }
    body::before {
        content: "تقرير مراجعة هندسية فقط - غير صالح للتنفيذ بدون اعتماد مكتب مسؤول";
        position: fixed;
        top: 45%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-24deg);
        width: 90%;
        text-align: center;
        color: rgba(220, 38, 38, 0.16);
        font-size: 34px;
        font-weight: 900;
        z-index: 9999;
        pointer-events: none;
    }
    body::after {
        content: "FOR ENGINEERING REVIEW ONLY - NOT FOR CONSTRUCTION";
        position: fixed;
        bottom: 12px;
        left: 0;
        right: 0;
        text-align: center;
        color: #991b1b;
        font-size: 12px;
        font-weight: 900;
        letter-spacing: 0;
        z-index: 9999;
    }
}
