/* ==================== CRYPTO PAYMENT GATEWAY - FRONTEND ==================== */

:root {
    --cpg-p: #6366f1;
    --cpg-pd: #4f46e5;
    --cpg-pl: #e0e7ff;
    --cpg-pll: #eef2ff;
    --cpg-ok: #22c55e;
    --cpg-okl: #dcfce7;
    --cpg-warn: #f59e0b;
    --cpg-warnl: #fef3c7;
    --cpg-err: #ef4444;
    --cpg-errl: #fee2e2;
    --cpg-g1: #f9fafb;
    --cpg-g2: #e5e7eb;
    --cpg-g3: #d1d5db;
    --cpg-g4: #9ca3af;
    --cpg-g5: #6b7280;
    --cpg-g6: #4b5563;
    --cpg-g7: #374151;
    --cpg-g8: #1f2937;
    --cpg-g9: #111827;
    --cpg-r: 12px;
    --cpg-sh: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --cpg-sh-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --cpg-sh-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.cpg-wrapper *,
.cpg-dash-wrapper * {
    box-sizing: border-box;
}

/* ================================================================
   PAYMENT FORM
   ================================================================ */

.cpg-wrapper {
    max-width: 780px;
    margin: 30px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--cpg-g8);
}

.cpg-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--cpg-sh-xl);
    overflow: hidden;
}

/* Header */
.cpg-header {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #4338ca 100%);
    padding: 36px 32px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cpg-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.cpg-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.cpg-header h2 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    position: relative;
    z-index: 1;
    letter-spacing: -0.5px;
}

.cpg-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 15px;
    position: relative;
    z-index: 1;
    font-weight: 400;
}

/* Alert */
.cpg-alert {
    padding: 24px;
    text-align: center;
    margin: 24px;
    border-radius: var(--cpg-r);
    font-size: 15px;
    line-height: 1.6;
}

.cpg-alert-warning {
    background: var(--cpg-warnl);
    color: #92400e;
    border: 1px solid #fde68a;
}

.cpg-alert a {
    color: var(--cpg-pd);
    font-weight: 700;
    text-decoration: none;
}

.cpg-alert a:hover {
    text-decoration: underline;
}

/* Form Body */
.cpg-body {
    padding: 32px;
}

/* Sections */
.cpg-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--cpg-g1);
}

.cpg-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.cpg-section h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--cpg-g8);
    margin: 0 0 20px;
    letter-spacing: -0.3px;
}

.cpg-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--cpg-p), var(--cpg-pd));
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* ================================================================
   PRODUCT & PLAN SELECTION
   ================================================================ */

