/* Lightweight modern UI overrides */
:root {
    --ui-primary: #2563eb;
    --ui-primary-soft: rgba(37, 99, 235, 0.12);
    --ui-text: #0f172a;
    --ui-muted: #64748b;
    --ui-border: #e2e8f0;
    --ui-surface: #ffffff;
    --ui-bg: #f8fafc;
    --ui-radius: 14px;
    --ui-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

html,
body {
    font-size: 15px;
    color: var(--ui-text);
    background: var(--ui-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    transition: color .2s ease, opacity .2s ease;
}

a:hover {
    text-decoration: none;
}

.bg-gray {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

header {
    box-shadow: 0 3px 16px rgba(15, 23, 42, 0.06);
    position: sticky;
    top: 0;
    z-index: 200;
    transition: box-shadow .22s ease, backdrop-filter .22s ease, background-color .22s ease;
}

header.modern-header-scrolled {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(4px);
}

.header-top {
    background: #ffffff;
    border-bottom: 1px solid var(--ui-border);
}

.header-middle,
.header-bottom {
    background: #ffffff;
}

.navbar-brand img {
    max-height: 46px;
    width: auto;
}

.navbar-mastermenu .nav-link,
.navbar-nav .nav-link {
    font-weight: 500;
    color: #334155;
    border-radius: 10px;
    transition: background-color .2s ease, color .2s ease;
}

.navbar-mastermenu .nav-link:hover,
.navbar-nav .nav-link:hover {
    color: var(--ui-primary);
    background: var(--ui-primary-soft);
}

.page-title {
    font-weight: 700;
    letter-spacing: .2px;
    margin-bottom: 14px;
}

.breadcrumb {
    background: transparent;
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 8px;
}

.page-container,
.card,
.modal-content,
.list-group-item,
.table {
    border-radius: var(--ui-radius);
}

.card,
.page-container,
.modal-content {
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow);
}

.card {
    overflow: hidden;
}

.card .card-header {
    background: #ffffff;
    border-bottom: 1px solid var(--ui-border);
    font-weight: 600;
}

.index-content .page-container,
.index-products .card {
    margin-bottom: 18px;
}

.btn {
    border-radius: 10px;
    font-weight: 600;
    transition: transform .15s ease, box-shadow .2s ease;
}

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

.btn-primary,
.btn-secondary,
.btn-success,
.btn-info {
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.form-control,
.custom-select,
.chosen-container-single .chosen-single {
    min-height: 42px;
    border-radius: 10px;
    border-color: #cbd5e1;
    box-shadow: none;
}

.form-control:focus,
.custom-select:focus {
    border-color: var(--ui-primary);
    box-shadow: 0 0 0 3px var(--ui-primary-soft);
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    border-top: none;
    border-bottom: 1px solid var(--ui-border);
    color: #475569;
    font-weight: 700;
    background: #f8fafc;
}

.table td,
.table th {
    border-color: var(--ui-border);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: rgba(148, 163, 184, 0.08);
}

.alert {
    border-radius: 12px;
    border-width: 1px;
}

footer,
.footer {
    border-top: 1px solid var(--ui-border);
    background: #ffffff;
}

.mini-fab,
.fixed-action-btn .btn,
#toTop {
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}

.modern-ui .wow {
    visibility: visible !important;
}

.modern-hero-section {
    margin-top: 8px;
}

.modern-hero-card {
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 55%, #2563eb 100%);
    color: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
    position: relative;
    overflow: hidden;
}

.modern-hero-card::before,
.modern-hero-card::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.09);
}

.modern-hero-card::before {
    width: 280px;
    height: 280px;
    right: -110px;
    top: -110px;
}

.modern-hero-card::after {
    width: 190px;
    height: 190px;
    left: -90px;
    bottom: -90px;
}

.modern-hero-title {
    color: #fff;
    font-size: clamp(1.8rem, 2.8vw, 2.8rem);
    font-weight: 800;
    line-height: 1.12;
    margin-bottom: .65rem;
}

.modern-hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    max-width: 680px;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.15rem;
}

.modern-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    font-weight: 600;
    border-radius: 999px;
    padding: .42rem .95rem;
    background: rgba(255, 255, 255, 0.12);
}

.modern-hero-actions .btn {
    min-width: 155px;
}

.modern-hero-actions .btn-primary {
    background: #fff;
    border-color: #fff;
    color: #0f172a;
}

.modern-hero-actions .btn-outline-primary {
    border-color: rgba(255, 255, 255, 0.65);
    color: #fff;
}

