/* ============================================================
   theme.css - ط§ظ„ط«ظٹظ… ط§ظ„ظ…ظˆط­ظ‘ط¯ ظ„ظ€ Sendly
   ظٹطھط¶ظ…ظ†: app-theme (ط§ظ„ظ„ظˆط­ط§طھ) + app-pages + auth-flat + register-premium
   ط§ظ„طھط±طھظٹط¨ ظٹط­ظپط¸ ط§ظ„طھط³ظ„ط³ظ„ ط§ظ„ط£طµظ„ظٹ ظ„ظ„طھظˆط§ط±ط« ط¨ظٹظ† ط§ظ„طµظپط­ط§طھ.
   v1.0 (2026)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

/* ===== included: public\css\app-theme.css ===== */
:root {
    --font-sans: "Inter", "IBM Plex Sans Arabic", "Cairo", system-ui, "Segoe UI", sans-serif;
    --font-arabic: "IBM Plex Sans Arabic", "Cairo", "Tajawal", "Segoe UI", sans-serif;

    --ink: #0f172a;
    --ink-muted: #64748b;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-solid: #ffffff;
    --surface-elevated: #f8fafc;
    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.14);

    --accent: #059669;
    --accent-hover: #10b981;
    --accent-soft: rgba(5, 150, 105, 0.12);
    --accent-ring: rgba(5, 150, 105, 0.35);

    --sidebar-from: #0b1220;
    --sidebar-to: #0f172a;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.12);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.12);
    --ok: #10b981;
    --ok-soft: rgba(16, 185, 129, 0.12);
    --info: #0ea5e9;
    --info-soft: rgba(14, 165, 233, 0.12);

    --topbar-h: 64px;
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 35px -10px rgba(15, 23, 42, 0.12);

    --focus: 0 0 0 3px var(--accent-ring);

    --space-1: 0.375rem;
    --space-2: 0.75rem;
    --space-3: 1.25rem;
    --space-4: 2rem;

    --fs-sm: 0.82rem;
    --fs-md: 0.92rem;
    --fs-lg: 1.05rem;
    --fs-xl: 1.4rem;

    --text-primary: var(--ink);
    --text-secondary: var(--ink-muted);

    --primary-color: var(--accent);
    --primary-dark: var(--accent-hover);

    --rp-bg: #f1f5f9;
    --rp-ink: #0f172a;
    --rp-muted: #64748b;
    --rp-surface: #ffffff;
    --rp-border: rgba(15, 23, 42, 0.08);
    --rp-accent: var(--accent);
}

/* ===== Wagate Dark Mode ===== */
[data-theme="dark"] {
    --ink: #f1f5f9;
    --ink-muted: #94a3b8;
    --surface: rgba(15, 23, 42, 0.85);
    --surface-solid: #0f172a;
    --surface-elevated: #1e293b;
    --border: rgba(241, 245, 249, 0.1);
    --border-strong: rgba(241, 245, 249, 0.18);

    --accent: #10b981;
    --accent-hover: #34d399;
    --accent-soft: rgba(16, 185, 129, 0.18);
    --accent-ring: rgba(16, 185, 129, 0.45);

    --sidebar-from: #070d1a;
    --sidebar-to: #0b1220;
    --danger-soft: rgba(239, 68, 68, 0.2);
    --warning-soft: rgba(245, 158, 11, 0.2);
    --ok-soft: rgba(16, 185, 129, 0.2);
    --info-soft: rgba(14, 165, 233, 0.2);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.7);

    --rp-bg: #0b1120;
    --rp-ink: #f1f5f9;
    --rp-muted: #94a3b8;
    --rp-surface: #131d31;
    --rp-border: rgba(241, 245, 249, 0.12);
    color-scheme: dark;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    direction: inherit;
    text-align: start;
    font-family: var(--font-sans);
    font-weight: 500;
    color: var(--ink);
    background: var(--rp-bg);
    min-height: 100vh;
    line-height: 1.6;
}

[data-theme="dark"] body {
    background: var(--rp-bg);
}

.ltr {
    direction: ltr;
    text-align: left;
}

/* â€”â€”â€” ط´ط±ظٹط· ط¹ظ„ظˆظٹ ظ…ظˆط­ظ‘ط¯ â€”â€”â€” */

/* ط±ط£ط³ ط§ظ„ظ…ظˆظ‚ط¹: ط´ط±ظٹط· ط§ظ„ط¹ظ†ظˆط§ظ† + ط´ط±ظٹط· ط§ظ„ط±ظˆط§ط¨ط· (ظٹظ„طھطµظ‚ط§ظ† ظ…ط¹ط§ظ‹) */
.app-site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--sidebar-from);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.12);
}

.app-site-header .navbar {
    position: relative;
    z-index: 1;
}

.navbar {
    position: relative;
    min-height: var(--topbar-h);
    padding: var(--space-2) clamp(14px, 3vw, 32px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    color: #f8fafc;
    background: var(--sidebar-from);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

/* هوية Wagate */
.wagate-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.wagate-logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    flex-shrink: 0;
    display: block;
}

.wagate-wordmark {
    font-family: "Inter", var(--font-arabic);
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    line-height: 1;
}

.navbar > div:first-child {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
    flex: 1 1 auto;
}

.navbar .nav-actions,
.navbar .user-info {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 0 1 auto;
    min-width: 0;
}

.language-toggle,
.theme-toggle,
.logout-btn,
.back-btn,
.navbar .logout-btn {
    font-family: var(--font-sans);
    font-weight: 600;
    padding: var(--space-1) var(--space-3);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
}

.theme-toggle {
    padding: var(--space-1) var(--space-2);
    font-size: 1.05rem;
    line-height: 1;
}

.language-toggle:hover,
.theme-toggle:hover,
.logout-btn:hover,
.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.navbar .username {
    opacity: 0.95;
    font-size: 0.92rem;
}

.admin-badge {
    background: #f59e0b;
    color: #422006;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

/* ط´ط±ظٹط· ط§ظ„ط±ظˆط§ط¨ط· ط§ظ„ط¹ظ„ظˆظٹ (ط¨ط¯ظٹظ„ ط§ظ„ظ‚ط§ط¦ظ…ط© ط§ظ„ط¬ط§ظ†ط¨ظٹط©) */
.app-subnav {
    background: var(--sidebar-to);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-subnav-scroll {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px clamp(12px, 3vw, 28px);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.app-subnav-scroll::-webkit-scrollbar {
    height: 6px;
}

.app-subnav-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
}

.app-subnav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    color: #94a3b8;
    text-decoration: none;
    border: 1px solid transparent;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease;
    white-space: nowrap;
}

.app-subnav-link:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #e2e8f0;
}

.app-subnav-link.active {
    background: var(--accent-soft);
    color: #ccfbf1;
    border-color: rgba(45, 212, 191, 0.35);
}

.app-subnav-icon {
    flex-shrink: 0;
    font-size: 1.05rem;
    line-height: 1;
}

.app-subnav-label {
    line-height: 1.25;
}

/* ===== الشريط الجانبي الزجاجي (Wagate) ===== */
:root {
    --sidebar-w: 250px;
}

.app-mobile-bar {
    display: none;
}

.sidebar-toggle {
    display: none;
}

.app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    width: var(--sidebar-w);
    z-index: 70;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(8, 51, 41, 0.97), rgba(4, 28, 23, 0.985));
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-inline-end: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 10px 0 34px rgba(2, 20, 16, 0.28);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.app-sidebar-head {
    padding: 22px 20px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.app-sidebar-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 12px 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.app-sidebar-group-label {
    display: block;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(204, 251, 241, 0.5);
    padding: 16px 12px 7px;
}

.app-sidebar-nav .app-subnav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 12px;
    border-radius: 12px;
    color: rgba(226, 232, 240, 0.78);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid transparent;
    margin-bottom: 3px;
    white-space: nowrap;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.app-sidebar-nav .app-subnav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.app-sidebar-nav .app-subnav-link.active {
    background: linear-gradient(135deg, rgba(20, 184, 146, 0.4), rgba(20, 184, 146, 0.12));
    color: #ccfbf1;
    border-color: rgba(45, 212, 191, 0.4);
    box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.12), 0 6px 18px rgba(20, 184, 146, 0.22);
}

.app-sidebar-nav .app-subnav-icon {
    font-size: 1.02rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.app-sidebar-nav .app-subnav-label {
    flex: 1 1 auto;
    line-height: 1.3;
}

.app-sidebar-foot {
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    padding: 14px 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #14b892, #0b7a5e);
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(20, 184, 146, 0.35);
}

.sidebar-user-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.sidebar-user .username {
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .admin-badge {
    align-self: flex-start;
}

.sidebar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.app-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 65;
    background: rgba(2, 10, 8, 0.5);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

@media (min-width: 901px) {
    body.app-sidebar-mounted .container {
        margin-inline-start: var(--sidebar-w);
    }
    body.app-sidebar-mounted .page-profile .container {
        margin-inline-start: var(--sidebar-w);
        margin-inline-end: auto;
    }
    body.app-sidebar-mounted .page-packages .container,
    body.app-sidebar-mounted .page-subscriptions .container {
        margin-inline-start: var(--sidebar-w);
        margin-inline-end: auto;
    }
}

@media (max-width: 900px) {
    .app-mobile-bar {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 16px;
        position: sticky;
        top: 0;
        z-index: 60;
        background: var(--sidebar-from);
        color: #fff;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.22);
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
        cursor: pointer;
        font-size: 1.05rem;
        transition: background 0.2s ease;
    }
    .sidebar-toggle:hover {
        background: rgba(255, 255, 255, 0.2);
    }
    .app-mobile-bar .wagate-logo-mark {
        width: 32px;
        height: 32px;
    }
    .app-sidebar {
        transform: translateX(100%);
    }
    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }
}

/* ط§ظ„ظ…ط­طھظˆظ‰ */

.container {
    width: min(1400px, 100%);
    margin: 0 auto;
    padding: var(--space-4) clamp(14px, 3vw, 28px);
}

.page-profile .container {
    max-width: 620px;
    margin-inline: auto;
}

.page-packages .container,
.page-subscriptions .container {
    max-width: 1200px;
}

.header-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(20px, 4vw, 36px);
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-md);
}

