/* ============================================================
   YAIDEL HOME — STOCK MANAGEMENT (DARK-BRAND EMPHASIS)
============================================================ */

.yaidel-stock-section {
    position: relative;
    padding: 88px 22px 84px;
    background: #202020;
    color: #f7f9fb;
    overflow: hidden;
    isolation: isolate;
}

.yaidel-stock-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.yaidel-stock-grid {
    position: absolute;
    inset: 0;
    opacity: .07;
    background-image:
        linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 56px 56px;
}

.yaidel-stock-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(56px);
}
.yaidel-stock-glow-1 {
    width: 380px;
    height: 380px;
    top: -140px;
    left: -120px;
    background: rgba(24,197,203,.22);
}
.yaidel-stock-glow-2 {
    width: 360px;
    height: 360px;
    right: -120px;
    bottom: -160px;
    background: rgba(24,197,203,.17);
}

/* Cursor-follow spotlight */
.yaidel-stock-cursor-glow {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(24,197,203,.20) 0%, rgba(24,197,203,0) 70%);
    transform: translate(-50%, -50%);
    left: 50%;
    top: 50%;
    opacity: 0;
    transition: opacity .25s ease;
}

.yaidel-stock-container {
    position: relative;
    z-index: 2;
    width: min(1220px, 100%);
    margin: 0 auto;
}

/* Header center aligned */
.yaidel-stock-header {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 30px;
}

.yaidel-stock-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 6px 11px;
    border: 1px solid rgba(24,197,203,.45);
    border-radius: 999px;
    background: rgba(24,197,203,.12);
    color: #9beef1;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.yaidel-stock-eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--yaidel-primary);
}

.yaidel-stock-title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(25px, 3.2vw, 36px);
    line-height: 1.08;
    letter-spacing: -.035em;
    font-weight: 600;
}
.yaidel-stock-title span {
    display: block;
    margin-top: 4px;
    color: var(--yaidel-primary);
}

.yaidel-stock-intro {
    margin: 13px auto 0;
    max-width: 680px;
    color: #c4cbd1;
    font-size: clamp(13px, 1vw, 15px);
    line-height: 1.65;
}

/* Layout */
.yaidel-stock-layout {
    display: grid;
    grid-template-columns: .95fr 1.05fr;
    gap: 14px;
}

.yaidel-stock-left,
.yaidel-stock-right {
    display: grid;
    gap: 14px;
}

/* Card styling with brand borders */
.yaidel-stock-summary-card,
.yaidel-stock-alert-card,
.yaidel-stock-table-card {
    position: relative;
    border: 1px solid rgba(24,197,203,.24);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,.03) 0%, rgba(255,255,255,.02) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
    padding: 18px;
}
.yaidel-stock-summary-card::before,
.yaidel-stock-alert-card::before,
.yaidel-stock-table-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(90deg, var(--yaidel-primary), rgba(24,197,203,.2));
}

.yaidel-stock-summary-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.yaidel-stock-summary-top h3,
.yaidel-stock-alert-head h3,
.yaidel-stock-table-head h3 {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -.015em;
}

.yaidel-stock-live-pill {
    min-height: 24px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(24,197,203,.38);
    color: #8ce8ec;
    background: rgba(24,197,203,.12);
    font-size: 10px;
    font-weight: 700;
}

.yaidel-stock-summary-card > p {
    margin: 9px 0 0;
    color: #b5c0c8;
    font-size: 12px;
    line-height: 1.55;
}

/* KPI */
.yaidel-stock-kpi-grid {
    margin-top: 13px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 9px;
}
.yaidel-stock-kpi {
    border: 1px solid rgba(24,197,203,.2);
    border-radius: 11px;
    background: rgba(255,255,255,.02);
    padding: 10px;
}
.yaidel-stock-kpi small {
    display: block;
    color: #aab6be;
    font-size: 10px;
}
.yaidel-stock-kpi strong {
    display: block;
    margin-top: 4px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -.02em;
}
.yaidel-stock-kpi span {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 600;
}
.is-up { color: #53d7b7; }
.is-warn { color: #f4c15d; }
.is-danger { color: #ff8a8a; }

/* Alert */
.yaidel-stock-alert-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.yaidel-stock-alert-head a {
    color: var(--yaidel-primary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}
.yaidel-stock-alert-head a:hover { text-decoration: underline; }

.yaidel-stock-alert-card ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}
.yaidel-stock-alert-card li {
    border: 1px solid rgba(24,197,203,.16);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    background: rgba(255,255,255,.02);
}
.yaidel-stock-alert-card strong {
    display: block;
    color: #f4f7fa;
    font-size: 13px;
}
.yaidel-stock-alert-card small {
    color: #a9b5be;
    font-size: 11px;
}

/* Table */
.yaidel-stock-table-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.yaidel-stock-table-head span {
    color: #9fb0bc;
    font-size: 11px;
}
.yaidel-stock-table-wrap {
    overflow-x: auto;
}
.yaidel-stock-table {
    width: 100%;
    min-width: 590px;
    border-collapse: collapse;
}
.yaidel-stock-table th {
    text-align: left;
    color: #9fb0bc;
    font-size: 11px;
    font-weight: 700;
    padding: 10px 8px;
    border-bottom: 1px solid rgba(24,197,203,.2);
}
.yaidel-stock-table td {
    color: #e8eef3;
    font-size: 13px;
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.yaidel-stock-table tbody tr:hover {
    background: rgba(24,197,203,.06);
}

/* Badges */
.yaidel-badge {
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
}
.yaidel-badge-ok {
    color: #5ef0c9;
    background: rgba(26,170,128,.2);
    border: 1px solid rgba(90,241,201,.25);
}
.yaidel-badge-warn {
    color: #ffd585;
    background: rgba(230,160,40,.18);
    border: 1px solid rgba(255,213,133,.24);
}
.yaidel-badge-danger {
    color: #ff9f9f;
    background: rgba(210,70,70,.20);
    border: 1px solid rgba(255,159,159,.22);
}

/* CTA */
.yaidel-stock-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}
.yaidel-stock-btn {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: .2s ease;
}
.yaidel-stock-btn-primary {
    color: #072325;
    background: var(--yaidel-primary);
    border: 1px solid var(--yaidel-primary);
}
.yaidel-stock-btn-primary:hover {
    transform: translateY(-1px);
    background: #25d4da;
}
.yaidel-stock-btn-secondary {
    color: #9deef1;
    border: 1px solid rgba(24,197,203,.4);
    background: rgba(24,197,203,.08);
}
.yaidel-stock-btn-secondary:hover {
    background: rgba(24,197,203,.18);
}

/* reveal animation */
.yaidel-stock-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .55s ease, transform .55s ease;
}
.yaidel-stock-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* hotspot pulse */
.yaidel-hotspot {
    position: relative;
}
.yaidel-hotspot::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--yaidel-primary);
    box-shadow: 0 0 0 0 rgba(24,197,203,.45);
    transform: translateY(-50%);
    animation: yaidelPulse 2s infinite;
}
@keyframes yaidelPulse {
    0%   { box-shadow: 0 0 0 0 rgba(24,197,203,.45); }
    70%  { box-shadow: 0 0 0 10px rgba(24,197,203,0); }
    100% { box-shadow: 0 0 0 0 rgba(24,197,203,0); }
}