.modern-hero-actions .btn-outline-primary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.modern-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
}

.modern-kpi-card {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: .85rem .75rem;
    text-align: center;
    backdrop-filter: blur(2px);
}

.modern-kpi-card .icon {
    font-size: 1.1rem;
    margin-bottom: .35rem;
}

.modern-kpi-card .label {
    font-size: .86rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.modern-features .modern-feature-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow);
    padding: 1.15rem 1rem;
    transition: transform .2s ease, box-shadow .2s ease;
}

.modern-features .modern-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.12);
}

.modern-features .modern-feature-card .icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ui-primary-soft);
    color: var(--ui-primary);
    font-size: 1.1rem;
    margin-bottom: .75rem;
}

.modern-features .modern-feature-card h5 {
    font-size: 1rem;
    margin-bottom: .45rem;
    font-weight: 700;
}

.modern-features .modern-feature-card p {
    font-size: .9rem;
    color: var(--ui-muted);
    margin-bottom: 0;
    line-height: 1.65;
}

.modern-section-title {
    font-size: clamp(1.2rem, 2.2vw, 1.8rem);
    font-weight: 800;
    margin-bottom: .6rem;
    letter-spacing: .2px;
}

.modern-section-subtitle {
    color: var(--ui-muted);
    line-height: 1.7;
    margin-bottom: .9rem;
}

.modern-proof-card,
.modern-process-card,
.modern-cta-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow);
    padding: 1.35rem;
}

.modern-trust-badges {
    gap: .55rem;
}

.modern-trust-badges span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .38rem .72rem;
    border-radius: 999px;
    font-size: .83rem;
    font-weight: 600;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.modern-trust-badges i {
    color: var(--ui-primary);
}

.modern-stat-card {
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    background: #f8fafc;
    padding: .85rem .6rem;
    text-align: center;
}

.modern-stat-card .value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.modern-stat-card .label {
    margin-top: .24rem;
    font-size: .78rem;
    color: var(--ui-muted);
    font-weight: 600;
}

.modern-step {
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    padding: 1rem;
    background: #fff;
    position: relative;
}

.modern-step .step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ui-primary-soft);
    color: var(--ui-primary);
    font-weight: 800;
    margin-bottom: .6rem;
}

.modern-step h6 {
    font-weight: 700;
    margin-bottom: .35rem;
}

.modern-step p {
    margin: 0;
    color: var(--ui-muted);
    line-height: 1.6;
    font-size: .9rem;
}

.modern-cta-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

.modern-cta-card h3 {
    margin-bottom: .4rem;
    font-size: clamp(1.15rem, 2vw, 1.6rem);
    font-weight: 800;
}

.modern-cta-card p {
    margin: 0;
    color: var(--ui-muted);
}

.modern-cta-card .btn {
    min-width: 170px;
}

.index-items .title,
.index-affiliate h3,
.index-reseller h3,
.index-content h1,
.index-content h2,
.index-content h3 {
    font-weight: 800;
    letter-spacing: .2px;
}

.index-items .title {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--ui-border);
    padding-bottom: .8rem;
}

.index-items .title span {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.index-items .title span::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--ui-primary);
    box-shadow: 0 0 0 5px var(--ui-primary-soft);
}

.index-products .card-product,
.index-items .card-product,
.index-items .card {
    border-radius: 14px;
    border: 1px solid var(--ui-border);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    transition: transform .18s ease, box-shadow .2s ease;
}

.index-products .card-product:hover,
.index-items .card-product:hover,
.index-items .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.card-product .card-product-img {
    background: #f8fafc;
}

.card-info .truncate-text,
.card-product .truncate-text {
    font-weight: 600;
    color: #0f172a;
}

.carousel.index-banner {
    background: transparent !important;
}

.carousel.index-banner .carousel-item {
    border-radius: 16px;
    overflow: hidden;
}

.carousel.index-banner .carousel-control-prev,
.carousel.index-banner .carousel-control-next {
    width: 52px;
}

.carousel.index-banner .carousel-control-prev i,
.carousel.index-banner .carousel-control-next i {
    background: rgba(15, 23, 42, 0.5);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.carousel-indicators li {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    opacity: .5;
}

.carousel-indicators .active {
    opacity: 1;
    transform: scale(1.15);
}

.affiliate-marketing,
.card-reseller {
    border-radius: 16px;
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow);
}

.affiliate-marketing .big-icon,
.card-reseller .fa,
.card-reseller .fas {
    color: var(--ui-primary);
}

