/* ============================================================
   Ajebhom design base: tokens, type, layout, buttons, inputs, cards, chips, LEDs, tables, section heads.
   Shared by every page of the site template; header.css and footer.css style the site chrome.
   Every class starts with ds-; sides are logical, so one file serves rtl (ar) and ltr (en).
   ============================================================ */

@font-face {
    font-family: Dubai;
    src: url('../fonts/dubai/DubaiW23-Light.woff2') format('woff2'), url('../fonts/dubai/DubaiW23-Light.woff') format('woff');
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: Dubai;
    src: url('../fonts/dubai/DubaiW23-Regular.woff2') format('woff2'), url('../fonts/dubai/DubaiW23-Regular.woff') format('woff');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: Dubai;
    src: url('../fonts/dubai/DubaiW23-Medium.woff2') format('woff2'), url('../fonts/dubai/DubaiW23-Medium.woff') format('woff');
    font-weight: 500 600;
    font-display: swap;
}

@font-face {
    font-family: Dubai;
    src: url('../fonts/dubai/DubaiW23-Bold.woff2') format('woff2'), url('../fonts/dubai/DubaiW23-Bold.woff') format('woff');
    font-weight: 700 900;
    font-display: swap;
}

/* ---------- tokens ---------- */
:root {
    --ds-red: #C91D13;
    --ds-red-dark: #A8150C;
    --ds-red-soft: #FCECEA;
    --ds-ink: #23262F;
    --ds-text: #434D5A;
    --ds-muted: #7D8590;
    --ds-line: #E9ECF0;
    --ds-line-soft: #F1F3F6;
    --ds-soft: #F6F7F9;
    --ds-bg: #FBFBFB;
    --ds-white: #FFFFFF;
    --ds-surface: #FFFFFF;
    --ds-surface-2: #FAFBFC;
    --ds-tint: #FFF6F5;
    --ds-tint-line: #F7DCD9;
    --ds-input-line: #DBDFE4;
    --ds-placeholder: #9AA1A9;
    --ds-grid: rgba(35, 38, 47, 0.035);
    --ds-glow: rgba(252, 236, 234, 0.95);
    --ds-skeleton: #D7DCE2;
    --ds-header-bg: rgba(255, 255, 255, 0.86);
    --ds-soft-hover: #F9DEDB;
    --ds-ok: #2C8C3A;
    --ds-ok-bright: #39B54A;
    --ds-ok-soft: #E8F6EA;
    --ds-warn: #E39400;
    --ds-warn-soft: #FFF4DF;
    --ds-blue: #0067B1;
    --ds-blue-soft: #EAF2FA;
    --ds-gpt: #10A37F;
    --ds-gem: #4C6EF5;

    --ds-r-sm: 10px;
    --ds-r-md: 16px;
    --ds-r-lg: 22px;
    --ds-r-xl: 28px;
    --ds-r-pill: 100px;

    --ds-shadow-sm: 0 1.5px 20.5px rgba(0, 0, 0, 0.05);
    --ds-shadow-md: 0 18px 40px rgba(35, 38, 47, 0.08);
    --ds-shadow-lg: 0 30px 70px rgba(35, 38, 47, 0.12);
    --ds-ring: 0 0 0 5px rgba(201, 29, 19, 0.09);

    --ds-font: Dubai, Tahoma, sans-serif;
    /* digits and Latin only: Arabic set in a monospace font falls apart into separate letters */
    --ds-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --ds-gutter: 24px;
    --ds-max: 1320px;
    color-scheme: light;
}

/* ---------- dark theme: the same tokens, night values (ds.js sets data-theme on <html>) ---------- */
:root[data-theme="dark"] {
    /* warm near-black instead of navy: red sits on it like on the brand's own black */
    --ds-red: #E8382D;
    --ds-red-dark: #C91D13;
    --ds-red-soft: rgba(232, 56, 45, 0.13);
    --ds-ink: #F5F1F1;
    --ds-text: #CEC6C7;
    --ds-muted: #8F8688;
    --ds-line: #332D31;
    --ds-line-soft: #262125;
    --ds-soft: #1E1A1D;
    --ds-bg: #0F0D0E;
    --ds-surface: #171416;
    --ds-surface-2: #131012;
    --ds-tint: #1F1517;
    --ds-tint-line: #3B2325;
    --ds-input-line: #3A3236;
    --ds-placeholder: #776E70;
    --ds-grid: rgba(255, 255, 255, 0.032);
    --ds-glow: rgba(232, 56, 45, 0.09);
    --ds-skeleton: #383034;
    --ds-header-bg: rgba(15, 13, 14, 0.84);
    --ds-soft-hover: rgba(232, 56, 45, 0.22);
    --ds-ok: #52C98E;
    --ds-ok-bright: #52C98E;
    --ds-ok-soft: rgba(82, 201, 142, 0.12);
    --ds-warn: #F2B04C;
    --ds-warn-soft: rgba(242, 176, 76, 0.13);
    --ds-blue: #8FA8FF;
    --ds-blue-soft: rgba(143, 168, 255, 0.12);
    --ds-shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 30px rgba(0, 0, 0, 0.4);
    --ds-shadow-md: 0 18px 40px rgba(0, 0, 0, 0.5);
    --ds-shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.6);
    --ds-ring: 0 0 0 5px rgba(232, 56, 45, 0.18);
    color-scheme: dark;
}

