:root {
    /* AWH-safe defaults; runtime values from CoreOne tenant config override these. */
    --aup-primary: #2e7d32;
    --aup-primary-dark: #1b5e20;
    --aup-primary-light: #43a047;
    --aup-secondary: #43a047;
    --aup-accent: #8bc34a;
    --aup-background: #f5f7fa;
    --aup-primary-soft: color-mix(in srgb, var(--aup-primary) 10%, white);
    --aup-primary-surface: color-mix(in srgb, var(--aup-primary) 4%, white);
    --aup-primary-border: color-mix(in srgb, var(--aup-primary) 22%, white);
    --aup-primary-muted: color-mix(in srgb, var(--aup-primary-light) 62%, white);
}

body {
    background-color: var(--aup-background);
}

.content-wrapper {
    background-color: var(--aup-background);
}

.brand-link {
    background-color: var(--aup-primary-dark);
}

.sidebar-dark-success {
    background-color: #263238;
}

.nav-sidebar .nav-link.active {
    background-color: var(--aup-primary) !important;
    color: #ffffff !important;
}

.awh-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background-color: #ffffff;
    color: var(--aup-primary);
    font-size: 11px;
    font-weight: 800;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: var(--aup-secondary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.wallet-display {
    color: var(--aup-primary) !important;
    font-weight: 700;
}

.aup-card {
    border-radius: 12px;
    border: 0;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

    .aup-card:hover {
        transform: translateY(-2px);
        transition: 0.2s ease-in-out;
    }

.aup-icon {
    font-size: 34px;
    margin-bottom: 12px;
    color: var(--aup-primary);
}

.login-page {
    background: linear-gradient( 135deg, color-mix(in srgb, var(--aup-primary-dark) 96%, transparent), color-mix(in srgb, var(--aup-primary-light) 90%, transparent) );
}

.login-box {
    width: 390px;
}

.login-card-body {
    border-radius: 15px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.login-logo a {
    color: #ffffff;
    font-weight: 700;
}

.btn-aup {
    color: #ffffff;
    background-color: var(--aup-primary);
    border-color: var(--aup-primary);
}

    .btn-aup:hover {
        color: #ffffff;
        background-color: var(--aup-primary-dark);
        border-color: var(--aup-primary-dark);
    }

@media (max-width: 576px) {
    .login-box {
        width: 92%;
    }
}

.awh-login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background-color: var(--aup-primary);
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.20);
}
/* =====================================================
   AUP PREMIUM RETAILER DASHBOARD
   ===================================================== */

.aup-welcome-panel {
    padding: 28px;
    border-radius: 18px;
    background: linear-gradient( 135deg, var(--aup-primary-dark) 0%, var(--aup-primary) 55%, var(--aup-primary-light) 100% );
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
    overflow: hidden;
    position: relative;
}

    .aup-welcome-panel::after {
        content: "";
        position: absolute;
        width: 260px;
        height: 260px;
        right: -90px;
        top: -120px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.08);
    }

.aup-welcome-avatar {
    width: 68px;
    min-width: 68px;
    height: 68px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.30);
    font-size: 28px;
    font-weight: 800;
}

