/**
 * Shahir — Brand Desk (Client / Users portal)
 * Metronic 8 skin: architectural command desk (ink + amber + purple)
 * Distinct from Creator Stage (influencer) & admin
 */

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

:root {
    --desk-ink: #0A0A0A;
    --desk-slate: #14141A;
    --desk-paper: #F4F4F6;
    --desk-surface: #FAFAFB;
    --desk-orange: #F97316;
    --desk-orange-deep: #EA580C;
    --desk-purple: #6D28D9;
    --desk-amber: #FACC15;
    --desk-magenta: #DB2777;
    --desk-grad: linear-gradient(120deg, #6D28D9 0%, #F97316 100%);
    --desk-grad-full: linear-gradient(120deg, #6D28D9 0%, #DB2777 35%, #F97316 70%, #FACC15 100%);
    --desk-radius: 0.35rem;
    --desk-font: 'Cairo', 'IBM Plex Sans Arabic', 'Plus Jakarta Sans', system-ui, sans-serif;
}

body.client-desk {
    --bs-primary: #F97316;
    --bs-primary-rgb: 249, 115, 22;
    --kt-primary: #F97316;
    --kt-primary-active: #EA580C;
    --kt-primary-light: #FFF7ED;
    --kt-text-primary: #EA580C;
    font-family: var(--desk-font) !important;
    background: var(--desk-paper);
}

body.client-desk .page,
body.client-desk #kt_wrapper,
body.client-desk #kt_content,
body.client-desk #kt_post {
    isolation: isolate;
}

body.client-desk .content,
body.client-desk #kt_content {
    background:
        radial-gradient(ellipse 45% 35% at 0% 0%, rgba(109, 40, 217, 0.05), transparent 55%),
        radial-gradient(ellipse 40% 30% at 100% 100%, rgba(249, 115, 22, 0.06), transparent 50%),
        var(--desk-surface) !important;
    position: relative;
    overflow: hidden;
}

body.client-desk #kt_content_container {
    position: relative;
    z-index: 1;
    padding-top: 0.25rem;
    padding-bottom: 2rem;
}

body.client-desk #kt_toolbar {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

body.client-desk #kt_toolbar .page-title h1 {
    font-size: 1.15rem !important;
    margin: 0 !important;
}

body.client-desk #kt_post {
    position: relative;
    z-index: 1;
}

/* ─── Aside: ink architecture ─── */
body.client-desk .desk-aside.aside-dark,
body.client-desk #kt_aside.desk-aside {
    background: linear-gradient(180deg, #0A0A0A 0%, #121218 100%) !important;
    box-shadow: inset -3px 0 0 #F97316;
    overflow: hidden !important;
    z-index: 98 !important;
}

body.client-desk .desk-aside .aside-logo {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

body.client-desk .desk-aside .aside-logo::after {
    content: "";
    position: absolute;
    bottom: -1px;
    inset-inline-start: 1.25rem;
    width: 2.5rem;
    height: 2px;
    background: var(--desk-grad);
}

body.client-desk .desk-badge-mini {
    font-size: 0.6rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #F97316;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', Cairo, sans-serif;
}

body.client-desk .desk-aside .menu-section {
    color: rgba(249, 115, 22, 0.85) !important;
    letter-spacing: 0.2em !important;
    font-size: 0.65rem !important;
}

body.client-desk .desk-aside .menu-link {
    border-radius: 0 !important;
    border-inline-start: 3px solid transparent;
    margin-inline: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

body.client-desk .desk-aside .menu-link:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-inline-start-color: rgba(249, 115, 22, 0.4);
}

body.client-desk .desk-aside .menu-link.active {
    background: rgba(249, 115, 22, 0.12) !important;
    border-inline-start-color: #F97316;
}

body.client-desk .desk-aside .menu-link.active .menu-icon i,
body.client-desk .desk-aside .menu-link.active .menu-title {
    color: #FDBA74 !important;
}

body.client-desk .desk-aside .menu-icon i {
    color: rgba(255, 255, 255, 0.45);
}

/* ─── Header: keep Metronic fixed ─── */
body.client-desk .header.desk-header {
    background: rgba(250, 250, 251, 0.97) !important;
    backdrop-filter: blur(10px);
    border-bottom: 0 !important;
    box-shadow: none !important;
    z-index: 99 !important;
}

body.client-desk .desk-header .container-fluid {
    position: relative;
}

body.client-desk .desk-header .container-fluid::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--desk-grad);
    pointer-events: none;
}

.badge-desk {
    background: var(--desk-grad);
    color: #fff !important;
    font-weight: 800;
    letter-spacing: 0.08em;
    border-radius: 0.2rem !important;
    font-size: 0.7rem;
}