/* ---------- base ---------- */
.ds {
    margin: 0;
    font-family: var(--ds-font);
    font-size: 16px;
    line-height: 1.8;
    color: var(--ds-text);
    background: var(--ds-bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

    .ds *,
    .ds *::before,
    .ds *::after {
        box-sizing: border-box;
    }

    .ds h1, .ds h2, .ds h3, .ds h4 {
        font-family: var(--ds-font);
        color: var(--ds-ink);
        margin: 0;
    }

    .ds p {
        margin: 0;
    }

    .ds a {
        color: inherit;
        text-decoration: none;
    }

    .ds img {
        max-width: 100%;
    }

    .ds button,
    .ds input {
        font-family: inherit;
    }

    .ds :focus-visible {
        outline: 2px solid var(--ds-red);
        outline-offset: 2px;
    }

.ds-container {
    width: 100%;
    max-width: calc(var(--ds-max) + var(--ds-gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--ds-gutter);
}

.ds-mono {
    font-family: var(--ds-mono);
}

.ds-num {
    font-family: var(--ds-mono);
    font-variant-numeric: tabular-nums;
}

.ds .colored-text {
    color: var(--ds-red);
}

/* a title's highlighted words get a soft red marker across their lower half. It is a thick underline pulled up
   under the letters (painted behind them), so it follows the words in any font and on every wrapped line;
   a background gradient would be measured against the font's whole box and drift below Dubai's deep descent */
.ds-h1 .colored-text,
.ds-h2 .colored-text {
    text-decoration-line: underline;
    text-decoration-color: rgba(201, 29, 19, 0.16);
    text-decoration-thickness: 0.4em;
    text-underline-offset: -0.78em;
    text-decoration-skip-ink: none;
}

:root[data-theme="dark"] .ds-h1 .colored-text,
:root[data-theme="dark"] .ds-h2 .colored-text {
    text-decoration-color: rgba(232, 56, 45, 0.24);
}

/* the faint dashboard grid used behind heroes */
.ds-grid-bg {
    background-image:
        linear-gradient(var(--ds-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--ds-grid) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ---------- sections and their heads ---------- */
.ds-section {
    padding: 96px 0;
}

.ds-section-soft {
    background: var(--ds-surface);
    border-block: 1px solid var(--ds-line-soft);
}

.ds-head {
    max-width: 820px;
    margin: 0 auto 48px;
    text-align: center;
}

.ds-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 8px;
    background: var(--ds-red);
    color: #FFF;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(201, 29, 19, 0.18);
}

    .ds-eyebrow .ds-mono {
        font-size: 12px;
        padding-inline-end: 8px;
        border-inline-end: 1px solid rgba(255, 255, 255, 0.4);
    }

    .ds-eyebrow .ds-live {
        background: #FFF;
        animation-name: ds-live-white;
    }

@keyframes ds-live-white {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6); }
    70% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.ds-h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.5;
}

.ds-h2 {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.55;
    margin-top: 14px !important;
}

.ds-h3 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.6;
}

.ds-lead {
    font-size: 17px;
    line-height: 2;
    color: var(--ds-text);
    margin-top: 14px !important;
}

.ds-small {
    font-size: 13px;
    line-height: 1.9;
    color: var(--ds-muted);
}

/* ---------- buttons ---------- */
.ds-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    border-radius: var(--ds-r-pill);
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

    .ds-btn:active {
        transform: translateY(1px);
    }

.ds-btn-primary {
    background: var(--ds-red);
    color: #FFF !important;
    box-shadow: 0 10px 22px rgba(201, 29, 19, 0.2);
}

    .ds-btn-primary:hover {
        background: var(--ds-red-dark);
    }

.ds-btn-ghost {
    background: transparent;
    color: var(--ds-ink) !important;
    border-color: var(--ds-line);
}

    .ds-btn-ghost:hover {
        border-color: var(--ds-ink);
    }

.ds-btn-soft {
    background: var(--ds-red-soft);
    color: var(--ds-red) !important;
}

    .ds-btn-soft:hover {
        background: var(--ds-soft-hover);
    }

.ds-btn-white {
    background: #FFF;
    color: var(--ds-red) !important;
}

.ds-btn-sm {
    height: 38px;
    padding: 0 16px;
    font-size: 14px;
}

.ds-btn-lg {
    height: 54px;
    padding: 0 32px;
    font-size: 16px;
}

/* ---------- inputs ---------- */
.ds-input {
    width: 100%;
    height: 48px;
    padding: 0 18px;
    border-radius: var(--ds-r-pill);
    border: 1px solid var(--ds-input-line);
    background: var(--ds-soft);
    color: var(--ds-ink);
    font-size: 15px;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

    .ds-input::placeholder {
        color: var(--ds-placeholder);
    }

    .ds-input:focus {
        outline: none;
        border-color: var(--ds-red);
        background: var(--ds-surface);
        box-shadow: var(--ds-ring);
    }

/* ---------- cards ---------- */
.ds-card {
    background: var(--ds-surface);
    border: 1px solid var(--ds-line-soft);
    border-radius: var(--ds-r-lg);
    box-shadow: var(--ds-shadow-sm);
}

.ds-card-pad {
    padding: 24px;
}

.ds-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--ds-line-soft);
}

