/*
 * Aimma Host client theme
 * Child theme for WHMCS Twenty-One (Bootstrap 4).
 */

:root {
    --qimma-primary: #6d28d9;
    --qimma-primary-dark: #4c1d95;
    --qimma-primary-soft: #ede9fe;
    --qimma-accent: #a855f7;
    --qimma-ink: #21143b;
    --qimma-muted: #6b6478;
    --qimma-surface: #ffffff;
    --qimma-page: #faf8ff;
    --qimma-border: #e9e2f6;
    --qimma-success: #0f9f6e;
    --qimma-radius-sm: 12px;
    --qimma-radius: 20px;
    --qimma-radius-lg: 28px;
    --qimma-shadow: 0 18px 55px rgba(76, 29, 149, .11);
    --qimma-shadow-sm: 0 8px 24px rgba(76, 29, 149, .08);
}

html {
    scroll-behavior: smooth;
}

body,
button,
input,
select,
textarea {
    font-family: "Tajawal", "Noto Kufi Arabic", "Segoe UI", Arial, sans-serif;
}

body.primary-bg-color {
    color: var(--qimma-ink);
    background:
        radial-gradient(circle at 10% 0%, rgba(168, 85, 247, .08), transparent 27rem),
        var(--qimma-page);
}

body,
.card,
.form-control,
.btn {
    font-size: 15px;
}

a {
    color: var(--qimma-primary);
}

a:hover {
    color: var(--qimma-primary-dark);
}

::selection {
    color: #fff;
    background: var(--qimma-primary);
}

.container {
    width: min(100% - 30px, 1220px);
    max-width: 1220px;
}

.header {
    position: relative;
    z-index: 50;
    border: 0;
    box-shadow: 0 10px 35px rgba(44, 20, 77, .07);
}

.header .navbar.navbar-light {
    min-height: 82px;
    background: rgba(255, 255, 255, .97);
}

.header .navbar-brand {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    max-width: min(72vw, 320px);
    color: var(--qimma-ink);
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    font-weight: 800;
    line-height: 1.3;
}

.header .navbar-brand::before {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    background: url("../img/qimma-mark.svg") center/contain no-repeat;
    content: "";
}

.header .navbar-brand .logo-img {
    max-width: 220px;
    max-height: 54px;
}

.header .navbar-brand:has(.logo-img)::before {
    display: none;
}

.main-navbar-wrapper {
    min-height: 50px;
    border: 0;
    background: linear-gradient(135deg, var(--qimma-primary-dark), var(--qimma-primary));
}

.main-navbar-wrapper .navbar-nav > .nav-item > .nav-link,
.main-navbar-wrapper .navbar-nav > .nav-item > a {
    border-radius: 10px;
    color: rgba(255, 255, 255, .9);
    font-weight: 600;
}

.main-navbar-wrapper .navbar-nav > .nav-item > .nav-link:hover,
.main-navbar-wrapper .navbar-nav > .nav-item.active > .nav-link,
.main-navbar-wrapper .navbar-nav > .nav-item.show > .nav-link {
    color: #fff;
    background: rgba(255, 255, 255, .12);
}

.header .toolbar .nav-link,
.header .toolbar .btn {
    border-radius: 12px;
}

.header .cart-btn {
    color: var(--qimma-primary);
    background: var(--qimma-primary-soft);
}

.badge-info,
.badge-primary {
    background: var(--qimma-primary);
}

.topbar {
    color: #fff;
    background: var(--qimma-primary-dark);
}

.topbar .btn,
.topbar a {
    color: #fff;
}

.master-breadcrumb {
    border: 0;
    color: var(--qimma-muted);
    background: rgba(237, 233, 254, .55);
}

.breadcrumb {
    min-height: 46px;
    margin: 0;
    background: transparent;
}

#main-body {
    min-height: 55vh;
    padding-top: 36px;
    padding-bottom: 56px;
}

.card,
.panel,
.list-group,
.sidebar .card {
    border: 1px solid var(--qimma-border);
    border-radius: var(--qimma-radius);
    background: var(--qimma-surface);
    box-shadow: var(--qimma-shadow-sm);
}

.card-header,
.card-footer {
    border-color: var(--qimma-border);
    background: transparent;
}

.card-header:first-child {
    border-radius: var(--qimma-radius) var(--qimma-radius) 0 0;
}

.card-footer:last-child {
    border-radius: 0 0 var(--qimma-radius) var(--qimma-radius);
}

.client-home-cards .card,
.sidebar .card {
    overflow: hidden;
}

.client-home-cards .card-header,
.sidebar .card-header {
    border-bottom: 1px solid var(--qimma-border);
}

.client-home-cards .list-group-item,
.sidebar .list-group-item {
    border-color: var(--qimma-border);
}

