:root {
    --renew-primary: #4f46e5;
    --renew-primary-dark: #3730a3;
    --renew-background: #f5f7fb;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--renew-background);
    color: #172033;
}

.login-page {
    background:
        radial-gradient(
            circle at top left,
            rgba(79, 70, 229, 0.18),
            transparent 35%
        ),
        radial-gradient(
            circle at bottom right,
            rgba(14, 165, 233, 0.16),
            transparent 35%
        ),
        #f7f8fc;
}

.brand-icon {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: linear-gradient(
        135deg,
        var(--renew-primary),
        #0ea5e9
    );
    color: #ffffff;
    font-size: 2rem;
    box-shadow: 0 15px 30px rgba(79, 70, 229, 0.25);
}

.login-card {
    border-radius: 24px;
}

.form-control,
.input-group-text {
    min-height: 54px;
}

.form-control:focus {
    border-color: var(--renew-primary);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.12);
}

.btn-primary {
    min-height: 54px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(
        135deg,
        var(--renew-primary),
        #2563eb
    );
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(
        135deg,
        var(--renew-primary-dark),
        #1d4ed8
    );
}
/* =========================================================
   ADMIN DASHBOARD
========================================================= */

.admin-body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background: #f4f6fb;
    color: #172033;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    width: 270px;
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(
            180deg,
            #17133d 0%,
            #21184f 55%,
            #16112f 100%
        );
    color: #ffffff;
    transition: transform 0.25s ease;
    box-shadow: 12px 0 30px rgba(23, 19, 61, 0.12);
}

.sidebar-brand {
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    color: #ffffff;
    font-size: 1.35rem;
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.25);
}

.sidebar-brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.1;
}

.sidebar-brand small {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.75rem;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 22px 16px;
}

.sidebar-section-title {
    padding: 0 13px;
    margin-bottom: 9px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.sidebar-link {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 5px;
    padding: 11px 14px;
    border-radius: 13px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.sidebar-link i {
    width: 22px;
    font-size: 1.1rem;
}

.sidebar-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}

.sidebar-link.active {
    color: #ffffff;
    background: linear-gradient(
        135deg,
        rgba(124, 58, 237, 0.9),
        rgba(37, 99, 235, 0.85)
    );
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.sidebar-badge {
    margin-left: auto;
    min-width: 23px;
    padding: 3px 7px;
    border-radius: 20px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.7rem;
    text-align: center;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-user-avatar,
.user-menu-avatar {
    width: 39px;
    height: 39px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: #ffffff;
    font-weight: 800;
}

.sidebar-user-details {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-user-details strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 0.85rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-details small {
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.72rem;
}

.sidebar-logout {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
}

.sidebar-logout:hover {
    color: #ffffff;
    background: rgba(239, 68, 68, 0.2);
}

.admin-main {
    width: calc(100% - 270px);
    min-height: 100vh;
    margin-left: 270px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 15px 30px;
    border-bottom: 1px solid #e9edf5;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
}

.sidebar-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid #e5e7eb;
    border-radius: 13px;
    background: #ffffff;
    font-size: 1.4rem;
}

.topbar-title {
    flex: 1;
}

.topbar-title h1 {
    margin: 0;
    color: #161b2e;
    font-size: 1.35rem;
    font-weight: 800;
}

.topbar-title p {
    margin: 2px 0 0;
    color: #8a93a6;
    font-size: 0.82rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 13px;
}

.topbar-icon-button {
    position: relative;
    width: 44px;
    height: 44px;
    border: 1px solid #e8ebf1;
    border-radius: 13px;
    background: #ffffff;
    color: #525b6d;
    font-size: 1.08rem;
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #ef4444;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 8px 5px 5px;
    border: 0;
    border-radius: 14px;
    background: transparent;
}

.user-menu:hover {
    background: #f5f7fb;
}

.user-menu-name {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-menu-name strong {
    max-width: 150px;
    overflow: hidden;
    color: #252c3d;
    font-size: 0.85rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-name small {
    color: #9299a8;
    font-size: 0.7rem;
}

.dashboard-content {
    padding: 28px 30px 40px;
}

.dashboard-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 25px;
    padding: 26px 28px;
    overflow: hidden;
    border-radius: 22px;
    background:
        radial-gradient(
            circle at right top,
            rgba(255, 255, 255, 0.22),
            transparent 38%
        ),
        linear-gradient(135deg, #4f46e5, #2563eb);
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(79, 70, 229, 0.18);
}

.welcome-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 9px;
    padding: 5px 11px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.75rem;
    font-weight: 700;
}

.dashboard-welcome h2 {
    margin: 0 0 5px;
    font-size: 1.65rem;
    font-weight: 800;
}

.dashboard-welcome p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
}

.btn-add-customer {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 20px;
    border-radius: 14px;
    background: #ffffff;
    color: #3730a3;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 800;
    box-shadow: 0 12px 25px rgba(20, 20, 60, 0.16);
}

.btn-add-customer:hover {
    color: #1e40af;
    transform: translateY(-2px);
}

.stat-card {
    height: 100%;
    padding: 22px;
    border: 1px solid #eef0f5;
    border-radius: 19px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(29, 39, 68, 0.05);
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(29, 39, 68, 0.09);
}

.stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-icon {
    width: 49px;
    height: 49px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    font-size: 1.25rem;
}

.stat-icon-purple {
    background: #ede9fe;
    color: #7c3aed;
}

.stat-icon-green {
    background: #dcfce7;
    color: #16a34a;
}

.stat-icon-orange {
    background: #ffedd5;
    color: #ea580c;
}

.stat-icon-blue {
    background: #dbeafe;
    color: #2563eb;
}

.stat-trend {
    padding: 5px 9px;
    border-radius: 30px;
    font-size: 0.68rem;
    font-weight: 800;
}

.stat-trend.positive {
    background: #dcfce7;
    color: #15803d;
}

.stat-trend.warning {
    background: #fef3c7;
    color: #b45309;
}

.stat-trend.danger {
    background: #fee2e2;
    color: #dc2626;
}

.stat-trend.neutral {
    background: #f1f5f9;
    color: #64748b;
}

.stat-value {
    margin-top: 20px;
    color: #172033;
    font-size: 2rem;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.stat-value.stat-money {
    font-size: 1.55rem;
}

.stat-label {
    margin-top: 2px;
    color: #8790a3;
    font-size: 0.82rem;
    font-weight: 600;
}

.stat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 13px;
    border-top: 1px solid #f0f2f6;
    color: #586174;
    text-decoration: none;
    font-size: 0.76rem;
    font-weight: 700;
}

.stat-link:hover {
    color: #4f46e5;
}

.dashboard-panel {
    height: 100%;
    border: 1px solid #eef0f5;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(29, 39, 68, 0.05);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 21px 22px;
    border-bottom: 1px solid #f0f2f6;
}

.panel-header h3 {
    margin: 0;
    color: #1e2535;
    font-size: 1rem;
    font-weight: 800;
}

.panel-header p {
    margin: 3px 0 0;
    color: #9199a8;
    font-size: 0.75rem;
}

.panel-link {
    color: #4f46e5;
    text-decoration: none;
    font-size: 0.76rem;
    font-weight: 800;
}

.empty-state {
    display: flex;
    min-height: 365px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 35px;
    text-align: center;
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 17px;
    border-radius: 22px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 1.8rem;
}

.empty-state h4 {
    margin-bottom: 7px;
    font-size: 1.05rem;
    font-weight: 800;
}

.empty-state p {
    max-width: 330px;
    margin-bottom: 19px;
    color: #8b93a3;
    font-size: 0.83rem;
}

.quick-actions {
    padding: 12px;
}

.quick-action {
    display: grid;
    grid-template-columns: 45px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border-radius: 14px;
    color: #252c3c;
    text-decoration: none;
    transition: all 0.2s ease;
}

.quick-action:hover {
    background: #f7f8fc;
    transform: translateX(3px);
}

.quick-action-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    font-size: 1.05rem;
}

.icon-purple {
    background: #ede9fe;
    color: #7c3aed;
}

.icon-green {
    background: #dcfce7;
    color: #16a34a;
}

.icon-orange {
    background: #ffedd5;
    color: #ea580c;
}

.icon-blue {
    background: #dbeafe;
    color: #2563eb;
}

.quick-action div:nth-child(2) {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.quick-action strong {
    font-size: 0.84rem;
}

.quick-action span {
    color: #929aa8;
    font-size: 0.7rem;
}

.quick-action > i {
    color: #a4aaba;
    font-size: 0.8rem;
}

.sidebar-overlay {
    display: none;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .admin-main {
        width: 100%;
        margin-left: 0;
    }

    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 1030;
        display: block;
        visibility: hidden;
        background: rgba(15, 23, 42, 0.5);
        opacity: 0;
        transition: all 0.2s ease;
    }

    .sidebar-overlay.show {
        visibility: visible;
        opacity: 1;
    }
}

@media (max-width: 767.98px) {
    .topbar {
        padding: 13px 17px;
    }

    .topbar-title p,
    .user-menu-name {
        display: none;
    }

    .dashboard-content {
        padding: 20px 16px 30px;
    }

    .dashboard-welcome {
        align-items: flex-start;
        flex-direction: column;
        padding: 23px;
    }

    .btn-add-customer {
        width: 100%;
        justify-content: center;
    }
}
/* =========================================================
   CUSTOMER MANAGEMENT
========================================================= */

.page-heading,
.form-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 24px;
}

.page-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    padding: 6px 12px;
    border-radius: 30px;
    background: #ede9fe;
    color: #6d28d9;
    font-size: 0.75rem;
    font-weight: 800;
}

.page-heading h2,
.form-page-heading h2 {
    margin: 0 0 5px;
    font-size: 1.65rem;
    font-weight: 850;
}

.page-heading p,
.form-page-heading p {
    margin: 0;
    color: #8a93a5;
    font-size: 0.88rem;
}

.content-card {
    border: 1px solid #edf0f5;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(29, 39, 68, 0.05);
}

.customer-filter {
    padding: 22px;
    border-bottom: 1px solid #edf0f5;
}

.customer-filter .form-label {
    color: #616a7c;
    font-size: 0.78rem;
    font-weight: 700;
}

.customer-table {
    margin-bottom: 0;
}

.customer-table thead th {
    padding: 15px 18px;
    border-bottom: 1px solid #edf0f5;
    background: #f8f9fc;
    color: #737c8e;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.customer-table tbody td {
    padding: 17px 18px;
    border-color: #f0f2f6;
    color: #596274;
    font-size: 0.82rem;
    vertical-align: middle;
}

.customer-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.customer-avatar {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: linear-gradient(135deg, #ede9fe, #dbeafe);
    color: #4f46e5;
    font-weight: 900;
}

.customer-name-cell > div:last-child,
.table-main-text,
.table-sub-text {
    display: block;
}

.customer-name-cell strong {
    display: block;
    color: #252c3c;
    font-size: 0.85rem;
}

.customer-name-cell small,
.table-sub-text {
    color: #969dab;
    font-size: 0.72rem;
}

.table-main-text {
    color: #4f586a;
    font-size: 0.8rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 800;
}

.status-badge.active {
    background: #dcfce7;
    color: #15803d;
}

.status-badge.inactive {
    background: #e5e7eb;
    color: #64748b;
}

.table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.table-actions form {
    margin: 0;
}

.action-button {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.action-button.view {
    background: #e0f2fe;
    color: #0284c7;
}

.action-button.edit {
    background: #ede9fe;
    color: #7c3aed;
}

.action-button.delete {
    background: #fee2e2;
    color: #dc2626;
}

.action-button:hover {
    transform: translateY(-2px);
    filter: brightness(0.96);
}

.table-empty-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    border-radius: 22px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 1.8rem;
}

.customer-pagination {
    display: flex;
    justify-content: flex-end;
    padding: 18px 22px;
    border-top: 1px solid #edf0f5;
}

.customer-pagination .page-link {
    border: 0;
    border-radius: 9px;
    color: #667085;
    font-size: 0.8rem;
}

.customer-pagination .page-item.active .page-link {
    background: #4f46e5;
    color: #ffffff;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    color: #667085;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
}

.back-link:hover {
    color: #4f46e5;
}

.customer-form-card {
    padding: 28px;
}

.form-section + .form-section {
    margin-top: 32px;
    padding-top: 30px;
    border-top: 1px solid #edf0f5;
}

.form-section-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 24px;
}

.form-section-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #ede9fe;
    color: #7c3aed;
    font-size: 1.1rem;
}

.form-section-icon.green {
    background: #dcfce7;
    color: #16a34a;
}

.form-section-heading h3 {
    margin: 0;
    color: #252c3c;
    font-size: 1rem;
    font-weight: 800;
}

.form-section-heading p {
    margin: 3px 0 0;
    color: #9299a8;
    font-size: 0.75rem;
}

.customer-form-card .form-label {
    color: #596274;
    font-size: 0.78rem;
    font-weight: 700;
}

.customer-form-card .form-control,
.customer-form-card .form-select {
    border-color: #e2e6ed;
    border-radius: 12px;
    font-size: 0.9rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #edf0f5;
}

@media (max-width: 767.98px) {
    .page-heading,
    .form-page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-heading .btn-add-customer {
        width: 100%;
        justify-content: center;
    }

    .customer-form-card {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
    }
}
/* =========================================================
   CUSTOMER PROFILE
========================================================= */

.customer-profile-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 25px;
}

.customer-profile-main {
    display: flex;
    align-items: center;
    gap: 17px;
}

.customer-profile-avatar {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 900;
    box-shadow: 0 14px 28px rgba(79, 70, 229, 0.2);
}

.customer-profile-heading h2 {
    margin: 0 0 7px;
    color: #202738;
    font-size: 1.65rem;
    font-weight: 850;
}

.customer-profile-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #8991a2;
    font-size: 0.8rem;
}

.customer-profile-meta > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.customer-profile-actions {
    display: flex;
    gap: 10px;
}

.customer-details-card {
    padding: 28px;
}

.details-section + .details-section {
    margin-top: 30px;
    padding-top: 28px;
    border-top: 1px solid #edf0f5;
}

.details-section-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 23px;
}

.details-section-heading h3 {
    margin: 0;
    color: #252c3c;
    font-size: 1rem;
    font-weight: 800;
}

.details-section-heading p {
    margin: 3px 0 0;
    color: #9199a8;
    font-size: 0.75rem;
}