/* Select Dropdown */
.cpg-field select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--cpg-g2);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
    background: #fff;
    color: var(--cpg-g8);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.cpg-field select:focus {
    border-color: var(--cpg-p);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.cpg-field select:hover {
    border-color: var(--cpg-g3);
}

/* Plan Cards */
.cpg-plan-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.cpg-plan-card {
    cursor: pointer;
    position: relative;
}

.cpg-plan-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cpg-plan-inner {
    border: 2px solid var(--cpg-g2);
    border-radius: var(--cpg-r);
    padding: 24px 18px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    background: #fff;
}

.cpg-plan-inner:hover {
    border-color: var(--cpg-pl);
    background: var(--cpg-pll);
    transform: translateY(-1px);
}

.cpg-plan-card input:checked + .cpg-plan-inner {
    border-color: var(--cpg-p);
    background: var(--cpg-pl);
    box-shadow: 0 0 0 1px var(--cpg-p), 0 4px 12px rgba(99, 102, 241, 0.15);
}

.cpg-plan-icon {
    display: block;
    font-size: 36px;
    margin-bottom: 10px;
}

.cpg-plan-name {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: var(--cpg-g8);
    margin-bottom: 4px;
}

.cpg-plan-desc {
    display: block;
    font-size: 13px;
    color: var(--cpg-g5);
    font-weight: 400;
}

.cpg-plan-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 3px 12px;
    background: var(--cpg-okl);
    color: #166534;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cpg-plan-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: var(--cpg-p);
    color: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

.cpg-plan-card input:checked + .cpg-plan-inner .cpg-plan-check {
    display: flex;
}

/* ================================================================
   PAYMENT METHODS GRID
   ================================================================ */

.cpg-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.cpg-method-card {
    cursor: pointer;
    position: relative;
}

.cpg-method-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cpg-method-inner {
    border: 2px solid var(--cpg-g2);
    border-radius: var(--cpg-r);
    padding: 16px 12px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    background: #fff;
}

.cpg-method-inner:hover {
    border-color: var(--cpg-pl);
    background: var(--cpg-pll);
    transform: translateY(-2px);
    box-shadow: var(--cpg-sh);
}

.cpg-method-card input:checked + .cpg-method-inner {
    border-color: var(--cpg-p);
    background: var(--cpg-pl);
    box-shadow: 0 0 0 1px var(--cpg-p), 0 4px 12px rgba(99, 102, 241, 0.15);
}

.cpg-method-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
    margin: 0 auto 10px;
    display: block;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.cpg-method-placeholder {
    width: 64px;
    height: 64px;
    margin: 0 auto 10px;
    background: var(--cpg-g1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.cpg-method-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--cpg-g7);
    line-height: 1.3;
}

.cpg-method-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: var(--cpg-p);
    color: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

.cpg-method-card input:checked + .cpg-method-inner .cpg-method-check {
    display: flex;
}

/* ================================================================
   QR CODE DISPLAY
   ================================================================ */

.cpg-qr-box {
    background: linear-gradient(135deg, var(--cpg-g1) 0%, #f3f4f6 100%);
    border: 1px solid var(--cpg-g2);
    border-radius: var(--cpg-r);
    padding: 28px;
    text-align: center;
    margin-bottom: 32px;
}

.cpg-qr-box h4 {
    margin: 0 0 18px;
    font-size: 17px;
    font-weight: 700;
    color: var(--cpg-g8);
}

.cpg-qr-img {
    display: inline-block;
    padding: 16px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    margin-bottom: 18px;
}

.cpg-qr-img img {
    max-width: 200px;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Wallet */
.cpg-wallet {
    margin-top: 18px;
}

.cpg-wallet label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--cpg-g5);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cpg-wallet-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--cpg-g2);
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.cpg-wallet-row code {
    font-size: 13px;
    word-break: break-all;
    color: var(--cpg-g7);
    background: transparent;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.cpg-copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cpg-copy-btn:hover {
    background: var(--cpg-g1);
}

/* Description */
.cpg-desc {
    font-size: 13px;
    color: var(--cpg-g5);
    font-style: italic;
    margin: 12px 0 0;
    line-height: 1.5;
}

/* Warning */
.cpg-warning {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--cpg-warnl);
    border: 1px solid #fde68a;
    border-radius: 10px;
    font-size: 13px;
    color: #92400e;
    font-weight: 500;
}

/* ================================================================
   FORM FIELDS
   ================================================================ */

.cpg-row-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cpg-field {
    margin-bottom: 18px;
}

.cpg-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--cpg-g7);
    margin-bottom: 6px;
}

.cpg-field input[type="text"],
.cpg-field input[type="email"],
.cpg-field input[type="number"],
.cpg-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--cpg-g2);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
    background: #fff;
    color: var(--cpg-g8);
}

.cpg-field input:focus,
.cpg-field textarea:focus {
    border-color: var(--cpg-p);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.cpg-field input:hover,
.cpg-field textarea:hover {
    border-color: var(--cpg-g3);
}

.cpg-field input::placeholder,
.cpg-field textarea::placeholder {
    color: var(--cpg-g4);
    font-weight: 400;
}

/* Checkbox */
.cpg-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--cpg-g7);
    cursor: pointer;
    background: var(--cpg-g1);
    padding: 16px 18px;
    border-radius: 10px;
    border: 1px solid var(--cpg-g2);
    transition: all 0.2s;
    line-height: 1.5;
}

