/* CODShield AI – Admin Styles (extracted from old inline <style>) */

/* Global Styles */
body {
    font-family: Inter !important;
}

/* ===== TOP NAVIGATION ===== */
.codshield-topnav {
    background: #0f172a;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 10px 0 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.codshield-topnav a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.codshield-topnav a:hover {
    background: #111827;
    color: #fff;
}

.codshield-topnav a.is-active {
    background: #1f2937;
    color: #fff;
}

.codshield-topnav a.codshield-nav-cta {
    background: #7c3aed;
    color: #fff;
    font-weight: 700;
    border-radius: 8px;
}

.codshield-topnav a.codshield-nav-cta:hover {
    background: #6d28d9;
    color: #fff;
}

/* ===== ICONS ===== */
.codshield-icon { 
    font: normal 20px/1 dashicons; 
}

.codshield-icon-green { 
    font-size: 22px; 
    color: #16a34a; 
}

.codshield-icon-red { 
    color: #7f1d1d; 
}

/* ===== GRID & CARD LAYOUTS ===== */
.wrap.codshield-ai-admin {
    display: flex;
    flex-direction: row;
    align-items: flex-start; 
    gap: 20px; 
}

.codshield-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    flex: 1;
}

.codshield-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    width: 85%;
}

.codshield-card h1 {
    margin: 0 0 8px;
    font-size: 24px;
}

.codshield-card h2 {
    margin: 0 0 10px;
    font-size: 16px;
}

/* ===== LICENSE STYLES ===== */
.codshield-license {
    border: 2px solid #22c55e;
    border-radius: 16px;
    background: #ecfdf5;
    padding: 16px;
}

.codshield-license.is-active {
    background: #ecfdf5;
    border-color: #22c55e;
}

.codshield-license.is-inactive {
    background: rgba(239,68,68,.10);
    border-color: rgba(239,68,68,.30);
    color: #7f1d1d;
}

.codshield-license.is-expired {
    background: #fff7f7;
    border-color: #fecaca;
    color: #7f1d1d;
}

/* License Wrap/Banner */
.codshield-lic-wrap {
    display: grid;
    gap: 14px;
}

.codshield-lic-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    margin-bottom: 12px;
}

.codshield-lic-banner.is-active {
    background: rgba(16,185,129,.10);
    border-color: rgba(16,185,129,.35);
    color: #065f46;
}

.codshield-lic-banner.is-inactive {
    background: rgba(239,68,68,.10);
    border-color: rgba(239,68,68,.30);
    color: #7f1d1d;
}

.codshield-lic-banner .dashicons { 
    font-size: 18px; 
    line-height: 1; 
    margin-right: 8px; 
}

.codshield-lic-banner .codshield-lic-banner-left { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

/* License Card */
.codshield-lic-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    background: #fff;
}

.codshield-lic-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.codshield-lic-field label {
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.codshield-lic-field .input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.codshield-lic-input {
    width: 100%;
}

.codshield-lic-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.codshield-lic-help {
    margin-top: 6px;
    color: #6b7280;
    font-size: 12px;
}

/* License Badges/Pills */
.codshield-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    background: #22c55e;
    color: #052e16;
}

.codshield-pill.inactive {
    background: #e5e7eb;
    color: #374151;
}

.codshield-pill.expired {
    background: #fee2e2;
    color: #7f1d1d;
}

.codshield-lic-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    margin-left: 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid transparent;
}

.codshield-lic-badge.badge-active {
    background: rgba(16,185,129,.12);
    border-color: rgba(16,185,129,.35);
    color: #065f46;
}

.codshield-lic-badge.badge-inactive {
    background: rgba(239,68,68,.12);
    border-color: rgba(239,68,68,.30);
    color: #7f1d1d;
}

/* ===== DASHBOARD DATA & USAGE ===== */
.codshield-dashboard-data {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
}

.codshield-dashboard-quickaction {
    display: flex;
    flex-direction: row;
}

.codshield-dashboard-quickaction .codshield-usage {
    margin-right: 10px;
    width: 31% !important;
}

.codshield-dashboard-quickaction .usage-header h2 {
    color: #2A86FF;
}