.form-section-icon.orange {
    background: #ffedd5;
    color: #ea580c;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item span {
    color: #9299a8;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.detail-item strong,
.detail-item a {
    color: #31394b;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.detail-item a:hover {
    color: #4f46e5;
}

.customer-notes {
    min-height: 90px;
    padding: 17px;
    border-radius: 14px;
    background: #f8f9fc;
    color: #596274;
    font-size: 0.86rem;
    line-height: 1.7;
}

.customer-summary-card {
    padding: 23px;
}

.customer-summary-card h3 {
    margin: 0 0 20px;
    color: #252c3c;
    font-size: 1rem;
    font-weight: 800;
}

.summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 0;
    border-bottom: 1px solid #edf0f5;
}

.summary-item:last-child {
    border-bottom: 0;
}

.summary-item > span:first-child {
    color: #8991a2;
    font-size: 0.76rem;
}

.summary-item strong {
    color: #333b4d;
    font-size: 0.8rem;
    text-align: right;
}

.customer-quick-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.customer-quick-links a {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 11px;
    padding: 12px;
    border-radius: 13px;
    color: #31394b;
    text-decoration: none;
    transition: all 0.2s ease;
}

.customer-quick-links a:hover {
    background: #f7f8fc;
    transform: translateX(3px);
}

.customer-quick-links > a > i {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 1rem;
}

.customer-quick-links span {
    display: flex;
    flex-direction: column;
}

.customer-quick-links strong {
    font-size: 0.8rem;
}

.customer-quick-links small {
    color: #9299a8;
    font-size: 0.7rem;
}

@media (max-width: 767.98px) {
    .customer-profile-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .customer-profile-main {
        align-items: flex-start;
    }

    .customer-profile-actions {
        width: 100%;
        flex-direction: column;
    }

    .customer-profile-actions .btn {
        width: 100%;
    }

    .customer-profile-avatar {
        width: 60px;
        height: 60px;
        border-radius: 19px;
        font-size: 1.4rem;
    }

    .customer-details-card {
        padding: 20px;
    }
}
.status-badge.warning {
    background: #fef3c7;
    color: #b45309;
}

.status-badge.danger {
    background: #fee2e2;
    color: #dc2626;
}

.status-badge.dark {
    background: #e2e8f0;
    color: #334155;
}

.form-check-input {
    width: 2.8rem;
    height: 1.45rem;
    cursor: pointer;
}

.form-check-input:checked {
    border-color: #4f46e5;
    background-color: #4f46e5;
}
.status-badge.info {
    background: #dbeafe;
    color: #2563eb;
}
/* =========================================================
   INVOICE AND PAYMENT
========================================================= */

.invoice-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.invoice-document {
    max-width: 1100px;
    margin: 0 auto;
    padding: 38px;
    border: 1px solid #e8ecf3;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(27, 39, 75, 0.07);
}

.invoice-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 28px;
    border-bottom: 2px solid #edf0f5;
}

.invoice-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.invoice-brand-icon {
    width: 53px;
    height: 53px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    color: #ffffff;
    font-size: 1.4rem;
}

.invoice-brand h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 900;
}

.invoice-brand p {
    margin: 2px 0 0;
    color: #8991a1;
    font-size: 0.75rem;
}

.invoice-company-details {
    display: flex;
    flex-direction: column;
    margin-top: 17px;
    color: #747d8f;
    font-size: 0.78rem;
    line-height: 1.6;
}

.invoice-company-details strong {
    color: #343c4e;
}

.invoice-heading {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 10px;
}

.invoice-heading h1 {
    margin: 0;
    color: #272f41;
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.invoice-information {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 35px;
    padding: 30px 0;
}

.invoice-customer {
    display: flex;
    flex-direction: column;
    color: #687184;
    font-size: 0.82rem;
    line-height: 1.65;
}

.invoice-customer small {
    margin-bottom: 9px;
    color: #9aa1af;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.invoice-customer h3 {
    margin: 0 0 5px;
    color: #293143;
    font-size: 1.08rem;
    font-weight: 850;
}

.invoice-meta {
    display: grid;
    gap: 13px;
}

.invoice-meta div {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    padding-bottom: 11px;
    border-bottom: 1px solid #edf0f5;
}

.invoice-meta span {
    color: #8d95a4;
    font-size: 0.75rem;
}

.invoice-meta strong {
    color: #333b4d;
    font-size: 0.78rem;
    text-align: right;
}

.billing-period-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 13px 16px;
    border-radius: 13px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 0.8rem;
}

.invoice-items-table {
    width: 100%;
    border-collapse: collapse;
}

.invoice-items-table th {
    padding: 13px 15px;
    background: #f5f7fb;
    color: #727b8e;
    font-size: 0.7rem;
    font-weight: 850;
    text-transform: uppercase;
}

.invoice-items-table td {
    padding: 17px 15px;
    border-bottom: 1px solid #edf0f5;
    color: #555f72;
    font-size: 0.82rem;
}

.invoice-items-table td strong {
    color: #30384a;
}

.invoice-bottom {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    margin-top: 30px;
}

.invoice-notes h4,
.invoice-payment-history h4 {
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 850;
}

.invoice-notes p {
    color: #7d8594;
    font-size: 0.8rem;
    line-height: 1.7;
}

.payment-instructions {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    padding: 15px;
    border-radius: 13px;
    background: #f8f9fc;
    color: #7d8594;
    font-size: 0.76rem;
}

.payment-instructions strong {
    margin-bottom: 4px;
    color: #3d4556;
}

.invoice-totals {
    display: flex;
    flex-direction: column;
}

.invoice-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
    color: #727b8d;
    font-size: 0.8rem;
}

.invoice-totals strong {
    color: #31394b;
}

.invoice-total-row {
    margin-top: 5px;
    padding-top: 15px !important;
    border-top: 2px solid #e6eaf0;
    font-size: 0.95rem !important;
}

.invoice-balance-row {
    margin-top: 6px;
    padding: 14px !important;
    border-radius: 12px;
    background: #eef2ff;
    color: #3730a3 !important;
    font-size: 0.95rem !important;
}

.invoice-balance-row strong {
    color: #3730a3;
}

.invoice-payment-history {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #e7eaf0;
}

.invoice-footer {
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid #e7eaf0;
    color: #9aa1af;
    font-size: 0.72rem;
    text-align: center;
}

.payment-total-card {
    min-width: 210px;
    padding: 14px 18px;
    border-radius: 15px;
    background: linear-gradient(135deg, #16a34a, #059669);
    color: #ffffff;
    box-shadow: 0 12px 25px rgba(22, 163, 74, 0.18);
}

.payment-total-card span,
.payment-total-card strong {
    display: block;
}

.payment-total-card span {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.72rem;
}

.payment-total-card strong {
    margin-top: 2px;
    font-size: 1.2rem;
}

@media (max-width: 767.98px) {
    .invoice-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .invoice-actions > div {
        display: grid !important;
        grid-template-columns: 1fr;
    }

    .invoice-document {
        padding: 22px;
    }

    .invoice-header,
    .invoice-information {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .invoice-heading {
        align-items: flex-start;
    }

    .invoice-bottom {
        grid-template-columns: 1fr;
    }

    .payment-total-card {
        width: 100%;
    }
}
.notification-channel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 800;
}

.notification-channel.email {
    background: #dbeafe;
    color: #2563eb;
}

.notification-channel.sms {
    background: #dcfce7;
    color: #15803d;
}

.notification-preview {
    max-width: 330px;
    white-space: normal;
}
/* =========================================================
   SETTINGS
========================================================= */

.settings-grid {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.settings-navigation {
    position: sticky;
    top: 105px;
    padding: 12px;
}

.settings-nav-button {
    width: 100%;
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 11px;
    margin-bottom: 6px;
    padding: 12px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: #566074;
    text-align: left;
    transition: all 0.2s ease;
}

.settings-nav-button:last-child {
    margin-bottom: 0;
}

.settings-nav-button:hover {
    background: #f7f8fc;
}

.settings-nav-button.active {
    background: #eef2ff;
    color: #4338ca;
}

.settings-nav-button > i {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f1f5f9;
    font-size: 1rem;
}

.settings-nav-button.active > i {
    background: #4f46e5;
    color: #ffffff;
}

.settings-nav-button span {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.settings-nav-button strong {
    font-size: 0.8rem;
}

.settings-nav-button small {
    color: #9299a8;
    font-size: 0.68rem;
}

.settings-content {
    padding: 28px;
}

.settings-panel {
    display: none;
}

.settings-panel.active {
    display: block;
}

.settings-panel-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 27px;
    padding-bottom: 20px;
    border-bottom: 1px solid #edf0f5;
}

.settings-panel-heading h3 {
    margin: 0;
    color: #252c3c;
    font-size: 1rem;
    font-weight: 850;
}

.settings-panel-heading p {
    margin: 3px 0 0;
    color: #9299a8;
    font-size: 0.75rem;
}

.form-section-icon.red {
    background: #fee2e2;
    color: #dc2626;
}

.settings-content .form-label {
    color: #596274;
    font-size: 0.78rem;
    font-weight: 700;
}

.settings-content .form-control,
.settings-content .form-select {
    border-color: #e2e6ed;
    border-radius: 12px;
    font-size: 0.9rem;
}

.settings-info-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    background: #eff6ff;
    color: #1d4ed8;
}

.settings-info-box > i {
    margin-top: 2px;
}

.settings-info-box strong {
    display: block;
    font-size: 0.8rem;
}

.settings-info-box p {
    margin: 3px 0 0;
    color: #4b6cae;
    font-size: 0.73rem;
    line-height: 1.6;
}

.sms-enable-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
    padding: 17px;
    border-radius: 14px;
    background: #f8f9fc;
}

.sms-enable-card strong {
    display: block;
    color: #333b4d;
    font-size: 0.83rem;
}

.sms-enable-card p {
    margin: 3px 0 0;
    color: #9299a8;
    font-size: 0.72rem;
}

.security-checklist {
    display: grid;
    gap: 12px;
}

.security-checklist > div {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: flex-start;
    gap: 11px;
    padding: 15px;
    border-radius: 13px;
    background: #f8f9fc;
}

.security-checklist > div > i {
    color: #16a34a;
    font-size: 1.15rem;
}

.security-checklist span {
    display: flex;
    flex-direction: column;
}

.security-checklist strong {
    color: #343c4e;
    font-size: 0.8rem;
}

.security-checklist small {
    margin-top: 3px;
    color: #8991a1;
    font-size: 0.7rem;
    line-height: 1.5;
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid #edf0f5;
}

@media (max-width: 991.98px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .settings-navigation {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .settings-navigation {
        grid-template-columns: 1fr;
    }

    .settings-content {
        padding: 20px;
    }

    .settings-actions .btn {
        width: 100%;
    }
}
/* =========================================================
   BULK SMS
========================================================= */

.bulk-sms-form-card {
    padding: 28px;
}

.recipient-group-card {
    position: relative;
    height: 100%;
    display: grid;
    grid-template-columns: 46px 1fr;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e7eaf0;
    border-radius: 15px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.recipient-group-card:hover {
    border-color: #c7d2fe;
    background: #fafaff;
}

.recipient-group-card:has(input:checked) {
    border-color: #4f46e5;
    background: #eef2ff;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.08);
}

.recipient-group-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.recipient-group-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #ede9fe;
    color: #7c3aed;
    font-size: 1.05rem;
}

.recipient-group-icon.red {
    background: #fee2e2;
    color: #dc2626;
}

.recipient-group-icon.orange {
    background: #ffedd5;
    color: #ea580c;
}

.recipient-group-icon.dark {
    background: #e2e8f0;
    color: #334155;
}

.recipient-group-card > span:last-child {
    display: flex;
    flex-direction: column;
}

.recipient-group-card strong {
    color: #333b4d;
    font-size: 0.82rem;
}

.recipient-group-card small {
    margin-top: 3px;
    color: #8991a2;
    font-size: 0.7rem;
    line-height: 1.5;
}

.bulk-sms-message {
    min-height: 175px;
    resize: vertical;
    line-height: 1.7;
}

.sms-message-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-top: 12px;
}

.sms-template-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.sms-template-tags button {
    padding: 6px 10px;
    border: 1px solid #d9deea;
    border-radius: 20px;
    background: #ffffff;
    color: #596274;
    font-size: 0.68rem;
    font-weight: 700;
}

.sms-template-tags button:hover {
    border-color: #4f46e5;
    color: #4f46e5;
}

.sms-counter {
    flex-shrink: 0;
    color: #8c94a4;
    font-size: 0.7rem;
    text-align: right;
}

.sms-counter strong {
    display: block;
    margin-top: 3px;
    color: #4f46e5;
}

.sms-example-box {
    padding: 16px;
    border: 1px dashed #c7d2fe;
    border-radius: 14px;
    background: #f8f9ff;
}

.sms-example-box strong {
    color: #3f46a5;
    font-size: 0.78rem;
}

.sms-example-box p {
    margin: 7px 0 12px;
    color: #70788b;
    font-size: 0.75rem;
    line-height: 1.6;
}

.sms-summary-card {
    padding: 22px;
}

.sms-summary-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.sms-summary-heading h3 {
    margin: 0;
    color: #30384a;
    font-size: 0.95rem;
    font-weight: 850;
}

.sms-summary-heading p {
    margin: 3px 0 0;
    color: #9299a8;
    font-size: 0.7rem;
}

.recipient-count {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 14px;
    border-radius: 13px;
    background: #eef2ff;
}

.recipient-count span {
    color: #5f67a2;
    font-size: 0.75rem;
    font-weight: 700;
}

.recipient-count strong {
    color: #4338ca;
    font-size: 1.3rem;
}

.recipient-preview-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.recipient-preview-item {
    display: grid;
    grid-template-columns: 39px 1fr;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border-radius: 11px;
    background: #f8f9fc;
}

.recipient-preview-avatar {
    width: 39px;
    height: 39px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #ede9fe, #dbeafe);
    color: #4f46e5;
    font-size: 0.8rem;
    font-weight: 900;
}

.recipient-preview-item > div:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.recipient-preview-item strong {
    overflow: hidden;
    color: #3b4354;
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recipient-preview-item small {
    color: #9299a8;
    font-size: 0.68rem;
}

.recipient-preview-empty {
    padding: 25px 10px;
    color: #9299a8;
    text-align: center;
}

.recipient-preview-empty i {
    display: block;
    margin-bottom: 8px;
    font-size: 1.7rem;
}

.recipient-preview-empty p {
    margin: 0;
    font-size: 0.75rem;
}

.recipient-more {
    padding: 10px;
    color: #697286;
    font-size: 0.7rem;
    text-align: center;
}

@media (max-width: 767.98px) {
    .bulk-sms-form-card {
        padding: 20px;
    }

    .sms-message-footer {
        flex-direction: column;
    }

    .sms-counter {
        text-align: left;
    }
}
/* =========================================================
   REPORTS
========================================================= */

.report-filter-card {
    margin-bottom: 26px;
    padding: 24px;
    overflow: hidden;
}

.report-filter-card .form-label {
    margin-bottom: 8px;
    color: #596274;
    font-size: 0.78rem;
    font-weight: 700;
}

.report-filter-card .form-control,
.report-filter-card .form-select {
    min-height: 52px;
    border: 1px solid #dfe4ec;
    border-radius: 12px;
    background-color: #ffffff;
    font-size: 0.88rem;
}

.report-filter-card .btn-primary {
    min-height: 52px;
    border-radius: 12px;
}

.report-period-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 17px;
    padding-top: 16px;
    border-top: 1px solid #edf0f5;
}