.cpg-checkbox:hover {
    background: var(--cpg-pll);
    border-color: var(--cpg-pl);
}

.cpg-checkbox input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--cpg-p);
}

/* ================================================================
   BUTTONS
   ================================================================ */

.cpg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    line-height: 1.5;
    letter-spacing: -0.1px;
}

.cpg-btn-primary {
    background: linear-gradient(135deg, var(--cpg-p), var(--cpg-pd));
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.cpg-btn-primary:hover {
    background: linear-gradient(135deg, var(--cpg-pd), #4338ca);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.cpg-btn-secondary {
    background: var(--cpg-g1);
    color: var(--cpg-g7);
    border: 1px solid var(--cpg-g2);
}

.cpg-btn-secondary:hover {
    background: var(--cpg-g2);
    color: var(--cpg-g7);
    text-decoration: none;
}

.cpg-btn-outline {
    background: transparent;
    color: var(--cpg-p);
    border: 2px solid var(--cpg-p);
}

.cpg-btn-outline:hover {
    background: var(--cpg-p);
    color: #fff;
    text-decoration: none;
}

.cpg-btn-lg {
    padding: 14px 32px;
    font-size: 16px;
    width: 100%;
    border-radius: 12px;
}

.cpg-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.cpg-btn-xs {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 8px;
}

.cpg-submit-area {
    text-align: center;
    padding-top: 8px;
}

/* Messages */
.cpg-msg {
    margin-top: 16px;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

.cpg-msg-error {
    background: var(--cpg-errl);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.cpg-msg-ok {
    background: var(--cpg-okl);
    color: #166534;
    border: 1px solid #86efac;
}

/* Success */
.cpg-success-box {
    text-align: center;
    padding: 48px 32px;
}

.cpg-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: var(--cpg-ok);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 20px;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.2);
}

.cpg-success-box h3 {
    font-size: 24px;
    color: var(--cpg-g8);
    margin: 0 0 10px;
    font-weight: 700;
}

.cpg-success-box p {
    color: var(--cpg-g5);
    font-size: 15px;
    margin: 0 0 8px;
    line-height: 1.6;
}

.cpg-success-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* ================================================================
   USER DASHBOARD
   ================================================================ */

.cpg-dash-wrapper {
    max-width: 960px;
    margin: 30px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--cpg-g8);
}

/* Dashboard Header */
.cpg-dash-header {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #4338ca 100%);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 24px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.cpg-dash-header::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.cpg-dash-user {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.cpg-dash-user img {
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cpg-dash-actions {
    display: flex;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.cpg-dash-actions .cpg-btn {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.cpg-dash-actions .cpg-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Back Link */
.cpg-dash-back {
    margin-bottom: 16px;
}

.cpg-dash-back a {
    color: var(--cpg-p);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.cpg-dash-back a:hover {
    background: var(--cpg-pl);
    text-decoration: none;
}

/* Dashboard Card */
.cpg-dash-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--cpg-sh-lg);
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.cpg-dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--cpg-g1);
    background: var(--cpg-g1);
}

.cpg-dash-card-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--cpg-g8);
    letter-spacing: -0.3px;
}

/* Tabs */
.cpg-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: #fff;
    border-radius: 14px;
    padding: 5px;
    box-shadow: var(--cpg-sh);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.cpg-tab {
    flex: 1;
    text-align: center;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cpg-g5);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.cpg-tab:hover {
    color: var(--cpg-g8);
    background: var(--cpg-g1);
    text-decoration: none;
}

.cpg-tab.active {
    background: linear-gradient(135deg, var(--cpg-p), var(--cpg-pd));
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.cpg-tab.active:hover {
    color: #fff;
}

.cpg-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    background: var(--cpg-err);
    color: #fff;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    padding: 0 5px;
    margin-left: 4px;
    box-shadow: 0 1px 3px rgba(239, 68, 68, 0.3);
}

