@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@300;400;500;600;700;800;900&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

/* ============================================================
   كسبان (Kasban) Design System - Bespoke AdTech & FinTech Aesthetic
   Handcrafted, Human-Centered, Zero-AI Generic Cliches
   ============================================================ */

:root {
    --font-heading: 'Alexandria', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Palette: Premium Emerald, Noble Slate, Warm Amber */
    --emerald-950: #021f1d;
    --emerald-900: #064e3b;
    --emerald-800: #065f46;
    --emerald-700: #047857;
    --emerald-600: #059669;
    --emerald-500: #10b981;
    --emerald-100: #d1fae5;
    --emerald-50:  #ecfdf5;

    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-100: #fef3c7;
    --amber-50:  #fffbeb;

    --slate-950: #090d16;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50:  #f8fafc;
    --white:     #ffffff;

    --border-light: #e2e8f0;
    --border-dark:  #1e293b;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-subtle: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-card: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-elevated: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
}

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

html {
    direction: rtl;
    text-align: right;
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--slate-50);
    color: var(--slate-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--slate-900);
    line-height: 1.3;
    font-weight: 700;
}

a {
    color: var(--emerald-700);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover {
    color: var(--emerald-600);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================================
   Top Bar & Role Switcher
   ============================================================ */
.role-switcher-bar {
    background: var(--slate-900);
    color: var(--slate-300);
    font-size: 0.8125rem;
    padding: 0.45rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.role-switcher-bar .switcher-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.role-switcher-bar .badge-driver {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    padding: 0.15rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.725rem;
    font-weight: 600;
}
.role-tabs {
    display: flex;
    gap: 0.35rem;
}
.role-tab-btn {
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-sm);
    color: var(--slate-300);
    font-size: 0.775rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}
.role-tab-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}
.role-tab-btn.active {
    background: var(--emerald-600);
    color: #fff;
    font-weight: 600;
}

/* ============================================================
   Main Navigation
   ============================================================ */
.main-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-subtle);
}
.nav-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}
.brand-logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--emerald-600) 0%, var(--emerald-900) 100%);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.35);
}
.brand-name {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--slate-900);
    letter-spacing: -0.02em;
}
.brand-tag {
    font-size: 0.675rem;
    background: var(--amber-100);
    color: var(--amber-600);
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    font-weight: 700;
    margin-right: 0.25rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}
.nav-item {
    font-weight: 500;
    color: var(--slate-600);
    font-size: 0.925rem;
    padding: 0.4rem 0;
    position: relative;
}
.nav-item:hover, .nav-item.active {
    color: var(--emerald-700);
}
.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -0.85rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--emerald-600);
    border-radius: 2px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.wallet-pill {
    background: var(--slate-100);
    border: 1px solid var(--border-light);
    border-radius: 9999px;
    padding: 0.3rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--slate-800);
}
.wallet-pill .amount {
    color: var(--emerald-700);
    font-family: var(--font-heading);
    font-weight: 700;
}

/* ============================================================
   Buttons & Badges
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    line-height: 1;
}
.btn-primary {
    background: var(--emerald-600);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
}
.btn-primary:hover {
    background: var(--emerald-700);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}
.btn-secondary {
    background: var(--white);
    color: var(--slate-700);
    border-color: var(--border-light);
}
.btn-secondary:hover {
    background: var(--slate-50);
    color: var(--slate-900);
    border-color: var(--slate-300);
}
.btn-dark {
    background: var(--slate-900);
    color: #ffffff;
}
.btn-dark:hover {
    background: var(--slate-800);
    color: #ffffff;
}
.btn-amber {
    background: var(--amber-500);
    color: #ffffff;
}
.btn-amber:hover {
    background: var(--amber-600);
    color: #ffffff;
}
.btn-sm {
    font-size: 0.8125rem;
    padding: 0.4rem 0.75rem;
    border-radius: 5px;
}
.btn-lg {
    font-size: 1.05rem;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-md);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    line-height: 1.2;
}
.badge-success {
    background: var(--emerald-100);
    color: var(--emerald-800);
}
.badge-warning {
    background: var(--amber-100);
    color: var(--amber-600);
}
.badge-neutral {
    background: var(--slate-200);
    color: var(--slate-700);
}
.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* ============================================================
   Layout & Grid
   ============================================================ */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 1.75rem 1.5rem;
    width: 100%;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.page-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--slate-900);
    margin-bottom: 0.25rem;
}
.page-subtitle {
    font-size: 0.95rem;
    color: var(--slate-500);
}

