  @import url('https://fonts.maateen.me/solaiman-lipi/font.css');

  .bangla {
    font-family: 'SolaimanLipi', sans-serif;
}
  .bangla thead {
    font-family: 'SolaimanLipi', sans-serif;
}
.success-text{
    color:green;
}
.cancel-text{
    color:red;
}
            .mg-settings-page {
                background: #f0f2f5;
                min-height: 100vh;
                padding: 40px 20px;
                font-family: 'Roboto', sans-serif;
                text-align: center;
            }
            /* Logo */
            .mg-logo img {
                max-width: 120px;
                margin-bottom: 30px;
            }
            /* Main Card */
            .mg-card {
                background: #fff;
                border-radius: 8px;
                box-shadow: 0 4px 12px rgba(0,0,0,0.1);
                max-width: 600px;
                margin: 0 auto;
                text-align: left;
            }
            .mg-card-header {
                background: #2c3e50;
                padding: 20px;
                display: flex;
                justify-content: space-between;
                align-items: center;
                border-top-left-radius: 8px;
                border-top-right-radius: 8px;
            }
            .mg-card-header h1 {
                color: #ecf0f1;
                margin: 0;
                font-size: 22px;
                font-weight: 400;
            }
            .mg-card-body {
                padding: 30px 40px;
            }
            .mg-form-group {
                margin-bottom: 20px;
            }
            .mg-form-group label {
                display: block;
                font-size: 16px;
                color: #34495e;
                margin-bottom: 8px;
            }
            .mg-form-group input[type="text"] {
                width: 100%;
                padding: 12px;
                font-size: 16px;
                border: 1px solid #bdc3c7;
                border-radius: 4px;
                transition: border-color 0.3s;
            }
            .mg-form-group input[type="text"]:focus {
                border-color: #2980b9;
                outline: none;
            }
            /* Switch Container */
            .mg-switch-container {
                display: flex;
                align-items: center;
                justify-content: space-between;
                border: 1px solid #bdc3c7;
                border-radius: 4px;
                padding: 10px 15px;
                background: #ecf0f1;
            }
            .mg-switch-description {
                font-size: 14px;
                color: #7f8c8d;
                line-height: 1.4;
                flex: 1;
                margin-right: 10px;
            }
            /* Toggle Switch */
            .switch {
                position: relative;
                display: inline-block;
                width: 50px;
                height: 24px;
                flex-shrink: 0;
            }
            .switch input { 
                opacity: 0;
                width: 0;
                height: 0;
            }
            .slider {
                position: absolute;
                cursor: pointer;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background-color: #ccc;
                transition: 0.4s;
                border-radius: 24px;
            }
            .slider:before {
                position: absolute;
                content: "";
                height: 18px;
                width: 18px;
                left: 3px;
                bottom: 3px;
                background-color: white;
                transition: 0.4s;
                border-radius: 50%;
            }
            input:checked + .slider {
                background-color: #2980b9;
            }
            input:focus + .slider {
                box-shadow: 0 0 1px #2980b9;
            }
            input:checked + .slider:before {
                transform: translateX(26px);
            }
            /* Button Group */
            .mg-button-group {
                text-align: right;
            }
            .mg-button-group button {
                background: #2980b9;
                color: #fff;
                border: none;
                padding: 12px 24px;
                font-size: 16px;
                border-radius: 4px;
                cursor: pointer;
                transition: background 0.3s;
            }
            .mg-button-group button:hover {
                background: #1c5980;
            }
            /* Spinner in Header */
            .mg-spinner {
                display: inline-block;
                width: 12px;
                height: 12px;
                border: 3px solid rgba(255,255,255,0.4);
                border-top-color: #fff;
                border-radius: 50%;
                animation: spin 0.8s linear infinite;
            }
            @keyframes spin {
                to { transform: rotate(360deg); }
            }
            .mg-success {
                color: #fff;
                font-size: 16px;
            }
            /* Extra Cards Section */
            .mg-extra-cards {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
                gap: 30px;
                margin-top: 40px;
                max-width: 900px;
                margin-left: auto;
                margin-right: auto;
            }
            .mg-extra-card {
                background: #fff;
                border-radius: 8px;
                box-shadow: 0 6px 15px rgba(0,0,0,0.1);
                overflow: hidden;
            }
            .mg-extra-card-header {
                background: #2980b9;
                padding: 15px;
                text-align: center;
            }
            .mg-extra-card-header h2 {
                font-size: 20px;
                margin: 0;
                color: #fff;
                font-weight: 500;
            }
            .mg-extra-card-body {
                padding: 20px;
                text-align: center;
            }
            .mg-extra-card-body p {
                font-size: 16px;
                color: #34495e;
                margin-bottom: 15px;
            }
            .mg-extra-btn {
                background: #2980b9;
                color: #fff;
                padding: 10px 20px;
                border-radius: 4px;
                text-decoration: none;
                font-size: 16px;
                transition: background 0.3s;
            }
            .mg-extra-btn:hover {
                background: #1c5980;
            }
            .mg-video-container {
                position: relative;
                padding-bottom: 56.25%;
                height: 0;
                overflow: hidden;
                border: 2px solid #2980b9;
                border-radius: 4px;
                box-shadow: 0 4px 10px rgba(0,0,0,0.1);
                margin-top: 10px;
            }
            .mg-video-container iframe {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                border: 0;
            }
            /* Responsive Styles */
            @media (max-width: 480px) {
                .mg-card-body {
                    padding: 20px;
                }
                .mg-button-group {
                    text-align: center;
                }
            }
            
            