.cpg-tab.active .cpg-tab-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Mini Stats */
.cpg-mini-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.cpg-mini {
    background: #fff;
    border-radius: 14px;
    padding: 20px 16px;
    text-align: center;
    box-shadow: var(--cpg-sh);
    border-top: 4px solid var(--cpg-g3);
    transition: transform 0.2s;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.cpg-mini:hover {
    transform: translateY(-2px);
    box-shadow: var(--cpg-sh-lg);
}

.cpg-mini-total {
    border-top-color: var(--cpg-p);
}

.cpg-mini-pending {
    border-top-color: var(--cpg-warn);
}

.cpg-mini-confirmed {
    border-top-color: var(--cpg-ok);
}

.cpg-mini-rejected {
    border-top-color: var(--cpg-err);
}

.cpg-mini-num {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: var(--cpg-g8);
    line-height: 1;
    letter-spacing: -1px;
}

.cpg-mini-label {
    display: block;
    font-size: 11px;
    color: var(--cpg-g5);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
}

/* Table */
.cpg-table {
    width: 100%;
    border-collapse: collapse;
}

.cpg-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--cpg-g5);
    background: var(--cpg-g1);
    border-bottom: 2px solid var(--cpg-g2);
}

.cpg-table tbody td {
    padding: 14px 16px;
    font-size: 13px;
    color: var(--cpg-g7);
    border-bottom: 1px solid var(--cpg-g1);
    vertical-align: middle;
}

.cpg-table tbody tr:hover {
    background: var(--cpg-pll);
}

.cpg-table tbody tr:last-child td {
    border-bottom: none;
}

.cpg-table code {
    font-size: 11px;
    background: var(--cpg-g1);
    padding: 3px 8px;
    border-radius: 6px;
    color: var(--cpg-g6);
    font-family: 'SFMono-Regular', Consolas, monospace;
}

.cpg-table a {
    color: var(--cpg-p);
    text-decoration: none;
    font-weight: 600;
}

.cpg-table a:hover {
    text-decoration: underline;
}

/* Badges */
.cpg-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.cpg-badge-pending {
    background: var(--cpg-warnl);
    color: #92400e;
}

.cpg-badge-confirmed {
    background: var(--cpg-okl);
    color: #166534;
}

.cpg-badge-rejected {
    background: var(--cpg-errl);
    color: #991b1b;
}

/* Product Tag */
.cpg-product-tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--cpg-pl);
    color: var(--cpg-pd);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Filter Pills */
.cpg-filter-pills {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--cpg-g1);
    background: var(--cpg-g1);
}

.cpg-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--cpg-g3);
    background: #fff;
    color: var(--cpg-g6);
    cursor: pointer;
    transition: all 0.2s;
}

.cpg-pill:hover {
    border-color: var(--cpg-p);
    color: var(--cpg-p);
    background: var(--cpg-pll);
}

.cpg-pill.active {
    background: linear-gradient(135deg, var(--cpg-p), var(--cpg-pd));
    color: #fff;
    border-color: var(--cpg-p);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

/* Detail Grid */
.cpg-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0 24px;
}

.cpg-detail-item {
    padding: 14px 8px;
    border-bottom: 1px solid var(--cpg-g1);
}

.cpg-detail-full {
    grid-column: 1 / -1;
}

.cpg-detail-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--cpg-g4);
    margin-bottom: 4px;
}

.cpg-detail-val {
    display: block;
    font-size: 14px;
    color: var(--cpg-g8);
    font-weight: 500;
}

.cpg-status-pending {
    color: var(--cpg-warn);
    font-weight: 700;
}

.cpg-status-confirmed {
    color: var(--cpg-ok);
    font-weight: 700;
}

.cpg-status-rejected {
    color: var(--cpg-err);
    font-weight: 700;
}

/* Invoice Box */
.cpg-invoice-box {
    padding: 24px;
    margin: 20px 24px 24px;
    background: linear-gradient(135deg, var(--cpg-g1), #f3f4f6);
    border-radius: var(--cpg-r);
    border: 1px solid var(--cpg-g2);
}

.cpg-invoice-box h4 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--cpg-g8);
}