.report-period-shortcuts button {
    min-height: 34px;
    padding: 6px 14px;
    border: 1px solid #dce1ea;
    border-radius: 20px;
    background: #ffffff;
    color: #5e687a;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.report-period-shortcuts button:hover {
    border-color: #4f46e5;
    background: #eef2ff;
    color: #4338ca;
    transform: translateY(-1px);
}

/* Report summary cards */

.report-stat-card {
    position: relative;
    min-height: 145px;
    height: 100%;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid #e8ecf3;
    border-radius: 19px;
    background: #ffffff;
    box-shadow: 0 8px 25px rgba(29, 39, 68, 0.055);
    transition: all 0.2s ease;
}

.report-stat-card::after {
    position: absolute;
    right: -28px;
    bottom: -32px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: currentColor;
    content: "";
    opacity: 0.045;
}

.report-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(29, 39, 68, 0.09);
}

.report-stat-icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.35rem;
}

.report-stat-card > div:last-child {
    min-width: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.report-stat-card span {
    display: block;
    margin-bottom: 5px;
    color: #7d8698;
    font-size: 0.73rem;
    font-weight: 700;
}

.report-stat-card strong {
    display: block;
    color: #1f2738;
    font-size: 1.28rem;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.report-stat-card small {
    display: block;
    margin-top: 6px;
    color: #9aa1af;
    font-size: 0.68rem;
    line-height: 1.4;
}

.report-stat-card.green {
    color: #16a34a;
}

.report-stat-card.green .report-stat-icon {
    background: #dcfce7;
    color: #15803d;
}

.report-stat-card.purple {
    color: #7c3aed;
}

.report-stat-card.purple .report-stat-icon {
    background: #ede9fe;
    color: #7c3aed;
}

.report-stat-card.red {
    color: #dc2626;
}

.report-stat-card.red .report-stat-icon {
    background: #fee2e2;
    color: #dc2626;
}

.report-stat-card.blue {
    color: #2563eb;
}

.report-stat-card.blue .report-stat-icon {
    background: #dbeafe;
    color: #2563eb;
}

/* Report panels */

.report-panel {
    height: 100%;
    overflow: hidden;
}

.report-panel-heading {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid #edf0f5;
}

.report-panel-heading h3 {
    margin: 0;
    color: #222a3a;
    font-size: 1.02rem;
    font-weight: 850;
}

.report-panel-heading p {
    margin: 4px 0 0;
    color: #8e97a8;
    font-size: 0.73rem;
}

.report-chart-container {
    position: relative;
    min-height: 350px;
    padding: 25px;
}

.report-chart-container canvas {
    width: 100% !important;
    max-height: 300px;
}

.report-empty-state {
    min-height: 290px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 25px;
    color: #8e97a8;
    text-align: center;
}

.report-empty-state i {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border-radius: 21px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 1.8rem;
}

.report-empty-state h4 {
    margin: 0 0 7px;
    color: #333b4d;
    font-size: 1rem;
    font-weight: 800;
}

.report-empty-state p {
    max-width: 320px;
    margin: 0;
    color: #9299a8;
    font-size: 0.76rem;
}

/* Invoice status */

.invoice-status-summary {
    padding: 12px 22px 20px;
}

.invoice-status-summary > div {
    min-height: 52px;
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 12px 0;
    border-bottom: 1px solid #edf0f5;
}

.invoice-status-summary > div:last-child {
    border-bottom: 0;
}

.invoice-status-summary span:nth-child(2) {
    color: #657084;
    font-size: 0.8rem;
    font-weight: 600;
}

.invoice-status-summary strong {
    min-width: 31px;
    padding: 5px 9px;
    border-radius: 20px;
    background: #f3f5f9;
    color: #30384a;
    font-size: 0.76rem;
    font-weight: 850;
    text-align: center;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.paid {
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.status-dot.pending {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.status-dot.partial {
    background: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.status-dot.overdue {
    background: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

/* New records */

.report-record-counts {
    display: grid;
    gap: 8px;
    padding: 13px;
}

.report-record-counts a {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: #333b4d;
    text-decoration: none;
    transition: all 0.2s ease;
}

.report-record-counts a::after {
    color: #a0a7b5;
    font-family: "bootstrap-icons";
    font-size: 0.8rem;
    content: "\f285";
}

.report-record-counts a:hover {
    border-color: #e4e8ef;
    background: #f8f9fc;
    transform: translateX(3px);
}

.record-count-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.05rem;
}

.record-count-icon.purple {
    background: #ede9fe;
    color: #7c3aed;
}

.record-count-icon.green {
    background: #dcfce7;
    color: #16a34a;
}

.report-record-counts span {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.report-record-counts strong {
    color: #252c3c;
    font-size: 1.05rem;
    font-weight: 900;
}

.report-record-counts small {
    margin-top: 2px;
    color: #9299a8;
    font-size: 0.7rem;
}

/* Tables inside reports */

.report-panel .customer-table thead th {
    padding-top: 14px;
    padding-bottom: 14px;
}

.report-panel .customer-table tbody td {
    padding-top: 15px;
    padding-bottom: 15px;
}

.report-panel .table-responsive {
    width: 100%;
}

/* Print layout */

@media print {
    .sidebar,
    .topbar,
    .sidebar-overlay,
    .report-filter-card,
    .page-heading .btn {
        display: none !important;
    }

    .admin-main {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .dashboard-content {
        padding: 10px !important;
    }

    .page-heading {
        margin-bottom: 16px !important;
    }

    .content-card,
    .report-stat-card {
        break-inside: avoid;
        border: 1px solid #dfe3ea !important;
        box-shadow: none !important;
    }

    .report-stat-card {
        min-height: 120px;
    }
}

/* Responsive report layout */

@media (max-width: 1199.98px) {
    .report-chart-container {
        min-height: 310px;
    }
}

@media (max-width: 767.98px) {
    .report-filter-card {
        padding: 18px;
    }

    .report-period-shortcuts {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .report-period-shortcuts button {
        width: 100%;
        min-height: 38px;
    }

    .report-stat-card {
        min-height: 130px;
        padding: 18px;
    }

    .report-stat-icon {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
    }

    .report-stat-card strong {
        font-size: 1.08rem;
    }

    .report-chart-container {
        min-height: 270px;
        padding: 18px;
    }

    .report-panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 575.98px) {
    .report-period-shortcuts {
        grid-template-columns: 1fr;
    }

    .report-stat-card {
        align-items: center;
    }
}

.report-summary-row > div {
    display: flex;
}

.report-summary-row .report-stat-card {
    width: 100%;
}

/* =========================================================
   HOSTED SOFTWARE PROFILE
========================================================= */

.service-profile-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 25px;
}

.service-profile-main {
    display: flex;
    align-items: center;
    gap: 17px;
}

.service-profile-icon {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    background: linear-gradient(135deg, #16a34a, #0d9488);
    color: #ffffff;
    font-size: 1.8rem;
    box-shadow: 0 14px 28px rgba(22, 163, 74, 0.2);
}

.service-profile-heading h2 {
    margin: 0 0 7px;
    color: #202738;
    font-size: 1.65rem;
    font-weight: 850;
}

.service-price {
    color: #15803d !important;
    font-size: 1rem !important;
}

.service-expiry-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 25px;
    padding: 17px;
    border-radius: 15px;
}

.service-expiry-banner > i {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    font-size: 1.1rem;
}

.service-expiry-banner > div {
    display: flex;
    flex-direction: column;
}

.service-expiry-banner strong {
    font-size: 0.84rem;
}

.service-expiry-banner span {
    margin-top: 3px;
    font-size: 0.72rem;
}

.service-expiry-banner.safe {
    background: #ecfdf5;
    color: #15803d;
}

.service-expiry-banner.safe > i {
    background: #dcfce7;
}

.service-expiry-banner.expiring {
    background: #fffbeb;
    color: #b45309;
}

.service-expiry-banner.expiring > i {
    background: #fef3c7;
}

.service-expiry-banner.overdue {
    background: #fef2f2;
    color: #dc2626;
}

.service-expiry-banner.overdue > i {
    background: #fee2e2;
}

.service-customer-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding: 14px;
    border-radius: 14px;
    background: #f8f9fc;
}

.service-customer-card .customer-avatar {
    width: 46px;
    height: 46px;
}

.service-customer-card > div:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.service-customer-card strong {
    overflow: hidden;
    color: #30384a;
    font-size: 0.83rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.service-customer-card small {
    margin-top: 2px;
    color: #9299a8;
    font-size: 0.7rem;
}

.customer-summary-card .summary-item a {
    color: #4f46e5;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 767.98px) {
    .service-profile-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .service-profile-main {
        align-items: flex-start;
    }

    .service-profile-icon {
        width: 60px;
        height: 60px;
        flex-basis: 60px;
        border-radius: 19px;
        font-size: 1.4rem;
    }

    .service-profile-heading .customer-profile-actions {
        width: 100%;
        flex-direction: column;
    }

    .service-profile-heading .customer-profile-actions .btn {
        width: 100%;
    }
}

/* =========================================================
   INVOICE EDIT
========================================================= */

.invoice-live-total {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 17px;
    border: 1px solid #dfe5f0;
    border-radius: 15px;
    background: #f8f9fc;
}

.invoice-live-total > div {
    display: flex;
    flex-direction: column;
    padding: 13px;
    border-radius: 12px;
    background: #ffffff;
}

.invoice-live-total span {
    color: #8a93a5;
    font-size: 0.7rem;
    font-weight: 700;
}

.invoice-live-total strong {
    margin-top: 4px;
    color: #252c3c;
    font-size: 1rem;
    font-weight: 900;
}

.invoice-live-total > div:nth-child(2) strong {
    color: #4f46e5;
}

.invoice-live-total > div:nth-child(3) strong {
    color: #dc2626;
}

@media (max-width: 767.98px) {
    .invoice-live-total {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   AUTOMATION SETTINGS
========================================================= */

.automation-command-box {
    margin-top: 28px;
    padding: 18px;
    border: 1px solid #c7d2fe;
    border-radius: 15px;
    background: #f8f9ff;
}

.automation-command-box strong {
    display: block;
    margin-bottom: 10px;
    color: #3730a3;
    font-size: 0.8rem;
}

.automation-command-box code {
    display: block;
    overflow-x: auto;
    padding: 13px;
    border-radius: 10px;
    background: #1e1b4b;
    color: #e0e7ff;
    font-size: 0.75rem;
    white-space: nowrap;
}

.automation-command-box p {
    margin: 10px 0 0;
    color: #737b90;
    font-size: 0.72rem;
}

/* =========================================================
   PAYMENT RECEIPT
========================================================= */

.receipt-page-content {
    max-width: 1150px;
    margin: 0 auto;
}

.receipt-page-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 22px;
}

.payment-receipt {
    overflow: hidden;
    border: 1px solid #e3e7ef;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(29, 39, 68, 0.08);
}

.receipt-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    padding: 36px;
}

.receipt-company {
    display: flex;
    align-items: flex-start;
    gap: 17px;
}

.receipt-logo {
    width: 66px;
    height: 66px;
    flex: 0 0 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #ffffff;
    font-size: 1.7rem;
    box-shadow: 0 12px 25px rgba(79, 70, 229, 0.22);
}

.receipt-company h2 {
    margin: 0 0 8px;
    color: #202738;
    font-size: 1.3rem;
    font-weight: 900;
}

.receipt-company p {
    max-width: 360px;
    margin: 0 0 8px;
    color: #717a8d;
    font-size: 0.78rem;
    line-height: 1.65;
}

.receipt-company span {
    display: block;
    margin-top: 4px;
    color: #717a8d;
    font-size: 0.75rem;
}

.receipt-company span i {
    width: 20px;
    color: #4f46e5;
}

.receipt-title {
    text-align: right;
}

.receipt-title > span {
    display: block;
    margin-bottom: 7px;
    color: #9299a8;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.13em;
}

.receipt-title h1 {
    margin: 0 0 12px;
    color: #242b3b;
    font-size: 1.15rem;
    font-weight: 900;
}

.receipt-divider {
    height: 1px;
    margin: 0 36px;
    background: #e9ecf2;
}

.receipt-information-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    padding: 30px 36px;
}

.receipt-information-card {
    padding: 22px;
    border: 1px solid #e7eaf0;
    border-radius: 17px;
    background: #fafbfc;
}

.receipt-section-label {
    display: block;
    margin-bottom: 9px;
    color: #8b94a6;
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.1em;
}

.receipt-information-card h3 {
    margin: 0 0 10px;
    color: #2c3445;
    font-size: 1rem;
    font-weight: 850;
}

.receipt-information-card p {
    margin: 4px 0;
    color: #697286;
    font-size: 0.75rem;
    line-height: 1.55;
}

.receipt-detail-line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #e7eaf0;
}

.receipt-detail-line:last-child {
    border-bottom: 0;
}

.receipt-detail-line span {
    color: #7f8899;
    font-size: 0.73rem;
}

.receipt-detail-line strong {
    color: #333b4d;
    font-size: 0.75rem;
    text-align: right;
}

.receipt-payment-summary {
    margin: 0 36px 30px;
    padding: 28px;
    border-radius: 19px;
    background: linear-gradient(135deg, #312e81, #4f46e5);
    color: #ffffff;
    text-align: center;
}

.receipt-amount-label {
    margin-bottom: 7px;
    color: #c7d2fe;
    font-size: 0.75rem;
    font-weight: 700;
}

.receipt-main-amount {
    font-size: 2.4rem;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.receipt-amount-note {
    margin-top: 7px;
    color: #dbeafe;
    font-size: 0.75rem;
}

.receipt-invoice-summary {
    margin: 0 36px 28px;
    overflow: hidden;
    border: 1px solid #e5e9f0;
    border-radius: 17px;
}

.receipt-summary-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 19px 21px;
    border-bottom: 1px solid #e8ebf1;
    background: #fafbfc;
}

.receipt-summary-heading h3 {
    margin: 0;
    color: #2f3748;
    font-size: 0.95rem;
    font-weight: 850;
}

.receipt-summary-heading .receipt-section-label {
    margin-bottom: 4px;
}

.receipt-invoice-link {
    color: #4f46e5;
    font-size: 0.73rem;
    font-weight: 750;
    text-decoration: none;
}

.receipt-summary-table {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.receipt-summary-table > div {
    display: flex;
    min-height: 86px;
    flex-direction: column;
    justify-content: center;
    padding: 18px 21px;
    border-right: 1px solid #e8ebf1;
    border-bottom: 1px solid #e8ebf1;
}

.receipt-summary-table > div:nth-child(3n) {
    border-right: 0;
}

.receipt-summary-table > div:nth-last-child(-n + 3) {
    border-bottom: 0;
}

.receipt-summary-table span {
    color: #8a93a4;
    font-size: 0.69rem;
}

.receipt-summary-table strong {
    margin-top: 5px;
    color: #30384a;
    font-size: 0.82rem;
    font-weight: 850;
}

.receipt-balance-message {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 36px 28px;
    padding: 17px;
    border-radius: 15px;
    background: #f8f9fc;
}

.receipt-message-icon {
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.15rem;
}

.receipt-message-icon.paid {
    background: #dcfce7;
    color: #16a34a;
}

.receipt-message-icon.balance {
    background: #fee2e2;
    color: #dc2626;
}

.receipt-balance-message strong {
    color: #333b4d;
    font-size: 0.82rem;
}

.receipt-balance-message p {
    margin: 3px 0 0;
    color: #7d8698;
    font-size: 0.72rem;
}

.receipt-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    padding: 24px 36px;
    border-top: 1px solid #e8ebf1;
    background: #fafbfc;
}

.receipt-footer strong {
    color: #30384a;
    font-size: 0.8rem;
}

.receipt-footer p {
    max-width: 550px;
    margin: 4px 0 0;
    color: #858e9f;
    font-size: 0.7rem;
}

.receipt-footer-reference {
    text-align: right;
}

.receipt-footer-reference span {
    display: block;
    color: #9299a8;
    font-size: 0.66rem;
}

.receipt-footer-reference strong {
    display: block;
    margin-top: 4px;
}

@media (max-width: 767.98px) {
    .receipt-page-actions,
    .receipt-header,
    .receipt-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .receipt-title {
        text-align: left;
    }

    .receipt-information-grid {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .receipt-divider {
        margin: 0 22px;
    }

    .receipt-payment-summary,
    .receipt-invoice-summary,
    .receipt-balance-message {
        margin-right: 22px;
        margin-left: 22px;
    }

    .receipt-summary-table {
        grid-template-columns: 1fr;
    }

    .receipt-summary-table > div {
        border-right: 0;
        border-bottom: 1px solid #e8ebf1;
    }

    .receipt-summary-table > div:nth-last-child(-n + 3) {
        border-bottom: 1px solid #e8ebf1;
    }

    .receipt-summary-table > div:last-child {
        border-bottom: 0;
    }

    .receipt-footer-reference {
        text-align: left;
    }
}

@media print {
    @page {
        size: A4;
        margin: 10mm;
    }

    body {
        background: #ffffff !important;
    }

    .no-print,
    .sidebar,
    .topbar,
    .sidebar-overlay {
        display: none !important;
    }

    .receipt-admin-wrapper,
    .receipt-admin-main {
        display: block !important;
        width: 100% !important;
        min-height: auto !important;
        margin: 0 !important;
    }

    .receipt-page-content {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
    }

    .payment-receipt {
        width: 100% !important;
        border: 1px solid #d8dce5 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .receipt-header {
        padding: 24px;
    }

    .receipt-divider {
        margin: 0 24px;
    }

    .receipt-information-grid {
        padding: 22px 24px;
    }

    .receipt-payment-summary,
    .receipt-invoice-summary,
    .receipt-balance-message {
        margin-right: 24px;
        margin-left: 24px;
    }

    .receipt-footer {
        padding: 20px 24px;
    }

    .receipt-payment-summary,
    .receipt-information-card,
    .receipt-invoice-summary,
    .receipt-balance-message {
        break-inside: avoid;
    }

    .receipt-payment-summary {
        background: #312e81 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* =========================================================
   INVOICE VIEW
========================================================= */

.invoice-view-content {
    max-width: 1200px;
    margin: 0 auto;
}

.invoice-page-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 22px;
}

.invoice-action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}

.invoice-document {
    overflow: hidden;
    border: 1px solid #e3e7ef;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(29, 39, 68, 0.08);
}

.invoice-document-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    padding: 36px;
}

.invoice-company-block {
    display: flex;
    align-items: flex-start;
    gap: 17px;
}

.invoice-company-logo {
    width: 66px;
    height: 66px;
    flex: 0 0 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #ffffff;
    font-size: 1.7rem;
    box-shadow: 0 12px 25px rgba(79, 70, 229, 0.22);
}

.invoice-company-details h2 {
    margin: 0 0 8px;
    color: #202738;
    font-size: 1.3rem;
    font-weight: 900;
}

.invoice-company-details p {
    max-width: 360px;
    margin: 0 0 8px;
    color: #717a8d;
    font-size: 0.78rem;
    line-height: 1.65;
}

.invoice-company-details span {
    display: block;
    margin-top: 4px;
    color: #717a8d;
    font-size: 0.75rem;
}

.invoice-company-details span i {
    width: 20px;
    color: #4f46e5;
}

.invoice-title-block {
    text-align: right;
}

.invoice-document-label {
    display: block;
    margin-bottom: 7px;
    color: #9299a8;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.13em;
}

.invoice-title-block h1 {
    margin: 0 0 12px;
    color: #242b3b;
    font-size: 1.3rem;
    font-weight: 900;
}

.invoice-document-divider {
    height: 1px;
    margin: 0 36px;
    background: #e9ecf2;
}

.invoice-information-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    padding: 30px 36px;
}

.invoice-information-card {
    padding: 22px;
    border: 1px solid #e7eaf0;
    border-radius: 17px;
    background: #fafbfc;
}

.invoice-section-label {
    display: block;
    margin-bottom: 9px;
    color: #8b94a6;
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.1em;
}

.invoice-information-card h3 {
    margin: 0 0 10px;
    color: #2c3445;
    font-size: 1rem;
    font-weight: 850;
}

.invoice-information-card p {
    margin: 4px 0;
    color: #697286;
    font-size: 0.75rem;
    line-height: 1.55;
}

.invoice-detail-line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #e7eaf0;
}

.invoice-detail-line:last-child {
    border-bottom: 0;
}

.invoice-detail-line span {
    color: #7f8899;
    font-size: 0.73rem;
}

.invoice-detail-line strong {
    color: #333b4d;
    font-size: 0.75rem;
    text-align: right;
}

.invoice-billing-period {
    margin: 0 36px 20px;
    padding: 15px 18px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #eff6ff;
}

.invoice-billing-period span {
    display: block;
    color: #6b7da6;
    font-size: 0.68rem;
}

.invoice-billing-period strong {
    display: block;
    margin-top: 4px;
    color: #1d4ed8;
    font-size: 0.8rem;
}

.invoice-service-card {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin: 0 36px 25px;
    padding: 17px;
    border: 1px solid #e4e8ef;
    border-radius: 16px;
    background: #f8f9fc;
}

.invoice-service-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #dcfce7;
    color: #16a34a;
    font-size: 1.25rem;
}

.invoice-service-details > span {
    color: #9299a8;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.invoice-service-details h3 {
    margin: 3px 0 5px;
    color: #30384a;
    font-size: 0.92rem;
    font-weight: 850;
}

.invoice-service-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.invoice-service-meta span {
    color: #7b8496;
    font-size: 0.69rem;
}

.invoice-items-section {
    margin: 0 36px 28px;
    overflow: hidden;
    border: 1px solid #e4e8ef;
    border-radius: 16px;
}

.invoice-table-responsive {
    overflow-x: auto;
}

.invoice-items-table {
    width: 100%;
    border-collapse: collapse;
}

.invoice-items-table th {
    padding: 15px 18px;
    background: #f7f8fb;
    color: #6f788a;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.invoice-items-table td {
    padding: 18px;
    border-top: 1px solid #e8ebf1;
    color: #4b5567;
    font-size: 0.8rem;
}

.invoice-items-table td strong {
    color: #30384a;
    font-weight: 800;
}

.invoice-summary-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 30px;
    padding: 0 36px 30px;
}

.invoice-notes-area {
    padding: 20px;
    border-radius: 15px;
    background: #fafbfc;
}

.invoice-notes-area p {
    margin: 0;
    color: #6f788a;
    font-size: 0.76rem;
    line-height: 1.7;
}

.invoice-totals {
    overflow: hidden;
    border: 1px solid #e3e7ee;
    border-radius: 16px;
}

.invoice-totals > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 13px 17px;
    border-bottom: 1px solid #e8ebf1;
}

.invoice-totals > div:last-child {
    border-bottom: 0;
}

.invoice-totals span {
    color: #778093;
    font-size: 0.75rem;
}

.invoice-totals strong {
    color: #30384a;
    font-size: 0.8rem;
}

.invoice-total-row {
    background: #eef2ff;
}

.invoice-total-row span,
.invoice-total-row strong {
    color: #4338ca;
    font-size: 0.9rem;
    font-weight: 900;
}

.invoice-paid-row strong {
    color: #16a34a;
}

.invoice-balance-row {
    background: #fef2f2;
}

.invoice-balance-row span,
.invoice-balance-row strong {
    color: #dc2626;
    font-size: 0.9rem;
    font-weight: 900;
}

.invoice-status-message {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 36px 28px;
    padding: 17px;
    border-radius: 15px;
}

.invoice-status-message > div {
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.15rem;
}

.invoice-status-message > span {
    display: flex;
    flex-direction: column;
}

.invoice-status-message strong {
    font-size: 0.82rem;
}

.invoice-status-message small {
    margin-top: 3px;
    font-size: 0.72rem;
    line-height: 1.5;
}

.invoice-status-message.paid {
    background: #ecfdf5;
    color: #15803d;
}

.invoice-status-message.paid > div {
    background: #dcfce7;
}

.invoice-status-message.pending {
    background: #fffbeb;
    color: #b45309;
}

.invoice-status-message.pending > div {
    background: #fef3c7;
}

.invoice-status-message.overdue,
.invoice-status-message.cancelled {
    background: #fef2f2;
    color: #dc2626;
}

.invoice-status-message.overdue > div,
.invoice-status-message.cancelled > div {
    background: #fee2e2;
}

.invoice-document-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    padding: 24px 36px;
    border-top: 1px solid #e8ebf1;
    background: #fafbfc;
}

.invoice-document-footer strong {
    color: #30384a;
    font-size: 0.8rem;
}

.invoice-document-footer p {
    max-width: 600px;
    margin: 4px 0 0;
    color: #858e9f;
    font-size: 0.7rem;
}

.invoice-footer-reference {
    text-align: right;
}

.invoice-footer-reference span {
    display: block;
    color: #9299a8;
    font-size: 0.66rem;
}

.invoice-footer-reference strong {
    display: block;
    margin-top: 4px;
}

.invoice-payment-history {
    margin-top: 25px;
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .invoice-summary-area {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .invoice-page-actions,
    .invoice-document-header,
    .invoice-document-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .invoice-action-buttons {
        justify-content: stretch;
        flex-direction: column;
    }

    .invoice-action-buttons .btn,
    .invoice-action-buttons form,
    .invoice-action-buttons form .btn {
        width: 100%;
    }

    .invoice-title-block {
        text-align: left;
    }

    .invoice-information-grid {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .invoice-document-divider {
        margin: 0 22px;
    }

    .invoice-billing-period,
    .invoice-service-card,
    .invoice-items-section,
    .invoice-status-message {
        margin-right: 22px;
        margin-left: 22px;
    }

    .invoice-service-card {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .invoice-service-card .btn {
        grid-column: 1 / -1;
    }

    .invoice-summary-area {
        padding-right: 22px;
        padding-left: 22px;
    }

    .invoice-footer-reference {
        text-align: left;
    }
}

@media print {
    @page {
        size: A4;
        margin: 8mm;
    }

    body {
        background: #ffffff !important;
    }

    .no-print,
    .sidebar,
    .topbar,
    .sidebar-overlay,
    .invoice-payment-history {
        display: none !important;
    }

    .invoice-view-wrapper,
    .invoice-view-main {
        display: block !important;
        width: 100% !important;
        min-height: auto !important;
        margin: 0 !important;
    }

    .invoice-view-content {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
    }

    .invoice-document {
        width: 100% !important;
        border: 1px solid #d8dce5 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .invoice-document-header {
        padding: 22px;
    }

    .invoice-document-divider {
        margin: 0 22px;
    }

    .invoice-information-grid {
        padding: 20px 22px;
    }

    .invoice-billing-period,
    .invoice-service-card,
    .invoice-items-section,
    .invoice-status-message {
        margin-right: 22px;
        margin-left: 22px;
    }

    .invoice-summary-area {
        padding-right: 22px;
        padding-left: 22px;
    }

    .invoice-document-footer {
        padding: 20px 22px;
    }

    .invoice-company-logo {
        background: #4f46e5 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .invoice-information-card,
    .invoice-service-card,
    .invoice-items-section,
    .invoice-summary-area,
    .invoice-status-message {
        break-inside: avoid;
    }
}

/* =========================================================
   PAYMENTS PAGE
========================================================= */

.payment-stat-card {
    min-height: 135px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 21px;
    border: 1px solid #e8ecf3;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(29, 39, 68, 0.055);
}

.payment-stat-icon {
    width: 53px;
    height: 53px;
    flex: 0 0 53px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.3rem;
}

.payment-stat-card > div:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.payment-stat-card span {
    color: #7f8899;
    font-size: 0.72rem;
    font-weight: 700;
}

.payment-stat-card strong {
    margin-top: 4px;
    color: #252c3c;
    font-size: 1.12rem;
    font-weight: 900;
}

.payment-stat-card small {
    margin-top: 4px;
    color: #9aa1af;
    font-size: 0.67rem;
}

.payment-stat-card.purple .payment-stat-icon {
    background: #ede9fe;
    color: #7c3aed;
}

.payment-stat-card.green .payment-stat-icon {
    background: #dcfce7;
    color: #16a34a;
}

.payment-stat-card.orange .payment-stat-icon {
    background: #ffedd5;
    color: #ea580c;
}

.payment-stat-card.red .payment-stat-icon {
    background: #fee2e2;
    color: #dc2626;
}

.payment-filter-card {
    margin-bottom: 24px;
    padding: 22px;
}

.payment-filter-card .form-label {
    color: #5f687a;
    font-size: 0.75rem;
    font-weight: 700;
}

.payment-filter-card .form-control,
.payment-filter-card .form-select,
.payment-filter-card .input-group-text {
    min-height: 47px;
    border-color: #dfe4ec;
}

.payment-filter-card .input-group-text {
    background: #ffffff;
    color: #8991a2;
}

.payment-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 18px;
    padding-top: 17px;
    border-top: 1px solid #edf0f5;
}

.payments-table-card {
    overflow: hidden;
}

.payments-table-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 20px 22px;
    border-bottom: 1px solid #edf0f5;
}

.payments-table-heading h3 {
    margin: 0;
    color: #252c3c;
    font-size: 1rem;
    font-weight: 850;
}

.payments-table-heading p {
    margin: 3px 0 0;
    color: #9299a8;
    font-size: 0.72rem;
}

.payment-reference-cell {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.payment-method-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 1rem;
}

.payment-reference-cell > div:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.payment-method-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 20px;
    background: #f3f5f9;
    color: #5f687a;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}

.table-primary-link {
    color: #343c4e;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
}

.table-primary-link:hover {
    color: #4f46e5;
}

.payments-table td {
    vertical-align: middle;
}

@media print {
    .sidebar,
    .topbar,
    .sidebar-overlay,
    .page-heading,
    .payment-filter-card,
    .payments-table-heading .btn,
    .payments-table th:last-child,
    .payments-table td:last-child {
        display: none !important;
    }

    .admin-main {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .dashboard-content {
        padding: 0 !important;
    }

    .content-card,
    .payment-stat-card {
        border: 1px solid #dfe3ea !important;
        box-shadow: none !important;
    }
}

@media (max-width: 767.98px) {
    .payment-filter-card {
        padding: 18px;
    }

    .payment-filter-actions {
        flex-direction: column-reverse;
    }

    .payment-filter-actions .btn {
        width: 100%;
    }

    .payments-table-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* =========================================================
   RECORD PAYMENT
========================================================= */

.payment-invoice-preview {
    overflow: hidden;
    min-height: 110px;
    border: 1px solid #e1e6ef;
    border-radius: 16px;
    background: #f8f9fc;
}

.payment-preview-empty {
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 22px;
    color: #8b94a5;
    font-size: 0.76rem;
}

.payment-preview-empty i {
    font-size: 1.2rem;
}

.payment-preview-details {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, 1fr);
}

.payment-preview-details > div {
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 18px;
    border-right: 1px solid #e4e8ef;
}

.payment-preview-details > div:last-child {
    border-right: 0;
}

.payment-preview-details span {
    color: #8a93a4;
    font-size: 0.67rem;
    font-weight: 700;
}

.payment-preview-details strong {
    margin-top: 5px;
    color: #30384a;
    font-size: 0.86rem;
    font-weight: 850;
}

.payment-preview-details small {
    margin-top: 3px;
    color: #979ead;
    font-size: 0.65rem;
}

.payment-confirmation-box {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0 0 25px;
    padding: 17px;
    border: 1px solid #c7d2fe;
    border-radius: 15px;
    background: #eef2ff;
}

.payment-confirmation-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #e0e7ff;
    color: #4f46e5;
    font-size: 1.05rem;
}

.payment-confirmation-box strong {
    color: #3730a3;
    font-size: 0.8rem;
}

.payment-confirmation-box p {
    margin: 4px 0 0;
    color: #66709a;
    font-size: 0.72rem;
    line-height: 1.6;
}

.payment-no-invoice-card {
    padding: 55px 25px;
    text-align: center;
}

.payment-no-invoice-card h3 {
    margin: 14px 0 7px;
    color: #30384a;
    font-size: 1.05rem;
    font-weight: 850;
}

.payment-no-invoice-card p {
    max-width: 480px;
    margin: 0 auto 20px;
    color: #858e9f;
    font-size: 0.76rem;
    line-height: 1.65;
}

@media (max-width: 991.98px) {
    .payment-preview-details {
        grid-template-columns: repeat(2, 1fr);
    }

    .payment-preview-details > div {
        border-right: 1px solid #e4e8ef;
        border-bottom: 1px solid #e4e8ef;
    }

    .payment-preview-details > div:nth-child(2n) {
        border-right: 0;
    }

    .payment-preview-details > div:last-child {
        grid-column: 1 / -1;
        border-bottom: 0;
    }
}

@media (max-width: 575.98px) {
    .payment-preview-details {
        grid-template-columns: 1fr;
    }

    .payment-preview-details > div,
    .payment-preview-details > div:nth-child(2n) {
        border-right: 0;
        border-bottom: 1px solid #e4e8ef;
    }

    .payment-preview-details > div:last-child {
        grid-column: auto;
        border-bottom: 0;
    }
}

/* =========================================================
   SEND INVOICE
========================================================= */

.invoice-delivery-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.invoice-delivery-option {
    position: relative;
    display: grid;
    grid-template-columns: 28px 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 18px;
    border: 1px solid #dfe4ed;
    border-radius: 16px;
    background: #ffffff;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.invoice-delivery-option:hover {
    border-color: #a5b4fc;
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.08);
    transform: translateY(-1px);
}

.invoice-delivery-option input {
    width: 19px;
    height: 19px;
    margin: 0;
    accent-color: #4f46e5;
}

.invoice-delivery-option input:disabled {
    cursor: not-allowed;
}

.invoice-delivery-option:has(input:checked) {
    border-color: #818cf8;
    background: #f8f9ff;
    box-shadow: 0 8px 22px rgba(79, 70, 229, 0.08);
}

.invoice-delivery-option:has(input:disabled) {
    opacity: 0.58;
    cursor: not-allowed;
}

.delivery-option-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 1.15rem;
}

.invoice-delivery-option > span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.invoice-delivery-option strong {
    color: #30384a;
    font-size: 0.82rem;
}

.invoice-delivery-option small {
    margin-top: 3px;
    color: #858e9f;
    font-size: 0.7rem;
    line-height: 1.45;
}

@media (max-width: 767.98px) {
    .invoice-delivery-options {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   INVOICE REMINDER
========================================================= */

.reminder-status-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding: 15px;
    border-radius: 14px;
}

.reminder-status-box > i {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    font-size: 1rem;
}

.reminder-status-box > div {
    display: flex;
    flex-direction: column;
}

.reminder-status-box strong {
    font-size: 0.78rem;
}

.reminder-status-box span {
    margin-top: 3px;
    font-size: 0.7rem;
}

.reminder-status-box.overdue {
    background: #fef2f2;
    color: #dc2626;
}

.reminder-status-box.overdue > i {
    background: #fee2e2;
}

.reminder-status-box.upcoming {
    background: #fffbeb;
    color: #b45309;
}

.reminder-status-box.upcoming > i {
    background: #fef3c7;
}

/* =========================================================
   CUSTOMER PORTAL LOGIN
========================================================= */

.portal-login-body {
    min-height: 100vh;
    margin: 0;
    background: #f5f7fb;
    color: #242b3b;
}

.portal-login-wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 0.95fr) minmax(500px, 1.05fr);
}