/* ─── Buttons ─── */
body.client-desk .btn-primary {
    background: #F97316 !important;
    border: 0 !important;
    color: #fff !important;
    font-weight: 700;
    border-radius: 0.3rem !important;
    box-shadow: 0 4px 0 #C2410C;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

body.client-desk .btn-primary:hover {
    background: #EA580C !important;
    transform: translateY(1px);
    box-shadow: 0 2px 0 #9A3412;
    color: #fff !important;
}

body.client-desk .btn-light-primary {
    background: #FFF7ED !important;
    color: #C2410C !important;
    border: 1px solid rgba(249, 115, 22, 0.2) !important;
    border-radius: 0.3rem !important;
}

body.client-desk .link-primary { color: #EA580C !important; }

body.client-desk .form-control:focus,
body.client-desk .form-select:focus,
body.client-desk .form-control-solid:focus {
    border-color: #F97316 !important;
    box-shadow: 0 0 0 0.25rem rgba(249, 115, 22, 0.15) !important;
}

body.client-desk .badge-light-primary {
    background: #FFF7ED !important;
    color: #C2410C !important;
}

body.client-desk .symbol-label.bg-light-primary {
    background: linear-gradient(145deg, #FFF7ED, #F3E8FF) !important;
    color: #EA580C !important;
}

/* ─── Cards: sharp architectural ─── */
body.client-desk .card {
    border: 1px solid rgba(10, 10, 10, 0.08) !important;
    border-radius: var(--desk-radius) !important;
    box-shadow: 6px 6px 0 rgba(10, 10, 10, 0.035) !important;
    background: #fff !important;
    overflow: visible;
    margin-bottom: 0.5rem;
}

body.client-desk .card .card-header,
body.client-desk .card .card-body {
    position: relative;
    z-index: 1;
}

body.client-desk .desk-welcome-card {
    background:
        linear-gradient(135deg, rgba(109, 40, 217, 0.05), rgba(249, 115, 22, 0.05)),
        #fff !important;
    border: 1px solid rgba(249, 115, 22, 0.2) !important;
    box-shadow: 8px 8px 0 rgba(109, 40, 217, 0.06) !important;
}

/* ─── Desk hero ─── */
.desk-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 0.35rem;
    padding: 1.75rem 2rem;
    background: #0A0A0A;
    color: #fff;
    margin-bottom: 1.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    box-shadow: 8px 8px 0 rgba(249, 115, 22, 0.28);
}

.desk-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 60% at 100% 0%, rgba(249, 115, 22, 0.28), transparent 55%),
        radial-gradient(ellipse 40% 50% at 0% 100%, rgba(109, 40, 217, 0.22), transparent 50%);
    z-index: 0;
}

.desk-hero > * { position: relative; z-index: 1; }

.desk-hero-kicker {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #F97316;
    margin-bottom: 0.75rem;
    font-family: 'Plus Jakarta Sans', Cairo, sans-serif;
}

.desk-hero h2 {
    font-weight: 800;
    font-size: clamp(1.45rem, 2.4vw, 1.9rem);
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
    max-width: 28rem;
}

.desk-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
    max-width: 34rem;
    line-height: 1.65;
}

.desk-hero-seal {
    width: 4.5rem;
    height: 4.5rem;
    border: 2px solid rgba(250, 204, 21, 0.5);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #FACC15;
    text-align: center;
    line-height: 1.2;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.2), transparent 70%);
    transform: rotate(-8deg);
}

/* ─── Stat tiles ─── */
.desk-stat {
    position: relative;
    background: #fff;
    border: 1px solid rgba(10, 10, 10, 0.08);
    border-radius: 0.35rem;
    padding: 1.25rem 1.15rem;
    box-shadow: 5px 5px 0 rgba(10, 10, 10, 0.035);
    height: 100%;
    min-height: 7.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.desk-stat:hover {
    transform: translate(-2px, -2px);
    box-shadow: 10px 10px 0 rgba(249, 115, 22, 0.15);
}

.desk-stat-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #71717A;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.desk-stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0A0A0A;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.desk-stat-bar {
    margin-top: 1rem;
    height: 3px;
    background: #E4E4E7;
    border-radius: 1px;
    overflow: hidden;
}

.desk-stat-bar > span {
    display: block;
    height: 100%;
    background: var(--desk-grad);
}