.ds-icon-tile {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E8574F, var(--ds-red));
    color: #FFF;
    font-size: 17px;
    box-shadow: 0 8px 18px rgba(201, 29, 19, 0.2);
}

/* ---------- chips, badges, LEDs, live dot ---------- */
.ds-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.8;
    background: var(--ds-line-soft);
    color: var(--ds-text);
}

.ds-chip-ok { background: var(--ds-ok-soft); color: var(--ds-ok); }
.ds-chip-warn { background: var(--ds-warn-soft); color: var(--ds-warn); }
.ds-chip-no { background: var(--ds-red-soft); color: var(--ds-red); }
.ds-chip-blue { background: var(--ds-blue-soft); color: var(--ds-blue); }

.ds-badge-new {
    display: inline-block;
    padding: 0 7px;
    border-radius: 6px;
    background: var(--ds-red);
    color: #FFF;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.8;
    vertical-align: 2px;
}

.ds-led {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #C9CED5;
    flex: none;
}

.ds-led-ok { background: var(--ds-ok-bright); box-shadow: 0 0 0 4px rgba(57, 181, 74, 0.15); }
.ds-led-warn { background: #FAA61B; box-shadow: 0 0 0 4px rgba(250, 166, 27, 0.16); }
.ds-led-no { background: var(--ds-red); box-shadow: 0 0 0 4px rgba(201, 29, 19, 0.12); }

.ds-live {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ds-red);
    animation: ds-live 1.4s ease-out infinite;
}

@keyframes ds-live {
    0% { box-shadow: 0 0 0 0 rgba(201, 29, 19, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(201, 29, 19, 0); }
    100% { box-shadow: 0 0 0 0 rgba(201, 29, 19, 0); }
}

/* ---------- segmented control ---------- */
.ds-seg {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 4px;
    border-radius: 14px;
    background: var(--ds-soft);
    border: 1px solid var(--ds-line);
}

    .ds-seg button,
    .ds-seg a {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        border: none;
        background: none;
        border-radius: 10px;
        padding: 7px 14px;
        font-size: 14px;
        font-weight: 500;
        color: var(--ds-muted);
        cursor: pointer;
        transition: background .2s ease, color .2s ease, box-shadow .2s ease;
    }

        .ds-seg button:hover,
        .ds-seg a:hover {
            color: var(--ds-ink);
        }

        .ds-seg button.is-on,
        .ds-seg a.is-on {
            background: var(--ds-red);
            color: #FFF;
            font-weight: 700;
            box-shadow: 0 6px 14px rgba(201, 29, 19, 0.22);
        }

/* phones: the tabs share the full width equally and never scroll or get cut; a tab with an icon puts it over
   its label, so four platforms fit side by side */
@media (max-width: 575px) {
    .ds-seg {
        display: flex;
        width: 100%;
        flex-wrap: nowrap;
        overflow: visible;
    }

        .ds-seg > button,
        .ds-seg > a,
        .ds-seg > li,
        .ds-seg > label {
            flex: 1 1 0;
            min-width: 0;
        }

        .ds-seg button,
        .ds-seg a {
            justify-content: center;
            width: 100%;
            padding: 7px 6px;
            font-size: 13px;
            white-space: nowrap;
        }

            .ds-seg button:has(img),
            .ds-seg a:has(img) {
                flex-direction: column;
                gap: 3px;
                height: auto !important;
                padding: 7px 4px;
                font-size: 12.5px;
                line-height: 1.3;
            }
}

/* ---------- KPI ---------- */
.ds-kpi {
    padding: 18px 20px;
}

    .ds-kpi span:not(.ds-icon-tile) {
        display: block;
        font-size: 13px;
        color: var(--ds-muted);
    }

    .ds-kpi b {
        display: block;
        font-family: var(--ds-mono);
        font-size: 30px;
        line-height: 1.3;
        color: var(--ds-ink);
        font-variant-numeric: tabular-nums;
    }

/* ---------- data table ---------- */
.ds-table {
    width: 100%;
}

.ds-tr {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--ds-line-soft);
    font-size: 14px;
}

    .ds-tr:last-child {
        border-bottom: none;
    }