.header-section h2 {
    margin: 0 0 var(--space-3);
    font-size: clamp(1.35rem, 2.8vw, 1.85rem);
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.03em;
}

.create-session-panel .create-session-heading {
    margin-bottom: var(--space-2);
}

.create-session-panel .muted,
.create-session-lead {
    color: var(--ink-muted);
    font-size: 0.94rem;
    margin: 0 0 var(--space-3);
    line-height: 1.55;
}

.create-session-fields {
    display: grid;
    gap: var(--space-3);
    align-items: end;
}

@media (min-width: 640px) {
    .create-session-fields {
        grid-template-columns: 1fr minmax(140px, 200px);
    }
}

.form-group.create-session-field {
    margin: 0;
}

.create-session-field label {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: var(--space-2);
    color: var(--ink);
}

.input-lg {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    font-size: 1rem;
    font-family: inherit;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: #fff;
    color: var(--ink);
}

.input-lg:focus {
    outline: none;
    box-shadow: var(--focus);
    border-color: var(--accent);
}

.create-session-actions {
    display: flex;
}

.create-session-actions .btn-create-session {
    width: 100%;
    white-space: nowrap;
}

.renew-banner {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-3);
    margin-bottom: var(--space-3);
    font-size: 0.93rem;
    color: var(--ink-muted);
    line-height: 1.55;
}

.renew-banner a {
    color: var(--accent-hover);
    font-weight: 700;
}

.card,
.stat-card,
.content-card,
.limit-card,
.user-card,
.session-card {
    background: var(--surface-solid);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.card {
    padding: var(--space-4);
}

.card h2 {
    margin: 0 0 var(--space-3);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ink);
    border-bottom: 2px solid var(--accent-soft);
    padding-bottom: var(--space-2);
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-3);
    margin-top: var(--space-3);
}

/* ط¥ط­طµط§ط¦ظٹط§طھ ط¹ظ„ظ‰ ط§ظ„ط¯ط§ط´ط¨ظˆط±ط¯ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.stat-card {
    padding: var(--space-4);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
    opacity: 0.65;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: clamp(2rem, 4vw, 2.85rem);
    font-weight: 800;
    color: var(--accent-hover);
    margin-bottom: 6px;
    line-height: 1;
}

.stat-label {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-muted);
}

/* ط¬ظ„ط³ط§طھ */

.sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.session-card {
    padding: clamp(18px, 3vw, 26px);
    display: flex;
    flex-direction: column;
    min-height: 200px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.session-card:hover {
    border-color: rgba(13, 148, 136, 0.28);
}

.session-card.status-connected {
    border-color: rgba(22, 163, 74, 0.4);
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.session-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ink);
}

.session-status {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 6px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.status-disconnected {
    background: var(--danger-soft);
    color: #991b1b;
}

.status-waiting_for_qr {
    background: var(--warning-soft);
    color: #92400e;
}

.status-authenticated {
    background: #dbeafe;
    color: #1e40af;
}

.status-connected {
    background: rgba(34, 197, 94, 0.15);
    color: #166534;
}

.status-auth_failure {
    background: var(--danger-soft);
    color: #991b1b;
}

.status-loading {
    background: #f1f5f9;
    color: var(--ink-muted);
}

.session-meta {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-top: var(--space-2);
}

.session-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--accent-soft);
    border-radius: 999px;
    font-size: 0.82rem;
    color: var(--accent-hover);
    font-weight: 600;
}

.session-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: var(--space-3);
    border-top: 1px solid var(--border);
}

.session-actions .btn {
    flex: 1;
    min-width: 104px;
    font-size: 0.82rem;
    padding: 10px 14px;
}

@media (max-width: 767px) {
    .session-actions {
        flex-direction: column;
    }

    .session-actions .btn {
        max-width: none;
        width: 100%;
    }
}

/* ط£ط²ط±ط§ط± */

.btn {
    position: relative;
    font-family: var(--font-sans);
    font-weight: 700;
    cursor: pointer;
    border-radius: 12px;
    border: none;
    padding: 12px 20px;
    font-size: 0.93rem;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: 1px solid transparent;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: #475569;
    color: #fff;
}

.btn-secondary:hover {
    background: #334155;
}

.btn-success {
    background: var(--ok);
    color: #fff;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-info {
    background: var(--info);
    color: #fff;
}

.btn-info:hover {
    background: #0369a1;
}

.btn-warning {
    background: var(--warning);
    color: #422006;
}

.btn-warning:hover {
    background: #b45309;
}

.btn-refresh {
    background: #0891b2;
    color: #fff;
}

.btn-delete {
    background: var(--danger);
    color: #fff;
}

.btn-delete:hover {
    background: #b91c1c;
}

.btn-qr {
    background: linear-gradient(120deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
}

.btn-open {
    background: linear-gradient(120deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #fff;
}

.btn-small {
    padding: 10px 16px;
    font-size: 0.82rem;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ط£ط²ط±ط§ط± ظ…ظˆط­ظ‘ط¯ط© ط¥ط¶ط§ظپظٹط© (ظ†ظپط³ ط³ظ„ظ… .btn) */

.btn-ai {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.btn-ai:hover:not(:disabled) {
    opacity: 0.9;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    background: var(--surface-solid);
    border-radius: var(--radius);
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ink);
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.action-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-edit {
    background: var(--accent-soft, #ccfbf1);
    color: #14b892;
    border-color: transparent;
}

/* طھط¨ظˆظ‘ط¨ط§طھ ظˆط§ط¬ظ‡ط§طھ ط§ظ„ظ‡ط±ظ… (owner/agent) â€” ظ…ظˆط­ظ‘ط¯ط© ظ…ظ† ط§ظ„ظ…ظ„ظپط§طھ ط§ظ„ظ…ظƒط±ط±ط© */

.h-tabs {
    display: flex;
    gap: var(--space-1);
    flex-wrap: wrap;
    margin: var(--space-3) 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--space-1);
}

.h-tab {
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface-solid);
    color: var(--ink);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.h-tab:hover {
    border-color: var(--accent);
}

.h-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.h-panel {
    display: none;
}

.h-panel.active {
    display: block;
}

.icon-btn {
    border: 1px solid var(--border);
    background: var(--surface-solid);
    border-radius: var(--radius);
    padding: var(--space-1) var(--space-2);
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--ink);
    transition: all 0.15s ease;
}

.icon-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.icon-btn.danger:hover {
    border-color: #dc2626;
    color: #dc2626;
}

/* ط­ظ‚ظˆظ„ ط§ظ„ظ†ظ…ط§ط°ط¬ */

.form-group {
    margin-bottom: var(--space-3);
}

.form-group.flex-1 {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--ink);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: var(--surface-elevated);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.form-group select {
    appearance: none;
    background-repeat: no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23475569'%3E%3Cpath d='M7 10L2 5h10z'/%3E%3C/svg%3E");
    background-position: center left 14px;
    padding-inline-start: 36px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--focus);
    background: #fff;
}

.create-session-form {
    display: flex;
    gap: var(--space-2);
    align-items: flex-end;
}

@media (max-width: 767px) {
    .create-session-form {
        flex-direction: column;
        align-items: stretch;
    }
}

.renew-note {
    margin-top: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius);
    background: linear-gradient(120deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid rgba(217, 119, 6, 0.25);
}

/* ط£ظˆط¶ط§ط¹ ظپط§ط±ط؛ط© / طھط­ظ…ظٹظ„ */

.empty-state,
.loading {
    padding: clamp(36px, 7vw, 72px);
    text-align: center;
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-strong);
    background: rgba(248, 250, 252, 0.9);
}

.empty-state h3 {
    margin: var(--space-2) 0;
    font-size: 1.25rem;
}

.spinner {
    width: 48px;
    height: 48px;
    margin: auto;
    border: 4px solid var(--accent-soft);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* QR ظ…ظ†ط·ظ‚ط© */

.qr-container {
    text-align: center;
    margin: var(--space-3) 0;
    padding: var(--space-4);
    background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
    border: 2px dashed rgba(13, 148, 136, 0.4);
    border-radius: var(--radius-lg);
}

.qr-container img {
    border-radius: 16px;
    max-width: 220px;
    box-shadow: var(--shadow-md);
}

.session-details .detail-item,
.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    gap: var(--space-2);
    border-bottom: 1px solid var(--border);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--ink-muted);
    font-weight: 600;
}

.detail-value {
    color: var(--ink);
    font-weight: 800;
}

