/* Customer portal — matches Digital Fin Serve theme */
.cp-page {
    min-height: calc(100vh - 120px);
    background:
        radial-gradient(ellipse at top left, rgba(215, 166, 62, 0.12), transparent 45%),
        radial-gradient(ellipse at bottom right, rgba(0, 50, 36, 0.08), transparent 40%),
        var(--bg-soft);
    padding: 48px 0 72px;
}

.cp-auth-wrap {
    max-width: 480px;
    margin: 0 auto;
}

.cp-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-md);
    padding: 36px 32px;
}

.cp-card-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 6px;
}

.cp-card-sub {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 28px;
}

.cp-card-sub a {
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
}

.cp-card-sub a:hover { color: var(--green-dark); }

.cp-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: 8px;
}

.cp-input,
.cp-select,
.cp-textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    padding: 12px 14px;
    font-size: 0.95rem;
    color: var(--text);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.cp-input:focus,
.cp-select:focus,
.cp-textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(215, 166, 62, 0.18);
}

.cp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 22px;
    border: none;
    border-radius: var(--radius-btn);
    background: var(--green-dark);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background var(--transition), transform var(--transition);
}

.cp-btn:hover {
    background: var(--green);
    color: #fff;
    transform: translateY(-1px);
}

.cp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.cp-btn-outline {
    background: transparent;
    border: 1.5px solid var(--green-dark);
    color: var(--green-dark);
}

.cp-btn-outline:hover {
    background: var(--green-dark);
    color: #fff;
}

.cp-btn-sm {
    width: auto;
    padding: 8px 16px;
    font-size: 0.85rem;
}

.cp-link {
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
}

.cp-link:hover { color: var(--green-dark); }

.cp-alert {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.cp-alert-danger {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.cp-alert-success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

/* Portal shell */
.cp-shell {
    background: var(--bg-soft);
    min-height: 100vh;
}

.cp-topbar {
    background: var(--green-dark);
    color: #fff;
    padding: 12px 0;
    box-shadow: var(--shadow-sm);
}

.cp-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.cp-topbar .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    min-width: 0;
    flex-shrink: 1;
}

.cp-topbar .brand img {
    height: 44px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.cp-topbar .brand-text { letter-spacing: 0.02em; }

.cp-topbar .user-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    min-width: 0;
    flex-shrink: 1;
}

.cp-topbar .user-meta__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
}

.cp-body {
    padding: 32px 0 56px;
}

.cp-mobile-menu {
    width: 100%;
}

.cp-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 52px;
    padding: 14px 18px;
    border: none;
    border-radius: var(--radius-btn);
    background: var(--green-dark);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
}

.cp-menu-toggle__label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.cp-menu-toggle__label i {
    color: var(--gold);
    font-size: 1.1rem;
}

.cp-menu-toggle > .fa-chevron-right {
    color: var(--gold-soft);
    font-size: 0.85rem;
}

.cp-menu-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(215, 166, 62, 0.28);
}

.cp-menu-toggle:active {
    transform: scale(0.99);
}

/* Big slide drawer (mobile) */
.cp-drawer {
    width: min(86vw, 340px) !important;
    border: none;
}

.cp-drawer__header {
    background: var(--green-dark);
    color: #fff;
    padding: 18px 20px;
}

.cp-drawer__header .offcanvas-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0;
}

.cp-drawer__body {
    background: #fff;
    padding: 12px !important;
}

.cp-drawer__body .cp-nav .nav-link {
    padding: 14px 16px;
    font-size: 1rem;
}

.cp-sidebar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    padding: 12px;
    position: sticky;
    top: 20px;
}

.cp-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cp-nav .nav-item { margin-bottom: 4px; }

.cp-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    transition: background var(--transition), color var(--transition);
}

.cp-nav .nav-link i {
    width: 18px;
    color: var(--gold);
    text-align: center;
}

.cp-nav .nav-link:hover,
.cp-nav .nav-link.active {
    background: rgba(0, 50, 36, 0.07);
    color: var(--green-dark);
}

.cp-nav .nav-link.logout {
    color: #B91C1C;
}

.cp-nav .nav-link.logout i { color: #B91C1C; }

.cp-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    padding: 28px;
    margin-bottom: 20px;
}

.cp-page-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 18px;
}

.cp-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 8px;
}

.cp-muted { color: var(--text-muted); font-size: 0.92rem; }

.cp-otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 22px;
}

.cp-otp-inputs input {
    width: 56px;
    height: 56px;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.cp-otp-inputs input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(215, 166, 62, 0.18);
}

/* Membership card visual */
.cp-member-card {
    max-width: 530px;
    margin: 0 auto 24px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(145deg, #00251B 0%, #003224 45%, #0A4A38 100%);
    color: #fff;
    padding: 28px 32px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.cp-member-card::after {
    content: "";
    position: absolute;
    inset: auto -40px -60px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(215, 166, 62, 0.18);
}

.cp-member-card .card-type {
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gold-soft);
    margin-bottom: 28px;
}

.cp-member-card .card-number {
    font-size: 1.35rem;
    letter-spacing: 0.18em;
    font-weight: 600;
    margin-bottom: 18px;
    word-spacing: 8px;
}

.cp-member-card .card-name {
    font-size: 1.05rem;
    text-transform: uppercase;
    font-weight: 600;
}

.cp-member-card .card-valid {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 4px;
}

.cp-download-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.cp-download-row a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #B91C1C;
    font-weight: 600;
    text-decoration: none;
}

.cp-download-row a:hover { color: var(--green-dark); }

.cp-doc-list .list-group-item {
    border-color: var(--border);
    padding: 16px 0;
}

.cp-notif-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--green-dark);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cp-table {
    width: 100%;
    border-collapse: collapse;
}

.cp-table th,
.cp-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    vertical-align: middle;
}

.cp-table th {
    color: var(--green-dark);
    font-weight: 600;
    background: rgba(0, 50, 36, 0.04);
}

.cp-kyc-error {
    color: #B91C1C;
    font-size: 0.8rem;
    margin-top: 4px;
}

.cp-offer-item {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 100%;
}

.cp-offer-item span {
    font-weight: 600;
    color: var(--green-dark);
}

@media (max-width: 767.98px) {
    .cp-topbar .brand img {
        height: 36px;
        max-width: 140px;
    }

    .cp-topbar .user-meta {
        font-size: 0.78rem;
    }

    .cp-topbar .user-meta__name {
        max-width: 110px;
    }

    .cp-body {
        padding: 20px 0 40px;
    }

    .cp-card { padding: 28px 20px; }
    .cp-panel { padding: 20px 16px; }

    .cp-page-title {
        font-size: 1.15rem;
        line-height: 1.4;
        margin-bottom: 16px;
    }

    .cp-member-card {
        max-width: 100%;
        padding: 20px 16px;
        border-radius: 14px;
    }

    .cp-member-card .card-number {
        font-size: 0.95rem;
        letter-spacing: 0.08em;
        word-spacing: 4px;
        margin-bottom: 14px;
    }

    .cp-member-card .card-name {
        font-size: 0.9rem;
    }

    .cp-member-card .card-type {
        font-size: 0.68rem;
        text-align: right;
        max-width: 42%;
        line-height: 1.3;
    }

    .cp-download-row {
        flex-direction: column;
        gap: 10px;
    }

    .cp-sidebar {
        position: static;
        margin-bottom: 4px;
    }

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

    .cp-otp-inputs input {
        width: 48px;
        height: 48px;
        font-size: 1.15rem;
    }
}
