/* =========================
   DDM – FRONTEND STYLES
   ========================= */

.ddm-dashboard {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* =========================
   Headings
   ========================= */

.ddm-dashboard h2 {
    margin-bottom: 5px;
}

.ddm-dashboard p {
    margin-top: 0;
    color: #555;
}

/* =========================
   Notifications
   ========================= */

.ddm-note {
    padding: 12px;
    border-radius: 6px;
    font-weight: 500;
    margin-bottom: 10px;
}

.ddm-info    { background: #d1ecf1; }
.ddm-success { background: #d4edda; }
.ddm-warning { background: #fff3cd; }
.ddm-danger  { background: #f8d7da; }

/* =========================
   Action Cards
   ========================= */

.ddm-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.ddm-actions a {
    display: block;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: #111;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: transform .15s ease, box-shadow .15s ease;
}

.ddm-actions a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,.12);
}

.ddm-actions h3 {
    margin: 0;
    font-size: 16px;
}

/* =========================
   Debt Cards
   ========================= */

.ddm-card {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.ddm-card > div {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

.ddm-card strong {
    font-size: 20px;
    display: block;
    margin-top: 5px;
}

/* =========================
   Forms
   ========================= */

#ddm-order-form,
#ddm-bulk-form {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

#ddm-order-form label,
#ddm-bulk-form label {
    display: block;
    margin-top: 12px;
    font-weight: 600;
}

#ddm-order-form select,
#ddm-order-form input,
#ddm-bulk-form select,
#ddm-bulk-form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

#ddm-order-form button,
#ddm-bulk-form button {
    margin-top: 15px;
    padding: 12px;
    width: 100%;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}

#ddm-order-form button:hover,
#ddm-bulk-form button:hover {
    background: #135e96;
}

#ddm-order-form button:disabled,
#ddm-bulk-form button:disabled,
#ddm-order-form button.ddm-is-loading,
#ddm-bulk-form button.ddm-is-loading {
    cursor: wait;
    opacity: 0.78;
}

.ddm-is-loading {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    justify-content: center;
}

.ddm-button-spinner {
    animation: ddmSpin 0.8s linear infinite;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    border-top-color: #fff;
    display: inline-block;
    height: 16px;
    width: 16px;
}

.ddm-processing-message {
    align-items: center;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #1e40af;
    display: flex;
    font-size: 14px;
    font-weight: 600;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 12px;
}

.ddm-processing-message::before {
    animation: ddmSpin 0.8s linear infinite;
    border: 2px solid rgba(30, 64, 175, 0.25);
    border-radius: 999px;
    border-top-color: #1e40af;
    content: "";
    display: inline-block;
    flex: 0 0 auto;
    height: 14px;
    width: 14px;
}

@keyframes ddmSpin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================
   Tables (Orders)
   ========================= */

.ddm-dashboard table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    display: block;
    overflow-x: auto;
}

.ddm-dashboard table th,
.ddm-dashboard table td {
    padding: 10px;
    white-space: nowrap;
}

.ddm-dashboard table th {
    background: #f6f7f7;
}

/* =========================
   Order Status Colors
   ========================= */

.ddm-status {
    font-weight: 700;
}

.ddm-pending {
    background:#e63946;color:#fff; /* red */
}

.ddm-processing {
    color: #0d6efd; /* blue */
}

.ddm-delivered {
    color: #198754; /* green */
}

/* =========================
   Pagination
   ========================= */

.ddm-pagination {
    margin-top: 15px;
}

.ddm-pagination a {
    text-decoration: none;
    font-weight: 600;
    margin-right: 10px;
}

/* =========================
   Mobile
   ========================= */

@media (max-width: 600px) {

    .ddm-card {
        flex-direction: column;
    }

    .ddm-actions {
        grid-template-columns: 1fr;
    }

    #ddm-order-form,
    #ddm-bulk-form {
        padding: 15px;
    }
}
.ddm-dashboard {
    max-width: 900px;
    margin: auto;
}

.ddm-greeting {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 5px;
}

.ddm-sub {
    color: #666;
    margin-bottom: 15px;
}