.cpg-invoice-box p {
    font-size: 14px;
    color: var(--cpg-g6);
    margin: 0 0 10px;
}

.cpg-invoice-img {
    margin: 16px 0;
    text-align: center;
}

.cpg-invoice-img img {
    max-width: 100%;
    max-height: 450px;
    border-radius: 10px;
    border: 1px solid var(--cpg-g2);
    box-shadow: var(--cpg-sh-lg);
}

.cpg-invoice-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

.cpg-invoice-none {
    text-align: center;
}

/* Invoices List */
.cpg-invoices-list {
    padding: 16px 20px;
}

.cpg-inv-card {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: var(--cpg-g1);
    border-radius: var(--cpg-r);
    border: 1px solid var(--cpg-g2);
    margin-bottom: 12px;
    transition: all 0.3s;
}

.cpg-inv-card:hover {
    box-shadow: var(--cpg-sh);
    transform: translateY(-1px);
    border-color: var(--cpg-pl);
}

.cpg-inv-thumb {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.cpg-inv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cpg-inv-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* API Key Section */
.cpg-api-section {
    margin-bottom: 20px;
}

.cpg-api-key-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--cpg-g1);
    border: 1px solid var(--cpg-g2);
    padding: 14px 18px;
    border-radius: 10px;
    margin-top: 6px;
}

.cpg-api-key-box code {
    font-size: 13px;
    word-break: break-all;
    flex: 1;
    background: transparent;
    color: var(--cpg-g8);
    font-family: 'SFMono-Regular', Consolas, monospace;
}

.cpg-api-desc {
    background: var(--cpg-g1);
    border: 1px solid var(--cpg-g2);
    padding: 20px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--cpg-g7);
    white-space: pre-wrap;
    margin-top: 8px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 768px) {
    .cpg-wrapper {
        padding: 0 12px;
        margin: 16px auto;
    }

    .cpg-dash-wrapper {
        padding: 0 12px;
        margin: 16px auto;
    }

    .cpg-header {
        padding: 28px 20px;
    }

    .cpg-header h2 {
        font-size: 22px;
    }

    .cpg-body {
        padding: 24px 20px;
    }

    .cpg-row-fields {
        grid-template-columns: 1fr;
    }

    .cpg-plan-cards {
        grid-template-columns: 1fr;
    }

    .cpg-methods-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cpg-mini-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .cpg-tabs {
        flex-wrap: wrap;
    }

    .cpg-tab {
        flex: 0 0 calc(50% - 2px);
        font-size: 12px;
        padding: 10px 8px;
    }

    .cpg-detail-grid {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }

    .cpg-dash-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .cpg-dash-user {
        flex-direction: column;
        text-align: center;
    }

    .cpg-dash-actions {
        justify-content: center;
    }

    .cpg-inv-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cpg-inv-thumb {
        margin: 0 auto;
    }

    .cpg-inv-btns {
        flex-direction: row;
        justify-content: center;
    }

    .cpg-invoice-btns {
        flex-direction: column;
    }

    .cpg-success-btns {
        flex-direction: column;
        align-items: center;
    }

    .cpg-success-btns .cpg-btn {
        width: 100%;
        max-width: 280px;
    }

    .cpg-table thead th,
    .cpg-table tbody td {
        padding: 10px 10px;
        font-size: 12px;
    }

    .cpg-dash-card-header {
        padding: 16px 18px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .cpg-filter-pills {
        justify-content: center;
    }

    .cpg-invoice-box {
        margin: 16px 16px 20px;
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .cpg-methods-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .cpg-method-inner {
        padding: 12px 8px;
    }

    .cpg-method-img {
        width: 50px;
        height: 50px;
    }

    .cpg-method-name {
        font-size: 11px;
    }

    .cpg-mini-stats {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .cpg-mini {
        padding: 14px 10px;
    }

    .cpg-mini-num {
        font-size: 26px;
    }

    .cpg-qr-img img {
        max-width: 160px;
    }

    .cpg-header h2 {
        font-size: 20px;
    }

    .cpg-section h3 {
        font-size: 16px;
    }
}