/* صفوف أزرار الإجراءات: تباعد موحد بدل الأزرار الملتصقة */
.user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* النصوص الطويلة تلتف بدل الخروج من مكانها */
.detail-value,
.detail-label,
.session-name,
.stat-label,
.user-card h3,
.user-card h4 {
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

table tbody td {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* modal */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(42px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    animation: fadeIn 0.25s ease;
}

.modal-content {
    margin: auto;
    width: min(548px, 94vw);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: linear-gradient(110deg, #14b892 0%, #0b5a45 100%);
    color: #f0fdfa;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
}

.modal-header .close {
    cursor: pointer;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.modal-header .close:hover {
    transform: rotate(90deg);
}

.modal-body {
    padding: var(--space-4);
    max-height: 72vh;
    overflow-y: auto;
}

.modal-footer {
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--border);
    background: #f8fafc;
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* ط£ط¯ظ…ظ†: طھط¨ظˆظٹط¨ط§طھ */

.tabs {
    display: flex;
    gap: 6px;
    padding: 6px;
    background: var(--surface-solid);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: var(--space-4);
}

.tab-button {
    flex: 1;
    font-family: var(--font-sans);
    font-weight: 700;
    cursor: pointer;
    border-radius: var(--radius);
    border: none;
    padding: 14px 16px;
    background: transparent;
    color: var(--ink-muted);
    transition:
        background 0.18s ease,
        color 0.18s ease;
}

.tab-button.active {
    background: linear-gradient(120deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #ecfdf5;
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.25);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ط¨ط·ط§ظ‚ط§طھ ط§ظ„ظ…ط³طھط®ط¯ظ…ظٹظ† ط¨ط§ظ„ط£ط¯ظ…ظ† */

.user-card {
    padding: var(--space-3);
    margin-bottom: 14px;
    background: #f8fafc;
}

.user-card:hover {
    border-color: rgba(13, 148, 136, 0.35);
    box-shadow: var(--shadow-sm);
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.user-status,
.status-admin,
.status-active,
.status-inactive,
.status-expired {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
}

.status-active {
    background: rgba(22, 163, 74, 0.14);
    color: #16a34a;
}

.status-inactive,
.status-expired {
    background: var(--danger-soft);
    color: #991b1b;
}

.status-admin {
    background: rgba(59, 130, 246, 0.16);
    color: #1d4ed8;
}

.user-details,
.detail-grid {
    display: grid;
    gap: var(--space-2);
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    margin-bottom: var(--space-2);
}

/* ط­ط¯ظˆط¯ */

.limits-grid {
    display: grid;
    gap: var(--space-3);
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin-bottom: var(--space-4);
}

.limit-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 var(--space-2);
    font-size: 1.08rem;
    color: var(--accent-hover);
    font-weight: 800;
}

.limit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2);
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.limit-item:last-child {
    border-bottom: none;
}

/* طھط³ط¬ظٹظ„ ط§ظ„ط¯ط®ظˆظ„ (ط¨ط·ط§ظ‚ط© ظˆط§ط­ط¯ط© ظˆط³ط· ط§ظ„ط´ط§ط´ط©) */

body.page-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-4);
}

body.page-login .language-toggle {
    position: fixed;
    top: 16px;
    inset-inline-start: 16px;
    z-index: 20;
    background: #0f172a;
    border-radius: 999px;
}

body.page-login .container:not(.narrow) {
    margin: auto;
    max-width: 440px;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--surface-solid);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

body.page-login .container .header {
    text-align: center;
    padding: var(--space-4);
    margin: 0;
    border-radius: 0;
    background: #14b892;
    color: #f0fdfa;
}

body.page-login .container .header h1 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
}

body.page-login .container .header p {
    margin-top: var(--space-2);
    opacity: 0.88;
}

body.page-login .form-container {
    padding: var(--space-4);
}

/* ط§ظ„طھط³ط¬ظٹظ„: ط²ط± ط§ظ„ظ„ط؛ط© ط¯ط§ط®ظ„ ط§ظ„ط´ط±ظٹط· â€” register-premium.css */

.hidden {
    display: none !important;
}

.error-message {
    padding: var(--space-2);
    border-radius: var(--radius);
    margin-bottom: var(--space-3);
    display: none;
    background: var(--danger-soft);
    color: #991b1b;
    border: 1px solid rgba(220, 38, 38, 0.25);
    font-weight: 600;
}

.success-message {
    padding: var(--space-2);
    border-radius: var(--radius);
    margin-bottom: var(--space-3);
    display: none;
    background: rgba(22, 163, 74, 0.12);
    color: #166534;
    border: 1px solid rgba(22, 163, 74, 0.25);
    font-weight: 600;
}

body.page-login .btn-primary {
    width: 100%;
}

.toggle-form button {
    background: transparent;
    border: none;
    color: var(--accent-hover);
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-sans);
}

/* طµظپط­ط© ط§ظ„ظ…ظ„ظپ ط§ظ„ط´ط®طµظٹ */

.info-row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.info-label {
    color: var(--ink-muted);
}

.info-value {
    font-weight: 800;
}

.badge-admin {
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
}

.badge-active {
    background: rgba(22, 163, 74, 0.14);
    color: #16a34a;
}

.badge-inactive {
    background: var(--danger-soft);
    color: #991b1b;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: var(--space-2);
}

.alert-success {
    background: rgba(22, 163, 74, 0.14);
    color: #16a34a;
    border: 1px solid rgba(22, 163, 74, 0.25);
}

.alert-error {
    background: var(--danger-soft);
    color: #991b1b;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

/* ط£ط¯ظˆط§طھ */

.text-danger {
    color: #dc2626 !important;
    font-weight: 800;
}

.text-warning {
    color: var(--warning) !important;
    font-weight: 800;
}

/* ط´ط±ظٹط· طھظ…ط±ظٹط± */

* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) #e2e8f0;
}

*::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

*::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: 999px;
}

/* ============================================
 * ط§ظ„طµظپط­ط© ط§ظ„ط±ط¦ظٹط³ظٹط© (Landing)
 * ============================================ */

body.page-home .language-toggle {
    position: fixed;
    top: 18px;
    inset-inline-end: 18px;
    z-index: 999;
}

/* شريط أدوات الصفحة الرئيسية (الوضع الليلي + اللغة) */
body.page-home .home-toolbar {
    position: fixed;
    top: 18px;
    inset-inline-end: 18px;
    z-index: 999;
    display: flex;
    gap: 8px;
    align-items: center;
}

body.page-home .home-toolbar .language-toggle,
body.page-home .home-toolbar .theme-toggle {
    position: static;
    font-family: var(--font-sans);
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s ease, transform 0.15s ease;
}

body.page-home .home-toolbar .theme-toggle {
    padding: 8px 12px;
    font-size: 1rem;
}

body.page-home .home-toolbar .language-toggle:hover,
body.page-home .home-toolbar .theme-toggle:hover {
    background: #ffffff;
}

[data-theme="dark"] body.page-home .home-toolbar .language-toggle,
[data-theme="dark"] body.page-home .home-toolbar .theme-toggle {
    background: var(--surface-elevated);
    color: var(--ink);
    border-color: var(--border-strong);
}

[data-theme="dark"] body.page-home .home-toolbar .language-toggle:hover,
[data-theme="dark"] body.page-home .home-toolbar .theme-toggle:hover {
    background: var(--surface-solid);
}

body.page-home .header {
    position: relative;
    overflow: clip;
    color: #f8fafc;
    padding: clamp(48px, 14vw, 110px) 0 clamp(54px, 10vw, 88px);
    background:
        radial-gradient(900px 420px at 18% -20%, rgba(45, 212, 191, 0.35), transparent 55%),
        radial-gradient(800px 400px at 90% 0%, rgba(99, 102, 241, 0.2), transparent 50%),
        linear-gradient(120deg, #0f172a 0%, #0b5a45 48%, #0f172a 100%);
}

body.page-home .header::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 18px 18px;
    opacity: 0.45;
    pointer-events: none;
}

body.page-home .header-content {
    position: relative;
    z-index: 1;
}

body.page-home .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-size: clamp(1.85rem, 5vw, 2.85rem);
    font-weight: 800;
}

body.page-home .logo svg,
body.page-home .logo .fab.fa-whatsapp {
    font-size: 1em;
}

body.page-home .logo img {
    height: 1em;
    width: auto;
    border-radius: 6px;
    display: block;
}

body.page-home .tagline {
    text-align: center;
    opacity: 0.88;
    font-size: clamp(1rem, 2.4vw, 1.22rem);
    margin-top: var(--space-3);
}

body.page-home .cta-buttons {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-4);
}

body.page-home .btn {
    padding: 14px 28px;
    border-radius: 999px;
    text-decoration: none;
}

body.page-home .btn-outline {
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
    border: 2px solid rgba(248, 250, 252, 0.45);
    box-shadow: none;
}

body.page-home .btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
}

body.page-home .btn-primary:hover {
    filter: brightness(1.06);
}

body.page-home .features {
    padding: var(--space-4) 0;
    background: transparent;
}

body.page-home .section-title {
    text-align: center;
    margin-bottom: var(--space-4);
    font-weight: 800;
    letter-spacing: -0.03em;
    font-size: clamp(1.45rem, 4vw, 2rem);
}

body.page-home .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
    max-width: 1200px;
    margin: 0 auto;
}

body.page-home .feature-card {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface-solid);
    text-align: center;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

body.page-home .feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

body.page-home .feature-icon {
    font-size: 2.4rem;
    color: var(--accent);
}

body.page-home .how-it-works {
    padding: var(--space-4) 0;
}

body.page-home .steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-4);
    max-width: 1000px;
    margin: 0 auto;
}