.ddm-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.ddm-nav a {
    background: #fff;
    padding: 16px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    text-decoration: none;
    color: #2271b1;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
}

.ddm-validation {
    background: #f8d7da;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.ddm-dashboard {
    max-width: 900px;
    margin: auto;
    padding: 10px;
}

.ddm-header {
    margin-bottom: 15px;
}

.ddm-greeting {
    font-size: 24px;
    margin-bottom: 4px;
}

.ddm-sub {
    color: #666;
    font-size: 14px;
}

/* Notifications */
.ddm-validation {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
}

.ddm-info    { background:#d1ecf1; }
.ddm-success { background:#d4edda; }
.ddm-warning { background:#fff3cd; }
.ddm-danger  { background:#f8d7da; }

/* Navigation */
.ddm-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.ddm-nav a {
    background: #fff;
    padding: 16px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    text-decoration: none;
    color: #2271b1;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
}

.ddm-nav a:hover {
    background: #f0f6fc;
}

/* Debt cards */
.ddm-card {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.ddm-card > div {
    flex: 1;
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.ddm-card strong {
    font-size: 20px;
}

/* Mobile */
@media (max-width: 600px) {
    .ddm-card {
        flex-direction: column;
    }
}
/* =========================
   USER ORDERS
========================= */

.ddm-orders {
    max-width: 1000px;
    margin: auto;
}

.ddm-order-search {
    margin: 15px 0;
    display: flex;
    gap: 10px;
}

.ddm-order-search input {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.ddm-order-search button {
    padding: 10px 16px;
    border: none;
    background: #2271b1;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}

/* Table */
.ddm-table-wrap {
    overflow-x: auto;
}

.ddm-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.ddm-table th,
.ddm-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
    white-space: nowrap;
}

.ddm-table th {
    background: #f6f7f7;
    font-weight: 600;
}

/* Status colors */
.ddm-status {
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.ddm-pending {
   background:#e63946;color:#fff;
}

.ddm-processing {
    background: #cfe2ff;
    color: #084298;
}

.ddm-delivered {
    background: #d1e7dd;
    color: #0f5132;
}

/* Mobile */
@media (max-width: 600px) {
    .ddm-order-search {
        flex-direction: column;
    }
}
/* =========================
   BULK ORDER – POLISH
   ========================= */

#ddm-bulk-form {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
    max-width: 600px;
    margin: 0 auto;
}

/* Labels */
#ddm-bulk-form label {
    display: block;
    margin-top: 15px;
    font-weight: 600;
}

/* Inputs */
#ddm-bulk-form select,
#ddm-bulk-form textarea {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    border-radius: 8px;
    border: 1px solid #dcdcdc;
    font-size: 14px;
}

#ddm-bulk-form textarea {
    min-height: 160px;
    font-family: monospace;
}

/* Buttons */
#ddm-validate-bulk,
#ddm-place-bulk {
    margin-top: 18px;
    padding: 14px;
    width: 100%;
    font-size: 15px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
}

#ddm-validate-bulk {
    background: #198754;
    color: #fff;
}

#ddm-place-bulk {
    background: #0d6efd;
    color: #fff;
}

#ddm-validate-bulk:hover {
    background: #157347;
}

#ddm-place-bulk:hover {
    background: #0b5ed7;
}

/* =========================
   BULK RESPONSE / PREVIEW
   ========================= */

#ddm-bulk-response {
    margin-top: 20px;
}

/* Valid order */
.ddm-valid {
    background: #eafaf1;
    border: 1px solid #b7ebc6;
    color: #0f5132;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Invalid order */
.ddm-invalid {
    background: #fdecea;
    border: 1px solid #f5c2c7;
    color: #842029;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
}

/* Summary box */
.ddm-summary {
    margin-top: 15px;
    padding: 15px;
    background: #f1f7ff;
    border: 1px solid #cfe2ff;
    border-radius: 10px;
    font-weight: 600;
}

/* =========================
   MOBILE OPTIMIZATION
   ========================= */
@media (max-width: 600px) {

    #ddm-bulk-form {
        padding: 16px;
        border-radius: 12px;
    }

    #ddm-bulk-form textarea {
        min-height: 140px;
    }
}

