:root {
    --brand: #2e5bff;
    --brand-dark: #1d4ed8;
    --soft-bg: #f7f9fc;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
}

html {
    font-size: 16px;
}

body {
    font-family: "Cairo", Tahoma, Arial, sans-serif;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.10), transparent 25%),
        linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
    color: var(--text);
}

.modern-card,
.stat-card,
.summary-box,
.mini-card {
    border: 0;
    border-radius: 1.25rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
    background: #fff;
}

.portal-shell {
    max-width: 1180px;
    margin: 0 auto;
}

.portal-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 91, 255, 0.08);
    color: var(--brand-dark);
    border-radius: 999px;
    padding: .45rem .9rem;
    font-size: .9rem;
    font-weight: 700;
}

.portal-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
}

.hero-card {
    overflow: hidden;
    position: relative;
}

.hero-card::after {
    content: "";
    position: absolute;
    inset-inline-end: -30px;
    top: -30px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(46, 91, 255, 0.12), transparent 70%);
    pointer-events: none;
}

.hero-badge {
    color: var(--brand-dark);
    font-weight: 700;
}

.action-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: .75rem;
    min-width: min(100%, 230px);
}

.action-btn {
    border-radius: 1rem;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(46, 91, 255, 0.12);
}

.stat-card {
    padding: 1.25rem;
    height: 100%;
}

.stat-title {
    color: var(--muted);
    margin-bottom: .5rem;
    font-weight: 700;
}

.stat-value {
    font-size: 1.7rem;
    line-height: 1.15;
    font-weight: 800;
}

.stat-subtitle {
    color: var(--muted);
    font-size: .92rem;
    margin-top: .35rem;
}

.package-card {
    transition: transform .2s ease, box-shadow .2s ease;
}

.package-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.12);
}

.price-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--brand);
}

.summary-box {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.summary-box span {
    color: var(--muted);
    font-size: .95rem;
    font-weight: 700;
}

.summary-box strong {
    font-size: 1.1rem;
}

.modern-card-header {
    background: linear-gradient(135deg, var(--brand), #4f7dff);
    color: #fff;
    font-weight: 800;
    border: 0;
    padding: 1rem 1.25rem;
}

.details-grid {
    display: grid;
    gap: .85rem;
}

.detail-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: .9rem 1rem;
    background: #fbfdff;
}

.detail-item span {
    color: var(--muted);
    font-weight: 700;
}

.detail-item strong {
    font-weight: 800;
    text-align: left;
}

.account-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.horizontal-cards {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 320px);
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: .4rem;
    scroll-snap-type: x proximity;
}

.horizontal-cards::-webkit-scrollbar {
    height: 10px;
}

.horizontal-cards::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.mini-card {
    padding: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    scroll-snap-align: start;
}

.mini-card-icon {
    font-size: 2rem;
    margin-bottom: .6rem;
}

.mini-card-date {
    font-weight: 800;
    margin-bottom: .85rem;
}

.mini-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.mini-card-grid span {
    display: block;
    font-size: .82rem;
    color: var(--muted);
    margin-bottom: .2rem;
    font-weight: 700;
}

.mini-card-grid strong {
    font-size: .95rem;
    word-break: break-word;
}

.invoice-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.recharge-card {
    background: linear-gradient(180deg, #ffffff 0%, #f4fbf8 100%);
}

.order-card {
    background: linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
}

.empty-state {
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    padding: 1.25rem;
    text-align: center;
    color: var(--muted);
    background: #fbfdff;
}

.portal-footer {
    font-size: .95rem;
}

.table > :not(caption) > * > * {
    padding-top: .85rem;
    padding-bottom: .85rem;
}

dl dt {
    color: var(--muted);
    font-weight: 700;
}

dl dd {
    margin-bottom: .85rem;
}

@media (max-width: 991.98px) {
    .account-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    html {
        font-size: 15px;
    }

    .account-summary-grid,
    .mini-card-grid {
        grid-template-columns: 1fr;
    }

    .detail-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .action-stack {
        width: 100%;
    }

    .horizontal-cards {
        grid-auto-columns: minmax(230px, 88vw);
    }
}

.form-control-modern,
.form-select.form-control-modern {
    border-radius: 1rem;
    border: 1px solid var(--line);
    min-height: 52px;
    padding: .85rem 1rem;
    box-shadow: none;
}

.form-control-modern:focus,
.form-select.form-control-modern:focus {
    border-color: rgba(46, 91, 255, 0.35);
    box-shadow: 0 0 0 0.2rem rgba(46, 91, 255, 0.12);
}

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

.order-help-icon {
    width: 64px;
    height: 64px;
    border-radius: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(46, 91, 255, 0.08);
}

.compact-grid .detail-item {
    padding: .8rem .9rem;
}

.timeline-steps {
    display: grid;
    gap: .9rem;
}

.timeline-step {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: .85rem;
    align-items: start;
}

.timeline-step strong {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(46, 91, 255, 0.08);
    color: var(--brand-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.timeline-step span {
    color: var(--text);
    line-height: 1.8;
}

@media (max-width: 991.98px) {
    .account-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .account-summary-grid {
        grid-template-columns: 1fr;
    }
}