.portal-login-brand-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 60px;
    background:
        radial-gradient(
            circle at top right,
            rgba(129, 140, 248, 0.35),
            transparent 35%
        ),
        linear-gradient(
            145deg,
            #312e81,
            #4338ca 50%,
            #5b21b6
        );
    color: #ffffff;
}

.portal-brand-content {
    max-width: 570px;
    margin: auto 0;
}

.portal-brand-logo {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 21px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 1.8rem;
    backdrop-filter: blur(10px);
}

.portal-brand-label,
.portal-form-label {
    display: block;
    margin-bottom: 13px;
    font-size: 0.71rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.portal-brand-label {
    color: #c7d2fe;
}

.portal-brand-content h1 {
    max-width: 540px;
    margin: 0;
    font-size: clamp(2.25rem, 4vw, 4rem);
    font-weight: 950;
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.portal-brand-content > p {
    max-width: 510px;
    margin: 23px 0 0;
    color: #dbeafe;
    font-size: 0.97rem;
    line-height: 1.8;
}

.portal-feature-list {
    display: grid;
    gap: 13px;
    margin-top: 38px;
}

.portal-feature-item {
    max-width: 500px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.09);
}

.portal-feature-item > div {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 1.1rem;
}

.portal-feature-item > span {
    display: flex;
    flex-direction: column;
}

.portal-feature-item strong {
    font-size: 0.82rem;
}

.portal-feature-item small {
    margin-top: 3px;
    color: #dbeafe;
    font-size: 0.7rem;
}

.portal-brand-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 45px;
    color: #c7d2fe;
    font-size: 0.7rem;
}