.list-group-item-action:hover {
    color: var(--qimma-primary-dark);
    background: #faf7ff;
}

.btn {
    min-height: 42px;
    border-radius: 12px;
    font-weight: 700;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

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

.btn-primary,
.btn-success,
.btn-info {
    border-color: transparent;
    background: linear-gradient(135deg, var(--qimma-primary), var(--qimma-accent));
    box-shadow: 0 9px 22px rgba(109, 40, 217, .22);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-success:hover,
.btn-info:hover {
    border-color: transparent;
    background: linear-gradient(135deg, var(--qimma-primary-dark), var(--qimma-primary));
}

.btn-outline-primary {
    border-color: var(--qimma-primary);
    color: var(--qimma-primary);
}

.btn-outline-primary:hover {
    border-color: var(--qimma-primary);
    color: #fff;
    background: var(--qimma-primary);
}

.btn-default,
.btn-secondary {
    border-color: var(--qimma-border);
    color: var(--qimma-ink);
    background: #fff;
}

.form-control,
.custom-select,
.input-group-text {
    min-height: 46px;
    border-color: #dcd3eb;
    border-radius: 12px;
    background-color: #fff;
}

.form-control:focus,
.custom-select:focus {
    border-color: var(--qimma-primary);
    box-shadow: 0 0 0 3px rgba(109, 40, 217, .13);
}

.input-group > .form-control:not(:first-child),
.input-group > .custom-select:not(:first-child),
.input-group > .input-group-prepend > .input-group-text {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.input-group > .form-control:not(:last-child),
.input-group > .custom-select:not(:last-child),
.input-group > .input-group-append > .input-group-text {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.form-control-label,
label {
    color: var(--qimma-ink);
    font-weight: 700;
}

.alert {
    border: 0;
    border-radius: 15px;
}

.alert-info {
    color: #4c1d95;
    background: #ede9fe;
}

.alert-success {
    color: #086348;
    background: #dff8ef;
}

.alert-danger {
    color: #8b1733;
    background: #fff0f3;
}

.tiles {
    overflow: hidden;
    border: 1px solid var(--qimma-border);
    border-radius: var(--qimma-radius);
    background: #fff;
    box-shadow: var(--qimma-shadow);
}

.tiles .tile {
    min-height: 166px;
    border-color: var(--qimma-border);
    color: var(--qimma-ink);
    background: #fff;
}

.tiles .tile:hover {
    color: var(--qimma-primary);
    background: #fbf9ff;
}

.tiles .tile .stat {
    color: var(--qimma-primary);
    font-weight: 800;
}

.tiles .tile .highlight {
    background: linear-gradient(90deg, var(--qimma-primary), var(--qimma-accent)) !important;
}

.qimma-client-welcome {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    margin-bottom: 24px;
    padding: 28px;
    border-radius: 21px;
    color: #fff;
    background:
        radial-gradient(circle at 10% -40%, rgba(255, 255, 255, .26), transparent 20rem),
        linear-gradient(135deg, var(--qimma-primary-dark), var(--qimma-primary) 65%, var(--qimma-accent));
    box-shadow: 0 16px 42px rgba(76, 29, 149, .2);
}

.qimma-client-welcome-label {
    color: #e9d5ff;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .14em;
}

.qimma-client-welcome h2 {
    margin: 5px 0;
    color: #fff;
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    font-weight: 900;
}

.qimma-client-welcome p {
    margin: 0;
    color: rgba(255, 255, 255, .78);
}

.qimma-client-welcome .btn {
    flex: 0 0 auto;
    color: var(--qimma-primary-dark);
    background: #fff;
}

.login-form .card {
    overflow: hidden;
    border: 0;
    box-shadow: var(--qimma-shadow);
}

.login-form .card::before {
    display: block;
    height: 7px;
    background: linear-gradient(90deg, var(--qimma-primary-dark), var(--qimma-accent));
    content: "";
}

.login-form .card-footer {
    background: #faf7ff;
}

.domain-search {
    position: relative;
    overflow: hidden;
    padding: 48px 0;
    color: #fff;
    background:
        radial-gradient(circle at 20% -20%, rgba(255, 255, 255, .25), transparent 22rem),
        linear-gradient(135deg, var(--qimma-primary-dark), var(--qimma-primary) 62%, var(--qimma-accent));
}

.domain-search::after {
    position: absolute;
    right: -80px;
    bottom: -110px;
    width: 300px;
    height: 300px;
    border: 48px solid rgba(255, 255, 255, .07);
    border-radius: 50%;
    content: "";
}

.domain-search h2,
.domain-search p {
    color: #fff;
}

.domain-search .form-control {
    min-height: 56px;
    border: 0;
}

.domain-search .btn {
    min-height: 56px;
    border: 0;
    color: var(--qimma-primary-dark);
    background: #fff;
}

.qimma-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(290px, .88fr);
    gap: clamp(32px, 6vw, 76px);
    align-items: center;
    overflow: hidden;
    margin-bottom: 58px;
    padding: clamp(38px, 6vw, 76px);
    border: 1px solid rgba(109, 40, 217, .08);
    border-radius: var(--qimma-radius-lg);
    background:
        radial-gradient(circle at 90% 10%, rgba(168, 85, 247, .18), transparent 24rem),
        linear-gradient(135deg, #fff, #f6f1ff);
    box-shadow: var(--qimma-shadow);
}

.qimma-hero::before {
    position: absolute;
    top: -95px;
    right: -85px;
    width: 280px;
    height: 280px;
    border: 44px solid rgba(109, 40, 217, .055);
    border-radius: 50%;
    content: "";
}

.qimma-eyebrow {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    padding: 8px 13px;
    border: 1px solid #ddd2f3;
    border-radius: 999px;
    color: var(--qimma-primary-dark);
    background: rgba(255, 255, 255, .78);
    font-size: .84rem;
    font-weight: 800;
}

.qimma-eyebrow::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--qimma-success);
    box-shadow: 0 0 0 5px rgba(15, 159, 110, .12);
    content: "";
}

.qimma-hero h1 {
    max-width: 760px;
    margin-bottom: 18px;
    color: var(--qimma-ink);
    font-size: clamp(2rem, 4.6vw, 4.2rem);
    font-weight: 900;
    letter-spacing: -.04em;
    line-height: 1.12;
}

.qimma-gradient-text {
    color: var(--qimma-primary);
    background: linear-gradient(90deg, var(--qimma-primary-dark), var(--qimma-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.qimma-hero p {
    max-width: 680px;
    margin-bottom: 25px;
    color: var(--qimma-muted);
    font-size: clamp(1rem, 1.4vw, 1.16rem);
    line-height: 1.9;
}

.qimma-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.qimma-hero-actions .btn {
    min-height: 50px;
    padding: 13px 22px;
}

.qimma-hero-visual {
    position: relative;
    min-height: 340px;
}

.qimma-server-card {
    position: absolute;
    inset: 28px 18px 28px 28px;
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 26px;
    color: #fff;
    background:
        radial-gradient(circle at 85% 0, rgba(255, 255, 255, .18), transparent 13rem),
        linear-gradient(155deg, var(--qimma-primary-dark), var(--qimma-primary));
    box-shadow: 0 30px 70px rgba(76, 29, 149, .28);
    transform: rotate(2deg);
}

.qimma-server-card::after {
    position: absolute;
    right: -18px;
    bottom: -22px;
    width: 96px;
    height: 96px;
    border: 16px solid rgba(255, 255, 255, .09);
    border-radius: 50%;
    content: "";
}

.qimma-server-top {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 34px;
}

.qimma-server-logo {
    width: 58px;
    height: 58px;
    padding: 7px;
    border-radius: 17px;
    background: #fff;
}

.qimma-server-status {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .13);
    font-size: .78rem;
    font-weight: 800;
}

.qimma-server-status::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 5px rgba(74, 222, 128, .12);
    content: "";
}

.qimma-server-lines {
    display: grid;
    gap: 13px;
}

.qimma-server-line {
    display: grid;
    grid-template-columns: 14px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 13px;
    background: rgba(255, 255, 255, .08);
}

.qimma-server-line i {
    color: #d8b4fe;
}

.qimma-server-line span:last-child {
    color: #e9d5ff;
    font-size: .78rem;
}

.qimma-float-badge {
    position: absolute;
    right: 0;
    bottom: 0;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 14px 17px;
    border: 1px solid var(--qimma-border);
    border-radius: 15px;
    color: var(--qimma-ink);
    background: #fff;
    box-shadow: var(--qimma-shadow);
    font-weight: 800;
}

.qimma-float-badge i {
    color: var(--qimma-success);
}

.qimma-section-head {
    max-width: 720px;
    margin: 0 auto 30px;
    text-align: center;
}

.qimma-section-head h2 {
    margin-bottom: 12px;
    color: var(--qimma-ink);
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    font-weight: 900;
}

.qimma-section-head p {
    color: var(--qimma-muted);
    line-height: 1.8;
}

.qimma-feature-grid,
.qimma-products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 58px;
}

.qimma-feature,
.qimma-product {
    position: relative;
    overflow: hidden;
    padding: 27px;
    border: 1px solid var(--qimma-border);
    border-radius: var(--qimma-radius);
    background: #fff;
    box-shadow: var(--qimma-shadow-sm);
}

.qimma-feature {
    transition: transform .22s ease, box-shadow .22s ease;
}

.qimma-feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--qimma-shadow);
}