.desk-stat:nth-child(1) .desk-stat-bar > span { width: 70%; }
.desk-stat:nth-child(2) .desk-stat-bar > span { width: 45%; background: linear-gradient(90deg, #6D28D9, #DB2777); }
.desk-stat:nth-child(3) .desk-stat-bar > span { width: 85%; background: linear-gradient(90deg, #F97316, #FACC15); }
.desk-stat:nth-child(4) .desk-stat-bar > span { width: 30%; background: #6D28D9; }

/* ─── Guest ─── */
.client-desk-guest {
    font-family: var(--desk-font);
}

.client-desk-guest .desk-guest-bg {
    background:
        linear-gradient(90deg, rgba(249, 115, 22, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(249, 115, 22, 0.05) 1px, transparent 1px),
        radial-gradient(ellipse 50% 40% at 15% 20%, rgba(109, 40, 217, 0.25), transparent 55%),
        radial-gradient(ellipse 45% 40% at 90% 80%, rgba(249, 115, 22, 0.22), transparent 50%),
        #0A0A0A;
    background-size: 48px 48px, 48px 48px, auto, auto, auto;
    min-height: 100vh;
}

.client-desk-guest .btn-primary {
    background: #F97316 !important;
    border: 0 !important;
    border-radius: 0.3rem !important;
    box-shadow: 0 4px 0 #C2410C;
}

.client-desk-guest .form-control-solid:focus {
    border-color: #F97316 !important;
    box-shadow: 0 0 0 0.25rem rgba(249, 115, 22, 0.15) !important;
}

.client-desk-guest .link-primary { color: #EA580C !important; }

.desk-login-card {
    background: #fff;
    border-radius: 0.35rem;
    box-shadow:
        0 0 0 1px rgba(249, 115, 22, 0.2),
        16px 16px 0 rgba(109, 40, 217, 0.25);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.desk-login-card .form .text-center.mt-4 {
    margin-top: 1.25rem !important;
    padding-top: 1rem;
    border-top: 1px solid #F4F4F5;
}

.desk-login-side {
    background:
        radial-gradient(ellipse at 70% 20%, rgba(249, 115, 22, 0.4), transparent 50%),
        radial-gradient(ellipse at 20% 90%, rgba(109, 40, 217, 0.35), transparent 45%),
        #0A0A0A;
    position: relative;
    overflow: hidden;
}

.desk-login-side::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 48%, rgba(255,255,255,0.04) 50%, transparent 52%),
        linear-gradient(0deg, transparent 48%, rgba(255,255,255,0.04) 50%, transparent 52%);
    background-size: 32px 32px;
}

.desk-login-side .content {
    position: relative;
    z-index: 1;
}

/* Project cards */
.desk-project-card {
    display: block;
    background: #fff;
    border: 1px solid rgba(10, 10, 10, 0.08);
    border-radius: 0.35rem;
    padding: 1.25rem;
    color: inherit;
    text-decoration: none;
    box-shadow: 6px 6px 0 rgba(10, 10, 10, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.desk-project-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 10px 10px 0 rgba(249, 115, 22, 0.2);
    color: inherit;
}

.desk-project-card h3 {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0A0A0A;
}

.desk-project-card p {
    color: #71717A;
    font-size: 0.9rem;
    margin: 0;
}

body.client-desk .scrolltop {
    background: #F97316 !important;
    border-radius: 0.25rem !important;
}

@media (max-width: 992px) {
    .desk-hero { padding: 1.5rem; box-shadow: 6px 6px 0 rgba(249, 115, 22, 0.3); }
}

/* ??? Phone-first auth (fast + responsive) ??? */
.phone-auth-card { max-width: 920px; }
.phone-auth-steps {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}
.phone-auth-steps span {
    font-size: 0.75rem;
    font-weight: 700;
    color: #71717A;
    background: #F4F4F6;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
}
.phone-auth-steps span.is-active {
    color: #EA580C;
    background: #FFF7ED;
}
.phone-input-wrap {
    display: flex;
    align-items: stretch;
    border-radius: 0.475rem;
    overflow: hidden;
    background: #F9F9F9;
    border: 1px solid #E4E6EF;
}
.phone-input-wrap:focus-within {
    border-color: #F97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}
.phone-prefix {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.85rem;
    font-weight: 700;
    color: #52525B;
    background: #EEEEF2;
    white-space: nowrap;
}
.phone-flag {
    font-size: 1.05rem;
    line-height: 1;
}
.phone-input-wrap .phone-input {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}
.pin-input {
    letter-spacing: 0.35em;
    font-weight: 700;
    font-size: 1.15rem;
}
@media (max-width: 576px) {
    .phone-auth-card .p-8 { padding: 1.5rem !important; }
    .pin-input { font-size: 1rem; letter-spacing: 0.25em; }
}