/* ============================================================
   Metric / Stat Cards
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    position: relative;
    box-shadow: var(--shadow-subtle);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}
.stat-card-label {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--slate-500);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.stat-card-value {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--slate-900);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    margin-bottom: 0.4rem;
}
.stat-card-change {
    font-size: 0.775rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.stat-card-change.positive {
    color: var(--emerald-600);
}
.stat-card-change.neutral {
    color: var(--slate-500);
}

/* ============================================================
   Bespoke Cards & Panels
   ============================================================ */
.card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-subtle);
    margin-bottom: 1.75rem;
    overflow: hidden;
}
.card-header {
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
}
.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--slate-900);
}
.card-body {
    padding: 1.5rem;
}
.card-footer {
    padding: 0.85rem 1.5rem;
    border-top: 1px solid var(--border-light);
    background: var(--slate-50);
}

/* ============================================================
   Tables
   ============================================================ */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}
.custom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.885rem;
    text-align: right;
}
.custom-table th {
    background: var(--slate-50);
    color: var(--slate-600);
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.custom-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--slate-700);
    vertical-align: middle;
}
.custom-table tr:hover td {
    background: #fafcff;
}
.custom-table .cell-title {
    font-weight: 600;
    color: var(--slate-900);
}

/* ============================================================
   Forms & Controls
   ============================================================ */
.form-group {
    margin-bottom: 1.25rem;
}
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 0.4rem;
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--slate-800);
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    outline: none;
    transition: all 0.2s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--emerald-600);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}
.form-hint {
    font-size: 0.775rem;
    color: var(--slate-400);
    margin-top: 0.35rem;
}

/* ============================================================
   Landing Page Styles
   ============================================================ */
.hero-section {
    background: linear-gradient(180deg, #ffffff 0%, var(--slate-50) 100%);
    border-bottom: 1px solid var(--border-light);
    padding: 4.5rem 1.5rem 3.5rem;
    position: relative;
    overflow: hidden;
}
.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--slate-200) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.4;
    pointer-events: none;
}
.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--emerald-50);
    border: 1px solid var(--emerald-100);
    color: var(--emerald-800);
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.hero-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--slate-950);
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 1.25rem;
}
.hero-title .highlight {
    color: var(--emerald-600);
    position: relative;
    display: inline-block;
}
.hero-desc {
    font-size: 1.2rem;
    color: var(--slate-600);
    line-height: 1.7;
    margin-bottom: 2.25rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

/* ============================================================
   Interactive Ad Widget Preview (Real Native Grid)
   ============================================================ */
.kasban-widget-box {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-elevated);
}
.kasban-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--slate-100);
    padding-bottom: 0.65rem;
}
.kasban-widget-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--slate-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.kasban-widget-brand-tag {
    font-size: 0.725rem;
    color: var(--slate-400);
    text-decoration: none;
    font-weight: 500;
}
.kasban-native-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.15rem;
}
@media (max-width: 900px) {
    .kasban-native-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-title { font-size: 2.2rem; }
}
@media (max-width: 600px) {
    .kasban-native-grid { grid-template-columns: 1fr; }
}

.kasban-native-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: inherit;
    position: relative;
}
.kasban-native-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 18px -4px rgba(0, 0, 0, 0.08);
    border-color: var(--slate-300);
}
.kasban-native-card .card-thumb-wrapper {
    position: relative;
    width: 100%;
    padding-top: 62%;
    background: var(--slate-100);
    overflow: hidden;
}
.kasban-native-card .card-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.kasban-native-card:hover .card-thumb {
    transform: scale(1.04);
}
.kasban-native-card .card-content {
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}
.kasban-native-card .card-ad-title {
    font-family: var(--font-heading);
    font-size: 0.865rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
}
.kasban-native-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.725rem;
    color: var(--slate-500);
    border-top: 1px dashed var(--slate-200);
    padding-top: 0.4rem;
}
.kasban-native-card .brand-sponsor {
    font-weight: 600;
    color: var(--emerald-700);
}

/* ============================================================
   Code Embed Box
   ============================================================ */
.code-box {
    background: var(--slate-900);
    color: #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 1.15rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    direction: ltr;
    text-align: left;
    overflow-x: auto;
    position: relative;
    border: 1px solid var(--slate-800);
}
.code-copy-btn {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.3rem 0.65rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}
.code-copy-btn:hover {
    background: var(--emerald-600);
}

/* ============================================================
   Footer
   ============================================================ */
.main-footer {
    background: var(--slate-900);
    color: var(--slate-400);
    padding: 3rem 1.5rem 1.5rem;
    margin-top: auto;
    border-top: 1px solid var(--slate-800);
    font-size: 0.875rem;
}
.footer-container {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
}
@media (max-width: 800px) {
    .footer-container { grid-template-columns: 1fr; gap: 1.75rem; }
}
.footer-bottom {
    max-width: 1320px;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.775rem;
}
