/* =========================
   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;
}

/* =========================
   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: 20px;
    border-radius: 24px;
    font-family: 'Inter', sans-serif;
}

/* 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: 30px 20px;
    border-radius: 20px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

/* 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;
}

/* Quick Actions - THE FIX FOR THE WHITE BOXES */
.ddm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 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 {
    grid-column: span 2;
    background: rgba(59, 130, 246, 0.05) !important;
    border: 1px dashed #3b82f6;
}
.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;
}
/* ==============================
   API DOCS – CLEAN & READABLE
============================== */

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

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

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

/* Sections */
.ddm-api-section {
    margin-bottom: 28px;
}

/* 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;
}

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

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

.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;
}

.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;
}



/* 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;}

/* 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 {
    padding: 10px 18px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