body.page-home .step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: auto;
    margin-bottom: var(--space-2);
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(130deg, var(--accent), #4338ca);
}

body.page-home .footer {
    padding: var(--space-4) var(--space-3);
    text-align: center;
    margin-top: var(--space-4);
    background: #0f172a;
    color: #94a3b8;
}

body.page-home .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}

body.page-home .footer-link {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 600;
}

body.page-home .footer-link:hover {
    color: #5eead4;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(26px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out both;
}

body.page-home .delay-1 {
    animation-delay: 0.1s;
}

body.page-home .delay-2 {
    animation-delay: 0.2s;
}

body.page-home .delay-3 {
    animation-delay: 0.3s;
}

body.page-home .delay-4 {
    animation-delay: 0.4s;
}

/* ط£ط¯ظ…ظ† ط¹ط§ظ… */

.settings-section,
.dashboard-section {
    margin-bottom: var(--space-3);
}

/* ط£ط²ط±ط§ط± ط¨ط­ط¬ظ… ظƒط§ظ…ظ„ ظ„ظˆ ظƒط§ظ†طھ ط¨ط­ط§ط¬ط© ط£ط­ظٹط§ظ†ظ‹ط§ */

.full-width-btn {
    width: 100%;
}

.view-session-btn {
    margin-top: var(--space-2);
}


/* ===== included: public\css\app-pages.css ===== */
/* طµظپط­ط§طھ ط¥ط¶ط§ظپظٹط©: session, api-docs, api-test, ظ„ظˆط­ط§طھ ط£ط¯ظˆط§طھ */

/* ط؛ظ„ط§ظپ ظٹط­ط§ظپط¸ ط¹ظ„ظ‰ ط´ط¨ظƒط© Bootstrap ط¯ظˆظ† طھطµط§ط¯ظ… ظ…ط¹ .container ط§ظ„ظ…ظˆط­ط¯ */
.bootstrap-shell {
    width: min(1140px, 100%);
    margin-inline: auto;
    padding-inline: clamp(14px, 2vw, 24px);
}

/* â€”â€” ظˆط«ط§ط¦ظ‚ API â€”â€” */
.tabs > .tab {
    flex: 1 1 auto;
    min-width: 118px;
    text-align: center;
    padding: 12px 10px;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    color: var(--ink-muted);
    border: 1px solid transparent;
    transition:
        background 0.18s ease,
        color 0.18s ease;
}

.tabs > .tab:hover {
    background: var(--surface-elevated);
}

.tabs > .tab.active {
    background: var(--accent);
    color: #ecfdf5;
    border-color: rgba(13, 148, 136, 0.35);
}

.section {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    box-shadow: var(--shadow-sm);
}

.section h2 {
    font-size: 1.35rem;
    margin-bottom: var(--space-2);
}

.section h3 {
    margin: var(--space-3) 0 var(--space-2);
}

.section p,
.section li {
    color: var(--ink-muted);
}

.code-block {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: var(--radius);
    padding: var(--space-3);
    overflow-x: auto;
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    margin: var(--space-2) 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.note {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    background: rgba(13, 148, 136, 0.09);
    border: 1px solid rgba(13, 148, 136, 0.25);
    margin: var(--space-2) 0;
}

.warning {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    background: var(--warning-soft);
    border: 1px solid rgba(217, 119, 6, 0.35);
    margin: var(--space-2) 0;
}

.endpoint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: var(--space-2) var(--space-3);
    background: var(--surface-elevated);
    border-radius: var(--radius);
    margin: var(--space-2) 0;
    border: 1px solid var(--border);
}

.endpoint-url {
    font-family: ui-monospace, monospace;
    font-size: 0.88rem;
    font-weight: 600;
    direction: ltr;
    text-align: left;
    word-break: break-all;
}

.method {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 8px;
    letter-spacing: 0.06em;
    color: #fff;
}

.method-post {
    background: #059669;
}

.method-get {
    background: #2563eb;
}

.method-put {
    background: #f59e0b;
}

.method-delete {
    background: #dc2626;
}

.param-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-2) 0;
    font-size: 0.9rem;
    display: block;
    overflow-x: auto;
}

.param-table th,
.param-table td {
    border: 1px solid var(--border);
    padding: 10px 12px;
    text-align: right;
}

.param-table th {
    background: var(--surface-elevated);
    font-weight: 700;
}

.param-table td.required {
    color: #b91c1c;
    font-weight: 700;
}

.param-table td.optional {
    color: var(--accent-hover);
}

/* â€”â€” ط§ط®طھط¨ط§ط± API â€”â€” */

.content {
    padding: 0;
}

.api-info {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
}

.api-info h3 {
    margin-bottom: var(--space-2);
}

.test-section {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
}

.test-section .btn {
    margin-bottom: var(--space-2);
}

.result {
    margin-top: var(--space-2);
    padding: var(--space-2);
    border-radius: var(--radius);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 0.82rem;
    max-height: 280px;
    overflow-y: auto;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    border: none;
    font-family: var(--font-sans);
    font-weight: 700;
    cursor: pointer;
    background: var(--accent);
    color: #fff;
}

.api-key-display,
.session-token-display {
    margin-top: 8px;
    padding: var(--space-2);
    background: var(--surface-elevated);
    border-radius: var(--radius);
    direction: ltr;
    text-align: left;
    word-break: break-all;
    font-family: monospace;
    font-size: 0.86rem;
    border: 1px dashed var(--border-strong);
}

/* â€”â€” ظ„ظˆط­ط© ط§ظ„ط¥ط¯ط§ط±ط©: ط­ظ‚ظˆظ„ ط¨ط­ط« ظˆط£ط¯ظˆط§طھ â€”â€” */

.toolbar-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    align-items: center;
}

input.search-box,
select.search-box {
    font-family: var(--font-sans);
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: var(--surface-solid);
}

.content-card {
    padding: clamp(18px, 3vw, 28px);
    margin-bottom: var(--space-3);
}

.admin-bulk #bulkActions,
#bulkActions {
    padding: var(--space-3);
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: var(--radius);
}

#bulkActions:not(.show) {
    display: none;
}

/* طھط¬ظ†ط¨ طھطµط§ط¯ظ… ط§ط³ظ… bulk-actions ط¨ظٹظ† ط§ظ„ط¬ظ„ط³ط§طھ ظˆط§ظ„ط¥ط¯ط§ط±ط© */
.admin-bulk .bulk-actions {
    gap: var(--space-2);
}

/* ط¨ط·ط§ظ‚ط§طھ ط­ط¯ظˆط¯ */
.limit-card {
    padding: var(--space-3);
}

.limit-label {
    color: var(--ink-muted);
    font-weight: 600;
}

.limit-value {
    font-weight: 800;
}

.limit-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    margin-inline-start: 8px;
}

.limit-status.status-good {
    background: rgba(22, 163, 74, 0.14);
    color: #166534;
}

.limit-status.status-warning {
    background: var(--warning-soft);
    color: #92400e;
}

.limit-status.status-bad {
    background: var(--danger-soft);
    color: #991b1b;
}

.header-section > p {
    color: var(--ink-muted);
    margin-top: 8px;
}

/* â€”â€” طµظپط­ط© ط§ظ„ط¬ظ„ط³ط© (ط±ط³ط§ط¦ظ„ ظˆظ…ط³طھظ„ظ…ظˆظ†) â€”â€” */

body.page-session .session-header {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
}

body.page-session .session-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
}

body.page-session .session-header .session-status {
    font-size: 0.72rem;
    padding: 8px 14px;
}

.api-info-section {
    padding: var(--space-4);
    background: var(--surface-solid);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: var(--space-3);
}

.api-info-section .section-header {
    margin-bottom: var(--space-2);
}

.api-info-section .section-header h3 {
    margin: 0;
}

.section-header {
    margin-bottom: var(--space-2);
}

.section-header p {
    color: var(--ink-muted);
    margin-top: 6px;
    font-size: 0.9rem;
}

.token-info h4 {
    margin-bottom: var(--space-2);
}

.token-display {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2);
    background: var(--surface-elevated);
    border-radius: var(--radius);
    direction: ltr;
    text-align: left;
    word-break: break-all;
    font-family: monospace;
}

.message-types {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: var(--space-3);
}

.message-type-btn {
    font-family: var(--font-sans);
    font-weight: 700;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface-solid);
    transition:
        transform 0.15s ease,
        box-shadow 0.18s ease;
}

.message-type-btn:hover {
    transform: translateY(-1px);
}

.message-type-btn.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: var(--shadow-sm);
}

.message-form {
    padding: var(--space-4);
    background: var(--surface-solid);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: var(--space-3);
}

.message-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    font-family: var(--font-sans);
    resize: vertical;
}

.message-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--focus);
}

.file-upload {
    border: 2px dashed rgba(13, 148, 136, 0.4);
    border-radius: var(--radius);
    padding: var(--space-4);
    text-align: center;
    cursor: pointer;
    background: rgba(248, 250, 252, 0.9);
    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.file-upload:hover {
    border-color: var(--accent-hover);
}

.file-preview {
    margin-top: var(--space-2);
}

.file-preview img {
    max-width: 100%;
    border-radius: 10px;
}

.bulk-actions h3 {
    margin-bottom: var(--space-2);
}

.selected-contacts {
    min-height: 48px;
    padding: 12px;
    border-radius: 12px;
    border: 1px dashed var(--border-strong);
}

.selected-contacts.empty {
    color: var(--ink-muted);
}

.contact-tag {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent-hover);
    padding: 4px 12px;
    border-radius: 999px;
    margin: 4px;
    font-size: 0.85rem;
    font-weight: 700;
}