.portal-login-form-panel {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 45px;
}

.portal-login-card {
    width: 100%;
    max-width: 520px;
    padding: 45px;
    border: 1px solid #e4e8f0;
    border-radius: 25px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(30, 41, 59, 0.1);
}

.portal-mobile-logo {
    display: none;
}

.portal-form-label {
    color: #4f46e5;
}

.portal-login-card h2 {
    margin: 0;
    color: #22293a;
    font-size: 2rem;
    font-weight: 950;
    letter-spacing: -0.035em;
}

.portal-login-description {
    margin: 13px 0 26px;
    color: #7c8597;
    font-size: 0.8rem;
    line-height: 1.7;
}

.portal-access-information {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid #c7d2fe;
    border-radius: 16px;
    background: #eef2ff;
}

.portal-access-icon {
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #e0e7ff;
    color: #4f46e5;
    font-size: 1.15rem;
}

.portal-access-information strong {
    color: #3730a3;
    font-size: 0.8rem;
}

.portal-access-information p {
    margin: 4px 0 0;
    color: #66709a;
    font-size: 0.72rem;
    line-height: 1.55;
}

.portal-help-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    border: 1px solid #e5e9f0;
    border-radius: 17px;
    background: #fafbfc;
}

.portal-help-card > span {
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #ecfdf5;
    color: #16a34a;
    font-size: 1.1rem;
}

.portal-help-card strong {
    color: #30384a;
    font-size: 0.8rem;
}

.portal-help-card p {
    margin: 4px 0 9px;
    color: #7d8697;
    font-size: 0.72rem;
    line-height: 1.55;
}

.portal-help-card a {
    display: block;
    margin-top: 5px;
    color: #4f46e5;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.portal-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    color: #9299a8;
    font-size: 0.68rem;
    text-align: center;
}

@media (max-width: 991.98px) {
    .portal-login-wrapper {
        grid-template-columns: 1fr;
    }

    .portal-login-brand-panel {
        display: none;
    }

    .portal-login-form-panel {
        padding: 28px 18px;
    }

    .portal-login-card {
        padding: 32px 25px;
    }

    .portal-mobile-logo {
        width: 58px;
        height: 58px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 25px;
        border-radius: 18px;
        background: linear-gradient(
            135deg,
            #4f46e5,
            #7c3aed
        );
        color: #ffffff;
        font-size: 1.45rem;
        box-shadow: 0 12px 25px rgba(79, 70, 229, 0.2);
    }
}

/* =========================================================
   CUSTOMER PORTAL DASHBOARD
========================================================= */

.portal-body {
    min-height: 100vh;
    margin: 0;
    background: #f4f6fa;
    color: #252c3c;
}

.portal-layout {
    min-height: 100vh;
    display: flex;
}

.portal-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    width: 270px;
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(
            180deg,
            #27225d,
            #312e81 55%,
            #3730a3
        );
    color: #ffffff;
    box-shadow: 10px 0 35px rgba(30, 27, 75, 0.13);
}

.portal-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 88px;
    padding: 20px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-sidebar-logo {
    width: 47px;
    height: 47px;
    flex: 0 0 47px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 1.2rem;
}

.portal-sidebar-brand > div:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.portal-sidebar-brand strong {
    overflow: hidden;
    font-size: 0.84rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-sidebar-brand small {
    margin-top: 3px;
    color: #c7d2fe;
    font-size: 0.66rem;
}

.portal-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 14px;
}

.portal-nav-label {
    display: block;
    padding: 0 12px;
    margin-bottom: 8px;
    color: #a5b4fc;
    font-size: 0.61rem;
    font-weight: 850;
    letter-spacing: 0.12em;
}

.portal-nav-link {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    margin-bottom: 5px;
    padding: 10px 12px;
    border-radius: 13px;
    color: #dbeafe;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.portal-nav-link i {
    font-size: 1rem;
}

.portal-nav-link:hover,
.portal-nav-link.active {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    transform: translateX(2px);
}

.portal-nav-count {
    min-width: 24px;
    padding: 3px 7px;
    border-radius: 20px;
    background: #fbbf24;
    color: #713f12;
    font-size: 0.59rem;
    font-weight: 900;
    text-align: center;
}

.portal-sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 17px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-account-block {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.portal-account-avatar,
.portal-topbar-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 900;
}

.portal-account-avatar {
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.78rem;
}

.portal-account-block > div:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.portal-account-block strong {
    overflow: hidden;
    font-size: 0.7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-account-block small {
    margin-top: 2px;
    color: #c7d2fe;
    font-size: 0.61rem;
}

.portal-logout-button {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
}

.portal-main {
    width: calc(100% - 270px);
    min-height: 100vh;
    margin-left: 270px;
    display: flex;
    flex-direction: column;
}

.portal-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 30px;
    border-bottom: 1px solid #e7eaf0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
}

.portal-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid #e2e6ee;
    border-radius: 13px;
    background: #ffffff;
    color: #4f46e5;
    font-size: 1.3rem;
}

.portal-topbar-title {
    flex: 1;
}

.portal-topbar-title span {
    display: block;
    color: #8a93a4;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.09em;
}

.portal-topbar-title h1 {
    margin: 4px 0 0;
    color: #252c3c;
    font-size: 1.25rem;
    font-weight: 900;
}

.portal-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.portal-support-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 41px;
    padding: 8px 14px;
    border: 1px solid #dfe3ec;
    border-radius: 12px;
    background: #ffffff;
    color: #4f46e5;
    font-size: 0.7rem;
    font-weight: 750;
    text-decoration: none;
}

.portal-topbar-avatar {
    width: 43px;
    height: 43px;
    background: #e0e7ff;
    color: #4338ca;
    font-size: 0.82rem;
}

.portal-content {
    width: 100%;
    max-width: 1600px;
    flex: 1;
    margin: 0 auto;
    padding: 28px 30px 40px;
}

.portal-welcome-banner {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 25px;
    padding: 31px;
    border-radius: 22px;
    background:
        radial-gradient(
            circle at right top,
            rgba(255, 255, 255, 0.18),
            transparent 38%
        ),
        linear-gradient(
            135deg,
            #3730a3,
            #4f46e5,
            #6d28d9
        );
    color: #ffffff;
    box-shadow: 0 20px 40px rgba(67, 56, 202, 0.18);
}