/* =========================
   DASHBOARD UI
========================= */

/* Container */
.ddm-dashboard {
    background-color: #0b0e14; /* Darker background like the image */
    color: #ffffff;
    padding: 18px 18px 14px;
    border-radius: 24px;
    font-family: 'Inter', sans-serif;
}

.ddm-dashboard > :last-child {
    margin-bottom: 0;
}

.ddm-btn {
    align-items: center;
    border-radius: 12px;
    box-sizing: border-box;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 800;
    justify-content: center;
    min-height: 48px;
    padding: 12px 16px;
    text-decoration: none !important;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
    white-space: nowrap;
}

.ddm-btn-primary {
    background: #2563eb !important;
    border: 1px solid #2563eb !important;
    color: #fff !important;
}

.ddm-btn-primary:hover {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #fff !important;
}

.ddm-btn-secondary {
    background: #1c2128 !important;
    border: 1px solid #334155 !important;
    color: #fff !important;
}

.ddm-btn-secondary:hover {
    background: #2d333b !important;
    color: #fff !important;
}

.ddm-btn-ghost {
    background: transparent !important;
    border: 1px solid rgba(255,255,255,.35) !important;
    color: inherit !important;
}

.ddm-btn-small {
    border-radius: 999px;
    font-size: 12px;
    min-height: 34px;
    padding: 7px 12px;
}

/* Greeting */
.ddm-header h2 { color: #ffffff !important; margin-bottom: 5px; }
.ddm-sub { color: #71767b; font-size: 14px; }

/* Main Blue Card */
.ddm-wallet {
    background: #3b82f6; /* Electric Blue */
    padding: 22px 20px;
    border-radius: 20px;
    margin: 16px 0;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.ddm-wallet-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ddm-clear-debt-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

button.ddm-clear-debt-link:disabled {
    cursor: not-allowed;
    opacity: .65;
}

/* Stats Cards (Orders / Spent) */
.ddm-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}
/* Stats Cards Visibility Fix */
.ddm-stat-card {
    background: #1c2128 !important; /* Solid dark slate */
    padding: 22px 15px;
    border-radius: 20px;
    border: 1px solid #334155; /* Subtle border to define the edge */
    text-align: left;
}

.ddm-stat-card span { 
    color: #94a3b8 !important; /* Light gray label - much easier to read */
    font-size: 13px; 
    font-weight: 500;
    display: block; 
    margin-bottom: 8px;
    text-transform: none;
}

.ddm-stat-card strong { 
    color: #ffffff !important; /* Pure white for the numbers */
    font-size: 24px; /* Larger font */
    font-weight: 800;
    letter-spacing: -0.5px;
    display: block;
}

.ddm-day-panel {
    background: #111827;
    border: 1px solid #2d333b;
    border-radius: 16px;
    margin: 12px 0 8px;
    padding: 14px;
}

.ddm-day-panel-copy h3 {
    color: #fff;
    font-size: 17px;
    margin: 0 0 5px;
}

.ddm-day-panel-copy p {
    color: #94a3b8 !important;
    font-size: 13px;
    line-height: 1.45;
    margin: 0 0 10px;
}

.ddm-day-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    margin: 0;
}

.ddm-day-field {
    min-width: 220px;
}

.ddm-day-field label {
    color: #cbd5e1;
    display: block;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 6px;
}

.ddm-day-filter input,
.ddm-day-filter button {
    min-height: 48px;
    padding: 11px 14px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.ddm-day-filter input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    background: #0b0e14;
    box-sizing: border-box;
    color: #fff;
    display: block;
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

.ddm-day-filter button {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
}

.ddm-day-summary {
    margin: 14px 0 0;
}

.ddm-day-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.ddm-day-label {
    color: #cbd5e1 !important;
    margin: 0;
}

.ddm-clear-summary-link {
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
}

.ddm-day-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 700px) {
    .ddm-dashboard {
        padding: 12px 12px 8px;
    }

    .ddm-wallet {
        margin: 12px 0;
        padding: 18px 14px;
    }

    .ddm-wallet-top {
        align-items: flex-start;
    }

    .ddm-wallet-amount {
        margin-bottom: 0;
    }

    .ddm-day-filter {
        grid-template-columns: 1fr;
    }

    .ddm-day-field {
        min-width: 0;
        width: 100%;
    }

    .ddm-day-filter input[type="date"],
    .ddm-day-filter button {
        box-sizing: border-box;
        min-height: 48px;
        width: 100%;
    }

    .ddm-day-stats {
        grid-template-columns: 1fr;
    }

    .ddm-day-summary-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .ddm-day-panel {
        margin: 10px 0 6px;
        padding: 12px;
    }

    .ddm-action {
        padding: 14px 12px;
    }

    .ddm-api-action {
        margin-top: 6px;
    }
}

/* Quick Actions - THE FIX FOR THE WHITE BOXES */
.ddm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0 0 12px;
}
.ddm-action {
    background: #1c2128 !important; /* Forces dark background */
    padding: 25px 15px;
    border-radius: 16px;
    text-decoration: none !important;
    color: #ffffff !important; /* Forces white text */
    text-align: center;
    border: 1px solid #2d333b;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.2s ease;
}
.ddm-action:hover {
    background: #2d333b !important;
    transform: translateY(-3px);
}
.ddm-action-api {
    background: rgba(59, 130, 246, 0.05) !important;
    border: 1px dashed #3b82f6;
    min-height: 0;
    padding: 10px 12px !important;
}
.ddm-api-action {
    margin: 6px 0 0;
}
.ddm-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    margin-left: 8px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(40,167,69,.7); }
    70% { box-shadow: 0 0 0 6px rgba(40,167,69,0); }
    100% { box-shadow: 0 0 0 0 rgba(40,167,69,0); }
}
.ddm-action:hover {
    transform: translateY(-4px) scale(1.02);
}