.footer-links,
footer,
.footer {
    margin-top: 24px;
}

.modal .modal-header {
    border-bottom: 1px solid var(--ui-border);
}

.modal .modal-footer {
    border-top: 1px solid var(--ui-border);
}

.modern-dashboard-page .clientarea-balance > .container > .page-container {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.modern-dashboard-page .card {
    border: 1px solid var(--ui-border);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.modern-dashboard-page .big-font {
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    font-weight: 800;
    letter-spacing: .2px;
}

.modern-dashboard-page .card-unpaid-balance {
    background: linear-gradient(145deg, #ffffff 0%, #fff5f5 100%);
}

.modern-dashboard-page .card-othercredit {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

.modern-dashboard-page #othercredit .card-body {
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    background: #ffffff;
    min-height: 160px;
}

.modern-dashboard-page .card-area-status {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
}

.modern-dashboard-page .card-area-status h2 {
    font-weight: 800;
    margin-bottom: .2rem;
}

.modern-dashboard-page .card-order-success {
    background: linear-gradient(180deg, #f8fffb 0%, #ffffff 100%);
}

.modern-dashboard-page .card-order-process {
    background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
}

.modern-dashboard-page .card-order-fail {
    background: linear-gradient(180deg, #fff8f8 0%, #ffffff 100%);
}

.modern-dashboard-page .progressbar {
    border-radius: 999px !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
}

.modern-dashboard-page .card-announcement {
    height: 100%;
}

.modern-reseller-imei {
    margin-top: .15rem;
}

.modern-reseller-imei-wrap {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.modern-reseller-imei .card-search {
    border: 1px solid var(--ui-border);
    border-radius: 14px;
    background: #ffffff;
}

.modern-reseller-imei .card-search .form-inline {
    gap: .75rem;
    flex-wrap: wrap;
}

.modern-reseller-imei .card-search .form-group.w-25 {
    min-width: 260px;
    flex: 1 1 320px;
}

.modern-reseller-imei .card-search .form-group.mb-0 {
    min-width: 220px;
    flex: 1 1 260px;
}

.modern-reseller-imei .service-list-box .group > .col-12 h3.title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: .9rem;
}

.modern-reseller-imei .service-list-box .group > .col-12 h3.title span {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.modern-reseller-imei .service-list-box .group > .col-12 h3.title span::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--ui-primary);
    box-shadow: 0 0 0 5px var(--ui-primary-soft);
}

.modern-reseller-imei .service {
    transition: transform .18s ease, filter .18s ease;
}

.modern-reseller-imei .service:hover {
    transform: translateY(-2px);
}

.modern-reseller-imei .card-product {
    border: 1px solid var(--ui-border);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.modern-reseller-imei .card-product .badge {
    border-radius: 999px;
    padding: .35rem .6rem;
    font-weight: 700;
}

.modern-reseller-imei .card-servicedetail {
    border: 1px solid var(--ui-border);
    background: #ffffff;
}

.modern-reseller-imei .modal-content {
    border: 1px solid var(--ui-border);
    border-radius: 16px;
}

.modern-reseller-imei .modal-header {
    background: #f8fafc;
}

.modern-reseller-imei #serviceDetails2 {
    min-height: 320px;
}

@media (max-width: 1200px) {
    .modern-hero-card {
        padding: 1.6rem;
    }
}

@media (max-width: 992px) {
    html,
    body {
        font-size: 14px;
    }

    .header-middle .container,
    .header-bottom .container,
    .index-content .container,
    .index-products .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .navbar-brand img {
        max-height: 40px;
    }

    .card,
    .page-container {
        border-radius: 12px;
    }

    .modern-hero-card {
        border-radius: 16px;
        padding: 1.2rem;
    }

    .modern-hero-title {
        font-size: 1.6rem;
    }

    .modern-hero-subtitle {
        font-size: .92rem;
    }

    .modern-kpi-grid {
        gap: .65rem;
    }

    .modern-kpi-card {
        padding: .65rem .5rem;
    }

    .modern-proof-card,
    .modern-process-card,
    .modern-cta-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .modern-stat-card .value {
        font-size: 1.1rem;
    }

    .modern-cta-card .btn {
        min-width: 145px;
    }

    .modern-dashboard-page #othercredit .card-body {
        min-height: auto;
    }

    .modern-reseller-imei .card-search .form-group.w-25,
    .modern-reseller-imei .card-search .form-group.mb-0 {
        min-width: 100%;
        flex-basis: 100%;
    }
}