.portal-welcome-label {
    display: block;
    margin-bottom: 8px;
    color: #c7d2fe;
    font-size: 0.64rem;
    font-weight: 850;
    letter-spacing: 0.11em;
}

.portal-welcome-banner h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.portal-welcome-banner p {
    max-width: 620px;
    margin: 8px 0 0;
    color: #dbeafe;
    font-size: 0.76rem;
    line-height: 1.65;
}

.portal-welcome-balance {
    min-width: 250px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.11);
    text-align: right;
}

.portal-welcome-balance span,
.portal-welcome-balance small {
    display: block;
    color: #dbeafe;
    font-size: 0.68rem;
}

.portal-welcome-balance strong {
    display: block;
    margin: 7px 0;
    font-size: 1.65rem;
    font-weight: 950;
}

.portal-stat-card {
    min-height: 124px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 19px;
    border: 1px solid #e5e9f0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 9px 25px rgba(30, 41, 59, 0.055);
}

.portal-stat-icon {
    width: 51px;
    height: 51px;
    flex: 0 0 51px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    font-size: 1.18rem;
}

.portal-stat-icon.purple {
    background: #ede9fe;
    color: #7c3aed;
}

.portal-stat-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

.portal-stat-icon.green {
    background: #dcfce7;
    color: #16a34a;
}

.portal-stat-icon.red {
    background: #fee2e2;
    color: #dc2626;
}

.portal-stat-card > div:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.portal-stat-card span {
    color: #7d8697;
    font-size: 0.69rem;
    font-weight: 700;
}

.portal-stat-card strong {
    margin-top: 4px;
    color: #252c3c;
    font-size: 1.05rem;
    font-weight: 900;
}

.portal-stat-card small {
    margin-top: 3px;
    color: #969dac;
    font-size: 0.63rem;
}

.portal-card {
    overflow: hidden;
    border: 1px solid #e5e9f0;
    border-radius: 19px;
    background: #ffffff;
    box-shadow: 0 9px 28px rgba(30, 41, 59, 0.05);
}

.portal-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 20px 21px;
    border-bottom: 1px solid #edf0f4;
}

.portal-card-heading span {
    display: block;
    color: #9299a8;
    font-size: 0.6rem;
    font-weight: 850;
    letter-spacing: 0.09em;
}

.portal-card-heading h3 {
    margin: 4px 0 0;
    color: #293143;
    font-size: 0.95rem;
    font-weight: 900;
}

.portal-card-heading p {
    margin: 4px 0 0;
    color: #8a93a4;
    font-size: 0.68rem;
}

.portal-card-link {
    color: #4f46e5;
    font-size: 0.68rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.portal-table {
    margin: 0;
}

.portal-table th {
    padding: 13px 16px;
    border-bottom-color: #e8ecf2;
    background: #fafbfc;
    color: #7b8495;
    font-size: 0.64rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.portal-table td {
    padding: 15px 16px;
    border-bottom-color: #edf0f4;
    color: #596274;
    font-size: 0.71rem;
    vertical-align: middle;
}

.portal-table tbody tr:last-child td {
    border-bottom: 0;
}

.portal-table td > strong,
.portal-table td > a {
    display: block;
}

.portal-table td small {
    display: block;
    margin-top: 3px;
    color: #969dac;
    font-size: 0.62rem;
}

.portal-table-link {
    color: #30384a;
    font-weight: 850;
    text-decoration: none;
}

.portal-table-link:hover {
    color: #4f46e5;
}

.portal-table-action {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dfe4ec;
    border-radius: 10px;
    color: #4f46e5;
    text-decoration: none;
}

.portal-table-action:hover {
    border-color: #a5b4fc;
    background: #eef2ff;
    color: #4338ca;
}

.portal-empty-icon {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 11px;
    border-radius: 17px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 1.25rem;
}

.portal-table h4 {
    margin: 0;
    color: #30384a;
    font-size: 0.86rem;
    font-weight: 850;
}

.portal-table td > p {
    margin: 5px 0 0;
    color: #9299a8;
    font-size: 0.68rem;
}

.portal-service-list {
    padding: 8px 19px 19px;
}

.portal-service-item {
    display: grid;
    grid-template-columns: 45px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #edf0f4;
}

.portal-service-item:last-child {
    border-bottom: 0;
}

.portal-service-item-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #ecfdf5;
    color: #16a34a;
    font-size: 1.08rem;
}

.portal-service-item-details {
    min-width: 0;
}

.portal-service-item-details > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.portal-service-item-details strong {
    overflow: hidden;
    color: #30384a;
    font-size: 0.73rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-service-item-details small {
    display: block;
    margin-top: 5px;
    color: #858e9f;
    font-size: 0.63rem;
}

.portal-service-item-details small i {
    width: 17px;
    color: #6366f1;
}

.portal-service-expiry {
    margin-top: 7px;
    font-size: 0.64rem;
    font-weight: 750;
}

.portal-empty-small {
    padding: 30px 15px 15px;
    color: #8a93a4;
    text-align: center;
}

.portal-empty-small i {
    display: block;
    margin-bottom: 9px;
    color: #6366f1;
    font-size: 1.4rem;
}

.portal-empty-small strong,
.portal-empty-small span {
    display: block;
}

.portal-empty-small strong {
    color: #30384a;
    font-size: 0.75rem;
}

.portal-empty-small span {
    margin-top: 4px;
    font-size: 0.66rem;
}

.portal-customer-details {
    padding: 9px 20px 20px;
}

.portal-customer-details > div {
    padding: 12px 0;
    border-bottom: 1px solid #edf0f4;
}

.portal-customer-details > div:last-child {
    border-bottom: 0;
}

.portal-customer-details span,
.portal-customer-details strong {
    display: block;
}

.portal-customer-details span {
    color: #9199a8;
    font-size: 0.63rem;
}

.portal-customer-details strong {
    margin-top: 4px;
    color: #30384a;
    font-size: 0.71rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.portal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 30px;
    border-top: 1px solid #e6eaf0;
    background: #ffffff;
    color: #9299a8;
    font-size: 0.63rem;
}

.portal-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1030;
    display: none;
    background: rgba(15, 23, 42, 0.5);
}

@media (max-width: 991.98px) {
    .portal-sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .portal-sidebar.open {
        transform: translateX(0);
    }

    .portal-main {
        width: 100%;
        margin-left: 0;
    }

    .portal-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .portal-sidebar-overlay.show {
        display: block;
    }

    .portal-menu-open {
        overflow: hidden;
    }

    .portal-content {
        padding-right: 20px;
        padding-left: 20px;
    }
}

@media (max-width: 767.98px) {
    .portal-topbar {
        padding: 14px 18px;
    }

    .portal-topbar-title span {
        display: none;
    }

    .portal-topbar-title h1 {
        font-size: 1rem;
    }

    .portal-support-button span {
        display: none;
    }

    .portal-welcome-banner {
        align-items: stretch;
        flex-direction: column;
        padding: 24px;
    }

    .portal-welcome-balance {
        min-width: 0;
        text-align: left;
    }

    .portal-card-heading {
        align-items: flex-start;
    }

    .portal-footer {
        align-items: flex-start;
        flex-direction: column;
        padding-right: 20px;
        padding-left: 20px;
    }
}

/* =========================================================
   CUSTOMER PORTAL INVOICES
========================================================= */

.portal-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.portal-page-heading > div > span {
    display: block;
    margin-bottom: 6px;
    color: #6366f1;
    font-size: 0.64rem;
    font-weight: 850;
    letter-spacing: 0.1em;
}

.portal-page-heading h2 {
    margin: 0;
    color: #252c3c;
    font-size: 1.55rem;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.portal-page-heading p {
    margin: 7px 0 0;
    color: #858e9f;
    font-size: 0.74rem;
    line-height: 1.6;
}

.portal-filter-card {
    padding: 21px;
}

.portal-filter-card .form-label {
    color: #616b7c;
    font-size: 0.71rem;
    font-weight: 750;
}

.portal-filter-card .form-control,
.portal-filter-card .form-select,
.portal-filter-card .input-group-text {
    min-height: 45px;
    border-color: #dfe4ec;
    font-size: 0.73rem;
}

.portal-filter-card .input-group-text {
    background: #ffffff;
    color: #8b94a5;
}

.portal-filter-reset {
    margin-top: 16px;
    padding-top: 15px;
    border-top: 1px solid #edf0f4;
    text-align: right;
}

.portal-filter-reset a {
    color: #dc2626;
    font-size: 0.68rem;
    font-weight: 750;
    text-decoration: none;
}

.portal-invoice-table {
    min-width: 1100px;
}

@media print {
    .portal-sidebar,
    .portal-topbar,
    .portal-sidebar-overlay,
    .portal-filter-card,
    .portal-page-heading .btn,
    .portal-footer,
    .portal-invoice-table th:last-child,
    .portal-invoice-table td:last-child {
        display: none !important;
    }

    .portal-main {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .portal-content {
        max-width: none !important;
        padding: 0 !important;
    }

    .portal-card,
    .portal-stat-card {
        border: 1px solid #dfe3ea !important;
        box-shadow: none !important;
    }
}

@media (max-width: 767.98px) {
    .portal-page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-page-heading .btn {
        width: 100%;
    }

    .portal-filter-card {
        padding: 18px;
    }
}

/* =========================================================
   CUSTOMER PORTAL FONT SIZE IMPROVEMENTS
========================================================= */

.portal-body {
    font-size: 16px;
}

.portal-sidebar-brand strong {
    font-size: 1rem;
}

.portal-sidebar-brand small {
    font-size: 0.78rem;
}

.portal-nav-label {
    font-size: 0.72rem;
}

.portal-nav-link {
    font-size: 0.9rem;
}

.portal-nav-link i {
    font-size: 1.08rem;
}

.portal-account-block strong {
    font-size: 0.82rem;
}

.portal-account-block small {
    font-size: 0.72rem;
}

.portal-topbar-title span {
    font-size: 0.75rem;
}

.portal-topbar-title h1 {
    font-size: 1.45rem;
}

.portal-support-button {
    font-size: 0.82rem;
}

.portal-welcome-label {
    font-size: 0.75rem;
}

.portal-welcome-banner h2 {
    font-size: 1.85rem;
}

.portal-welcome-banner p {
    font-size: 0.9rem;
}

.portal-welcome-balance span,
.portal-welcome-balance small {
    font-size: 0.8rem;
}

.portal-welcome-balance strong {
    font-size: 1.9rem;
}

.portal-stat-card span {
    font-size: 0.82rem;
}

.portal-stat-card strong {
    font-size: 1.22rem;
}

.portal-stat-card small {
    font-size: 0.75rem;
}

.portal-card-heading span {
    font-size: 0.7rem;
}

.portal-card-heading h3 {
    font-size: 1.12rem;
}

.portal-card-heading p {
    font-size: 0.8rem;
}

.portal-card-link {
    font-size: 0.8rem;
}

.portal-table th {
    font-size: 0.75rem;
}

.portal-table td {
    font-size: 0.85rem;
}

.portal-table td small {
    font-size: 0.74rem;
}

.portal-table-link {
    font-size: 0.88rem;
}

.portal-table h4 {
    font-size: 1rem;
}

.portal-table td > p {
    font-size: 0.78rem;
}

.portal-service-item-details strong {
    font-size: 0.86rem;
}

.portal-service-item-details small {
    font-size: 0.75rem;
}

.portal-service-expiry {
    font-size: 0.76rem;
}

.portal-customer-details span {
    font-size: 0.74rem;
}

.portal-customer-details strong {
    font-size: 0.86rem;
}

.portal-footer {
    font-size: 0.75rem;
}

.portal-page-heading > div > span {
    font-size: 0.75rem;
}

.portal-page-heading h2 {
    font-size: 1.8rem;
}

.portal-page-heading p {
    font-size: 0.88rem;
}

.portal-filter-card .form-label {
    font-size: 0.82rem;
}

.portal-filter-card .form-control,
.portal-filter-card .form-select,
.portal-filter-card .input-group-text {
    font-size: 0.85rem;
}

.portal-filter-reset a {
    font-size: 0.8rem;
}

.portal-invoice-table td,
.portal-invoice-table th {
    padding-top: 17px;
    padding-bottom: 17px;
}

@media (max-width: 767.98px) {
    .portal-topbar-title h1 {
        font-size: 1.15rem;
    }

    .portal-welcome-banner h2 {
        font-size: 1.5rem;
    }

    .portal-page-heading h2 {
        font-size: 1.5rem;
    }
}

/* =========================================================
   CUSTOMER PORTAL INVOICE VIEW
========================================================= */

.portal-invoice-view-content {
    max-width: 1250px;
}

.portal-invoice-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.portal-invoice-document {
    overflow: hidden;
    border: 1px solid #e2e7ef;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(30, 41, 59, 0.08);
}

.portal-invoice-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    padding: 36px;
}

.portal-invoice-company {
    display: flex;
    align-items: flex-start;
    gap: 17px;
}

.portal-invoice-company-logo {
    width: 66px;
    height: 66px;
    flex: 0 0 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #ffffff;
    font-size: 1.7rem;
    box-shadow: 0 12px 25px rgba(79, 70, 229, 0.2);
}

.portal-invoice-company h2 {
    margin: 0 0 8px;
    color: #202738;
    font-size: 1.45rem;
    font-weight: 900;
}

.portal-invoice-company p {
    max-width: 380px;
    margin: 0 0 8px;
    color: #717a8d;
    font-size: 0.88rem;
    line-height: 1.65;
}

.portal-invoice-company span {
    display: block;
    margin-top: 5px;
    color: #717a8d;
    font-size: 0.84rem;
}

.portal-invoice-company span i {
    width: 22px;
    color: #4f46e5;
}

.portal-invoice-title {
    text-align: right;
}

.portal-invoice-title > span:first-child {
    display: block;
    margin-bottom: 7px;
    color: #9299a8;
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.13em;
}

.portal-invoice-title h1 {
    margin: 0 0 13px;
    color: #242b3b;
    font-size: 1.45rem;
    font-weight: 950;
}

.portal-invoice-divider {
    height: 1px;
    margin: 0 36px;
    background: #e8ebf1;
}

.portal-invoice-information-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    padding: 30px 36px;
}

.portal-invoice-information-card {
    padding: 22px;
    border: 1px solid #e6eaf0;
    border-radius: 17px;
    background: #fafbfc;
}

.portal-invoice-label {
    display: block;
    margin-bottom: 10px;
    color: #8b94a6;
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.1em;
}

.portal-invoice-information-card h3 {
    margin: 0 0 11px;
    color: #2c3445;
    font-size: 1.08rem;
    font-weight: 850;
}

.portal-invoice-information-card p {
    margin: 5px 0;
    color: #697286;
    font-size: 0.86rem;
    line-height: 1.55;
}

.portal-invoice-detail-line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 11px 0;
    border-bottom: 1px solid #e7eaf0;
}