.message-status.message-success {
    background: rgba(22, 163, 74, 0.12);
    border: 1px solid rgba(22, 163, 74, 0.3);
    color: #166534;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: var(--space-2);
}

.message-status.message-error {
    background: var(--danger-soft);
    border: 1px solid rgba(220, 38, 38, 0.25);
    padding: 10px;
    border-radius: 10px;
    margin-bottom: var(--space-2);
}

.main-content {
    margin-top: var(--space-3);
}

.main-content > .contacts-section {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
}

.search-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: var(--space-3);
    border-radius: 12px;
    border: 1px solid var(--border-strong);
}

.contacts-list {
    display: grid;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.15s ease;
}

.contact-item:hover {
    border-color: rgba(13, 148, 136, 0.35);
}

.contact-name {
    font-weight: 800;
}

.contact-details {
    color: var(--ink-muted);
    font-size: 0.89rem;
    direction: ltr;
    text-align: right;
}

.contact-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--surface-elevated);
    font-size: 0.74rem;
    margin-inline-start: 8px;
}

.loading-note {
    font-size: 0.87rem;
    color: var(--ink-muted);
    margin-top: 8px;
}

/* طµظپط­ط© ط§ظ„طھط³ط¬ظٹظ„: ط£ظ†ظ…ط§ط·ظ‡ط§ ظپظٹ css/register-premium.css */

/* طµظپط­ط© طھط­ظ‚ظ‚ ط§ظ„ط¨ط±ظٹط¯ */
body.page-verify {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-4);
}

body.page-verify .container {
    max-width: 440px;
    width: 100%;
    margin: auto;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    background: var(--surface-solid);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

body.page-verify .container > .logo {
    font-size: 2rem;
    margin-bottom: var(--space-2);
}

body.page-verify .container > h1 {
    font-size: 1.2rem;
    font-weight: 800;
}

body.page-verify .description {
    color: var(--ink-muted);
    margin: var(--space-2) 0;
}

body.page-verify .email {
    font-weight: 800;
    color: var(--accent-hover);
}

body.page-verify .verification-code {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

body.page-verify .code-input {
    width: 48px;
    height: 56px;
    text-align: center;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    font-size: 1.35rem;
    font-weight: 700;
}

body.page-verify #loading {
    display: none;
    padding: var(--space-3);
}

body.page-verify .error {
    margin-top: var(--space-2);
    color: #991b1b;
    font-weight: 700;
}

body.page-verify .success {
    margin-top: var(--space-2);
    color: #166534;
    font-weight: 700;
}

body.page-verify .timer {
    color: var(--ink-muted);
    font-size: 0.92rem;
    margin-top: 8px;
}

body.page-verify .resend-info {
    margin-top: var(--space-3);
    font-size: 0.85rem;
    color: var(--ink-muted);
}

body.page-verify #verifyBtn.btn {
    width: 100%;
    margin-top: var(--space-2);
    background: linear-gradient(120deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #fff;
}

.test-section > .btn {
    background: #475569;
    color: #fff;
}

.test-section > .btn:hover {
    background: #334155;
}


/* ===== included: public\css\auth-flat.css ===== */
/* Shared flat auth chrome â€” login + register normalization */

.page-auth.page-login {
    margin: 0;
    background: #eef2f6;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem clamp(1rem, 4vw, 2rem);
    background: #ffffff;
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 800;
    font-size: clamp(1rem, 2.2vw, 1.12rem);
    letter-spacing: -0.02em;
    text-decoration: none;
    color: var(--ink, #0f172a);
}

.auth-brand__mark {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: block;
    object-fit: contain;
}

.auth-topbar__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.auth-lang {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #fff;
    color: var(--ink-muted, #475569);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.auth-lang:hover {
    border-color: rgba(13, 148, 136, 0.35);
    color: #14b892;
}

.auth-link-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(13, 148, 136, 0.35);
    color: #14b892;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    background: #fff;
}

.auth-link-secondary:hover {
    background: rgba(13, 148, 136, 0.08);
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 2.5rem) 1rem;
}

.auth-card {
    width: min(440px, 100%);
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 14px;
    padding: clamp(1.5rem, 4vw, 2rem);
}

.auth-card__head h1 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ink, #0f172a);
}

.auth-card__sub {
    margin: 0 0 1.25rem;
    color: var(--ink-muted, #475569);
    font-size: 0.95rem;
    line-height: 1.5;
}

.auth-field {
    margin-bottom: 1rem;
}

.auth-field label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--ink, #0f172a);
}

.auth-field input {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    font-size: 1rem;
    font-family: inherit;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.14);
}

.auth-field input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.25);
    border-color: var(--accent, #0b7a5e);
}

.auth-banner {
    padding: 11px 13px;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.auth-banner--error {
    display: none;
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.22);
    color: #991b1b;
}

.auth-banner--error.is-visible {
    display: block;
}

.auth-submit.btn {
    width: 100%;
    margin-top: 0.5rem;
}

/* Register page: tone down premium chrome to flat */
body.page-register.auth-flat .register-topbar {
    backdrop-filter: none;
    background: #ffffff;
    box-shadow: none;
}