.ddm-action:hover span {
    letter-spacing: .5px;
}
.ddm-stat-card strong {
    color: #111;
}

/* ==============================
   CLEAR DEBT INSTRUCTIONS
============================== */

.ddm-clear-debt-page {
    background: #0b0e14 !important;
    border-radius: 24px !important;
    box-sizing: border-box;
    color: #fff !important;
    display: block;
    margin: 20px auto !important;
    max-width: 900px;
    padding: 18px !important;
}

.ddm-clear-debt-page .ddm-clear-debt-header {
    display: block;
    margin-bottom: 18px !important;
}

.ddm-clear-debt-page .ddm-clear-debt-header h2 {
    color: #fff !important;
    margin: 0 0 6px !important;
}

.ddm-clear-debt-page .ddm-clear-debt-header p,
.ddm-clear-debt-page .ddm-payment-missing,
.ddm-clear-debt-page .ddm-clear-debt-steps {
    color: #94a3b8 !important;
}

.ddm-clear-debt-page .ddm-clear-debt-card {
    background: #111827 !important;
    border: 1px solid #2d333b !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    box-sizing: border-box;
    display: block;
    padding: 18px !important;
}

.ddm-clear-debt-page .ddm-clear-debt-balance {
    background: #3b82f6 !important;
    border: 0 !important;
    border-left: 0 !important;
    margin-bottom: 16px !important;
}

.ddm-clear-debt-page .ddm-clear-debt-balance span {
    color: rgba(255,255,255,.86) !important;
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
}

.ddm-clear-debt-page .ddm-clear-debt-balance strong {
    color: #fff !important;
    display: block;
    font-size: 32px;
    line-height: 1.1;
}

.ddm-clear-debt-page .ddm-clear-debt-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.ddm-clear-debt-page .ddm-clear-debt-card h3 {
    color: #fff !important;
    margin: 0 0 14px !important;
}

.ddm-clear-debt-page .ddm-payment-details {
    margin: 0 !important;
}

.ddm-clear-debt-page .ddm-payment-details div {
    border-top: 1px solid #2d333b !important;
    padding: 12px 0 !important;
}

.ddm-clear-debt-page .ddm-payment-details div:first-child {
    border-top: 0;
    padding-top: 0;
}