.portal-invoice-detail-line:last-child {
    border-bottom: 0;
}

.portal-invoice-detail-line span {
    color: #7f8899;
    font-size: 0.84rem;
}

.portal-invoice-detail-line strong {
    color: #333b4d;
    font-size: 0.86rem;
    text-align: right;
}

.portal-invoice-billing-period {
    margin: 0 36px 20px;
    padding: 16px 18px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #eff6ff;
}

.portal-invoice-billing-period span {
    display: block;
    color: #6b7da6;
    font-size: 0.78rem;
}

.portal-invoice-billing-period strong {
    display: block;
    margin-top: 5px;
    color: #1d4ed8;
    font-size: 0.9rem;
}

.portal-invoice-service {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    margin: 0 36px 25px;
    padding: 18px;
    border: 1px solid #e4e8ef;
    border-radius: 16px;
    background: #f8f9fc;
}

.portal-invoice-service-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #dcfce7;
    color: #16a34a;
    font-size: 1.25rem;
}

.portal-invoice-service > div:last-child > span {
    color: #9299a8;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.portal-invoice-service h3 {
    margin: 4px 0 7px;
    color: #30384a;
    font-size: 1rem;
    font-weight: 850;
}

.portal-invoice-service-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
}

.portal-invoice-service-meta small {
    color: #7b8496;
    font-size: 0.78rem;
}

.portal-invoice-service-meta small i {
    margin-right: 4px;
    color: #6366f1;
}

.portal-invoice-items-section {
    margin: 0 36px 28px;
    overflow: hidden;
    border: 1px solid #e4e8ef;
    border-radius: 16px;
}

.portal-invoice-items-table {
    width: 100%;
    border-collapse: collapse;
}

.portal-invoice-items-table th {
    padding: 16px 18px;
    background: #f7f8fb;
    color: #6f788a;
    font-size: 0.8rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.portal-invoice-items-table td {
    padding: 19px 18px;
    border-top: 1px solid #e8ebf1;
    color: #4b5567;
    font-size: 0.92rem;
}

.portal-invoice-items-table td strong {
    color: #30384a;
    font-weight: 850;
}

.portal-invoice-summary-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 30px;
    padding: 0 36px 30px;
}

.portal-invoice-notes {
    padding: 20px;
    border-radius: 15px;
    background: #fafbfc;
}

.portal-invoice-notes p {
    margin: 0;
    color: #6f788a;
    font-size: 0.86rem;
    line-height: 1.7;
}

.portal-invoice-totals {
    overflow: hidden;
    border: 1px solid #e3e7ee;
    border-radius: 16px;
}

.portal-invoice-totals > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 17px;
    border-bottom: 1px solid #e8ebf1;
}

.portal-invoice-totals > div:last-child {
    border-bottom: 0;
}

.portal-invoice-totals span {
    color: #778093;
    font-size: 0.84rem;
}

.portal-invoice-totals strong {
    color: #30384a;
    font-size: 0.88rem;
}

.portal-invoice-total-row {
    background: #eef2ff;
}

.portal-invoice-total-row span,
.portal-invoice-total-row strong {
    color: #4338ca;
    font-size: 0.98rem;
    font-weight: 900;
}

.portal-invoice-paid-row strong {
    color: #16a34a;
}

.portal-invoice-balance-row {
    background: #fef2f2;
}

.portal-invoice-balance-row span,
.portal-invoice-balance-row strong {
    color: #dc2626;
    font-size: 0.98rem;
    font-weight: 900;
}

.portal-invoice-message {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 36px 28px;
    padding: 18px;
    border-radius: 15px;
}

.portal-invoice-message > i {
    font-size: 1.25rem;
}

.portal-invoice-message > div {
    display: flex;
    flex-direction: column;
}

.portal-invoice-message strong {
    font-size: 0.9rem;
}

.portal-invoice-message span {
    margin-top: 4px;
    font-size: 0.82rem;
    line-height: 1.5;
}

.portal-invoice-message.paid {
    background: #ecfdf5;
    color: #15803d;
}

.portal-invoice-message.pending {
    background: #fffbeb;
    color: #b45309;
}

.portal-invoice-message.overdue,
.portal-invoice-message.cancelled {
    background: #fef2f2;
    color: #dc2626;
}

.portal-invoice-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    padding: 24px 36px;
    border-top: 1px solid #e8ebf1;
    background: #fafbfc;
}

.portal-invoice-footer > div:last-child {
    text-align: right;
}

.portal-invoice-footer strong {
    color: #30384a;
    font-size: 0.9rem;
}

.portal-invoice-footer p {
    max-width: 600px;
    margin: 5px 0 0;
    color: #858e9f;
    font-size: 0.8rem;
}

.portal-invoice-footer span {
    display: block;
    color: #9299a8;
    font-size: 0.76rem;
}

.portal-invoice-footer > div:last-child strong {
    display: block;
    margin-top: 5px;
}

@media (max-width: 991.98px) {
    .portal-invoice-summary-area {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .portal-invoice-actions,
    .portal-invoice-header,
    .portal-invoice-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-invoice-title {
        text-align: left;
    }

    .portal-invoice-information-grid {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .portal-invoice-divider {
        margin: 0 22px;
    }

    .portal-invoice-billing-period,
    .portal-invoice-service,
    .portal-invoice-items-section,
    .portal-invoice-message {
        margin-right: 22px;
        margin-left: 22px;
    }

    .portal-invoice-summary-area {
        padding-right: 22px;
        padding-left: 22px;
    }

    .portal-invoice-footer > div:last-child {
        text-align: left;
    }
}

@media print {
    @page {
        size: A4;
        margin: 8mm;
    }

    body {
        background: #ffffff !important;
    }

    .portal-no-print,
    .portal-sidebar,
    .portal-topbar,
    .portal-sidebar-overlay,
    .portal-footer {
        display: none !important;
    }

    .portal-main,
    .portal-invoice-view-main {
        width: 100% !important;
        min-height: auto !important;
        margin: 0 !important;
    }

    .portal-content,
    .portal-invoice-view-content {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
    }

    .portal-invoice-document {
        width: 100% !important;
        border: 1px solid #d8dce5 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .portal-invoice-header {
        padding: 22px;
    }

    .portal-invoice-divider {
        margin: 0 22px;
    }

    .portal-invoice-information-grid {
        padding: 20px 22px;
    }

    .portal-invoice-billing-period,
    .portal-invoice-service,
    .portal-invoice-items-section,
    .portal-invoice-message {
        margin-right: 22px;
        margin-left: 22px;
    }

    .portal-invoice-summary-area {
        padding-right: 22px;
        padding-left: 22px;
    }

    .portal-invoice-footer {
        padding: 20px 22px;
    }

    .portal-invoice-company-logo {
        background: #4f46e5 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .portal-invoice-information-card,
    .portal-invoice-service,
    .portal-invoice-items-section,
    .portal-invoice-summary-area,
    .portal-invoice-message {
        break-inside: avoid;
    }
}

/* =========================================================
   CUSTOMER PORTAL PAYMENTS
========================================================= */

.portal-payment-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    padding-top: 17px;
    border-top: 1px solid #edf0f4;
}

.portal-payments-table {
    min-width: 1200px;
}

.portal-payment-reference {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
}

.portal-payment-method-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 1.05rem;
}

.portal-payment-reference > div:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.portal-payment-reference strong {
    color: #30384a;
    font-size: 0.88rem;
    font-weight: 850;
}

.portal-payment-reference small {
    margin-top: 3px;
    color: #969dac;
    font-size: 0.74rem;
}

.portal-payment-method-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 22px;
    background: #f3f5f9;
    color: #5f687a;
    font-size: 0.79rem;
    font-weight: 750;
    white-space: nowrap;
}

@media print {
    .portal-sidebar,
    .portal-topbar,
    .portal-sidebar-overlay,
    .portal-filter-card,
    .portal-page-heading .btn,
    .portal-footer,
    .portal-payments-table th:last-child,
    .portal-payments-table td:last-child {
        display: none !important;
    }

    .portal-main {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .portal-content {
        max-width: none !important;
        padding: 0 !important;
    }

    .portal-card,
    .portal-stat-card {
        border: 1px solid #dfe3ea !important;
        box-shadow: none !important;
    }
}

@media (max-width: 767.98px) {
    .portal-payment-filter-actions {
        flex-direction: column-reverse;
    }

    .portal-payment-filter-actions .btn {
        width: 100%;
    }
}

/* =========================================================
   CUSTOMER PORTAL RECEIPT
========================================================= */

.portal-receipt-content {
    max-width: 1050px;
}

.portal-receipt-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.portal-receipt-document {
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e7ef;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(30, 41, 59, 0.08);
}

.portal-receipt-top-accent {
    height: 8px;
    background: linear-gradient(
        90deg,
        #4338ca,
        #6366f1,
        #7c3aed
    );
}

.portal-receipt-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    padding: 36px;
}

.portal-receipt-company {
    display: flex;
    align-items: flex-start;
    gap: 17px;
}

.portal-receipt-logo {
    width: 66px;
    height: 66px;
    flex: 0 0 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: linear-gradient(
        135deg,
        #4f46e5,
        #7c3aed
    );
    color: #ffffff;
    font-size: 1.7rem;
    box-shadow: 0 12px 25px rgba(79, 70, 229, 0.2);
}

.portal-receipt-company h2 {
    margin: 0 0 8px;
    color: #202738;
    font-size: 1.5rem;
    font-weight: 900;
}

.portal-receipt-company p {
    max-width: 380px;
    margin: 0 0 8px;
    color: #717a8d;
    font-size: 0.9rem;
    line-height: 1.65;
}

.portal-receipt-company span {
    display: block;
    margin-top: 5px;
    color: #717a8d;
    font-size: 0.86rem;
}

.portal-receipt-company span i {
    width: 22px;
    color: #4f46e5;
}

.portal-receipt-heading {
    text-align: right;
}

.portal-receipt-heading > span:first-child {
    display: block;
    margin-bottom: 7px;
    color: #9299a8;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.13em;
}

.portal-receipt-heading h1 {
    margin: 0 0 13px;
    color: #242b3b;
    font-size: 1.35rem;
    font-weight: 950;
}

.portal-receipt-divider {
    height: 1px;
    margin: 0 36px;
    background: #e8ebf1;
}

.portal-receipt-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    padding: 30px 36px;
}

.portal-receipt-customer-card,
.portal-receipt-meta-card {
    padding: 22px;
    border: 1px solid #e6eaf0;
    border-radius: 17px;
    background: #fafbfc;
}

.portal-receipt-label {
    display: block;
    margin-bottom: 10px;
    color: #8b94a6;
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.1em;
}

.portal-receipt-customer-card h3 {
    margin: 0 0 11px;
    color: #2c3445;
    font-size: 1.1rem;
    font-weight: 850;
}

.portal-receipt-customer-card p {
    margin: 5px 0;
    color: #697286;
    font-size: 0.88rem;
    line-height: 1.55;
}

.portal-receipt-detail-line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 11px 0;
    border-bottom: 1px solid #e7eaf0;
}

.portal-receipt-detail-line:last-child {
    border-bottom: 0;
}

.portal-receipt-detail-line span {
    color: #7f8899;
    font-size: 0.86rem;
}

.portal-receipt-detail-line strong {
    color: #333b4d;
    font-size: 0.88rem;
    text-align: right;
}

.portal-receipt-amount-box {
    margin: 0 36px 28px;
    padding: 30px;
    border: 1px solid #c7d2fe;
    border-radius: 20px;
    background:
        radial-gradient(
            circle at right top,
            rgba(99, 102, 241, 0.13),
            transparent 35%
        ),
        #eef2ff;
    text-align: center;
}

.portal-receipt-amount-box > span {
    display: block;
    color: #6366f1;
    font-size: 0.8rem;
    font-weight: 850;
    letter-spacing: 0.12em;
}

.portal-receipt-amount-box strong {
    display: block;
    margin: 10px 0 8px;
    color: #3730a3;
    font-size: 2.4rem;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.portal-receipt-amount-box p {
    margin: 0;
    color: #6b70a3;
    font-size: 0.9rem;
    font-weight: 700;
}

.portal-receipt-payment-information {
    margin: 0 36px 28px;
    overflow: hidden;
    border: 1px solid #e3e7ee;
    border-radius: 16px;
}

.portal-receipt-information-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 18px;
    border-bottom: 1px solid #e8ebf1;
}

.portal-receipt-information-row:last-child {
    border-bottom: 0;
}

.portal-receipt-information-row span {
    color: #7b8496;
    font-size: 0.86rem;
}

.portal-receipt-information-row strong {
    color: #30384a;
    font-size: 0.9rem;
    text-align: right;
}

.portal-receipt-invoice-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 36px 28px;
    overflow: hidden;
    border: 1px solid #e3e7ee;
    border-radius: 16px;
}

.portal-receipt-invoice-summary > div {
    padding: 20px;
    border-right: 1px solid #e8ebf1;
}

.portal-receipt-invoice-summary > div:last-child {
    border-right: 0;
}

.portal-receipt-invoice-summary span,
.portal-receipt-invoice-summary strong {
    display: block;
}

.portal-receipt-invoice-summary span {
    color: #7b8496;
    font-size: 0.8rem;
}

.portal-receipt-invoice-summary strong {
    margin-top: 7px;
    color: #30384a;
    font-size: 1rem;
    font-weight: 900;
}

.portal-receipt-balance {
    background: #fef2f2;
}

.portal-receipt-balance span,
.portal-receipt-balance strong {
    color: #dc2626;
}

.portal-receipt-notes {
    margin: 0 36px 28px;
    padding: 20px;
    border-radius: 15px;
    background: #fafbfc;
}

.portal-receipt-notes p {
    margin: 0;
    color: #6f788a;
    font-size: 0.88rem;
    line-height: 1.7;
}

.portal-receipt-status-message {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 36px 28px;
    padding: 18px;
    border-radius: 15px;
}

.portal-receipt-status-message > i {
    font-size: 1.3rem;
}

.portal-receipt-status-message > div {
    display: flex;
    flex-direction: column;
}

.portal-receipt-status-message strong {
    font-size: 0.92rem;
}

.portal-receipt-status-message span {
    margin-top: 4px;
    font-size: 0.84rem;
    line-height: 1.5;
}

.portal-receipt-status-message.successful {
    background: #ecfdf5;
    color: #15803d;
}

.portal-receipt-status-message.pending {
    background: #fffbeb;
    color: #b45309;
}