.qimma-feature-icon {
    display: grid;
    width: 54px;
    height: 54px;
    margin-bottom: 20px;
    border-radius: 16px;
    place-items: center;
    color: var(--qimma-primary);
    background: var(--qimma-primary-soft);
    font-size: 1.35rem;
}

.qimma-feature h3,
.qimma-product h3 {
    margin-bottom: 10px;
    color: var(--qimma-ink);
    font-size: 1.15rem;
    font-weight: 800;
}

.qimma-feature p,
.qimma-product p {
    margin-bottom: 0;
    color: var(--qimma-muted);
    line-height: 1.75;
}

.qimma-product {
    display: flex;
    flex-direction: column;
}

.qimma-product::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--qimma-primary), var(--qimma-accent));
    content: "";
}

.qimma-product p {
    flex: 1;
    margin-bottom: 22px;
}

.qimma-help-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.qimma-help-grid a {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    padding: 22px;
    border: 1px solid var(--qimma-border);
    border-radius: var(--qimma-radius);
    color: var(--qimma-ink);
    background: #fff;
    box-shadow: var(--qimma-shadow-sm);
    font-weight: 800;
    text-align: center;
}

.qimma-help-grid a:hover {
    color: var(--qimma-primary);
    text-decoration: none;
    transform: translateY(-3px);
}