.ddm-clear-debt-page .ddm-payment-details dt {
    color: #94a3b8 !important;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.ddm-clear-debt-page .ddm-payment-details dd {
    align-items: center;
    color: #fff !important;
    display: flex;
    font-size: 16px;
    font-weight: 700;
    gap: 10px;
    justify-content: space-between;
    margin: 0;
}

.ddm-clear-debt-page .ddm-reference-box {
    align-items: center;
    background: #0b0e14 !important;
    border: 1px dashed #3b82f6 !important;
    border-radius: 12px !important;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 14px;
}

.ddm-clear-debt-page .ddm-reference-box code {
    color: #fff !important;
    font-size: 28px;
    font-weight: 800;
}

.ddm-copy-button {
    white-space: nowrap;
}

.ddm-clear-debt-page .ddm-clear-debt-steps {
    margin: 0;
    padding-left: 20px !important;
}

.ddm-clear-debt-page .ddm-clear-debt-steps li {
    margin-bottom: 8px;
}

.ddm-clear-debt-page .ddm-instructions-card {
    margin-top: 16px !important;
}

.ddm-clear-debt-page .ddm-claim-card {
    margin-top: 16px !important;
}

.ddm-clear-debt-page .ddm-claim-card p {
    color: #94a3b8 !important;
    margin: 0 0 14px !important;
}

.ddm-clear-debt-page .ddm-claim-form label {
    color: #cbd5e1 !important;
    display: block;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 6px;
}

.ddm-clear-debt-page .ddm-claim-form-row {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.ddm-clear-debt-page .ddm-claim-form input {
    background: #0b0e14 !important;
    border: 1px solid #334155 !important;
    border-radius: 12px !important;
    box-sizing: border-box;
    color: #fff !important;
    min-height: 46px;
    padding: 10px 12px;
    width: 100%;
}

.ddm-clear-debt-page .ddm-claim-form button {
    min-height: 46px;
}

.ddm-clear-debt-page .ddm-claim-notice {
    border-radius: 12px !important;
    box-sizing: border-box;
    margin-bottom: 14px !important;
    padding: 12px !important;
}

.ddm-clear-debt-page .ddm-claim-success {
    background: #ecfdf5 !important;
    border: 1px solid #86efac !important;
    color: #166534 !important;
}

.ddm-clear-debt-page .ddm-claim-error {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #991b1b !important;
}

.ddm-clear-debt-page .ddm-claim-notice dl {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 12px 0 0;
}

.ddm-clear-debt-page .ddm-claim-notice dl div {
    background: rgba(255,255,255,.72) !important;
    border-radius: 8px !important;
    padding: 8px !important;
}

.ddm-clear-debt-page .ddm-claim-notice dt {
    font-size: 12px;
    font-weight: 700;
    opacity: .75;
}

.ddm-clear-debt-page .ddm-claim-notice dd {
    font-size: 16px;
    font-weight: 800;
    margin: 2px 0 0;
}

@media (max-width: 700px) {
    .ddm-clear-debt-grid {
        grid-template-columns: 1fr;
    }

    .ddm-payment-details dd,
    .ddm-reference-box {
        align-items: stretch;
        flex-direction: column;
    }

    .ddm-copy-button {
        width: 100%;
    }

    .ddm-claim-form-row,
    .ddm-claim-notice dl {
        grid-template-columns: 1fr;
    }

    .ddm-claim-form button {
        width: 100%;
    }

    .ddm-clear-debt-page {
        border-radius: 18px;
        margin: 12px auto;
        padding: 14px;
    }

    .ddm-reference-box code {
        font-size: 24px;
        text-align: center;
    }

    .ddm-btn {
        width: 100%;
    }

    .ddm-btn-small {
        min-height: 36px;
        width: auto;
    }

    .ddm-wallet-top .ddm-btn-small {
        width: auto;
    }
}
/* ==============================
   API DOCS – CLEAN & READABLE
============================== */

/* ==============================
   CLEAR DEBT GLASS UI
============================== */

.ddm-modern-container {
    color: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0 auto;
    max-width: 1100px;
    padding: 1rem;
}

.ddm-clear-login-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    margin: 2rem auto;
    max-width: 500px;
    padding: 2.5rem;
    text-align: center;
}

