@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

:root {
    /* Canvas & Cards */
    --bg-root: #f8fafc;
    /* Slate-50 clean backdrop */
    --bg-card: #ffffff;
    /* Pure white card surface */
    --bg-input: #f1f5f9;
    /* Slate-100 input fill */
    --bg-input-focus: #ffffff;
    --border-color: #e2e8f0;
    /* Slate-200 border */
    --border-hover: #cbd5e1;

    /* Typography */
    --text-main: #0f172a;
    /* Slate-900 high contrast */
    --text-muted: #475569;
    /* Slate-600 secondary text */
    --text-dim: #94a3b8;
    /* Slate-400 hint text */
    --font-family: 'Cairo', system-ui, -apple-system, sans-serif;

    /* Brand & Financial State Accents */
    --accent-btc: #f7931a;
    /* Bitcoin Gold */
    --accent-btc-hover: #d97706;
    --profit: #059669;
    /* High-contrast Emerald 600 */
    --profit-bg: #ecfdf5;
    /* Emerald 50 soft fill */
    --profit-border: #a7f3d0;
    --loss: #e11d48;
    /* High-contrast Rose 600 */
    --loss-bg: #fff1f2;
    /* Rose 50 soft fill */
    --loss-border: #fecdd3;

    /* Elevation */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-root);
    color: var(--text-main);
    direction: rtl;
    text-align: start;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 740px;
    margin-inline: auto;
    padding-inline: 1.25rem;
    padding-block: 2.5rem;
}

/* Number & Calculation Protection */
input[type="number"],
.mono-num {
    direction: ltr;
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
}

/* Ad Container Skeleton (Clean light-mode slot) */
.ad-slot {
    width: 100%;
    min-height: 90px;
    background-color: #f1f5f9;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-block: 1.5rem;
    position: relative;
}

.ad-slot::after {
    content: "إعلان";
    position: absolute;
    top: 4px;
    inset-inline-end: 8px;
    font-size: 0.7rem;
    color: var(--text-dim);
}