body.page-register.auth-flat .register-brand__mark {
    background: var(--accent, #0b7a5e);
    box-shadow: none;
    border: none;
}

body.page-register.auth-flat .register-showcase {
    background: #14b892;
    color: #f8fafc;
}

body.page-register.auth-flat .register-card {
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}


/* ===== included: public\css\register-premium.css ===== */
/* طµظپط­ط© ط¥ظ†ط´ط§ط، ط­ط³ط§ط¨ â€” ظˆط§ط¬ظ‡ط© SaaS ط­ط¯ظٹط«ط© */

body.page-register {
    min-height: 100vh;
    margin: 0;
    background: var(--rp-bg, #f4f7fb);
    color: var(--rp-ink, #0f172a);
    font-family: "Tajawal", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.page-register * {
    box-sizing: border-box;
}

.register-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* â€”â€” ط§ظ„ط´ط±ظٹط· ط§ظ„ط¹ظ„ظˆظٹ ط§ظ„ط¨ط³ظٹط· â€”â€” */
.register-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem clamp(1rem, 4vw, 2rem);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.register-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}

.register-brand:hover {
    opacity: 0.88;
}

.register-brand__mark {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: linear-gradient(135deg, #0b7a5e 0%, #0b7a5e 50%, #0f172a 100%);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.05rem;
    box-shadow:
        0 4px 14px rgba(13, 148, 136, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.register-brand__text {
    font-weight: 800;
    font-size: clamp(0.98rem, 2vw, 1.06rem);
    letter-spacing: -0.02em;
}

.register-topbar__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

body.page-register .register-lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.95);
    color: var(--rp-muted, #475569);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        color 0.2s ease,
        background 0.2s ease;
}

body.page-register .register-lang-toggle:hover {
    border-color: rgba(13, 148, 136, 0.35);
    color: #14b892;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

body.page-register .register-lang-toggle:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(13, 148, 136, 0.35),
        0 0 0 1px rgba(13, 148, 136, 0.5);
}

.register-link-login {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.48rem 1rem;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    color: #f8fafc;
    background: linear-gradient(120deg, #14b892 0%, #0b5a45 100%);
    box-shadow:
        0 4px 16px rgba(15, 118, 110, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition:
        transform 0.18s ease,
        box-shadow 0.22s ease,
        filter 0.2s ease;
}

.register-link-login:hover {
    filter: brightness(1.06);
    box-shadow: 0 8px 26px rgba(15, 118, 110, 0.32);
    transform: translateY(-1px);
}

.register-link-login:active {
    transform: translateY(0);
}

.register-link-login:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(13, 148, 136, 0.45),
        0 4px 16px rgba(15, 118, 110, 0.28);
}

/* â€”â€” طھط®ط·ظٹط· ط±ط¦ظٹط³ظٹ: ط¹ظ…ظˆط¯ ظ„ظ„ظ‡ظˆظٹط© + ط¹ظ…ظˆط¯ ط§ظ„ظ†ظ…ظˆط°ط¬ â€”â€” */
.register-main {
    flex: 1;
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: clamp(1.25rem, 4vw, 2.5rem) clamp(1rem, 3vw, 1.75rem);
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 4vw, 2.75rem);
    align-items: stretch;
}

@media (min-width: 960px) {
    .register-main {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
        gap: 2rem 2.5rem;
        align-items: center;
    }
}

/* ط¹ظ…ظˆط¯ ط§ظ„ظˆطµظ„ */
.register-showcase {
    position: relative;
    border-radius: 22px;
    padding: clamp(1.75rem, 4vw, 2.75rem);
    background:
        radial-gradient(800px 400px at 100% -20%, rgba(45, 212, 191, 0.22), transparent 55%),
        radial-gradient(500px 300px at 0% 100%, rgba(99, 102, 241, 0.12), transparent 50%),
        linear-gradient(155deg, #0f172a 0%, #0b5a45 42%, #14b892 100%);
    color: #e2e8f0;
    overflow: hidden;
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.2),
        0 1px 0 rgba(255, 255, 255, 0.06) inset;
    isolation: isolate;
}

.register-showcase::before {
    content: "";
    position: absolute;
    inset: -40%;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size:
        32px 32px,
        32px 32px;
    background-position:
        0 0,
        16px 16px;
    opacity: 0.9;
    z-index: 0;
}

.register-showcase > * {
    position: relative;
    z-index: 1;
}

.register-showcase__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.72rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(240, 253, 250, 0.95);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.register-showcase__title {
    margin: 1.1rem 0 0.6rem;
    font-size: clamp(1.5rem, 3.8vw, 2.05rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.03em;
    color: #f8fafc;
}

.register-showcase__lead {
    margin: 0 0 1.5rem;
    font-size: clamp(0.95rem, 2vw, 1.06rem);
    line-height: 1.72;
    color: rgba(226, 232, 240, 0.9);
    max-width: 36ch;
}

.register-showcase__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.85rem;
}

.register-showcase__list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.92rem;
    line-height: 1.58;
    color: rgba(241, 245, 249, 0.92);
}

.register-showcase__list i {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    margin-top: 0.2rem;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(45, 212, 191, 0.18);
    color: #5eead4;
    font-size: 0.75rem;
}

.register-showcase__footer {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.95);
}

@media (max-width: 959px) {
    .register-showcase__footer {
        display: none;
    }
}

/* ط¹ظ…ظˆط¯ ط§ظ„ظ†ظ…ظˆط°ط¬ â€” ظٹط¸ظ‡ط± ط£ظˆظ„ط§ظ‹ ط¹ظ„ظ‰ ط§ظ„ط¬ظˆط§ظ„ */
.register-form-column {
    order: -1;
}

@media (min-width: 960px) {
    .register-form-column {
        order: 0;
    }
}

.register-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.07);
    box-shadow:
        0 1px 3px rgba(15, 23, 42, 0.04),
        0 18px 48px rgba(15, 23, 42, 0.08);
    overflow: clip;
}

.register-card__head {
    padding: clamp(1.35rem, 3vw, 1.85rem) clamp(1.35rem, 3vw, 2rem) 0;
}

.register-card__title {
    margin: 0;
    font-size: clamp(1.28rem, 2.8vw, 1.55rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    color: var(--rp-ink, #0f172a);
}

.register-card__subtitle {
    margin: 0.5rem 0 0;
    font-size: 0.935rem;
    line-height: 1.62;
    color: var(--rp-muted, #64748b);
}

.register-form-inner {
    padding: clamp(1.25rem, 3vw, 2rem);
    padding-top: 1.35rem;
}

.rp-field {
    margin-bottom: 1.2rem;
}

.rp-field:last-of-type {
    margin-bottom: 1.35rem;
}

.rp-field__top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.65rem;
    margin-bottom: 0.42rem;
}

.rp-field__label {
    font-size: 0.86rem;
    font-weight: 800;
    color: #334155;
    cursor: pointer;
}

.rp-field__hint {
    font-size: 0.73rem;
    font-weight: 600;
    color: #94a3b8;
}

.rp-input-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
    border-radius: 12px;
    border: 1.5px solid rgba(51, 65, 85, 0.16);
    background: #fafbfc;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.22s ease;
}

.rp-input-wrap:hover {
    border-color: rgba(13, 148, 136, 0.32);
}

.rp-input-wrap:focus-within {
    border-color: #0b7a5e;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.16);
}

.rp-field.is-invalid .rp-input-wrap {
    border-color: #e11d48;
    background: #fffbfb;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.rp-field.is-invalid .rp-input-wrap:focus-within {
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.14);
}

.rp-field__prefix {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.85rem;
    flex-shrink: 0;
    color: #64748b;
    font-size: 0.95rem;
}

.rp-input-wrap input {
    flex: 1;
    min-width: 0;
    padding: 0.82rem 0.95rem;
    padding-inline-start: 0;
    padding-inline-end: 0.85rem;
    border: none;
    border-radius: 10px;
    background: transparent;
    font-family: inherit;
    font-size: 0.965rem;
    font-weight: 600;
    color: #0f172a;
}

html[dir="rtl"] .rp-input-wrap input:not([type="email"]) {
    direction: rtl;
    text-align: right;
}

html[dir="ltr"] .rp-input-wrap input:not([type="email"]) {
    direction: ltr;
    text-align: left;
}

.rp-field[data-field="email"] .rp-input-wrap input[type="email"] {
    direction: ltr;
    unicode-bidi: plaintext;
    text-align: left;
}

.rp-input-wrap input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.rp-input-wrap input:focus {
    outline: none;
}

.rp-field__msg {
    min-height: 1.35rem;
    margin-top: 0.42rem;
    font-size: 0.775rem;
    font-weight: 700;
    color: #be123c;
    display: flex;
    align-items: flex-start;
    gap: 0.38rem;
    opacity: 0;
    transform: translateY(-2px);
    transition:
        opacity 0.22s ease,
        transform 0.22s ease;
}

.rp-field.is-invalid .rp-field__msg {
    opacity: 1;
    transform: translateY(0);
}

.rp-field__msg::before {
    content: "";
    flex-shrink: 0;
    width: 0.42rem;
    height: 0.42rem;
    margin-top: 0.32rem;
    border-radius: 50%;
    background: #fb7185;
}

.rp-form-alert {
    display: none;
    align-items: flex-start;
    gap: 0.62rem;
    padding: 0.78rem 0.92rem;
    margin-bottom: 1.05rem;
    border-radius: 12px;
    font-size: 0.865rem;
    font-weight: 700;
    line-height: 1.52;
}

.rp-form-alert.is-visible {
    display: flex;
}

.rp-form-alert--error {
    background: #fff1f2;
    border: 1px solid rgba(251, 113, 133, 0.45);
    color: #9f1239;
}

.rp-submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.62rem;
    padding: 0.94rem 1.25rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.965rem;
    font-weight: 800;
    color: #f0fdfa;
    background: linear-gradient(125deg, #14b892 0%, #0b7a5e 45%, #0f172a 120%);
    box-shadow:
        0 6px 24px rgba(13, 148, 136, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition:
        transform 0.18s ease,
        box-shadow 0.22s ease,
        filter 0.2s ease;
}

.rp-submit:hover:not(:disabled) {
    filter: brightness(1.05);
    box-shadow:
        0 10px 32px rgba(13, 148, 136, 0.36),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.rp-submit:active:not(:disabled) {
    transform: translateY(0);
}

.rp-submit:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px #fff,
        0 0 0 6px rgba(13, 148, 136, 0.45),
        0 6px 24px rgba(13, 148, 136, 0.32);
}

.rp-submit:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
}

.rp-submit__spin {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    border: 2.5px solid rgba(240, 253, 250, 0.3);
    border-top-color: #fff;
    animation: rp-spin 0.65s linear infinite;
}

@keyframes rp-spin {
    to {
        transform: rotate(360deg);
    }
}

.register-footer {
    padding: clamp(1.1rem, 3vw, 1.5rem);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    text-align: center;
    font-size: 0.9rem;
    color: var(--rp-muted, #64748b);
    background: none;
}

.register-footer a {
    font-weight: 800;
    color: #14b892;
    text-decoration: none;
}

.register-footer a:hover {
    text-decoration: underline;
}

.register-footer a:focus-visible {
    outline: 2px solid #0b7a5e;
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* ============================================================
   Phase A â€” ط¹ظ†ط§طµط± ط§ظ„ظ…طµط§ط¯ظ‚ط© ط§ظ„ظ…ظˆط­ط¯ط© (Google OAuth + ط¥ط¸ظ‡ط§ط± ظƒظ„ظ…ط© ط§ظ„ظ…ط±ظˆط±)
   ============================================================ */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1.1rem 0 0.95rem;
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 600;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(15, 23, 42, 0.1);
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    color: #1f2937;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.google-btn:hover:not([disabled]) {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.28);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}
.google-btn:active:not([disabled]) {
    transform: translateY(1px);
}
.google-btn svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}
.google-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-password-wrap {
    position: relative;
}
.auth-password-wrap input {
    padding-inline-end: 46px;
}
.password-toggle {
    position: absolute;
    top: 50%;
    inset-inline-end: 6px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1rem;
    padding: 8px 10px;
    border-radius: 8px;
    line-height: 1;
}
.password-toggle:hover {
    color: #0b7a5e;
    background: rgba(13, 148, 136, 0.08);
}
.rp-input-wrap .password-toggle {
    position: static;
    transform: none;
    flex: 0 0 auto;
    margin-inline-end: 0.35rem;
    align-self: center;
}

/* ===== توافق لوحة الأدمن (body.page-admin) — بديل Bootstrap غير المحمّل ===== */
body.page-admin .row { display: flex; flex-wrap: wrap; gap: 12px; }
body.page-admin .col-md-8 { flex: 1 1 100%; }
body.page-admin .col-md-4 { flex: 1 1 100%; }
@media (min-width: 640px) {
    body.page-admin .col-md-8 { flex: 1 1 60%; }
    body.page-admin .col-md-4 { flex: 1 1 30%; }
}
body.page-admin .align-items-center { align-items: center; }
body.page-admin .text-end { text-align: end; }
body.page-admin .text-center { text-align: center; }
body.page-admin .text-muted { color: var(--ink-muted); }
body.page-admin .mb-1 { margin-bottom: 0.25rem; }
body.page-admin .me-1 { margin-inline-end: 0.25rem; }
body.page-admin .me-2 { margin-inline-end: 0.5rem; }

body.page-admin .table-responsive { width: 100%; overflow-x: auto; }
body.page-admin .table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
body.page-admin .table th {
    background: #0f172a;
    color: #fff;
    text-align: right;
    padding: 10px 12px;
    font-weight: 700;
    white-space: nowrap;
}
body.page-admin .table td {
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    vertical-align: middle;
}
body.page-admin .table-hover tbody tr:hover { background: rgba(13, 148, 136, 0.05); }

body.page-admin .badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}
body.page-admin .bg-success, body.page-admin .badge-success { background: var(--ok-soft); color: #16a34a; }
body.page-admin .bg-danger, body.page-admin .badge-danger { background: var(--danger-soft); color: #b91c1c; }

body.page-admin .form-text { color: var(--ink-muted); font-size: 0.78rem; }
body.page-admin .btn-group { display: flex; flex-wrap: wrap; gap: 8px; }
body.page-admin .btn-close {
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 2px 6px;
    margin-inline-start: auto;
    border-radius: 999px;
}
body.page-admin .btn-close:hover { background: rgba(0, 0, 0, 0.08); }

body.page-admin .alert { position: relative; display: flex; align-items: center; gap: 8px; }
body.page-admin .alert-danger { background: var(--danger-soft); color: #991b1b; border: 1px solid rgba(220, 38, 38, 0.2); }
body.page-admin .alert-info { background: var(--info-soft); color: #075985; border: 1px solid rgba(2, 132, 199, 0.25); }
body.page-admin .position-fixed { position: fixed; }

body.page-admin .package-card {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-2);
    box-shadow: var(--shadow-sm);
}
body.page-admin .package-price { font-size: 1.15rem; font-weight: 800; color: var(--accent); }
body.page-admin .feature-list { margin: 8px 0; padding-inline-start: 18px; }

/* ===== استعلامات وسائط إضافية (شريط علوي + مودالات + جداول) ===== */
@media (max-width: 767px) {
    .app-site-header .navbar { gap: 8px; }
    .navbar > div:first-child h1 { font-size: 1.05rem; }
    .navbar .username { display: none; }
    .language-toggle, .logout-btn, .back-btn {
        padding: var(--space-1) var(--space-2);
        font-size: 0.82rem;
    }
    .modal-content { width: 95%; max-height: 88vh; }
}

@media (max-width: 480px) {
    .app-site-header .navbar { flex-direction: column; align-items: stretch; }
    .navbar > div:first-child, .navbar .user-info { justify-content: center; }
}

/* ============================================================
   Wagate — تجاوزات الوضع الليلي للعناصر العامة
   ============================================================ */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .input-lg,
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
    background: var(--surface-elevated);
    color: var(--ink);
    border-color: var(--border-strong);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--ink-muted);
    opacity: 0.7;
}

[data-theme="dark"] table,
[data-theme="dark"] .table {
    background: var(--surface-solid);
    color: var(--ink);
}

[data-theme="dark"] table th,
[data-theme="dark"] .table th {
    background: var(--surface-elevated);
    color: var(--ink);
}

[data-theme="dark"] .modal-content {
    background: var(--surface-solid);
    color: var(--ink);
}

[data-theme="dark"] .modal-content h2,
[data-theme="dark"] .modal-content h3 {
    color: var(--ink);
}

[data-theme="dark"] .rp-container,
[data-theme="dark"] .rp-box {
    background: var(--rp-surface);
    color: var(--rp-ink);
}

[data-theme="dark"] a { color: var(--accent-hover); }

[data-theme="dark"] ::selection { background: var(--accent-soft); }

/* ============================================================
   Wagate — تجاوزات الوضع الليلي الكاملة (auth / register / dashboards)
   ============================================================ */

/* ——— صفحات المصادقة (login/auth-flat) ——— */
[data-theme="dark"] .page-auth.page-login {
    background: var(--rp-bg);
}

[data-theme="dark"] .auth-topbar {
    background: var(--surface-solid);
    border-bottom: 1px solid var(--border-strong);
}

[data-theme="dark"] .auth-brand {
    color: var(--ink);
}

[data-theme="dark"] .auth-lang,
[data-theme="dark"] .auth-link-secondary {
    background: var(--surface-elevated);
    color: var(--ink-muted);
    border-color: var(--border-strong);
}

[data-theme="dark"] .auth-card {
    background: var(--surface-solid);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .auth-card__sub {
    color: var(--ink-muted);
}

[data-theme="dark"] .auth-field label {
    color: var(--ink);
}

[data-theme="dark"] .auth-field input {
    background: var(--surface-elevated);
    color: var(--ink);
    border-color: var(--border-strong);
}

[data-theme="dark"] .auth-field input::placeholder {
    color: var(--ink-muted);
    opacity: 0.7;
}

/* ——— صفحة التسجيل (register-premium) ——— */
[data-theme="dark"] .register-topbar {
    background: rgba(15, 23, 42, 0.78);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] body.page-register.auth-flat .register-topbar {
    background: var(--surface-solid);
    border-bottom: 1px solid var(--border-strong);
}

[data-theme="dark"] .register-brand {
    color: var(--ink);
}

[data-theme="dark"] body.page-register .register-lang-toggle {
    background: var(--surface-elevated);
    border-color: var(--border-strong);
    color: var(--ink-muted);
}

[data-theme="dark"] .register-card {
    background: var(--surface-solid);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .register-card h1,
[data-theme="dark"] .register-card h2 {
    color: var(--ink);
}

[data-theme="dark"] .rp-field__label {
    color: var(--ink-muted);
}

[data-theme="dark"] .rp-input-wrap input {
    color: var(--ink);
}

[data-theme="dark"] .rp-input-wrap:focus-within {
    background: var(--surface-elevated);
    box-shadow: 0 0 0 4px var(--accent-ring);
}

[data-theme="dark"] .rp-field.is-invalid .rp-input-wrap {
    background: rgba(220, 38, 38, 0.08);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.22);
}

[data-theme="dark"] .rp-form-alert--error {
    background: rgba(220, 38, 38, 0.14);
    border-color: rgba(251, 113, 133, 0.4);
    color: #fecaca;
}

[data-theme="dark"] .google-btn {
    color: var(--ink);
    background: var(--surface-solid);
    border-color: var(--border-strong);
}

[data-theme="dark"] .google-btn:hover:not([disabled]) {
    background: var(--surface-elevated);
    border-color: var(--border-strong);
}

/* ——— لوحة التحكم ——— */
[data-theme="dark"] .modal-footer {
    background: var(--surface-elevated);
}

[data-theme="dark"] .user-card {
    background: var(--surface-elevated);
}

[data-theme="dark"] .status-loading {
    background: var(--surface-elevated);
    color: var(--ink-muted);
}

[data-theme="dark"] *::-webkit-scrollbar-track {
    background: var(--surface-elevated);
}

[data-theme="dark"] .card h2,
[data-theme="dark"] .content-card h2 {
    color: var(--ink);
}

/* ============================================================
   صقل احترافي — Wagate Pro Polish
   ============================================================ */

:root {
    --radius-card: 16px;
    --grad-primary: linear-gradient(135deg, #0b7a5e 0%, #14b892 100%);
    --shadow-lift: 0 2px 6px rgba(15, 23, 42, 0.05), 0 16px 38px rgba(15, 23, 42, 0.1);
}

[data-theme="dark"] {
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.35), 0 18px 44px rgba(0, 0, 0, 0.48);
}

/* ——— عناوين الأقسام ——— */
.header-section h1,
.header-section h2,
.page-heading h1,
.page-heading h2 {
    color: var(--ink);
    letter-spacing: -0.02em;
}

/* ——— البطاقات ——— */
.card,
.stat-card,
.content-card,
.limit-card,
.user-card,
.session-card {
    border-radius: var(--radius-card);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 30px rgba(15, 23, 42, 0.06);
}

.stat-card,
.session-card,
.user-card,
.limit-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.stat-card:hover,
.session-card:hover,
.user-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
}

/* ——— بطاقات الإحصائيات ——— */
.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-block: var(--space-4);
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    color: #fff;
    margin-bottom: 6px;
    background: var(--grad-primary);
    box-shadow: 0 6px 16px rgba(11, 122, 94, 0.3);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.3);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.3);
}