.ddm-clear-login-icon {
    align-items: center;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 50%;
    display: flex;
    height: 64px;
    justify-content: center;
    margin: 0 auto 1.5rem;
    width: 64px;
}

.ddm-clear-login-card h3 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 .5rem;
}

.ddm-clear-login-card p {
    color: rgba(255,255,255,0.6);
    font-size: .95rem;
    line-height: 1.5;
    margin: 0 0 1.5rem;
}

.ddm-glass-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(2, 6, 23, 0.86) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 1.75rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ddm-header-sec {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94) 0%, rgba(30, 41, 59, 0.88) 100%);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
    margin: 0 0 1.5rem;
    padding: 1.5rem 1.75rem;
}

.ddm-header-sec h2 {
    background: none;
    color: #ffffff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: #ffffff;
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.ddm-header-sec p {
    color: #e2e8f0;
    font-size: 1.05rem;
    margin: 0;
}

.ddm-balance-banner {
    align-items: center;
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.88) 0%, rgba(69, 10, 10, 0.82) 100%);
    border: 1px solid rgba(252, 165, 165, 0.34);
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
}

.ddm-balance-banner.ddm-no-debt {
    background: linear-gradient(135deg, rgba(6, 95, 70, 0.88) 0%, rgba(6, 78, 59, 0.82) 100%);
    border: 1px solid rgba(110, 231, 183, 0.34);
}

.ddm-balance-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ddm-balance-label span {
    color: #fee2e2;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ddm-balance-label strong {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.ddm-account-clear-badge {
    background: rgba(16, 185, 129, 0.24);
    border: 1px solid rgba(167, 243, 208, 0.42);
    border-radius: 20px;
    color: #d1fae5;
    font-size: .85rem;
    font-weight: 600;
    padding: .5rem 1rem;
}

.ddm-grid-layout {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1.2fr .8fr;
    margin-bottom: 1.5rem;
}

.ddm-card-title {
    align-items: center;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    color: #f8fafc;
    display: flex;
    font-size: 1.15rem;
    font-weight: 600;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
}