.qimma-help-grid i {
    color: var(--qimma-primary);
    font-size: 1.65rem;
}

.footer {
    border: 0;
    color: rgba(255, 255, 255, .75);
    background: #211137;
}

.footer a {
    color: #e9d5ff;
}

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .ml-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

html[dir="rtl"] .mr-auto {
    margin-right: 0 !important;
    margin-left: auto !important;
}

html[dir="rtl"] .mr-1,
html[dir="rtl"] .mr-2,
html[dir="rtl"] .mr-3 {
    margin-right: 0 !important;
    margin-left: .75rem !important;
}

html[dir="rtl"] .ml-1,
html[dir="rtl"] .ml-2,
html[dir="rtl"] .ml-3 {
    margin-right: .75rem !important;
    margin-left: 0 !important;
}

html[dir="rtl"] .float-right {
    float: left !important;
}

html[dir="rtl"] .float-left {
    float: right !important;
}

html[dir="rtl"] .text-right {
    text-align: left !important;
}

html[dir="rtl"] .text-left {
    text-align: right !important;
}

html[dir="rtl"] .dropdown-menu {
    right: auto;
    left: 0;
    text-align: right;
}

html[dir="rtl"] .qimma-hero::before {
    right: auto;
    left: -85px;
}

html[dir="rtl"] .qimma-server-card {
    inset: 28px 28px 28px 18px;
    transform: rotate(-2deg);
}

html[dir="rtl"] .qimma-float-badge {
    right: auto;
    left: 0;
}

@media (max-width: 991.98px) {
    .qimma-hero {
        grid-template-columns: 1fr;
    }

    .qimma-client-welcome {
        align-items: stretch;
        flex-direction: column;
    }

    .qimma-hero-visual {
        min-height: 300px;
    }

    .qimma-feature-grid,
    .qimma-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qimma-help-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .main-navbar-wrapper .navbar-collapse {
        padding: 12px 0;
    }
}

@media (max-width: 767.98px) {
    .container {
        width: min(100% - 20px, 1220px);
    }

    #main-body {
        padding-top: 22px;
        padding-bottom: 38px;
    }

    .header .navbar.navbar-light {
        min-height: 68px;
    }

    .header .navbar-brand {
        gap: 9px;
        max-width: 62vw;
        font-size: .98rem;
    }

    .header .navbar-brand::before {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .qimma-hero {
        gap: 24px;
        margin-bottom: 42px;
        padding: 29px 22px;
        border-radius: 22px;
    }

    .qimma-hero h1 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .qimma-hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .qimma-hero-actions .btn {
        width: 100%;
    }

    .qimma-hero-visual {
        min-height: 280px;
    }

    .qimma-server-card {
        inset: 12px 5px 28px;
        padding: 20px;
    }

    html[dir="rtl"] .qimma-server-card {
        inset: 12px 5px 28px;
    }

    .qimma-feature-grid,
    .qimma-products-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .qimma-help-grid {
        gap: 10px;
    }

    .qimma-help-grid a {
        min-height: 118px;
        padding: 15px;
    }

    .tiles .tile {
        min-height: 135px;
    }
}

@media (max-width: 420px) {
    .qimma-help-grid {
        grid-template-columns: 1fr;
    }

    .qimma-hero-visual {
        min-height: 260px;
    }

    .qimma-server-line {
        grid-template-columns: 12px 1fr;
    }

    .qimma-server-line span:last-child {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