.codshield-usage {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.codshield-dashboard-data .codshield-usage {
    width: 21% !important;
}

/* Usage Header */
.usage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.usage-header h2 {
    font-size: 15px;
    font-weight: 600;
    color: #444;
    margin: 0;
}

/* Usage Icon */
.usage-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.usage-icon.blue { color: #007bff; }
.usage-icon.green { color: #28a745; }
.usage-icon.red { color: #dc3545; }

/* Value styling */
.value {
    font-size: 24px;
    font-weight: 400;
    color: #111;
    font-family: 'Roboto';
}

/* Progress Bar */
.codshield-progress {
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.codshield-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #60a5fa, #34d399);
}

/* Row and KV */
.codshield-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    margin-top: 6px;
}

.codshield-kv .k {
    color: #6b7280;
    font-size: 12px;
}

.codshield-kv .v {
    font-weight: 700;
    font-size: 16px;
}

/* ===== MODULES SECTION ===== */
.codshield-modules-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.codshield-modules-header {
    border-bottom: 1px solid #e0e0e0;
}

.codshield-modules-header h2 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
}

.codshield-search-modules {
    border-bottom: 1px solid #e0e0e0;
}

.codshield-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.codshield-modules-list {
    display: flex;
    flex-direction: column;
}

.codshield-module-item {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.codshield-module-item:last-child {
    border-bottom: none;
}

/* Module Title/Header */
.module-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.module-title-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.module-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.module-tag {
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    width: fit-content;
}

.module-tag.core {
    background: #e3f2fd;
    color: #1976d2;
}

.module-category {
    font-size: 12px;
    color: #666;
}

.module-description {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.4;
}

.module-version {
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-badge {
    font-size: 12px;
    font-weight: 500;
    color: #666;
}

/* ===== EXTENSIONS SECTION ===== */
.codshield-extensions-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.codshield-extensions-header {
    border-bottom: 1px solid #e0e0e0;
}

.codshield-extensions-header h2 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
}

.codshield-extensions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    padding: 16px;
}

.codshield-extension-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.codshield-extension-card:hover {
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.extension-card-header {
    margin-bottom: 12px;
}

.extension-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.extension-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.extension-category {
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    color: #666;
}

.extension-category.marketing {
    background: #e8f5e8;
    color: #2e7d32;
}

.extension-category.social {
    background: #e3f2fd;
    color: #1976d2;
}

.extension-category.analytics {
    background: #f3e5f5;
    color: #7b1fa2;
}

.extension-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.extension-badge.premium {
    background: #fff3e0;
    color: #ef6c00;
}

.extension-badge.free {
    background: #e8f5e8;
    color: #2e7d32;
}

.extension-price {
    font-size: 12px;
    font-weight: 600;
    color: #c2185b;
}

.extension-description {
    margin: 0 0 16px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    flex-grow: 1;
}

.extension-actions {
    margin-top: auto;
}

.btn-learn-more {
    width: 100%;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #007cba;
    border-radius: 4px;
    color: #007cba;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-learn-more:hover {
    background: #007cba;
    color: #fff;
}

.btn-view-all {
    margin-top: 20px;
    padding: 12px 24px;
    background: #007cba;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #f0f0f0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-view-all:hover {
    background: #e9ecef;
    border-color: #007cba;
    color: #007cba;
}

.codshield-extensions-footer {
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

/* ===== SUPPORT SECTION ===== */
.codshield-support-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.codshield-support-header {
    border-bottom: 1px solid #e0e0e0;
}

.codshield-support-header h1 {
    margin: 0 0 4px 0;
    font-size: 24px;
    font-weight: 600;
}

/* Form Elements */
.form-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.support-input,
.support-select,
.support-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.3s ease;
}

.support-input:focus,
.support-select:focus,
.support-textarea:focus {
    outline: none;
    border-color: #007cba;
}

.support-input::placeholder {
    color: #999;
}

.support-select {
    cursor: pointer;
}

.support-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* System Info */
.system-info-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.system-info-line {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
}

.system-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}

.system-info-item:last-child {
    border-bottom: none;
}

.system-info-item strong {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.system-info-item span {
    font-size: 14px;
    color: #666;
}

.status-active {
    color: #15b400;
    font-weight: 500;
}

/* Submit Ticket */
.submit-ticket-button {
    width: 15%;
    padding: 12px 24px;
    background: #007cba;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    float: right;
}

.submit-ticket-button:hover {
    background: #005a87;
}

.submit-ticket {
    width: 15%;
    float: right;
}

/* Documentation */
.doc-checkbox {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.doc-category {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    font-weight: 500;
}

.codshield-modules-section-documentation {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.codshield-modules-section-documentation .codshield-modules-section {
    width: 31%;
    margin: 10px;
}

.documentation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.doc-title-section {
    flex: 1;
}

.view-all-docs-btn {
    background: #007cba;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    margin-left: 16px;
}

.view-all-docs-btn:hover {
    background: #005a87;
}

/* ===== ANALYTICS SECTION ===== */
.codshield-analytics-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-top: 16px;
}

.codshield-analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.analytics-title-section h1 {
    margin: 0 0 4px 0;
    font-size: 24px;
    font-weight: 600;
}

.analytics-period-btn {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.analytics-period-btn:hover {
    background: #e9ecef;
    border-color: #007cba;
}

.codshield-analytics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 20px;
}

.analytics-card {
    border-radius: 8px;
    padding: 24px 20px;
    border: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.analytics-content {
    flex: 1;
    text-align: left;
    font-size: 24px;
}

.analytics-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.analytics-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.2;
}

.analytics-change {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: left;
    gap: 6px;
}

.analytics-change.positive {
    color: #15b400;
}

.analytics-change.negative {
    color: #ea0000;
}

.analytics-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.analytics-icon i {
    font-size: 20px;
}

/* Analytics Icon Colors - using nth-child */
.analytics-card:nth-child(1) .analytics-icon i { color: #2a86ff; }
.analytics-card:nth-child(2) .analytics-icon i { color: #15b400; }
.analytics-card:nth-child(3) .analytics-icon i { color: #ea0000; }
.analytics-card:nth-child(4) .analytics-icon i { color: #15b400; }

/* Charts Grid */
.codshield-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.chart-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 24px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.chart-title-section h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.chart-date-info {
    text-align: right;
}

.current-date {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.date-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item {
    font-size: 13px;
    color: #666;
}

.detail-label {
    font-weight: 500;
}

.detail-value {
    font-weight: 600;
    color: #333;
}

/* Line Chart */
.chart-container {
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
    margin-bottom: 16px;
}

.chart-area {
    position: relative;
    height: 200px;
    margin-bottom: 40px;
}

.chart-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.chart-line {
    height: 1px;
    background: #e0e0e0;
    width: 100%;
}

.chart-data-points {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.data-point {
    position: absolute;
    width: 40px;
    height: 8px;
    background: #2a86ff;
    border-radius: 5px;
    bottom: 0;
    transform: translateX(-50%);
    border: 2px solid #fff;
}

.chart-line-path {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(42, 134, 255, 0.3) 0%, 
        rgba(42, 134, 255, 0.2) 100%);
    clip-path: polygon(5% 40%, 20% 20%, 35% 55%, 50% 10%, 65% 30%, 80% 15%, 95% 25%);
}

.chart-x-axis {
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
}

.axis-date {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.chart-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.chart-checkbox label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    cursor: pointer;
}

/* Pie Chart */
.pie-chart-container {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 20px 0;
}

.pie-chart {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: conic-gradient(
        var(--color, #ea0000) 0% var(--percentage, 10%),
        transparent var(--percentage, 10%) 100%
    );
    position: relative;
}

.pie-segment {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    clip-path: polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%, 50% 100%);
    background: conic-gradient(
        var(--color) 0% var(--percentage),
        transparent var(--percentage) 100%
    );
    transform: rotate(calc(var(--start, 0) * 1deg));
}

.pie-segment.blocked { --start: 0; }
.pie-segment.high-risk { --start: 36; }
.pie-segment.medium-risk { --start: 46.8; }
.pie-segment.low-risk { --start: 72; }
.pie-segment.legitimate { --start: 122.4; }

.pie-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

.legend-color.blocked { background: #ea0000; }
.legend-color.high-risk { background: #ff6b6b; }
.legend-color.medium-risk { background: #ffa726; }
.legend-color.low-risk { background: #42a5f5; }
.legend-color.legitimate { background: #15b400; }

.legend-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    flex: 1;
}

.legend-value {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

/* ===== ORDERS SECTION ===== */
.orders-details-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.orders-header {
    margin-bottom: 25px;
}

.orders-title-section h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}

/* Filters */
.horizontal-filters-section {
    margin-bottom: 20px;
}

.filters-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
    transition: all 0.3s ease;
    white-space: nowrap;
    width: 15%;
}

.filter-item:hover {
    background: #e9ecef;
    border-color: #4285f4;
}

.filter-label {
    font-weight: 500;
}

.filter-item i {
    font-size: 12px;
    color: #6c757d;
}

/* Search */
.search-orders-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-container {
    position: relative;
    flex: 1;
    width: 100%;
}

.search-container i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.search-input {
    width: 100%;
    padding: 10px 12px 10px 35px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    background: #f8f9fa;
}

.search-input:focus {
    outline: none;
    border-color: #4285f4;
    background: white;
}

.orders-count {
    font-size: 14px;
    color: #6c757d;
    white-space: nowrap;
}

/* Orders Table */
.orders-table-container {
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.orders-table th {
    background: #f8f9fa;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
    white-space: nowrap;
}

.orders-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #f1f3f4;
}

.customer-info {
    min-width: 200px;
}

.customer-name {
    font-weight: 600;
    color: #2c3e50;
}

.customer-email,
.customer-phone {
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

.order-total {
    white-space: nowrap;
}

.total-amount {
    font-weight: 600;
    color: #2c3e50;
}

.payment-method {
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

/* Order Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge.processing {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge.confirmed {
    background: #d1edff;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge.failed {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-badge.completed {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.canceled {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Fraud Score */
.fraud-score {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
}

.fraud-score.low {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.fraud-score.high {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Admin Status */
.admin-status {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.admin-status.clean {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.admin-status.reported {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===== WHATSAPP ANALYTICS ===== */
.whatsapp-analytics-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.section-header-with-date {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
}

.header-left h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.date-range-picker {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.date-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.date-input {
    border: none;
    background: transparent;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    color: #495057;
    min-width: 120px;
    outline: none;
}

.date-input:focus {
    background: white;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.date-separator {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

.export-csv-btn {
    width: 180px;
    height: 40px;
    color: rgba(42, 134, 255, 1);
    border: 1px solid rgba(0, 0, 0, 0.2);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 400;
    font-size: 16px !important;
    font-family: "Roboto";
    cursor: pointer;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.export-csv-btn:active {
    transform: translateY(0);
}

.whatsapp-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 15px;
}

.metric-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
    min-height: 140px;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0;
    margin-bottom: 15px;
    font-size: 28px;
}

.metric-card:nth-child(1) .metric-icon { color: rgba(42, 134, 255, 1); }
.metric-card:nth-child(2) .metric-icon { color: rgba(21, 180, 0, 1); }
.metric-card:nth-child(3) .metric-icon { color: rgba(234, 0, 0, 1); }
.metric-card:nth-child(4) .metric-icon { color: rgba(174, 0, 0, 1); }
.metric-card:nth-child(5) .metric-icon { color: rgba(138, 56, 245, 1); }

.metric-value {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
    margin-bottom: 8px;
    font-family: "Roboto";
}

.metric-label {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 5px;
    line-height: 1.3;
}

.metric-subtext {
    font-size: 12px;
    color: #ffffff;
    font-weight: 500;
    margin-top: 4px;
    border: 1px solid rgba(42, 134, 255, 1);
    border-radius: 6px;
    padding: 4px 8px;
    display: inline-block;
    background-color: rgba(42, 134, 255, 1);
    text-align: center;
    line-height: 1;
    white-space: nowrap;
}

/* ===== CONFIRMATION REPORT ===== */
.confirmation-report-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.report-header {
    margin-bottom: 30px;
}

.report-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}

.report-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.report-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.report-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
}

.report-title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(0, 0, 0, 1);
    margin: 0;
    font-family: "Roboto";
}

.report-icon {
    font-size: 20px;
}

.report-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.confirmed-row {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 12px;
    margin-bottom: 4px;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.5);
    font-weight: 400;
    font-family: "Roboto";
}

.stat-value {
    font-size: 14px;
    font-weight: 500;
    color: rgba(0, 0, 0, 1);
    font-family: "Roboto";
}

.success-rate {
    color: #28a745;
    font-weight: 700;
}

/* ===== AI CHAT LOGS ===== */
.ai-chat-logs-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.chat-logs-header {
    margin-bottom: 25px;
}

.chat-logs-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}

.chat-logs-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.date-metrics-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

.current-date-metrics .date-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.metric-label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.metric-value {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.dates-list-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

.dates-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.date-item {
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #495057;
}

.date-item:hover {
    background: #e9ecef;
}

.date-item.active {
    background: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
    border-left: 3px solid #1976d2;
}

/* Bar Chart */
.bar-chart-section {
    grid-column: 1 / -1;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 10px;
}

.chart-container {
    display: flex;
    align-items: end;
    gap: 20px;
    height: 200px;
}

.chart-y-axis {
    display: flex;
    flex-direction: column-reverse;
    justify-content: space-between;
    height: 100%;
    font-size: 12px;
    color: #6c757d;
    min-width: 30px;
}

.chart-bars {
    display: flex;
    align-items: end;
    gap: 20px;
    flex: 1;
    height: 100%;
    position: relative;
}

.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.bar-wrapper {
    display: flex;
    align-items: end;
    gap: 1px;
    height: 100%;
    width: 100%;
    justify-content: center;
}

.bar {
    width: 35px;
    border-radius: 8px;
    transition: all 0.3s ease;
    height: 50px !important;
    cursor: pointer;
}

.recovery-bar {
    height: 70px !important;
    background: rgba(42, 134, 255, 1);
}

.click-bar {
    background: rgba(0, 161, 37, 1);
}

.bar-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.metrics-checkboxes {
    grid-column: 1 / -1;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.checkbox-item:last-child {
    margin-bottom: 0;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1976d2;
}

.checkbox-item label {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
    cursor: pointer;
}

/* ===== ORDER TAB ICON ===== */
.order-tab-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
    font-size: 24px;
}

.cube-icon svg {
    width: 25px;
    height: 25px;
    vertical-align: middle;
}

/* ===== FEATURES SECTION ===== */
.codshield-features-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px 0;
    overflow: hidden;
}

.features-header {
    padding: 20px 20px 0;
    border-bottom: 1px solid #e9ecef;
}

.features-header h2 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.features-table-container {
    overflow-x: auto;
}

.features-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.features-table th {
    background: #f8f9fa;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
    white-space: nowrap;
}

.features-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: top;
}

.features-table tbody tr:last-child td {
    border-bottom: none;
}

.features-table tbody tr:hover {
    background: #f8f9fa;
}

.status-badge.active {
    background: rgba(220, 252, 231, 1);
    color: rgba(21, 128, 61, 1);
    border: 1px solid #c3e6cb;
    border-radius: 35px;
}

.status-badge.coming-soon {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    border-radius: 35px;
}

/* ===== WORKFLOW SECTION ===== */
.codshield-workflow-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px 0;
    padding: 20px;
}

.workflow-header {
    margin-bottom: 25px;
}

.workflow-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.workflow-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.step-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 24px;
}

.workflow-step:nth-child(1) .step-icon {
    background: rgba(220, 252, 231, 1);
    border: 2px solid rgba(187, 247, 208, 1);
    color: rgba(0, 161, 37, 1);
}

.workflow-step:nth-child(3) .step-icon {
    background: rgba(219, 234, 254, 1);
    border: 2px solid rgba(191, 219, 254, 1);
    color: rgba(37, 99, 235, 1);
}

.workflow-step:nth-child(5) .step-icon {
    background: rgba(243, 232, 255, 1);
    border: 2px solid rgba(233, 213, 255, 1);
    color: rgba(147, 51, 234, 1);
}

.workflow-step:nth-child(7) .step-icon {
    background: rgba(243, 244, 246, 1);
    border: 2px solid rgba(229, 231, 235, 1);
    color: rgba(75, 85, 99, 1);
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 16px;
    font-weight: 600;
    color: rgba(31, 41, 55, 1);
    margin-bottom: 4px;
    font-family: "Inter";
}

.step-description {
    font-size: 12px;
    color: rgba(107, 114, 128, 1);
    font-weight: 400;
    line-height: 16px;
}

.workflow-arrow {
    color: rgba(209, 213, 219, 1);
    font-size: 18px;
    padding: 0 10px;
}

/* ===== RETRY CONFIGURATION ===== */
.codshield-retry-config-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px 0;
    padding: 25px;
}

.retry-config-header {
    margin-bottom: 25px;
}

.retry-config-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.config-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.config-left {
    display: flex;
    flex-direction: column;
}

.retry-config-form {
    width: 100%;
}

.config-settings {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 25px;
}

.config-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: rgba(31, 41, 55, 1);
    margin-bottom: 5px;
}

.config-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    background: #fff;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.config-input:focus {
    outline: none;
    border-color: #007cba;
}

.config-input:hover {
    border-color: #adb5bd;
}

.config-description {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
    margin: 5px 0 0 0;
}

.auto_status_update {
    float: right;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    float: right;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: rgba(42, 134, 255, 1);
}

input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Checkbox Group */
.checkbox-group {
    margin-top: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #adb5bd;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #007cba;
    border-color: #007cba;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.config-divider {
    height: 1px;
    background: #e9ecef;
    margin: 25px 0;
}

.save-config-section {
    text-align: center;
}

.save-config-btn {
    background: rgba(42, 134, 255, 1);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.save-config-btn:hover {
    background: #005a87;
}

.save-config-btn:active {
    transform: translateY(1px);
}

.config-right {
    height: 100%;
}

.channel-priority-section {
    border-radius: 8px;
    padding: 25px;
    border: 1px solid #e9ecef;
    height: 100%;
    box-sizing: border-box;
}

.priority-header h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.priority-description {
    margin: 0 0 20px 0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

.priority-list {
    margin-bottom: 20px;
}

.priority-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background-color: rgba(249, 250, 251, 1);
    margin-bottom: 5px;
    padding-left: 20px;
}

.priority-number {
    font-size: 16px;
    font-weight: 600;
    color: rgba(75, 85, 99, 1);
    min-width: 25px;
    border: 3px solid;
    border-radius: 50%;
    background-color: rgba(229, 231, 235, 1);
}

.priority-icon {
    font-size: 20px;
    width: 30px;
    text-align: center;
}

.priority-text {
    font-size: 15px;
    color: #2c3e50;
    font-weight: 500;
    line-height: 1.4;
}

.priority-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
    font-size: 14px;
    color: #856404;
    line-height: 1.5;
}

.priority-note strong {
    color: #856404;
}

/* ===== RECENT CONFIRMATIONS ===== */
.codshield-recent-confirmations-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px 0;
    padding: 25px;
}

.recent-confirmations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.recent-confirmations-title-section h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: rgba(31, 41, 55, 1);
}

.view-all-section {
    margin-left: auto;
}

.view-all-btn {
    background: transparent;
    color: rgba(37, 99, 235, 1);
    border: 1px solid #007cba;
    border-radius: 6px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.view-all-btn:hover {
    background: #007cba;
    color: #fff;
}

.recent-confirmations-table-container {
    overflow-x: auto;
}

.recent-confirmations-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}

.recent-confirmations-table th {
    background: #f8f9fa;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: rgba(107, 114, 128, 1);
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.recent-confirmations-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
}

.recent-confirmations-table tbody tr:hover {
    background: #f8f9fa;
}

.recent-confirmations-table tbody tr:last-child td {
    border-bottom: none;
}

.channel-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 400;
    white-space: nowrap;
    color: rgba(31, 41, 55, 1);
}

.channel-badge i {
    font-size: 16px;
}

.status-badge.confirmed {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge.failed {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.response-badge {
    padding: 4px 8px;
    font-size: 16px;
    font-weight: 400;
    white-space: nowrap;
    color: rgba(31, 41, 55, 1);
}

.time-cell {
    color: rgba(107, 114, 128, 1);
    font-size: 16px;
    white-space: nowrap;
    font-weight: 400;
}

/* ===== VIP DISCOUNT SETTINGS ===== */
.codshield-section {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 24px;
    margin: 20px 0;
}

.codshield-section h2 {
    margin: 0 0 8px 0;
    font-size: 1.3em;
    color: #1d2327;
    font-weight: 600;
}

.codshield-muted {
    color: #646970;
    font-size: 19px;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.codshield-setting-row {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f1;
}

.codshield-setting-row:last-child {
    border-bottom: none;
}

/* Toggle Group */
.codshield-toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.codshield-toggle-label {
    flex: 1;
}

.codshield-toggle-text {
    display: block;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 4px;
}

.codshield-toggle-desc {
    display: block;
    color: #646970;
    font-size: 13px;
}

.codshield-toggle-switch {
    position: relative;
}

.codshield-toggle-switch input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.codshield-toggle-slider {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    background-color: #dcdcde;
    border-radius: 34px;
    transition: .4s;
    cursor: pointer;
}

.codshield-toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}

input[type="checkbox"]:checked + .codshield-toggle-slider {
    background-color: #2271b1;
}

input[type="checkbox"]:checked + .codshield-toggle-slider:before {
    transform: translateX(26px);
}

/* Input with Suffix */
.codshield-input-label {
    display: block;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 8px;
}

.codshield-input-with-suffix {
    position: relative;
    display: inline-block;
    max-width: 120px;
}

.codshield-number-input {
    width: 80px;
    padding: 6px 30px 6px 8px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
}

.codshield-input-suffix {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #646970;
    font-size: 14px;
}

/* Checkbox */
.codshield-checkbox-group {
    display: flex;
    align-items: flex-start;
}

.codshield-checkbox-group input[type="checkbox"] {
    margin: 2px 8px 0 0;
}

.codshield-checkbox-label {
    color: #646970;
    font-size: 13px;
    line-height: 1.4;
}

.vip-discount-icon {
    color: rgba(255, 128, 0, 1);
    background-color: rgba(255, 128, 0, 0.2);
    padding: 10px;
    margin-right: 5px;
    border: 2px solid rgba(255, 128, 0, 0.3);
    border-radius: 50%;
}

.vip-discount-notice-icon {
    border: 2px solid rgba(30, 64, 175, 1);
    border-radius: 50%;
    color: rgba(30, 64, 175, 1);
    margin-right: 5px;
    margin-top: 3px;
}

/* ===== SMART TRIGGER TIMING ===== */
.codshield-trigger-timing {
    margin-top: 20px;
}

.codshield-trigger-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #e0e0e0;
}

.codshield-trigger-row:last-child {
    border-bottom: none;
}

.codshield-trigger-content {
    flex: 1;
}

.codshield-trigger-main {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.codshield-trigger-title {
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}

.codshield-risk-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.risk-low {
    background-color: rgba(220, 252, 231, 1);
    color: rgba(22, 101, 52, 1);
}

.risk-medium {
    background-color: rgba(254, 249, 195, 1);
    color: rgba(133, 77, 14, 1);
}

.risk-high {
    background-color: rgba(254, 226, 226, 1);
    color: rgba(153, 27, 27, 1);
}

.codshield-trigger-desc {
    color: #646970;
    font-size: 13px;
    margin: 0;
    line-height: 1.4;
}

.codshield-trigger-input {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
    justify-content: flex-end;
}

.codshield-trigger-number-input {
    width: 50px;
    padding: 8px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    background: #fff;
}

.codshield-trigger-number-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.codshield-trigger-suffix {
    color: #646970;
    font-size: 14px;
    font-weight: 500;
    min-width: 30px;
}

.smart-trigger-time-icon {
    color: rgba(147, 51, 234, 1);
    background-color: rgba(243, 232, 255, 1);
    padding: 10px;
    margin-right: 5px;
    border: 2px solid rgba(233, 213, 255, 1);
    border-radius: 8px;
}

/* ===== WHATSAPP MESSAGE TEMPLATES ===== */
.codshield-message-templates {
    margin-top: 20px;
}

.codshield-template-section {
    margin-bottom: 30px;
}

.codshield-template-title {
    font-size: 16px;
    font-weight: 500;
    color: #1d2327;
    margin: 0 0 12px 0;
}

.codshield-template-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.codshield-template-textarea:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
    background: #fff;
}

.codshield-template-variables {
    margin-top: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.codshield-variables-label {
    font-size: 12px;
    color: #646970;
    font-weight: 500;
    margin-right: 4px;
}

.codshield-variable-tag {
    background: rgba(229, 231, 235, 1);
    color: rgba(55, 65, 81, 1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.2s ease;
}

.codshield-variable-tag:hover {
    background: #e1ecf7;
    border-color: #a0c5e8;
}

.codshield-template-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 30px 0;
    position: relative;
}

.codshield-template-divider::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 5px;
    background: #f0f0f1;
    border-radius: 0 0 3px 3px;
}

.codshield-template-actions {
    margin-top: 30px;
    text-align: right;
}

.codshield-save-button {
    background: rgba(42, 134, 255, 1);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    width: 100%;
}

.codshield-save-button:hover {
    background: #135e96;
}

.codshield-save-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.4);
}

.whatsapp-template-icon {
    color: rgba(0, 161, 37, 1);
    background-color: rgba(220, 252, 231, 1);
    padding: 10px;
    margin-right: 5px;
    border: 2px solid rgba(187, 247, 208, 1);
    border-radius: 8px;
}

/* ===== AI SALES CLOSURE ===== */
.ai-sales-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.ai-sales-icon .fa-message {
    color: rgba(255, 128, 0, 1);
    font-size: 24px;
    border: 2px solid rgba(255, 166, 0, 0.2);
    border-radius: 50%;
    padding: 10px;
    background-color: rgba(255, 166, 0, 0.15);
}

.ai-sales-icon .fa-arrow-up-right-dots {
    color: rgba(21, 180, 0, 1);
    font-size: 24px;
    border: 2px solid rgba(187, 247, 208, 1);
    border-radius: 50%;
    padding: 10px;
    background-color: rgba(220, 252, 231, 1);
}

.ai-sales-icon .fa-upload {
    color: rgba(42, 134, 255, 1);
    font-size: 24px;
    border: 2px solid rgba(191, 219, 254, 1);
    border-radius: 50%;
    padding: 10px;
    background-color: rgba(219, 234, 254, 1);
}

.ai-sales-icon .fa-comments {
    color: rgba(138, 56, 245, 1);
    font-size: 24px;
    border: 2px solid rgba(233, 213, 255, 1);
    border-radius: 50%;
    padding: 10px;
    background-color: rgba(243, 232, 255, 1);
}

.ai-sales-value {
    font-size: 28px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1;
}

/* ===== CONVERSATIONS SECTION ===== */
.codshield-conversations-section {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 24px;
    margin: 20px 0;
}

.codshield-conversations-section h2 {
    margin: 0 0 8px 0;
    font-size: 1.5em;
    color: #1d2327;
    font-weight: 600;
}

.codshield-conversations-table {
    margin-top: 10px;
    overflow: hidden;
}

.codshield-conversations-table table {
    border: none;
    margin: 0;
}

.codshield-conversations-table thead th {
    border-bottom: 1px solid #ccd0d4;
    font-weight: 500;
    color: rgba(107, 114, 128, 1) !important;
    padding: 12px;
    text-align: left;
    font-size: 14px;
}

.codshield-conversations-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: middle;
    font-weight: 400;
    color: rgba(55, 65, 81, 1);
    font-size: 14px;
}

.codshield-conversations-table tbody tr:last-child td {
    border-bottom: none;
}

/* Column Widths */
.col-customer {
    width: 25%;
    font-weight: 500;
    color: #1d2327;
}

.col-cart-value {
    width: 15%;
    font-weight: 600;
    color: #1d2327;
}

.col-messages {
    width: 10%;
    text-align: center;
    color: #646970;
}

.col-status {
    width: 20%;
}

.col-date {
    width: 20%;
    color: rgba(107, 114, 128, 1) !important;
}

/* Status Badges */
.status-converted {
    background: rgba(220, 252, 231, 1);
    color: rgba(21, 128, 61, 1);
}

.status-in-progress {
    background: rgba(219, 234, 254, 1);
    color: rgba(29, 78, 216, 1);
}

.status-human-handoff {
    background: rgba(254, 249, 195, 1);
    color: rgba(133, 77, 14, 1);
}

.status-no-response {
    background: rgba(243, 244, 246, 1);
    color: rgba(75, 85, 99, 1);
}

/* ===== UTILITIES ===== */
/* Spacing */
.codshield-mt-14 { margin-top: 14px; }
.codshield-mt-16 { margin-top: 16px; }
.codshield-mt-8  { margin-top: 8px; }
.codshield-mt-6  { margin-top: 6px; }
.codshield-mb-6  { margin-bottom: 6px; }
.codshield-mb-8  { margin-bottom: 8px; }

/* Padding */
.codshield-p-14  { padding: 14px; }

/* Flex */
.codshield-flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.codshield-flex-gap {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Font */
.codshield-fw-800 { font-weight: 800; }
.codshield-fs-12  { font-size: 12px; }

/* Misc */
.codshield-muted { 
    color: #6b7280; 
}

.codshield-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 8px 14px;
}

.codshield-manage-account { 
    margin-left: 8px; 
}

.cta-wrapper-container { 
    display: flex; 
    gap: 20px;
}

.codshield-cta { 
    margin-left: 12px; 
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .codshield-charts-grid {
        grid-template-columns: 1fr;
    }
    
    .pie-chart-container {
        justify-content: center;
    }
}

@media (max-width: 1024px) {
    .codshield-analytics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .config-layout {
        gap: 30px;
    }
    
    .channel-priority-section {
        padding: 20px;
    }
}

@media (max-width: 900px) {
    .codshield-lic-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* General */
    .wrap.codshield-ai-admin {
        flex-direction: column;
    }
    
    .codshield-dashboard-data,
    .codshield-dashboard-quickaction {
        flex-direction: column;
    }
    
    .codshield-dashboard-quickaction .codshield-usage,
    .codshield-dashboard-data .codshield-usage {
        width: 100% !important;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    /* Analytics */
    .codshield-analytics-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .analytics-period-btn {
        align-self: flex-start;
    }
    
    .codshield-analytics-grid {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 12px;
    }
    
    .analytics-card {
        padding: 20px 16px;
    }
    
    .analytics-value {
        font-size: 24px;
    }
    
    .chart-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .chart-date-info {
        text-align: left;
    }
    
    .pie-chart-container {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
    
    .pie-legend {
        width: 100%;
    }
    
    /* Extensions */
    .codshield-extensions-grid {
        grid-template-columns: 1fr;
        padding: 12px;
    }
    
    /* Support */
    .form-fields-grid {
        grid-template-columns: 1fr;
    }
    
    .system-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    /* Orders */
    .filters-row {
        justify-content: center;
    }
    
    .search-orders-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .orders-table {
        font-size: 12px;
    }
    
    .orders-table th,
    .orders-table td {
        padding: 8px 4px;
    }
    
    .status-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    /* WhatsApp */
    .section-header-with-date {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-right {
        justify-content: space-between;
    }
    
    .date-range-picker {
        width: 100%;
        justify-content: space-between;
    }
    
    .date-input-group {
        flex: 1;
    }
    
    .whatsapp-metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .metric-card {
        padding: 20px 15px;
    }
    
    .metric-value {
        font-size: 24px;
    }
    
    /* Confirmation Report */
    .report-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .report-card {
        padding: 20px;
    }
    
    .report-card-header {
        margin-bottom: 15px;
    }
    
    .report-icon {
        width: 45px;
        height: 45px;
        font-size: 28px;
    }
    
    .report-title {
        font-size: 14px;
    }
    
    .stat-label {
        font-size: 13px;
    }
    
    .stat-value {
        font-size: 14px;
    }
    
    /* AI Chat Logs */
    .chat-logs-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .date-metrics-section,
    .dates-list-section {
        padding: 15px;
    }
    
    .dates-list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .date-item {
        flex: 1;
        min-width: 80px;
        text-align: center;
    }
    
    .bar-chart-section {
        padding: 15px;
    }
    
    .chart-container {
        height: 150px;
        gap: 10px;
    }
    
    .chart-bars {
        gap: 12px;
    }
    
    .bar {
        width: 12px;
    }
    
    .bar-wrapper {
        gap: 2px;
    }
    
    .metrics-checkboxes {
        padding: 15px;
    }
    
    /* Features */
    .features-table {
        font-size: 12px;
    }
    
    .features-table th,
    .features-table td {
        padding: 8px 12px;
    }
    
    /* Workflow */
    .workflow-steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .workflow-step {
        flex-direction: row;
        text-align: left;
        width: 100%;
        gap: 15px;
    }
    
    .step-icon {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .workflow-arrow {
        transform: rotate(90deg);
        padding: 5px 0;
    }
    
    .step-content {
        flex: 1;
    }
    
    /* Retry Config */
    .config-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .config-settings {
        gap: 20px;
    }
    
    .config-group {
        padding: 18px;
    }
    
    .config-input {
        padding: 10px 14px;
        font-size: 15px;
    }
    
    .save-config-btn {
        width: 100%;
        padding: 14px 20px;
    }
    
    .channel-priority-section {
        padding: 20px;
    }
    
    .priority-item {
        padding: 12px 0;
    }
    
    .priority-number {
        font-size: 15px;
    }
    
    .priority-text {
        font-size: 14px;
    }
    
    /* Recent Confirmations */
    .recent-confirmations-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .view-all-section {
        margin-left: 0;
        width: 100%;
    }
    
    .view-all-btn {
        width: 100%;
        padding: 10px 20px;
    }
    
    .recent-confirmations-table {
        font-size: 12px;
    }
    
    .recent-confirmations-table th,
    .recent-confirmations-table td {
        padding: 8px 12px;
    }
    
    .channel-badge {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .status-badge,
    .response-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    /* Smart Trigger */
    .codshield-trigger-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .codshield-trigger-input {
        align-self: flex-end;
    }
    
    /* Table Header */
    .codshield-table-header {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }
    
    .codshield-table-row {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }
    
    .feature-col,
    .description-col {
        flex: 1;
        width: 100%;
    }
    
    .codshield-table-header .feature-col {
        padding-left: 12px;
    }
    
    /* Conversations */
    .codshield-conversations-table {
        overflow-x: auto;
    }
    
    .codshield-conversations-table table {
        min-width: 600px;
    }
    
    .col-customer,
    .col-cart-value,
    .col-messages,
    .col-status,
    .col-date {
        width: auto;
    }
}

@media (max-width: 480px) {
    /* General */
    .codshield-card {
        width: 100%;
    }
    
    /* Date Range */
    .date-range-picker {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-input-group {
        justify-content: center;
    }
    
    .export-csv-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Confirmation Report */
    .confirmation-report-section {
        padding: 20px;
    }
    
    .report-header h2 {
        font-size: 18px;
    }
    
    .report-card-header {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    /* AI Chat Logs */
    .ai-chat-logs-section {
        padding: 20px;
    }
    
    .chat-logs-header h2 {
        font-size: 18px;
    }
    
    .current-date-metrics .date-title {
        font-size: 16px;
    }
    
    .metric-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .chart-container {
        height: 120px;
    }
    
    .chart-bars {
        gap: 8px;
    }
    
    .bar {
        width: 10px;
    }
    
    .bar-label {
        font-size: 10px;
    }
    
    /* Workflow */
    .codshield-workflow-section {
        padding: 15px;
    }
    
    .step-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .step-title {
        font-size: 14px;
    }
    
    .step-description {
        font-size: 12px;
    }
    
    /* Retry Config */
    .codshield-retry-config-section {
        padding: 20px;
    }
    
    .config-group {
        padding: 15px;
    }
    
    .config-input {
        font-size: 14px;
    }
    
    .channel-priority-section {
        padding: 18px;
    }
    
    .priority-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 15px 0;
    }
    
    .priority-number,
    .priority-icon {
        width: auto;
    }
    
    .checkbox-label {
        font-size: 13px;
    }
    
    .config-label {
        font-size: 13px;
    }
    
    /* Recent Confirmations */
    .recent-confirmations-table th,
    .recent-confirmations-table td {
        padding: 6px 8px;
    }
    
    .channel-badge {
        flex-direction: column;
        gap: 2px;
        text-align: center;
    }
}