.ds-th {
    font-size: 12px;
    font-weight: 700;
    color: var(--ds-red);
    background: var(--ds-tint);
}

.ds-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .ds-bar i {
        position: relative;
        flex: 1;
        height: 8px;
        border-radius: 8px;
        background: var(--ds-line-soft);
        overflow: hidden;
    }

        .ds-bar i::after {
            content: "";
            position: absolute;
            inset-block: 0;
            inset-inline-start: 0;
            width: calc(var(--v, 0) * 1%);
            border-radius: 8px;
            background: linear-gradient(90deg, #E8574F, var(--ds-red));
        }

html[dir="rtl"] .ds-bar i::after {
    background: linear-gradient(270deg, #E8574F, var(--ds-red));
}

.ds-bar b {
    min-width: 54px;
    font-family: var(--ds-mono);
    font-size: 13px;
    color: var(--ds-ink);
    text-align: end;
}

/* ---------- reveal on scroll (ds.js adds .is-in) ---------- */
.ds-js [data-ds-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1);
}

    .ds-js [data-ds-reveal].is-in {
        opacity: 1;
        transform: none;
    }

/* ---------- day / night switch ---------- */
/* elements with two versions (logos, the switch's icon): .ds-day shows in light, .ds-night in dark */
.ds-night {
    display: none !important;
}

:root[data-theme="dark"] .ds-day {
    display: none !important;
}

:root[data-theme="dark"] .ds-night {
    display: inline-block !important;
}

.ds-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--ds-line);
    border-radius: 10px;
    background: var(--ds-surface);
    color: var(--ds-ink);
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}

    .ds-icon-btn:hover {
        border-color: var(--ds-red);
        color: var(--ds-red);
    }

/* while the theme switches, every colour fades instead of jumping */
.ds-theme-fade,
.ds-theme-fade *,
.ds-theme-fade *::before,
.ds-theme-fade *::after {
    transition: background-color .35s ease, border-color .35s ease, color .35s ease, fill .35s ease, box-shadow .35s ease !important;
}

/* ---------- responsive ---------- */
@media (max-width: 991px) {
    .ds-section {
        padding: 60px 0;
    }

    .ds-h1 {
        font-size: 32px;
        line-height: 1.65;
    }

    .ds-h2 {
        font-size: 26px;
        line-height: 1.75;
    }

    .ds-head {
        margin-bottom: 32px;
    }
}

@media (max-width: 575px) {
    :root {
        --ds-gutter: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ds-live {
        animation: none;
    }

    .ds-js [data-ds-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ============================================================
   LANGUAGE SWITCH (Site/_LangSwitch: the site header, the sign-in pages, the panel's top bar): one button, a globe
   and the other language's name; on phones the globe alone
   ============================================================ */
.ds-langsw {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
    border: 1px solid var(--ds-line);
    border-radius: 10px;
    background: var(--ds-surface);
    color: var(--ds-ink) !important;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    flex: none;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}

    .ds-langsw i {
        color: var(--ds-muted);
        font-size: 14px;
        transition: color .2s ease, transform .4s ease;
    }

    .ds-langsw:hover,
    .ds-langsw:focus-visible {
        border-color: var(--ds-red);
        background: var(--ds-red-soft);
        color: var(--ds-red) !important;
    }

        .ds-langsw:hover i,
        .ds-langsw:focus-visible i {
            color: var(--ds-red);
            transform: rotate(-20deg);
        }

@media (max-width: 575px) {
    .ds-langsw {
        width: 38px;
        padding: 0;
        justify-content: center;
    }

        .ds-langsw span {
            display: none;
        }
}

@media (prefers-reduced-motion: reduce) {
    .ds-langsw i {
        transition: none;
    }
}