/* ============================================================
   ORDER DETAILS — "Order Success Ratio" metabox
   ============================================================ */

#bdcrc_order_ratio .inside { margin: 0; padding: 16px; }

.bdcrc-od, .bdcrc-od * { box-sizing: border-box; }
.bdcrc-od {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
}

.bdcrc-od-empty {
    padding: 18px;
    border: 1px dashed #d7dae1;
    border-radius: 8px;
    color: #6b7280;
    font-size: 13px;
    text-align: center;
}

/* Toolbar */
.bdcrc-od-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.bdcrc-od-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #6c3fc7;
    background: #f5f0ff;
    border: 1px solid #e9d5ff;
    border-radius: 99px;
    padding: 6px 14px;
}
.bdcrc-od-phone .dashicons { font-size: 15px; width: 15px; height: 15px; color: #9b6af1; }

.bdcrc-od .bdcrc-refresh-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(135deg, #6c3fc7, #e65fae);
    border-radius: 8px;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(155, 106, 241, 0.32);
}
.bdcrc-od .bdcrc-refresh-button:hover { opacity: 0.9; background: linear-gradient(135deg, #6c3fc7, #e65fae); }
.bdcrc-od .bdcrc-refresh-button:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }
.bdcrc-od .bdcrc-refresh-button .dashicons { font-size: 15px; width: 15px; height: 15px; }

/* Stat cards */
.bdcrc-od-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}
.bdcrc-od-stat {
    border-radius: 8px;
    border: 1px solid transparent;
    padding: 14px 16px;
}
.bdcrc-od-stat-total   { background: #f5f8ff; border-color: #d9e4f9; }
.bdcrc-od-stat-success { background: #f3fcf6; border-color: #cbead8; }
.bdcrc-od-stat-cancel  { background: #fef6f6; border-color: #f7dcdc; }
.bdcrc-od-stat-rate    { background: #f1fbfa; border-color: #cbe8e4; }

.bdcrc-od-stat-lbl { font-size: 12px; font-weight: 500; margin-bottom: 6px; }
.bdcrc-od-stat-total   .bdcrc-od-stat-lbl { color: #3068ce; }
.bdcrc-od-stat-success .bdcrc-od-stat-lbl { color: #1a9e4b; }
.bdcrc-od-stat-cancel  .bdcrc-od-stat-lbl { color: #e04747; }
.bdcrc-od-stat-rate    .bdcrc-od-stat-lbl { color: #14a396; }

.bdcrc-od-stat-num {
    font-size: 21px; font-weight: 700; line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.bdcrc-od-stat-total   .bdcrc-od-stat-num { color: #1c4fa8; }
.bdcrc-od-stat-success .bdcrc-od-stat-num { color: #12803a; }
.bdcrc-od-stat-cancel  .bdcrc-od-stat-num { color: #c02626; }
.bdcrc-od-stat-rate    .bdcrc-od-stat-num { color: #0e7c72; }

/* Card + table */
.bdcrc-od-card {
    background: #fff;
    border: 1px solid #e4e7ea;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}
.bdcrc-od-card:last-child { margin-bottom: 0; }

.bdcrc-od-card-head {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #eef0f3;
    background: linear-gradient(135deg, #fff5f8, #fff);
}
.bdcrc-od-card-head h3 { margin: 0; font-size: 13px; font-weight: 700; color: #0f172a; }
.bdcrc-od-card-head .dashicons {
    color: #fff; font-size: 15px; width: 15px; height: 15px;
    background: linear-gradient(135deg, #dc2626, #f87171);
    border-radius: 8px; padding: 8px; box-sizing: content-box;
    box-shadow: 0 3px 9px rgba(220, 38, 38, 0.32);
}
.bdcrc-od-fraud-count {
    margin-left: auto;
    background: #ef4444; color: #fff;
    font-size: 11px; font-weight: 800;
    padding: 3px 10px; border-radius: 99px;
}

.bdcrc-od-tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bdcrc-od-tbl { width: 100%; border-collapse: collapse; }

.bdcrc-od-tbl thead th {
    background: linear-gradient(135deg, #6c3fc7, #9b6af1 55%, #e65fae);
    padding: 11px 16px;
    font-size: 12px; font-weight: 700;
    color: #fff; text-align: left;
    border-bottom: none;
    white-space: nowrap;
}
.bdcrc-od-tbl .bdcrc-od-c-logo  { width: 140px; }
.bdcrc-od-tbl .bdcrc-od-c-name  { width: 120px; }
.bdcrc-od-tbl .bdcrc-od-c-num   { width: 80px; }
.bdcrc-od-tbl .bdcrc-od-c-ratio { width: 180px; }

.bdcrc-od-tbl tbody tr { border-bottom: 1px solid #eceef1; }
.bdcrc-od-tbl tbody tr:last-child { border-bottom: none; }
.bdcrc-od-tbl tbody tr:nth-child(even) { background: #fdfbff; }
.bdcrc-od-tbl tbody tr:hover { background: #faf6ff; }
.bdcrc-od-tbl td {
    padding: 12px 16px;
    border: none;
    vertical-align: middle;
    font-size: 13px; font-weight: 500; color: #1e293b;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.bdcrc-od-logo-cell img {
    display: block;
    max-width: 100px; max-height: 28px;
    width: auto; height: auto;
    object-fit: contain;
}
.bdcrc-od-logo-text { font-size: 13px; font-weight: 700; color: #6c3fc7; }
.bdcrc-od-name { font-weight: 700; color: #1e293b; }
.bdcrc-od-num-success {
    font-weight: 700; color: #15803d;
    background: #f0fdf4; border: 1px solid #bbf7d0;
    padding: 2px 10px; border-radius: 99px; display: inline-block;
}
.bdcrc-od-num-cancel {
    font-weight: 700; color: #b91c1c;
    background: #fff1f2; border: 1px solid #fecaca;
    padding: 2px 10px; border-radius: 99px; display: inline-block;
}

.bdcrc-od-ratio-inner { display: flex; align-items: center; gap: 10px; }
.bdcrc-od-ratio-pct { flex-shrink: 0; min-width: 46px; font-weight: 700; color: #0f172a; }
.bdcrc-od-bar-track {
    flex: 1; min-width: 60px; height: 9px;
    background: #eef0f3; border-radius: 99px; overflow: hidden;
}
.bdcrc-od-bar-fill { height: 100%; border-radius: 99px; transition: width .5s ease; }
.bdcrc-od-bar-fill.good    { background: linear-gradient(90deg, #22c55e, #4ade80); }
.bdcrc-od-bar-fill.average { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.bdcrc-od-bar-fill.bad     { background: linear-gradient(90deg, #ef4444, #f87171); }

/* ─ Tablet ─ */
@media screen and (max-width: 900px) {
    .bdcrc-od-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ─ Mobile: stack table rows into labelled cards ─ */
@media screen and (max-width: 600px) {
    .bdcrc-od-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .bdcrc-od-stat-num { font-size: 18px; }

    .bdcrc-od-toolbar { flex-direction: column; align-items: stretch; }
    .bdcrc-od-toolbar .bdcrc-refresh-button { width: 100%; justify-content: center; }
    .bdcrc-od-phone { justify-content: center; }

    .bdcrc-od-tbl-wrap { overflow-x: visible; }
    .bdcrc-od-tbl, .bdcrc-od-tbl tbody, .bdcrc-od-tbl tr, .bdcrc-od-tbl td { display: block; width: 100%; }
    .bdcrc-od-tbl thead { display: none; }

    .bdcrc-od-tbl tbody tr {
        border: 1px solid #e4e7ea;
        border-radius: 8px;
        margin: 12px;
        padding: 4px 0;
    }
    .bdcrc-od-tbl tbody tr:hover { background: transparent; }

    .bdcrc-od-tbl tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 9px 14px;
        border-bottom: 1px solid #f4f5f7;
        text-align: right;
    }
    .bdcrc-od-tbl tbody td:last-child { border-bottom: none; }
    .bdcrc-od-tbl tbody td::before {
        content: attr(data-label);
        font-size: 12px;
        font-weight: 600;
        color: #8a92a1;
        text-align: left;
        flex-shrink: 0;
    }
    /* the ratio row needs the bar to keep its width */
    .bdcrc-od-ratio-cell .bdcrc-od-ratio-inner { flex: 1; min-width: 0; }
}

 /* Search Form Styles */
            .mg-search-form {
                display: flex;
                flex-direction: row;
                gap: 10px;
            }
            .mg-search-form input[type="text"] {
                flex: 1;
                padding: 12px;
                font-size: 16px;
                border: 1px solid #bdc3c7;
                border-radius: 4px;
                transition: border-color 0.3s;
            }
            .mg-search-form input[type="text"]:focus {
                border-color: #2980b9;
                outline: none;
            }
            .mg-search-form button {
                background: #2980b9;
                color: #fff;
                border: none;
                padding: 12px 24px;
                font-size: 16px;
                border-radius: 4px;
                cursor: pointer;
                transition: background 0.3s;
            }
            .mg-search-form button:hover {
                background: #1c5980;
            }
            /* Result Container */
            .mg-result-wrapper {
                margin-top: 20px;
            }
            /* Responsive Styles */
            @media (max-width: 480px) {
                .mg-card-body {
                    padding: 20px;
                }
            }
            
            
             /* Footer in Card */
            .mg-card-footer {
                background: #ecf0f1;
                padding: 10px 20px;
                font-size: 14px;
                color: #7f8c8d;
                text-align: center;
                border-bottom-left-radius: 8px;
                border-bottom-right-radius: 8px;
            }
            .mg-card-footer a {
                color: #2980b9;
                text-decoration: none;
            }
            .mg-card-footer a:hover {
                text-decoration: underline;
               padding: 12px;
                font-size: 16px;
                border: 1px solid #bdc3c7;
                border-radius: 4px;
                -webkit-transition: border-color 0.3s;
                -o-transition: border-color 0.3s;
                transition: border-color 0.3s;
            }
            .mg-search-form input[type="text"]:focus {
                border-color: #2980b9;
                outline: none;
            }
            .mg-search-form button {
                background: #2980b9;
                color: #fff;
                border: none;
                padding: 12px 24px;
                font-size: 16px;
                border-radius: 4px;
                cursor: pointer;
                -webkit-transition: background 0.3s;
                -o-transition: background 0.3s;
                transition: background 0.3s;
            }
            .mg-search-form button:hover {
                background: #1c5980;
            }
            /* Result Container */
            .mg-result-wrapper {
                margin-top: 20px;
            }
            /* Responsive Styles */
            @media (max-width: 480px) {
                .mg-card-body {
                    padding: 20px;
                }
            }
            
            
             /* Footer in Card */
            .mg-card-footer {
                background: #ecf0f1;
                padding: 10px 20px;
                font-size: 14px;
                color: #7f8c8d;
                text-align: center;
                border-bottom-left-radius: 8px;
                border-bottom-right-radius: 8px;
            }
            .mg-card-footer a {
                color: #2980b9;
                text-decoration: none;
            }
            .mg-card-footer a:hover {
                text-decoration: underline;
            }
            
            .bdcrc-refresh-button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

/* Base styles for progress bar (for list view) */
.bd-courier-progress-bar {
    position: relative;
    display: inline-block;
    width: 120px;
    height: 24px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f1f1f1;
    overflow: hidden;
}

/* For details (Order Edit) page, make progress bar full width */
#courier-data-table .bd-courier-progress-bar {
    width: 100%;
    display: block;
}

/* Progress bar segments using spans */
.bd-courier-progress-bar .success-bar {
    display: inline-block;
    height: 100%;
    background-color: #4CAF50; /* Green */
}

.bd-courier-progress-bar .cancel-bar {
    display: inline-block;
    height: 100%;
    background-color: #F44336; /* Red */
}

/* Overlay text on the progress bar (centered) */
.bd-courier-progress-bar .progress-text {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    line-height: 24px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

/* Inline container to keep progress bar and refresh button on one line */
.inline-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Refresh button styling */
.bdcrc-refresh-button {
    padding: 4px 8px;
    border: none;
    background: #0073aa;
    color: #fff;
    border-radius: 3px;
    cursor: pointer;
}
.bdcrc-refresh-button:hover {
    background: #006799;
}


/* Optional: Style the refresh button for a button-like appearance */
.bdcrc-refresh-button {
    padding: 4px 8px;
    border: none;
    background: #0073aa;
    color: #fff;
    border-radius: 3px;
    cursor: pointer;
}
.bdcrc-refresh-button:hover {
    background: #006799;
}

@keyframes dashicons-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.dashicons-spin {
  animation: dashicons-spin 1s linear infinite;
}

/* ============================================================
   COURIER SEARCH PAGE  — gradient theme #9b6af1 → #e65fae
   ============================================================ */

:root {
    --bdcrc-grad: linear-gradient(135deg, #9b6af1 0%, #e65fae 100%);
    --bdcrc-grad-r: linear-gradient(135deg, #e65fae 0%, #9b6af1 100%);
    --bdcrc-purple: #9b6af1;
    --bdcrc-pink:   #e65fae;
    --bdcrc-bg:     #f5f0ff;
    --bdcrc-card:   #ffffff;
    --bdcrc-text:   #2d1b4e;
    --bdcrc-muted:  #7c6f8e;
    --bdcrc-green:  #22c55e;
    --bdcrc-red:    #ef4444;
    --bdcrc-radius: 16px;
    --bdcrc-shadow: 0 8px 32px rgba(155, 106, 241, 0.15);
}

/* Page wrapper */
.bdcrc-search-page {
    background: var(--bdcrc-bg);
    min-height: 100vh;
    font-family: 'Roboto', sans-serif;
    color: var(--bdcrc-text);
    padding-bottom: 60px;
}

/* ── Hero ── */
.bdcrc-hero {
    background: var(--bdcrc-grad);
    position: relative;
    padding: 48px 24px 0;
    text-align: center;
    overflow: hidden;
}
.bdcrc-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}
.bdcrc-hero-inner { position: relative; }
.bdcrc-hero-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 18px;
    background: rgba(255,255,255,0.2);
    padding: 10px;
    margin-bottom: 16px;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.bdcrc-hero-title {
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}
.bdcrc-hero-subtitle {
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    margin: 0 0 40px;
}
.bdcrc-hero-wave {
    line-height: 0;
    margin-top: 8px;
}
.bdcrc-hero-wave svg {
    display: block;
    width: 100%;
    height: 56px;
}

/* ── Search Wrap ── */
.bdcrc-search-wrap {
    max-width: 760px;
    margin: -8px auto 0;
    padding: 0 20px;
}

/* ── Search Card ── */
.bdcrc-search-card {
    background: var(--bdcrc-card);
    border-radius: var(--bdcrc-radius);
    box-shadow: var(--bdcrc-shadow);
    padding: 36px 40px 32px;
    text-align: center;
    border: 1px solid rgba(155,106,241,0.12);
    margin-bottom: 28px;
}
.bdcrc-search-card-icon {
    width: 52px;
    height: 52px;
    background: var(--bdcrc-grad);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    box-shadow: 0 4px 14px rgba(155,106,241,0.4);
}
.bdcrc-search-card-icon .dashicons {
    color: #fff;
    font-size: 24px;
    width: 24px;
    height: 24px;
}
.bdcrc-search-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--bdcrc-text);
    margin: 0 0 22px;
}

/* Input Group */
.bdcrc-input-group {
    display: flex;
    align-items: stretch;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(155,106,241,0.25);
    transition: border-color 0.25s, box-shadow 0.25s;
    background: #fff;
}
.bdcrc-input-group:focus-within {
    border-color: var(--bdcrc-purple);
    box-shadow: 0 0 0 4px rgba(155,106,241,0.15);
}
.bdcrc-input-prefix {
    padding: 0 14px;
    display: flex;
    align-items: center;
    background: #faf7ff;
    font-size: 18px;
    border-right: 2px solid rgba(155,106,241,0.15);
    user-select: none;
}
.bdcrc-input-group input[type="tel"] {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 16px;
    font-size: 16px;
    color: var(--bdcrc-text);
    background: transparent;
    letter-spacing: 0.5px;
}
.bdcrc-input-group input[type="tel"]::placeholder { color: #c4b5d8; }

.bdcrc-search-btn {
    background: var(--bdcrc-grad);
    color: #fff;
    border: none;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.bdcrc-search-btn:hover { opacity: 0.88; transform: scale(1.02); }
.bdcrc-search-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.bdcrc-search-btn .dashicons { font-size: 18px; width: 18px; height: 18px; }

/* Spinner */
.bdcrc-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bdcrc-spin 0.7s linear infinite;
    vertical-align: middle;
}
@keyframes bdcrc-spin { to { transform: rotate(360deg); } }

/* Powered by */
.bdcrc-powered {
    text-align: center;
    font-size: 13px;
    color: var(--bdcrc-muted);
    margin-top: 10px;
}
.bdcrc-powered a { color: var(--bdcrc-purple); text-decoration: none; }
.bdcrc-powered a:hover { text-decoration: underline; }

/* Error box */
.bdcrc-error-box {
    background: #fff0f0;
    border: 1px solid #ffc5c5;
    border-left: 4px solid var(--bdcrc-red);
    border-radius: 10px;
    padding: 16px 20px;
    color: #b91c1c;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Results Area ── */
.bdcrc-results-area { margin-top: 4px; }

/* Stat Cards */
.bdcrc-stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
@media (max-width: 600px) {
    .bdcrc-stat-cards { grid-template-columns: repeat(2, 1fr); }
}
.bdcrc-stat-card {
    background: var(--bdcrc-card);
    border-radius: 14px;
    padding: 20px 16px 16px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(155,106,241,0.1);
    border: 1px solid rgba(155,106,241,0.1);
    position: relative;
    overflow: hidden;
}
.bdcrc-stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--bdcrc-grad);
}
.bdcrc-stat-total::before  { background: var(--bdcrc-grad); }
.bdcrc-stat-success::before { background: linear-gradient(90deg, #22c55e, #4ade80); }
.bdcrc-stat-cancel::before  { background: linear-gradient(90deg, #ef4444, #f87171); }
.bdcrc-stat-ratio::before   { background: var(--bdcrc-grad-r); }

.bdcrc-stat-icon { font-size: 22px; margin-bottom: 6px; }
.bdcrc-stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--bdcrc-text);
    line-height: 1;
    margin-bottom: 4px;
}
.bdcrc-stat-label {
    font-size: 12px;
    color: var(--bdcrc-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Overall Progress Bar */
.bdcrc-overall-bar-wrap {
    background: var(--bdcrc-card);
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 4px 16px rgba(155,106,241,0.1);
    border: 1px solid rgba(155,106,241,0.1);
    margin-bottom: 20px;
}
.bdcrc-overall-bar {
    height: 28px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    background: #f0e8ff;
}
.bdcrc-overall-success {
    background: linear-gradient(90deg, #22c55e, #4ade80);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 28px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    transition: width 0.6s ease;
    min-width: 36px;
}
.bdcrc-overall-fail {
    background: linear-gradient(90deg, #f87171, #ef4444);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 28px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    transition: width 0.6s ease;
    min-width: 36px;
}

/* Table Wrap */
.bdcrc-table-wrap {
    background: var(--bdcrc-card);
    border-radius: var(--bdcrc-radius);
    box-shadow: var(--bdcrc-shadow);
    border: 1px solid rgba(155,106,241,0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

/* Result Table */
.bdcrc-result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.bdcrc-result-table thead tr {
    background: var(--bdcrc-grad);
}
.bdcrc-result-table thead th {
    color: #fff;
    font-weight: 600;
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    letter-spacing: 0.3px;
    border: none;
}
.bdcrc-result-table tbody tr {
    border-bottom: 1px solid #f0ebff;
    transition: background 0.15s;
}
.bdcrc-result-table tbody tr:last-child { border-bottom: none; }
.bdcrc-result-table tbody tr:hover { background: #faf6ff; }
.bdcrc-result-table td {
    padding: 12px 16px;
    color: var(--bdcrc-text);
    border: none;
    vertical-align: middle;
}
.bdcrc-courier-cell { display: flex; align-items: center; gap: 10px; }
.bdcrc-result-logo { height: 32px; width: auto; object-fit: contain; }
.bdcrc-courier-name { font-weight: 600; color: var(--bdcrc-purple); }
.bdcrc-cell-success { color: #16a34a; font-weight: 600; }
.bdcrc-cell-cancel  { color: #dc2626; font-weight: 600; }

/* Mini inline bar */
.bdcrc-mini-bar-wrap {
    height: 6px;
    background: #f0ebff;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
    width: 100%;
}
.bdcrc-mini-bar {
    height: 100%;
    background: var(--bdcrc-grad);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Ratio Badge */
.bdcrc-ratio-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}
.bdcrc-ratio-badge.good    { background: #dcfce7; color: #16a34a; }
.bdcrc-ratio-badge.average { background: #fef9c3; color: #a16207; }
.bdcrc-ratio-badge.bad     { background: #fee2e2; color: #dc2626; }

/* Fraud Section */
.bdcrc-fraud-section { margin-bottom: 20px; }
.bdcrc-fraud-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #fff0f0, #fff);
    border: 1px solid #fecaca;
    border-radius: 12px 12px 0 0;
    padding: 14px 20px;
    font-weight: 700;
    color: #b91c1c;
    font-size: 15px;
}
.bdcrc-fraud-header .dashicons { color: #ef4444; }
.bdcrc-fraud-count {
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
    margin-left: 2px;
}
.bdcrc-fraud-table thead tr { background: linear-gradient(135deg, #ef4444, #f87171); }
.bdcrc-fraud-section .bdcrc-table-wrap {
    border-radius: 0 0 var(--bdcrc-radius) var(--bdcrc-radius);
    border-top: none;
    margin-bottom: 0;
}

/* ============================================================
   SETTINGS PAGE — mobile
   ============================================================ */
@media screen and (max-width: 782px) {
    .mg-settings-page { padding: 20px 12px; }
    .mg-card-body { padding: 22px 18px; }
    .mg-card-header { padding: 16px; flex-wrap: wrap; gap: 10px; }
    .mg-card-header h1 { font-size: 18px; }

    /* stack the token input above its button instead of squeezing both */
    .mg-search-form { flex-direction: column; }
    .mg-search-form button { width: 100%; }

    .mg-button-group { text-align: center; }
    .mg-button-group button { width: 100%; }

    .mg-switch-container { flex-direction: column; align-items: flex-start; gap: 12px; }
    .mg-switch-description { margin-right: 0; }

    .mg-extra-cards { grid-template-columns: 1fr; gap: 20px; margin-top: 28px; }
}

/* Orders list column — keep the bar + refresh button from overflowing */
@media screen and (max-width: 782px) {
    .inline-container { flex-wrap: wrap; }
    .bd-courier-progress-bar { width: 100%; max-width: 160px; }
}