.stat-number {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ——— الأزرار ——— */
.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 13px;
    padding: 12px 22px;
}

.btn i {
    font-size: 0.95em;
    flex-shrink: 0;
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-ring);
}

.btn-primary {
    background: var(--grad-primary);
    box-shadow: 0 6px 18px rgba(11, 122, 94, 0.28);
}

.btn-primary:hover {
    background: var(--grad-primary);
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 9px 24px rgba(11, 122, 94, 0.36);
}

.btn-secondary {
    background: linear-gradient(135deg, #475569, #334155);
}

.btn-secondary:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

.btn-small {
    min-height: 38px;
    padding: 9px 16px;
    border-radius: 11px;
}

.btn:disabled {
    transform: none !important;
}

/* ——— الجداول ——— */
body.page-admin .table-responsive {
    border-radius: var(--radius-card);
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 30px rgba(15, 23, 42, 0.06);
}

body.page-admin .table {
    border: none;
}

body.page-admin .table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(180deg, #0f172a, #1e293b);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    padding: 13px 14px;
}

body.page-admin .table td {
    padding: 13px 14px;
}

body.page-admin .table tbody tr {
    transition: background 0.15s ease;
}

body.page-admin .table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.025);
}

body.page-admin .table-hover tbody tr:hover {
    background: rgba(13, 148, 136, 0.06);
}

[data-theme="dark"] body.page-admin .table tbody tr:nth-child(even) {
    background: rgba(226, 232, 240, 0.02);
}