/* Responsive */
@media (max-width: 1060px) {
    .yaidel-stock-layout {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 680px) {
    .yaidel-stock-section {
        padding: 68px 14px 64px;
    }

    .yaidel-stock-title {
        font-size: clamp(23px, 8vw, 31px);
    }

    .yaidel-stock-intro {
        font-size: 12px;
    }

    .yaidel-stock-summary-card,
    .yaidel-stock-alert-card,
    .yaidel-stock-table-card {
        padding: 14px;
    }

    .yaidel-stock-kpi-grid {
        grid-template-columns: 1fr;
    }

    .yaidel-stock-btn {
        width: 100%;
    }

    .yaidel-stock-cursor-glow {
        display: none; /* avoid clutter/perf hit on small devices */
    }
}

@media (prefers-reduced-motion: reduce) {
    .yaidel-stock-reveal,
    .yaidel-hotspot::after,
    .yaidel-stock-btn {
        transition: none !important;
        animation: none !important;
    }
}










/* ============================================================
   MOBILE OVERFLOW / VISIBILITY FIXES
   (Add at end so it overrides earlier rules)
============================================================ */

/* 1) Prevent accidental horizontal overflow */
.yaidel-stock-section,
.yaidel-stock-container,
.yaidel-stock-layout,
.yaidel-stock-left,
.yaidel-stock-right,
.yaidel-stock-summary-card,
.yaidel-stock-alert-card,
.yaidel-stock-table-card,
.yaidel-stock-actions {
    min-width: 0;
}

.yaidel-stock-section {
    overflow-x: hidden;
}

/* 2) Let text break safely on small screens */
.yaidel-stock-title,
.yaidel-stock-intro,
.yaidel-stock-summary-card p,
.yaidel-stock-alert-card small,
.yaidel-stock-table td,
.yaidel-stock-table th,
.yaidel-stock-btn {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* 3) Improve card internal spacing consistency */
.yaidel-stock-summary-card,
.yaidel-stock-alert-card,
.yaidel-stock-table-card {
    box-sizing: border-box;
}

/* 4) Action buttons always fully visible */
.yaidel-stock-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.yaidel-stock-btn {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    justify-content: center;
    padding: 12px 14px;
    min-height: 46px;
}

/* 5) Table behavior on mobile */
.yaidel-stock-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
}

/* Keep desktop table intact; allow horizontal scroll on mobile */
@media (max-width: 900px) {
    .yaidel-stock-table {
        min-width: 640px;
    }
}

/* 6) Mobile-specific layout/typography tightening */
@media (max-width: 680px) {
    .yaidel-stock-section {
        padding: 60px 12px 56px;
    }

    .yaidel-stock-container {
        width: 100%;
    }

    .yaidel-stock-header {
        margin-bottom: 20px;
        padding-inline: 2px;
    }

    .yaidel-stock-title {
        font-size: clamp(22px, 8vw, 30px);
        line-height: 1.12;
    }

    .yaidel-stock-intro {
        font-size: 12px;
        line-height: 1.55;
    }

    .yaidel-stock-summary-top h3,
    .yaidel-stock-alert-head h3,
    .yaidel-stock-table-head h3 {
        font-size: 14px;
    }

    .yaidel-stock-summary-card,
    .yaidel-stock-alert-card,
    .yaidel-stock-table-card {
        padding: 13px;
        border-radius: 13px;
    }

    .yaidel-stock-kpi-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .yaidel-stock-kpi strong {
        font-size: 16px;
    }

    .yaidel-stock-alert-card li {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .yaidel-hotspot::after {
        right: 8px;
    }

    /* hide cursor glow on touch devices */
    .yaidel-stock-cursor-glow {
        display: none !important;
    }
}

/* 7) Extra-small phones */
@media (max-width: 420px) {
    .yaidel-stock-section {
        padding-left: 10px;
        padding-right: 10px;
    }

    .yaidel-stock-eyebrow {
        font-size: 9px;
        padding: 5px 10px;
    }

    .yaidel-stock-kpi {
        padding: 9px;
    }

    .yaidel-stock-btn {
        font-size: 11px;
        min-height: 44px;
    }
}