.ddm-claim-title {
    border-bottom-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.ddm-meta-row {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ddm-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ddm-meta-item label,
.ddm-field-label {
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.ddm-field-label {
    display: block;
    margin-bottom: .5rem;
}

.ddm-meta-value {
    align-items: center;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 10px;
    color: #f8fafc;
    display: flex;
    font-size: 1.05rem;
    font-weight: 500;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
}

.ddm-mono-value {
    font-family: monospace;
    letter-spacing: .02em;
}

.ddm-network-value {
    color: #93c5fd;
    font-size: .9rem;
    font-weight: 600;
    text-transform: uppercase;
}

.ddm-copy-trigger {
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(147, 197, 253, 0.32);
    border-radius: 6px;
    color: #f8fafc;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    transition: all 0.2s ease;
}

.ddm-copy-trigger:hover {
    background: rgba(59, 130, 246, 0.32);
    border-color: rgba(191, 219, 254, 0.5);
}

.ddm-reference-card-modern {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ddm-reference-wrapper {
    align-items: center;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    padding: 1rem 0;
    text-align: center;
}

.ddm-ref-code {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.42) 0%, rgba(30, 58, 138, 0.25) 100%);
    border: 1px dashed rgba(147, 197, 253, 0.68);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    color: #dbeafe;
    display: inline-block;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1.5rem;
}

.ddm-action-btn {
    align-items: center;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    color: #ffffff !important;
    cursor: pointer;
    display: inline-flex;
    font-weight: 600;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    text-decoration: none !important;
    transition: all 0.2s ease;
    width: 100%;
}

.ddm-action-btn:hover {
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.ddm-reference-copy-btn {
    max-width: 220px;
}

.ddm-copy-success {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: #fff !important;
}

.ddm-instructions-panel {
    margin-bottom: 1.5rem;
}

.ddm-instruction-steps {
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    font-size: 0.95rem;
    gap: 0.5rem;
    margin: 0;
    padding-left: 1.25rem;
}

.ddm-instruction-steps li::marker {
    color: #93c5fd;
    font-weight: bold;
}

.ddm-claim-help {
    color: #cbd5e1;
    font-size: .95rem;
    margin: -.5rem 0 1.25rem;
}

.ddm-field-input {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 10px;
    caret-color: #ffffff;
    color: #f8fafc !important;
    font-size: 1rem;
    padding: 0.85rem 1rem;
    -webkit-text-fill-color: #f8fafc;
    transition: all 0.2s ease;
    width: 100%;
}

.ddm-field-input:focus {
    background: rgba(15, 23, 42, 0.95);
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.24);
    color: #ffffff !important;
    outline: none;
    -webkit-text-fill-color: #ffffff;
}

.ddm-field-input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.ddm-field-input:-webkit-autofill,
.ddm-field-input:-webkit-autofill:hover,
.ddm-field-input:-webkit-autofill:focus {
    box-shadow: 0 0 0 1000px rgba(15, 23, 42, 0.95) inset;
    caret-color: #ffffff;
    -webkit-text-fill-color: #f8fafc;
}

.ddm-status-alert {
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    font-size: 0.95rem;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
}

.ddm-status-alert-error {
    background: rgba(127, 29, 29, 0.82);
    border: 1px solid rgba(252, 165, 165, 0.38);
    color: #fee2e2;
}

.ddm-status-alert-success {
    background: rgba(6, 95, 70, 0.82);
    border: 1px solid rgba(167, 243, 208, 0.38);
    color: #d1fae5;
}

.ddm-status-message {
    align-items: center;
    display: flex;
    font-weight: 600;
    gap: .5rem;
}

.ddm-status-details {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    margin: 0;
    padding: 0.75rem;
}

.ddm-status-details div {
    display: flex;
    flex-direction: column;
}

.ddm-status-details dt {
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 500;
}

.ddm-status-details dd {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.ddm-form-flex-row {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    margin-top: 0.5rem;
}

.ddm-form-flex-row .ddm-field-input {
    flex: 1 1 auto;
    min-width: 240px;
}

.ddm-form-flex-row .ddm-action-btn {
    flex: 0 0 auto;
    min-width: 180px;
    width: auto;
}

.ddm-verify-payment-btn {
    flex-shrink: 0;
    min-width: 180px;
}

.ddm-payment-config-warning {
    color: #cbd5e1;
    font-size: .95rem;
    padding: 1.5rem 0;
    text-align: center;
}

@media (max-width: 768px) {
    .ddm-grid-layout {
        grid-template-columns: 1fr;
    }

    .ddm-balance-banner {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 540px) {
    .ddm-form-flex-row {
        flex-direction: column;
    }

    .ddm-form-flex-row .ddm-field-input {
        min-width: 0;
    }

    .ddm-form-flex-row button,
    .ddm-reference-copy-btn {
        max-width: none;
        width: 100%;
    }

    .ddm-modern-container {
        padding: .75rem;
    }
}

.ddm-api-docs {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: #ffffff;
    color: #1d2327;
    border-radius: 14px;
    box-sizing: border-box;
}

.ddm-api-docs h2 {
    margin-bottom: 6px;
}

.ddm-api-docs-header {
    margin-bottom: 18px;
}

.ddm-muted {
    color: #6b7280;
    margin-bottom: 24px;
}

/* Sections */
.ddm-api-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-sizing: border-box;
    margin-bottom: 18px;
    padding: 18px;
}

.ddm-api-section h3 {
    margin: 0 0 10px;
}

.ddm-api-section h4 {
    margin: 18px 0 8px;
}

.ddm-api-full-url {
    color: #4b5563;
    margin: 8px 0 0;
    overflow-wrap: anywhere;
}

/* Code blocks */
.ddm-api-section pre {
    background: #f6f8fa;       /* light gray */
    color: #1d2327;            /* WP admin text */
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.5;
    margin: 8px 0 14px;
    max-width: 100%;
    text-align: left;
    white-space: pre;
}

/* Inline code */
.ddm-api-section code {
    font-family: Consolas, Monaco, monospace;
}

.ddm-api-section pre code {
    display: block;
    white-space: pre;
}

/* API key box */
.ddm-api-key-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 14px;
    border-radius: 10px;
    box-sizing: border-box;
}

.ddm-api-key-mask {
    display: block;
    font-family: monospace;
    margin-bottom: 8px;
    color: #374151;
}

.ddm-api-key-full {
    width: 100%;
    padding: 10px;
    font-family: monospace;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    box-sizing: border-box;
}

.ddm-api-key-full:focus {
    outline: none;
    border-color: #2271b1;
}

/* Lists */
.ddm-api-section ul {
    padding-left: 18px;
}

.ddm-api-section li {
    margin-bottom: 6px;
}

@media (max-width: 640px) {
    .ddm-api-docs {
        margin: 10px 0;
        padding: 12px;
    }

    .ddm-api-section {
        border-radius: 10px;
        margin-bottom: 14px;
        padding: 14px;
    }

    .ddm-api-section pre {
        font-size: 13px;
        padding: 10px;
    }
}



/* subtle animation */
@keyframes ddmSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* mobile tweak */
@media (max-width: 600px) {
    .ddm-notification {
        font-size: 13px;
        padding: 10px 12px;
    }
}


/* =========================
 * STATUS PILLS
 * ========================= */
.ddm-status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    line-height: 1.4;
    white-space: nowrap;
}

/* Pending */
.ddm-pending { background:#e63946;color:#fff; }

/* Processing */
.ddm-processing {background:#0073e6;color:#fff;}

/* Delivered */
.ddm-delivered {
    background:#2a9d8f;color:#fff;}

/* Cancelled */
.ddm-cancelled {
    background:#6c757d;color:#fff;
}

/* Refunded (future-proof) */
.ddm-refunded {
    background: #f8d7da;
    color: #842029;
}
@media (max-width: 600px) {
    .ddm-status-pill {
        font-size: 10px;
        padding: 3px 10px;
    }
}

/* ===== DASHBOARD NOTIFICATIONS ===== */

/* Container */
.ddm-notifications {
    overflow: hidden;
    margin-bottom: 15px;
}

/* Static notification card */
.ddm-notification {
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
    white-space: nowrap;
}

/* Marquee wrapper */
.ddm-marquee {
    overflow: hidden;
    position: relative;
}

/* Moving text ONLY */
.ddm-marquee span {
    display: inline-block;
    padding-left: 100%;
    animation: ddmMarquee 14s linear infinite;
}

/* Pause on hover (UX win) */
.ddm-notification:hover .ddm-marquee span {
    animation-play-state: paused;
}

/* Animation */
@keyframes ddmMarquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}



/* COLORS */
.ddm-info {
    background: #e7f1ff;
    color: #084298;
}

.ddm-success {
    background: #d1e7dd;
    color: #0f5132;
}

.ddm-warning {
    background: #fff3cd;
    color: #664d03;
}

.ddm-danger {
    background: #f8d7da;
    color: #842029;
}


/* ===== CLEAN SUCCESS MODAL ===== */
.ddm-success-card {
    text-align: center;
    padding: 10px 5px;
}

.ddm-success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 10px;
    background: #198754;
    color: #fff;
    font-size: 32px;
    line-height: 56px;
    border-radius: 50%;
}

.ddm-success-card h3 {
    margin: 8px 0 12px;
    font-size: 20px;
    color: #198754;
}

.ddm-success-meta {
    display: flex;
    justify-content: space-between;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 15px;
}

.ddm-success-meta div {
    text-align: left;
}

.ddm-success-meta span {
    display: block;
    font-size: 12px;
    color: #6c757d;
}

.ddm-success-meta strong {
    font-size: 15px;
    color: #212529;
}

.ddm-success-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ddm-link {
    font-size: 14px;
    color: #2271b1;
    text-decoration: none;
}

.ddm-btn-primary {
    background: #2563eb !important;
    border: 1px solid #2563eb !important;
    border-radius: 12px;
    color: #fff !important;
    cursor: pointer;
    font-weight: 800;
    min-height: 48px;
    padding: 12px 16px;
}