.portal-receipt-status-message.failed,
.portal-receipt-status-message.reversed {
    background: #fef2f2;
    color: #dc2626;
}

.portal-receipt-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    padding: 24px 36px;
    border-top: 1px solid #e8ebf1;
    background: #fafbfc;
}

.portal-receipt-footer > div:last-child {
    text-align: right;
}

.portal-receipt-footer strong {
    color: #30384a;
    font-size: 0.92rem;
}

.portal-receipt-footer p {
    margin: 5px 0 0;
    color: #858e9f;
    font-size: 0.82rem;
}

.portal-receipt-footer span {
    display: block;
    color: #9299a8;
    font-size: 0.78rem;
}

.portal-receipt-footer > div:last-child strong {
    display: block;
    margin-top: 5px;
}

@media (max-width: 767.98px) {
    .portal-receipt-actions,
    .portal-receipt-header,
    .portal-receipt-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-receipt-heading {
        text-align: left;
    }

    .portal-receipt-meta-grid {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .portal-receipt-divider {
        margin: 0 22px;
    }

    .portal-receipt-amount-box,
    .portal-receipt-payment-information,
    .portal-receipt-invoice-summary,
    .portal-receipt-notes,
    .portal-receipt-status-message {
        margin-right: 22px;
        margin-left: 22px;
    }

    .portal-receipt-invoice-summary {
        grid-template-columns: 1fr;
    }

    .portal-receipt-invoice-summary > div {
        border-right: 0;
        border-bottom: 1px solid #e8ebf1;
    }

    .portal-receipt-invoice-summary > div:last-child {
        border-bottom: 0;
    }

    .portal-receipt-footer > div:last-child {
        text-align: left;
    }
}

@media print {
    @page {
        size: A4;
        margin: 8mm;
    }

    body {
        background: #ffffff !important;
    }

    .portal-no-print,
    .portal-sidebar,
    .portal-topbar,
    .portal-sidebar-overlay,
    .portal-footer {
        display: none !important;
    }

    .portal-main,
    .portal-receipt-main {
        width: 100% !important;
        min-height: auto !important;
        margin: 0 !important;
    }

    .portal-content,
    .portal-receipt-content {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
    }

    .portal-receipt-document {
        width: 100% !important;
        border: 1px solid #d8dce5 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .portal-receipt-header {
        padding: 22px;
    }

    .portal-receipt-divider {
        margin: 0 22px;
    }

    .portal-receipt-meta-grid {
        padding: 20px 22px;
    }

    .portal-receipt-amount-box,
    .portal-receipt-payment-information,
    .portal-receipt-invoice-summary,
    .portal-receipt-notes,
    .portal-receipt-status-message {
        margin-right: 22px;
        margin-left: 22px;
    }

    .portal-receipt-footer {
        padding: 20px 22px;
    }

    .portal-receipt-logo,
    .portal-receipt-top-accent,
    .portal-receipt-amount-box,
    .portal-receipt-balance,
    .portal-receipt-status-message {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .portal-receipt-meta-grid,
    .portal-receipt-amount-box,
    .portal-receipt-payment-information,
    .portal-receipt-invoice-summary,
    .portal-receipt-status-message {
        break-inside: avoid;
    }
}

/* =========================================================
   CUSTOMER PORTAL SERVICES
========================================================= */

.portal-service-grid {
    display: grid;
    grid-template-columns: repeat(
        2,
        minmax(0, 1fr)
    );
    gap: 24px;
    margin-top: 24px;
}

.portal-service-card {
    overflow: hidden;
    border: 1px solid #e3e7ee;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(30, 41, 59, 0.06);
}

.portal-service-card-header {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 22px;
    border-bottom: 1px solid #edf0f4;
}

.portal-service-card-icon {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(
        135deg,
        #e0e7ff,
        #ede9fe
    );
    color: #4f46e5;
    font-size: 1.3rem;
}

.portal-service-card-title {
    min-width: 0;
}

.portal-service-card-title span {
    display: block;
    margin-bottom: 4px;
    color: #8b94a6;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.portal-service-card-title h3 {
    overflow: hidden;
    margin: 0;
    color: #293143;
    font-size: 1.15rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-service-domain {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 8px;
    margin: 20px 22px 0;
    padding: 13px 15px;
    border: 1px solid #dbeafe;
    border-radius: 13px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.88rem;
    font-weight: 750;
    text-decoration: none;
}

.portal-service-domain span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-service-domain:hover {
    border-color: #93c5fd;
    background: #dbeafe;
    color: #1d4ed8;
}

.portal-service-domain.muted {
    border-color: #e5e7eb;
    background: #f9fafb;
    color: #8b94a6;
}

.portal-service-details-grid {
    display: grid;
    grid-template-columns: repeat(
        2,
        minmax(0, 1fr)
    );
    gap: 0;
    margin: 20px 22px 0;
    overflow: hidden;
    border: 1px solid #e5e9f0;
    border-radius: 15px;
}

.portal-service-details-grid > div {
    padding: 16px;
    border-right: 1px solid #e8ebf1;
    border-bottom: 1px solid #e8ebf1;
}

.portal-service-details-grid > div:nth-child(2n) {
    border-right: 0;
}

.portal-service-details-grid > div:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.portal-service-details-grid span,
.portal-service-details-grid strong {
    display: block;
}

.portal-service-details-grid span {
    color: #8a93a4;
    font-size: 0.78rem;
}

.portal-service-details-grid strong {
    margin-top: 5px;
    color: #30384a;
    font-size: 0.9rem;
    font-weight: 850;
}

.portal-service-renewal-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 20px 22px 0;
    padding: 17px;
    border: 1px solid #ddd6fe;
    border-radius: 15px;
    background: #f5f3ff;
}

.portal-service-renewal-block span,
.portal-service-renewal-block strong {
    display: block;
}

.portal-service-renewal-block span {
    color: #7c75a4;
    font-size: 0.78rem;
}

.portal-service-renewal-block strong {
    margin-top: 5px;
    color: #5b21b6;
    font-size: 1rem;
    font-weight: 900;
}

.portal-service-expiry-status {
    margin: 20px 22px 0;
}

.portal-service-expiry-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 9px;
}

.portal-service-expiry-heading span {
    color: #7d8698;
    font-size: 0.8rem;
}

.portal-service-expiry-heading strong {
    font-size: 0.82rem;
}

.portal-service-expiry-status .progress {
    height: 9px;
    border-radius: 20px;
    background: #edf0f4;
}

.portal-service-financial-summary {
    display: grid;
    grid-template-columns: repeat(
        3,
        minmax(0, 1fr)
    );
    margin: 20px 22px 0;
    overflow: hidden;
    border: 1px solid #e4e8ef;
    border-radius: 15px;
}

.portal-service-financial-summary > div {
    padding: 15px;
    border-right: 1px solid #e8ebf1;
}

.portal-service-financial-summary > div:last-child {
    border-right: 0;
}

.portal-service-financial-summary span,
.portal-service-financial-summary strong {
    display: block;
}

.portal-service-financial-summary span {
    color: #8a93a4;
    font-size: 0.74rem;
}

.portal-service-financial-summary strong {
    margin-top: 5px;
    color: #30384a;
    font-size: 0.86rem;
    font-weight: 850;
}

.portal-service-notes {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 9px;
    margin: 20px 22px 0;
    padding: 15px;
    border-radius: 13px;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.82rem;
    line-height: 1.55;
}

.portal-service-card-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
    padding: 18px 22px;
    border-top: 1px solid #edf0f4;
    background: #fafbfc;
}

.portal-services-empty {
    grid-column: 1 / -1;
    padding: 55px 25px;
    text-align: center;
}

.portal-services-empty h3 {
    margin: 0;
    color: #30384a;
    font-size: 1.1rem;
    font-weight: 900;
}

.portal-services-empty p {
    margin: 7px 0 0;
    color: #8992a3;
    font-size: 0.86rem;
}

@media (max-width: 1199.98px) {
    .portal-service-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .portal-service-card-header {
        grid-template-columns: 50px minmax(0, 1fr);
    }

    .portal-service-card-header > .badge {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .portal-service-details-grid,
    .portal-service-financial-summary {
        grid-template-columns: 1fr;
    }

    .portal-service-details-grid > div,
    .portal-service-details-grid > div:nth-child(2n),
    .portal-service-details-grid > div:nth-last-child(-n + 2),
    .portal-service-financial-summary > div {
        border-right: 0;
        border-bottom: 1px solid #e8ebf1;
    }

    .portal-service-details-grid > div:last-child,
    .portal-service-financial-summary > div:last-child {
        border-bottom: 0;
    }

    .portal-service-renewal-block,
    .portal-service-expiry-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-service-renewal-block .text-end {
        text-align: left !important;
    }

    .portal-service-card-footer {
        flex-direction: column;
    }

    .portal-service-card-footer .btn {
        width: 100%;
    }
}

/* =========================================================
   CUSTOMER PORTAL SERVICE VIEW
========================================================= */

.portal-service-view-content {
    max-width: 1450px;
}

.portal-service-view-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.portal-service-view-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 24px;
    padding: 28px;
    border-radius: 22px;
    background:
        radial-gradient(
            circle at right top,
            rgba(255, 255, 255, 0.18),
            transparent 38%
        ),
        linear-gradient(
            135deg,
            #312e81,
            #4f46e5,
            #6d28d9
        );
    color: #ffffff;
    box-shadow: 0 18px 38px rgba(67, 56, 202, 0.2);
}

.portal-service-view-hero-main {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.portal-service-view-logo {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 21px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 1.8rem;
}

.portal-service-view-code {
    display: block;
    margin-bottom: 5px;
    color: #c7d2fe;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.portal-service-view-hero h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.portal-service-view-hero-main a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    color: #e0e7ff;
    font-size: 0.88rem;
    text-decoration: none;
}

.portal-service-view-hero-status {
    min-width: 220px;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 10px;
    text-align: right;
}

.portal-service-view-hero-status strong {
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    font-size: 0.86rem;
}

.portal-service-view-details {
    display: grid;
    grid-template-columns: repeat(
        2,
        minmax(0, 1fr)
    );
    padding: 8px 22px 22px;
}

.portal-service-view-details > div {
    padding: 16px;
    border-bottom: 1px solid #edf0f4;
}

.portal-service-view-details > div:nth-child(odd) {
    border-right: 1px solid #edf0f4;
}

.portal-service-view-details > div:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.portal-service-view-details span,
.portal-service-view-details strong {
    display: block;
}

.portal-service-view-details span {
    color: #8a93a4;
    font-size: 0.78rem;
}

.portal-service-view-details strong {
    margin-top: 5px;
    color: #30384a;
    font-size: 0.92rem;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.portal-service-view-table {
    min-width: 900px;
}

.portal-service-view-expiry {
    padding: 25px;
    text-align: center;
}

.portal-service-view-expiry-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    border-radius: 21px;
    font-size: 1.55rem;
}

.portal-service-view-expiry-icon.success {
    background: #dcfce7;
    color: #16a34a;
}

.portal-service-view-expiry-icon.warning {
    background: #fef3c7;
    color: #d97706;
}

.portal-service-view-expiry-icon.danger {
    background: #fee2e2;
    color: #dc2626;
}

.portal-service-view-expiry > span {
    display: block;
    color: #747e90;
    font-size: 0.86rem;
}

.portal-service-view-expiry > strong {
    display: block;
    margin-top: 6px;
    font-size: 0.92rem;
}

.portal-service-view-expiry .progress {
    height: 10px;
    margin-top: 20px;
    border-radius: 20px;
    background: #edf0f4;
}

.portal-service-view-expiry-dates {
    display: grid;
    grid-template-columns: repeat(
        2,
        minmax(0, 1fr)
    );
    gap: 12px;
    margin-top: 22px;
}

.portal-service-view-expiry-dates > div {
    padding: 14px;
    border: 1px solid #e5e9f0;
    border-radius: 13px;
    background: #fafbfc;
    text-align: left;
}

.portal-service-view-expiry-dates span,
.portal-service-view-expiry-dates strong {
    display: block;
}

.portal-service-view-expiry-dates span {
    color: #8a93a4;
    font-size: 0.75rem;
}

.portal-service-view-expiry-dates strong {
    margin-top: 5px;
    color: #30384a;
    font-size: 0.84rem;
}

.portal-service-view-finance {
    padding: 7px 20px 20px;
}

.portal-service-view-finance > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 0;
    border-bottom: 1px solid #edf0f4;
}

.portal-service-view-finance > div:last-child {
    border-bottom: 0;
}

.portal-service-view-finance span {
    color: #80899a;
    font-size: 0.82rem;
}

.portal-service-view-finance strong {
    color: #30384a;
    font-size: 0.9rem;
    text-align: right;
}

.portal-service-view-notes {
    padding: 22px;
    color: #657084;
    text-align: center;
}

.portal-service-view-notes i {
    display: block;
    margin-bottom: 10px;
    color: #6366f1;
    font-size: 1.45rem;
}

.portal-service-view-notes p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.7;
}

.portal-service-view-balance-card {
    margin-top: 24px;
    padding: 25px;
    border-radius: 20px;
    background:
        radial-gradient(
            circle at right top,
            rgba(255, 255, 255, 0.18),
            transparent 40%
        ),
        linear-gradient(
            135deg,
            #b91c1c,
            #dc2626
        );
    color: #ffffff;
    text-align: center;
    box-shadow: 0 16px 32px rgba(220, 38, 38, 0.18);
}

.portal-service-view-balance-card > div {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 1.35rem;
}

.portal-service-view-balance-card > span {
    display: block;
    color: #fecaca;
    font-size: 0.73rem;
    font-weight: 850;
    letter-spacing: 0.09em;
}

.portal-service-view-balance-card > strong {
    display: block;
    margin-top: 8px;
    font-size: 1.7rem;
    font-weight: 950;
}

.portal-service-view-balance-card p {
    margin: 8px 0 18px;
    color: #fee2e2;
    font-size: 0.82rem;
}

@media (max-width: 767.98px) {
    .portal-service-view-actions,
    .portal-service-view-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-service-view-hero-status {
        min-width: 0;
        align-items: flex-start;
        text-align: left;
    }

    .portal-service-view-details {
        grid-template-columns: 1fr;
    }

    .portal-service-view-details > div,
    .portal-service-view-details > div:nth-child(odd),
    .portal-service-view-details > div:nth-last-child(-n + 2) {
        border-right: 0;
        border-bottom: 1px solid #edf0f4;
    }

    .portal-service-view-details > div:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 575.98px) {
    .portal-service-view-hero-main {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-service-view-expiry-dates {
        grid-template-columns: 1fr;
    }
}