.aup-welcome-label {
    font-size: 13px;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.aup-welcome-name {
    font-size: 28px;
    font-weight: 700;
}

.aup-welcome-message {
    font-size: 15px;
    opacity: 0.92;
}

.aup-last-login {
    font-size: 12px;
    opacity: 0.82;
}

.aup-wallet-panel {
    padding: 20px 22px;
    border-radius: 16px;
    background-color: rgba(255, 255, 255, 0.96);
    color: var(--aup-primary-dark);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
    position: relative;
    z-index: 1;
}

.aup-wallet-caption {
    font-size: 13px;
    font-weight: 600;
    color: #607d68;
}

.aup-wallet-amount {
    margin-top: 5px;
    font-size: 30px;
    font-weight: 800;
    color: var(--aup-primary-dark);
}

.aup-wallet-note {
    margin-top: 2px;
    font-size: 12px;
    color: #7c8b80;
}

.aup-dashboard-card {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

.aup-card-header {
    min-height: 72px;
    padding: 17px 20px;
    border-bottom: 1px solid var(--aup-primary-surface);
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.aup-card-title {
    float: none;
    margin: 0;
    color: #263238;
    font-size: 17px;
    font-weight: 700;
}

    .aup-card-title i {
        color: var(--aup-primary);
    }

.aup-card-subtitle {
    clear: both;
    margin-top: 4px;
    color: #8a9690;
    font-size: 12px;
}

.aup-service-tile {
    min-height: 145px;
    padding: 18px 12px;
    border: 1px solid var(--aup-primary-border);
    border-radius: 15px;
    background-color: #ffffff;
    color: #263238;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease-in-out;
}

    .aup-service-tile:hover {
        color: var(--aup-primary-dark);
        border-color: var(--aup-primary-muted);
        text-decoration: none;
        transform: translateY(-4px);
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.13);
    }

.aup-service-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
}

    .aup-service-icon.mobile {
        background-color: var(--aup-primary-soft);
        color: var(--aup-primary);
    }

    .aup-service-icon.dth {
        background-color: #e3f2fd;
        color: #1976d2;
    }

    .aup-service-icon.shopping {
        background-color: #fff3e0;
        color: #ef6c00;
    }

    .aup-service-icon.cart {
        background-color: #f3e5f5;
        color: #8e24aa;
    }

    .aup-service-icon.orders {
        background-color: #e0f2f1;
        color: #00796b;
    }

    .aup-service-icon.statement {
        background-color: #fff8e1;
        color: #f9a825;
    }

.aup-service-title {
    color: #263238;
    font-size: 14px;
    font-weight: 700;
}

.aup-service-description {
    margin-top: 4px;
    color: #87918b;
    font-size: 11px;
}

.aup-stat-card {
    min-height: 145px;
    padding: 22px;
    border: 1px solid var(--aup-primary-surface);
    border-radius: 16px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

.aup-stat-content {
    min-width: 0;
}

.aup-stat-label {
    color: #77827c;
    font-size: 13px;
    font-weight: 600;
}

.aup-stat-value {
    margin-top: 7px;
    color: #263238;
    font-size: 27px;
    font-weight: 800;
    word-break: break-word;
}

.aup-stat-footer {
    margin-top: 5px;
    color: #a0aaa4;
    font-size: 11px;
}

.aup-stat-icon {
    width: 58px;
    min-width: 58px;
    height: 58px;
    margin-left: 12px;
    border-radius: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

    .aup-stat-icon.recharge {
        background-color: #e3f2fd;
        color: #1976d2;
    }

    .aup-stat-icon.amount {
        background-color: var(--aup-primary-soft);
        color: var(--aup-primary);
    }

    .aup-stat-icon.commission {
        background-color: #fff8e1;
        color: #f9a825;
    }

    .aup-stat-icon.pending {
        background-color: #ffebee;
        color: #d32f2f;
    }

.aup-transaction-table thead th {
    padding: 14px 18px;
    border-top: 0;
    border-bottom: 1px solid var(--aup-primary-surface);
    background-color: #f8faf9;
    color: #738078;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.aup-transaction-table tbody td {
    padding: 15px 18px;
    border-top: 1px solid var(--aup-primary-surface);
    color: #3c4841;
    font-size: 13px;
    vertical-align: middle;
}

.aup-status-badge {
    min-width: 70px;
    padding: 6px 9px;
    border-radius: 20px;
    font-size: 10px;
    text-transform: uppercase;
}

.aup-empty-state {
    padding: 42px 20px;
    text-align: center;
}

.aup-empty-icon {
    color: #b7c1bb;
    font-size: 34px;
}

.aup-empty-title {
    margin-top: 12px;
    color: #45534b;
    font-size: 15px;
    font-weight: 700;
}

.aup-empty-description {
    margin-top: 4px;
    color: #9ba59f;
    font-size: 12px;
}

.aup-summary-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--aup-primary-surface);
    display: flex;
    align-items: center;
}

    .aup-summary-item:last-child {
        border-bottom: 0;
    }

.aup-summary-icon {
    width: 44px;
    min-width: 44px;
    height: 44px;
    margin-right: 14px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .aup-summary-icon.success {
        background-color: var(--aup-primary-soft);
        color: var(--aup-primary);
    }

    .aup-summary-icon.failed {
        background-color: #ffebee;
        color: #d32f2f;
    }

    .aup-summary-icon.shopping {
        background-color: #fff3e0;
        color: #ef6c00;
    }

    .aup-summary-icon.orders {
        background-color: #e3f2fd;
        color: #1976d2;
    }

.aup-summary-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.aup-summary-label {
    color: #657169;
    font-size: 13px;
}

.aup-summary-value {
    color: #263238;
    font-size: 17px;
    font-weight: 800;
}

@media (max-width: 767px) {
    .aup-welcome-panel {
        padding: 21px;
    }

    .aup-welcome-avatar {
        width: 55px;
        min-width: 55px;
        height: 55px;
        font-size: 22px;
    }

    .aup-welcome-name {
        font-size: 22px;
    }

    .aup-wallet-amount {
        font-size: 26px;
    }

    .aup-service-tile {
        min-height: 130px;
        padding: 14px 8px;
    }

    .aup-service-icon {
        width: 50px;
        height: 50px;
        border-radius: 14px;
        font-size: 21px;
    }

    .aup-service-title {
        font-size: 12px;
    }

    .aup-service-description {
        font-size: 10px;
    }

    .aup-stat-card {
        min-height: 125px;
        padding: 18px;
    }

    .aup-stat-value {
        font-size: 23px;
    }

    .aup-card-header {
        align-items: flex-start;
    }
}

/* =====================================================
   AUP MOBILE RECHARGE
   ===================================================== */

.aup-recharge-wallet {
    padding: 18px 20px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--aup-primary-soft), #ffffff);
    border: 1px solid var(--aup-primary-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.aup-recharge-wallet-label {
    color: #6d7d71;
    font-size: 12px;
    font-weight: 600;
}

.aup-recharge-wallet-amount {
    margin-top: 3px;
    color: var(--aup-primary-dark);
    font-size: 28px;
    font-weight: 800;
}

.aup-recharge-wallet-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    background-color: var(--aup-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.aup-quick-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .aup-quick-amounts .btn {
        min-width: 62px;
        border-radius: 20px;
    }

.aup-result-modal {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
}

.aup-result-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 31px;
}

    .aup-result-icon.success {
        background-color: var(--aup-primary-soft);
        color: var(--aup-primary);
    }

    .aup-result-icon.pending {
        background-color: #fff8e1;
        color: #f9a825;
    }

    .aup-result-icon.failed {
        background-color: #ffebee;
        color: #d32f2f;
    }

.aup-result-reference {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background-color: #f7f9f8;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    font-size: 12px;
}

    .aup-result-reference span {
        color: #7c8881;
    }

    .aup-result-reference strong {
        color: #263238;
        word-break: break-all;
    }

/* =====================================================
   AUP MOBILE RECHARGE RECOMMENDED OFFERS
   ===================================================== */

.aup-offers-modal {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
}

    .aup-offers-modal .modal-header {
        padding: 18px 22px;
        border-bottom: 1px solid var(--aup-primary-surface);
    }

    .aup-offers-modal .modal-body {
        padding: 22px;
        background-color: #f7f9f8;
    }

.aup-offers-loading {
    padding: 45px 20px;
    color: #66756b;
    font-size: 14px;
    text-align: center;
}

    .aup-offers-loading i {
        color: var(--aup-primary);
        font-size: 32px;
    }

.aup-offer-card {
    padding: 18px;
    border: 1px solid var(--aup-primary-border);
    border-radius: 15px;
    background-color: #ffffff;
    box-shadow: 0 4px 14px rgba(38, 50, 56, 0.05);
    transition: all 0.2s ease-in-out;
}

    .aup-offer-card:hover {
        border-color: var(--aup-primary-muted);
        transform: translateY(-3px);
        box-shadow: 0 9px 22px rgba(0, 0, 0, 0.12);
    }

.aup-offer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.aup-offer-amount {
    color: var(--aup-primary-dark);
    font-size: 27px;
    font-weight: 800;
}

.aup-offer-description {
    min-height: 92px;
    margin-top: 13px;
    color: #59655e;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-line;
}

@media (max-width: 767px) {
    .aup-offers-modal .modal-body {
        padding: 15px;
    }

    .aup-offer-description {
        min-height: auto;
    }
}

/* =====================================================
   AUP MOBILE RECHARGE - ALL PLANS
   ===================================================== */

.aup-plans-modal {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
}

    .aup-plans-modal .modal-header {
        padding: 18px 22px;
        border-bottom: 1px solid var(--aup-primary-surface);
    }

    .aup-plans-modal .modal-body {
        padding: 22px;
        background-color: #f7f9f8;
    }

.aup-plan-toolbar {
    margin-bottom: 18px;
}

    .aup-plan-toolbar .input-group-text {
        background-color: #ffffff;
        border-right: 0;
        color: var(--aup-primary);
    }

    .aup-plan-toolbar .form-control {
        border-left: 0;
    }

.aup-plan-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding-bottom: 7px;
    overflow-x: auto;
}

    .aup-plan-tabs .nav-link {
        border: 1px solid #dfe7e1;
        border-radius: 20px;
        background-color: #ffffff;
        color: #56635b;
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
    }

        .aup-plan-tabs .nav-link.active {
            border-color: var(--aup-primary);
            background-color: var(--aup-primary);
            color: #ffffff;
        }

.aup-plan-card {
    padding: 18px;
    border: 1px solid var(--aup-primary-border);
    border-radius: 15px;
    background-color: #ffffff;
    box-shadow: 0 4px 14px rgba(38, 50, 56, 0.05);
    transition: all 0.2s ease-in-out;
}

    .aup-plan-card:hover {
        border-color: var(--aup-primary-muted);
        transform: translateY(-3px);
        box-shadow: 0 9px 22px rgba(0, 0, 0, 0.12);
    }

.aup-plan-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.aup-plan-amount {
    color: var(--aup-primary-dark);
    font-size: 27px;
    font-weight: 800;
}

.aup-plan-category {
    padding: 6px 9px;
    border: 1px solid var(--aup-primary-border);
    color: #607067;
    font-size: 10px;
}

.aup-plan-validity {
    margin-top: 12px;
    color: var(--aup-primary);
    font-size: 12px;
    font-weight: 700;
}

.aup-plan-description {
    min-height: 105px;
    margin-top: 10px;
    color: #59655e;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-line;
}

.aup-plan-updated {
    min-height: 18px;
    margin-top: 9px;
    color: #9aa49e;
    font-size: 10px;
}

@media (max-width: 767px) {
    .aup-plans-modal .modal-body {
        padding: 14px;
    }

    .aup-plan-description {
        min-height: auto;
    }
}

/* Mobile recharge offer and plan buttons */

.aup-plan-action-btn {
    min-height: 58px;
    padding: 12px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

    .aup-plan-action-btn i {
        font-size: 16px;
    }

@media (max-width: 575px) {
    .aup-plan-action-btn {
        white-space: normal;
        font-size: 14px;
    }
}

/* =====================================================
   AUP RETAILER RECHARGE REPORT
   ===================================================== */

.aup-report-stat {
    min-height: 112px;
    padding: 20px;
    border: 1px solid var(--aup-primary-border);
    border-radius: 15px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 5px 18px rgba(38, 50, 56, 0.06);
}

.aup-report-stat-label {
    color: #77827c;
    font-size: 12px;
    font-weight: 600;
}

.aup-report-stat-value {
    margin-top: 6px;
    color: #263238;
    font-size: 25px;
    font-weight: 800;
}

.aup-report-stat > i {
    font-size: 30px;
    opacity: 0.85;
}

.aup-report-stat.total > i {
    color: #1976d2;
}

.aup-report-stat.success > i {
    color: var(--aup-primary);
}

.aup-report-stat.pending > i {
    color: #f9a825;
}

.aup-report-stat.failed > i {
    color: #d32f2f;
}

.aup-report-stat.amount > i {
    color: #7b1fa2;
}

.aup-request-id {
    color: #455a64;
    font-size: 11px;
    font-weight: 600;
    word-break: break-all;
}

.aup-failure-reason {
    min-width: 220px;
    max-width: 320px;
    color: #c62828 !important;
    white-space: normal;
}

.pagination .page-link {
    color: var(--aup-primary);
}

.pagination .page-item.active .page-link {
    border-color: var(--aup-primary);
    background-color: var(--aup-primary);
    color: #ffffff;
}

/* =====================================================
   AUP RECHARGE REPORT DETAILS AND EXPORT BUTTONS
   ===================================================== */

.aup-detail-item {
    min-height: 76px;
    margin-bottom: 15px;
    padding: 13px 15px;
    border: 1px solid var(--aup-primary-border);
    border-radius: 11px;
    background-color: #f8faf9;
}

    .aup-detail-item span {
        display: block;
        margin-bottom: 5px;
        color: #7b8880;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
    }

    .aup-detail-item strong {
        color: #263238;
        font-size: 14px;
        word-break: break-word;
    }

.aup-dashboard-card .card-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.btn-transaction-details {
    min-width: 36px;
}

@media (max-width: 767px) {
    .aup-dashboard-card .card-tools {
        width: 100%;
        margin-top: 12px;
    }

        .aup-dashboard-card .card-tools .btn {
            margin-bottom: 6px;
        }
}

/* =====================================================
   COREONE TENANT BRAND OVERRIDES
   Buttons/cards that previously used Bootstrap success green are
   brand actions, so they follow the active tenant. Status badges
   remain Bootstrap semantic colours.
   ===================================================== */
.btn-success {
    background-color: var(--aup-primary) !important;
    border-color: var(--aup-primary) !important;
}
.btn-success:hover, .btn-success:focus, .btn-success:active {
    background-color: var(--aup-primary-dark) !important;
    border-color: var(--aup-primary-dark) !important;
}
.btn-outline-success {
    color: var(--aup-primary) !important;
    border-color: var(--aup-primary) !important;
}
.btn-outline-success:hover, .btn-outline-success:focus, .btn-outline-success:active {
    color: #fff !important;
    background-color: var(--aup-primary) !important;
    border-color: var(--aup-primary) !important;
}
.card-success.card-outline {
    border-top-color: var(--aup-primary) !important;
}
.card-success > .card-header,
.bg-success.tenant-brand-bg {
    background-color: var(--aup-primary) !important;
}
.sidebar-dark-success .nav-sidebar > .nav-item > .nav-link.active {
    background-color: var(--aup-primary) !important;
}