[data-theme="dark"] body.page-admin .table thead th {
    background: linear-gradient(180deg, #0b1220, #0f172a);
}

/* ——— النوافذ المنبثقة ——— */
.modal {
    background: rgba(15, 23, 42, 0.6);
}

.modal-content {
    border-radius: 18px;
}

.modal-header {
    padding: 18px 24px;
}

.modal-header h3 {
    display: flex;
    align-items: center;
}

.modal-header h3 i {
    font-size: 1.05em;
    opacity: 0.95;
}

.modal-footer {
    justify-content: flex-end;
    padding: 16px 24px;
}

.modal-footer .btn {
    min-width: 112px;
}

/* ——— الحالات الفارغة ——— */
.empty-state {
    background: var(--surface-elevated);
    border-style: dashed;
}

.empty-state h3 {
    color: var(--ink);
}

/* ——— حقول الإدخال والحقول العامة ——— */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea {
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

/* ——— بطاقات المصادقة ——— */
.auth-card,
.register-card {
    border-radius: 20px;
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 26px 64px rgba(11, 122, 94, 0.18);
}

[data-theme="dark"] .auth-card,
[data-theme="dark"] .register-card {
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55);
}

/* ——— صفحة الإنزال: توهج خلف الـ hero ——— */
body.page-home .header-content {
    position: relative;
}

body.page-home .header-content::before {
    content: "";
    position: absolute;
    inset: -30% -15% -10%;
    background: radial-gradient(620px 320px at 50% 0%, rgba(20, 184, 146, 0.22), transparent 72%);
    pointer-events: none;
    z-index: 0;
}

body.page-home .header-content > * {
    position: relative;
    z-index: 1;
}

body.page-home .feature-card,
body.page-home .step {
    border-radius: 18px;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

body.page-home .feature-card:hover,
body.page-home .step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
    border-color: rgba(13, 148, 136, 0.3);
}

/* ——— محاذاة أيقونات Font Awesome داخل العناصر ——— */
.btn i,
.action-btn i,
.icon-btn i,
.message-type-btn i,
.h-tab i {
    vertical-align: middle;
}

/* ——— أزرار الأيقونات المربعة ——— */
.icon-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    padding: 0;
    transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.icon-btn:hover {
    transform: translateY(-1px);
}

/* ——— تبويبات الهرم ——— */
.h-tab.active {
    background: var(--grad-primary);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(11, 122, 94, 0.28);
}

/* ——— حقول البحث: حلقة تركيز ——— */
.search-box input:focus {
    box-shadow: 0 0 0 3px var(--accent-ring);
}

/* ——— مزامنة تبويبات الهرم مع الوضع الليلي ——— */
[data-theme="dark"] .h-tab {
    background: var(--surface-solid);
    border-color: var(--border-strong);
    color: var(--ink);
}

/* ============================================================
   إصلاحات وضوح الأزرار والنصوص — Wagate Contrast Fixes
   ============================================================ */

/* خط أبيض مضمون على أزرار الدخول والتسجيل والرئيسية */
.btn-primary,
.rp-submit,
body.page-home .btn-primary,
body.page-login .btn-primary,
body.page-register .btn-primary {
    color: #ffffff;
}

.btn-primary:hover,
.rp-submit:hover:not(:disabled) {
    color: #ffffff;
}

body.page-home .btn-outline {
    color: #ffffff;
    border-color: rgba(248, 250, 252, 0.6);
}

/* نص رمادي واضح لفوتر إنشاء الحساب في الوضعين */
.register-footer {
    color: var(--rp-muted, #475569);
}

[data-theme="dark"] .register-footer {
    color: #94a3b8;
    border-top-color: var(--border-strong);
}

[data-theme="dark"] .register-footer a {
    color: #2dd4a7;
/* ============================================================
   Wagate Modern SaaS UI Additions (2026 Production Standard)
   ============================================================ */

/* Main layout wrapper */
.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem clamp(1rem, 2.5vw, 2.5rem);
}

/* Dashboard Header & Welcome Bar */
.dash-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(14, 165, 233, 0.05) 100%), var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.dash-hero-text h1 {
    font-size: clamp(1.4rem, 2.2vw, 1.85rem);
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-hero-text p {
    color: var(--ink-muted);
    font-size: var(--fs-md);
    margin: 0;
}

.dash-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Stats Cards Grid */
.stats-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card-v2 {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.stat-card-v2:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.stat-card-v2 .stat-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-card-v2 .stat-meta {
    flex: 1;
    min-width: 0;
}

.stat-card-v2 .stat-val {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.2;
}

.stat-card-v2 .stat-title {
    font-size: var(--fs-sm);
    color: var(--ink-muted);
    font-weight: 600;
}

/* Session Section Toolbar */
.section-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.section-toolbar .title-area h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-filter-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.search-input-wrap {
    position: relative;
    min-width: 240px;
}

.search-input-wrap i {
    position: absolute;
    top: 50%;
    inset-inline-start: 14px;
    transform: translateY(-50%);
    color: var(--ink-muted);
    pointer-events: none;
}

.search-input-wrap input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.4rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    font-size: var(--fs-sm);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input-wrap input:focus {
    border-color: var(--accent);
    box-shadow: var(--focus);
}

/* Sessions Grid Modern Cards */
.sessions-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.session-card-v2 {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.session-card-v2:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.session-card-v2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--ink-muted);
    opacity: 0.4;
}

.session-card-v2.connected::before {
    background: linear-gradient(90deg, #10b981, #059669);
    opacity: 1;
}

.session-card-v2.waiting_for_qr::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
    opacity: 1;
}

.session-card-v2.disconnected::before {
    background: linear-gradient(90deg, #ef4444, #b91c1c);
    opacity: 0.7;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.card-top .session-info h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.card-top .session-id-tag {
    font-size: 0.75rem;
    color: var(--ink-muted);
    font-family: monospace;
}

/* Status Badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.status-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-pill.connected {
    background: var(--ok-soft);
    color: var(--ok);
}
.status-pill.connected .dot {
    background: var(--ok);
    box-shadow: 0 0 8px var(--ok);
    animation: pulseGlow 2s infinite ease-in-out;
}

.status-pill.waiting_for_qr {
    background: var(--warning-soft);
    color: var(--warning);
}
.status-pill.waiting_for_qr .dot {
    background: var(--warning);
    animation: pulseGlow 1.5s infinite ease-in-out;
}

.status-pill.disconnected,
.status-pill.auth_failure {
    background: var(--danger-soft);
    color: var(--danger);
}
.status-pill.disconnected .dot {
    background: var(--danger);
}

.session-meta-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: var(--fs-sm);
    color: var(--ink-muted);
}

.session-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 4px;
}

.session-meta-item:last-child {
    border-bottom: none;
}

.session-meta-item .val {
    font-weight: 600;
    color: var(--ink);
}

/* Card Action Buttons */
.card-actions-v2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.card-actions-v2 .btn {
    flex: 1;
    min-width: 90px;
    padding: 0.55rem 0.75rem;
    font-size: var(--fs-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--radius-sm);
}

/* Onboarding & Wizard Modal */
.modal-wizard {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-wizard.show {
    display: flex;
}

.wizard-content {
    background: var(--surface-solid);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 540px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: fadeInScale 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.wizard-header {
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wizard-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wizard-close {
    background: transparent;
    border: none;
    color: var(--ink-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.15s ease;
}

.wizard-close:hover {
    color: var(--danger);
}

.wizard-body {
    padding: 1.75rem;
}

.wizard-tabs {
    display: flex;
    gap: 0.5rem;
    background: var(--surface-elevated);
    padding: 4px;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.wizard-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.65rem 1rem;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--ink-muted);
    border-radius: calc(var(--radius-sm) - 2px);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.wizard-tab-btn.active {
    background: var(--surface-solid);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    font-weight: 700;
}

.qr-display-box {
    background: #ffffff;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qr-display-box img {
    max-width: 220px;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.pairing-code-display {
    background: var(--ok-soft);
    border: 2px solid var(--ok);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    margin: 1rem 0;
}

.pairing-code-digit {
    font-family: 'Courier New', Courier, monospace;
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: 6px;
    color: var(--ok);
    margin: 0.5rem 0;
}


/* ============================================
   Skeleton Loading & Shared UX Utilities
   وفق إرشادات ui-ux-pro-max: skeleton بدل شاشة فاضية
   ============================================ */
.skeleton-card .sk,
.sk {
    background: linear-gradient(90deg, var(--surface-elevated) 25%, var(--surface) 50%, var(--surface-elevated) 75%);
    background-size: 200% 100%;
    animation: skShimmer 1.4s ease-in-out infinite;
    border-radius: 6px;
}
.sk-title { height: 18px; width: 60%; margin-bottom: 8px; }
.sk-tag { height: 12px; width: 35%; }
.sk-pill { height: 24px; width: 84px; border-radius: 999px; }
.sk-line { height: 14px; width: 90%; margin-top: 16px; }
.sk-line.short { width: 55%; }
.sk-row { height: 44px; width: 100%; margin-top: 10px; }
.sk-btn { height: 38px; width: 100%; margin-top: 20px; border-radius: var(--radius-sm); }
@keyframes skShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .skeleton-card .sk, .sk { animation: none; }
}

/* Empty state مع زر إجراء */
.empty-state .btn { margin-top: 1rem; }

/* تركيز واضح على العناصر التفاعلية (Accessibility: focus-states) */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline: none;
    box-shadow: var(--focus);
    border-radius: var(--radius-sm);
}
