/* Repair Desk — Admin Backend CSS */

/* Override WP admin background on our page */
#wpcontent { background: #f8fafc; }

/* Reset WP admin defaults inside our container */
.rd-wrap { margin: 0 0 0 -20px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.rd-wrap * { box-sizing: border-box; }

/* Header */
.rd-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    padding: 0;
}
.rd-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    max-width: 100%;
}
.rd-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.rd-header-icon {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #f97316;
}
.rd-header-title {
    display: flex;
    flex-direction: column;
}
.rd-header-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}
.rd-header-meta {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Badges */
.rd-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 999px;
}
.rd-badge-free {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}
.rd-badge-premium {
    background: rgba(236, 72, 153, 0.2);
    color: #f472b6;
}

/* Header links */
.rd-header-right {
    display: flex;
    gap: 8px;
}
.rd-header-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
    transition: background 0.2s;
}
.rd-header-link:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* Tabs */
.rd-tabs {
    display: flex;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.rd-tabs::-webkit-scrollbar {
    display: none;
}
.rd-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.rd-tab:hover {
    color: #1e293b;
}
.rd-tab.active {
    color: #f97316;
    border-bottom-color: #f97316;
    font-weight: 600;
}
@media (max-width: 782px) {
    .rd-tabs {
        padding: 0 8px;
        -webkit-mask-image: linear-gradient(to right, #000 90%, transparent);
        mask-image: linear-gradient(to right, #000 90%, transparent);
    }
    .rd-tabs:hover, .rd-tabs:active {
        -webkit-mask-image: none;
        mask-image: none;
    }
    .rd-tab {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Body */
.rd-body {
    padding: 24px;
    background: #f8fafc;
    min-height: 500px;
}

/* Loading */
.rd-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 40px;
    color: #64748b;
    justify-content: center;
}

/* Card */
.rd-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden;
}
.rd-info-bar {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    margin-top: 8px;
    font-size: 13px;
    color: #64748b;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
}
.rd-info-bar a { color: #3b82f6; text-decoration: none; }
.rd-info-bar a:hover { text-decoration: underline; }
.rd-info-bar code { background: #dbeafe; padding: 2px 6px; border-radius: 4px; font-size: 12px; }
.rd-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}
.rd-card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}
.rd-card-actions {
    margin-left: auto;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Info box used at the top of admin tabs */
.rd-info-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 13px;
    color: #1e293b;
    line-height: 1.6;
}
.rd-info-box .dashicons-info-outline {
    color: #3b82f6;
    flex-shrink: 0;
    margin-top: 2px;
}
.rd-info-box strong {
    color: #1e40af;
}
.rd-card-body {
    padding: 20px;
}

/* Toolbar */
.rd-toolbar {
    display: block;
    text-align: right;
    margin-bottom: 16px;
}
.rd-toolbar-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-right: 12px;
    vertical-align: middle;
}
.rd-toolbar-right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    vertical-align: middle;
}

/* Search */
.rd-search {
    display: flex;
    align-items: center;
    gap: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.rd-search:focus-within {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}
.rd-search input {
    border: none;
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
    min-width: 240px;
    background: transparent;
}
.rd-search .dashicons {
    padding: 8px;
    color: #94a3b8;
}

/* Buttons */
.rd-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1.4;
}
.rd-btn-primary {
    background: #f97316;
    color: #fff;
    border-color: #f97316;
}
.rd-btn-primary:hover {
    background: #ea580c;
    border-color: #ea580c;
    color: #fff;
}
.rd-btn-secondary {
    background: #fff;
    color: #374151;
    border-color: #d1d5db;
}
.rd-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #1f2937;
}
.rd-btn-danger {
    background: #fff;
    color: #dc2626;
    border-color: #fca5a5;
}
.rd-btn-danger:hover {
    background: #fef2f2;
    border-color: #dc2626;
}
.rd-btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Filter pills */
.rd-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    transition: all 0.2s;
}
.rd-filter-pill:hover,
.rd-filter-pill.active {
    border-color: #f97316;
    color: #f97316;
    background: #fff7ed;
}
.rd-filter-pill .rd-count {
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
}
.rd-filter-pill.active .rd-count {
    background: #ffedd5;
    color: #f97316;
}

/* Table */
.rd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.rd-table th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}
.rd-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
    vertical-align: middle;
}
.rd-table tr:hover td {
    background: #f8fafc;
}
.rd-table tr:last-child td {
    border-bottom: none;
}

/* Status badges — colors are rendered dynamically via inline styles */

/* DataTables mobile */
@media (max-width: 782px) {
    .rd-dt-top, .rd-dt-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    .rd-card .dataTables_filter input {
        width: 100%;
        min-width: 0;
    }
}

/* DataTables Responsive child row styling */
.rd-card table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
.rd-card table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
    background-color: #f97316;
    border: none;
    box-shadow: none;
}
.rd-card .dtr-details {
    padding: 8px 0;
}
.rd-card .dtr-details li {
    padding: 4px 0;
    border-bottom: 1px solid #f1f5f9;
}
.rd-card .dtr-title {
    font-weight: 600;
    color: #64748b;
    font-size: 12px;
    margin-right: 8px;
}

/* DataTables overrides to match our design */
.rd-card .dataTables_wrapper { padding: 0; }
.rd-dt-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid #f1f5f9; }
.rd-dt-bottom { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid #f1f5f9; font-size: 13px; color: #64748b; }
.rd-card .dataTables_filter input { padding: 6px 10px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 13px; margin-left: 6px; }
.rd-card .dataTables_filter input:focus { border-color: #f97316; outline: none; box-shadow: 0 0 0 3px rgba(249,115,22,0.1); }
.rd-card .dataTables_length select { padding: 4px 8px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 13px; }
.rd-card .dataTables_paginate .paginate_button { padding: 4px 10px; border: 1px solid #e2e8f0; border-radius: 6px; margin: 0 2px; font-size: 12px; cursor: pointer; background: #fff; color: #374151; }
.rd-card .dataTables_paginate .paginate_button.current { background: #f97316; color: #fff; border-color: #f97316; }
.rd-card .dataTables_paginate .paginate_button:hover:not(.current) { background: #f8fafc; border-color: #94a3b8; }
.rd-card .dataTables_paginate .paginate_button.disabled { opacity: 0.4; cursor: default; }
.rd-card .dataTables_processing { background: rgba(255,255,255,0.9); color: #64748b; font-size: 13px; }
.rd-card table.dataTable { border-collapse: collapse; }
.rd-card table.dataTable tbody td { vertical-align: top; }
.rd-card table.dataTable thead th { border-bottom: 1px solid #e2e8f0; }

/* Empty state */
.rd-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}
.rd-empty .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    color: #cbd5e1;
}
.rd-empty p {
    font-size: 14px;
    margin: 0 0 16px;
}

/* Forms */
.rd-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.rd-form-full {
    grid-column: 1 / -1;
}
.rd-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.rd-form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.rd-form-group input,
.rd-form-group textarea,
.rd-form-group select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    background: #fff;
    font-family: inherit;
}
.rd-form-group input:focus,
.rd-form-group textarea:focus,
.rd-form-group select:focus {
    border-color: #f97316;
    outline: none;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}
.rd-form-group textarea {
    resize: vertical;
    min-height: 80px;
}
.rd-form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    margin-top: 16px;
}

/* Modal */
.rd-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.rd-modal {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
}
.rd-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}
.rd-modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}
.rd-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}
.rd-modal-close:hover {
    color: #475569;
}
.rd-modal-body {
    padding: 24px;
}

/* Timeline */
.rd-timeline {
    position: relative;
    padding-left: 24px;
}
.rd-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: #e2e8f0;
}
.rd-timeline-item {
    position: relative;
    padding-bottom: 16px;
}
.rd-timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--tl-color, #f97316);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--tl-color, #f97316);
}
.rd-timeline-date {
    font-size: 11px;
    color: #94a3b8;
}
.rd-timeline-text {
    font-size: 13px;
    color: #374151;
}
.rd-timeline-by {
    font-size: 11px;
    color: #94a3b8;
    font-style: italic;
}

/* Options / Settings */
/* Options toolbar (subtabs + Export/Import/Reset) */
.rd-options-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

/* Options sub-tabs */
.rd-options-subtab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    display: inline-flex;
    align-items: center;
}
.rd-options-subtab:hover {
    color: #1e293b;
}
.rd-options-subtab.active {
    color: #f97316;
    border-bottom-color: #f97316;
    font-weight: 600;
}

.rd-options-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    position: sticky;
    top: 32px;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: background 0.2s, box-shadow 0.2s;
}
.rd-options-nav.scrolled {
    background: #1e293b;
    border-color: #1e293b;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.rd-options-nav.scrolled .rd-options-nav-item {
    color: #94a3b8;
}
.rd-options-nav.scrolled .rd-options-nav-item:hover {
    background: #334155;
    color: #fff;
}
.rd-options-nav-item {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    color: #4b5563;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.15s;
}
.rd-options-nav-item:hover {
    background: #f3f4f6;
    color: #1e293b;
}
.rd-options-section {
    padding: 0 20px 16px;
}
.rd-option-group-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 24px 0 12px 0;
    padding: 10px 0;
    border-bottom: 2px solid #f97316;
    display: flex;
    align-items: center;
    gap: 8px;
    scroll-margin-top: 80px;
}
.rd-option-group-title:first-child {
    margin-top: 0;
}
.rd-option-row {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}
.rd-option-row:last-child {
    border-bottom: none;
}
.rd-option-label-col {
    flex: 0 0 260px;
    padding-right: 20px;
}
.rd-option-label {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}
.rd-option-key {
    font-size: 10px;
    font-weight: 400;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 6px;
    font-family: monospace;
    user-select: all;
}
.rd-option-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
    margin-top: 4px;
}
.rd-option-input-col {
    flex: 1;
    min-width: 0;
}
.rd-option-input-col input[type="text"],
.rd-option-input-col input[type="number"],
.rd-option-input-col select {
    width: 100%;
    max-width: 400px;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    transition: border-color 0.2s;
}
.rd-option-input-col input[type="text"]:focus,
.rd-option-input-col input[type="number"]:focus,
.rd-option-input-col select:focus,
.rd-option-textarea:focus {
    border-color: #f97316;
    outline: none;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}
.rd-option-input-col input[type="checkbox"] {
    width: auto;
    margin-top: 4px;
}
.rd-option-textarea {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
}
/* Premium lock hint */
.rd-upgrade-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #f97316;
}
.rd-upgrade-hint .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 2px;
}
.rd-upgrade-hint a {
    color: #f97316;
    text-decoration: none;
    font-weight: 500;
}
.rd-upgrade-hint a:hover {
    text-decoration: underline;
}
.rd-option-input-col input:disabled,
.rd-option-input-col textarea:disabled,
.rd-option-input-col select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8fafc;
}

/* Auto-save status bar */
.rd-options-autosave-bar {
    padding: 8px 20px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Info Grid (Support Info) */
.rd-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
@media (max-width: 782px) {
    .rd-info-grid {
        grid-template-columns: 1fr;
    }
}

/* Status Flow Items */
.rd-status-flow-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 6px;
    background: #fff;
    transition: opacity 0.2s, box-shadow 0.2s;
    user-select: none;
}
.rd-status-flow-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Repair create form grid */
.rd-create-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 782px) {
    .rd-create-grid {
        grid-template-columns: 1fr;
    }
    .rd-create-grid > div:last-child {
        order: -1; /* Photos first on mobile */
    }
}

/* Mobile show/hide helpers */
.rd-hide-mobile { }
.rd-show-mobile { display: none !important; }
@media (max-width: 782px) {
    .rd-hide-mobile { display: none !important; }
    .rd-show-mobile { display: inline !important; }
}

/* Product action buttons — connected group */
.rd-product-actions {
    display: inline-flex;
    gap: 0;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}
.rd-product-actions .rd-btn {
    border: none;
    border-radius: 0;
    border-right: 1px solid #e2e8f0;
    padding: 6px 10px;
}
.rd-product-actions .rd-btn:last-child {
    border-right: none;
}

/* Save as device button alignment */
.rd-save-device-wrap {
    text-align: right;
}
@media (max-width: 782px) {
    .rd-save-device-wrap {
        text-align: center;
    }
}

/* Customer search results */
.rd-customer-result:hover {
    background: #f8fafc !important;
    border-color: #f97316 !important;
}

/* File Upload Widget */
.rd-upload-widget {
    margin-top: 12px;
}
.rd-upload-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.rd-upload-drop {
    border: 2px dashed #e2e8f0;
    border-radius: 0;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rd-upload-drop:hover,
.rd-upload-drop.dragover {
    border-color: #f97316;
    background: #fff7ed;
    color: #f97316;
}
.rd-upload-tile {
    border-style: dashed;
    border-color: #cbd5e1;
}
.rd-upload-tile:hover {
    border-color: #f97316;
}
.rd-upload-drop .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    display: block;
    margin: 0 auto 8px;
}
.rd-file-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}
.rd-file-item {
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}
.rd-file-item.is-thumbnail {
    border-color: #f97316;
    border-width: 2px;
}
.rd-file-thumb {
    width: 100%;
    height: 90px;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}
.rd-file-icon {
    width: 100%;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
}
.rd-file-icon .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
}
.rd-file-info {
    padding: 6px 8px;
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* File button group — connected, full width (like Bootstrap btn-group) */
.rd-file-btn-group {
    display: flex;
    border-top: 1px solid #e2e8f0;
}
.rd-file-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    border: none;
    border-right: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.rd-file-btn:last-child {
    border-right: none;
}
.rd-file-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}
.rd-file-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}
.rd-file-btn-danger {
    color: #dc2626;
}
.rd-file-btn-danger:hover {
    background: #fef2f2;
}
.rd-file-limit-info {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}
/* Lightbox */
.rd-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.rd-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.rd-lightbox iframe {
    width: 80vw;
    height: 85vh;
    border: none;
    border-radius: 8px;
    background: #fff;
}
.rd-lightbox-close {
    position: absolute;
    top: 16px;
    right: 24px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rd-lightbox-close:hover { background: rgba(255,255,255,0.4); }
.rd-lightbox-name {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 13px;
    background: rgba(0,0,0,0.5);
    padding: 4px 16px;
    border-radius: 999px;
}

/* Camera modal */
.rd-camera-preview {
    width: 100%;
    max-width: 480px;
    border-radius: 8px;
    background: #000;
}

/* Scroll to top button */
.rd-scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f97316;
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.2s, transform 0.2s;
}
.rd-scroll-top:hover {
    transform: scale(1.1);
    background: #ea580c;
}
.rd-scroll-top.visible {
    display: flex;
}

/* Responsive */
@media (max-width: 782px) {
    .rd-form-grid {
        grid-template-columns: 1fr;
    }
    .rd-toolbar-left,
    .rd-toolbar-right {
        display: flex;
        margin-right: 0;
        margin-bottom: 8px;
    }
    .rd-search input {
        min-width: 0;
        width: 100%;
    }
    .rd-option-row {
        flex-direction: column;
    }
    .rd-option-label-col {
        flex: none;
        padding-right: 0;
        margin-bottom: 6px;
    }
}

/* Modal Spinner Overlay */
#rd-modal-spinner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}
#rd-modal-spinner .spinner {
    float: none;
    width: 40px;
    height: 40px;
    visibility: visible;
}

/* === Pro Teaser === */
.rd-pro-teaser {
    margin: 24px 0 8px;
    padding: 16px 20px;
    background: #f0f6ff;
    border: 1px solid #c3dafe;
    border-radius: 8px;
}
.rd-pro-teaser-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #475569;
}
.rd-pro-teaser-header .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #6b7280;
}
.rd-pro-teaser-list {
    margin: 0 0 10px 20px;
    padding: 0;
    list-style: disc;
}
.rd-pro-teaser-list li {
    margin-bottom: 2px;
    color: #374151;
    font-size: 12px;
}
.rd-pro-teaser-link {
    font-size: 12px;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
}
.rd-pro-teaser-link:hover {
    text-decoration: underline;
    color: #1d4ed8;
}

/* === Go Pro Page === */
.rd-gopro {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 0;
}
.rd-gopro-header {
    text-align: center;
    margin-bottom: 32px;
}
.rd-gopro-header-icon {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #f59e0b;
    display: block;
    margin: 0 auto 12px;
}
.rd-gopro-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px;
}
.rd-gopro-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}
.rd-gopro-table-wrap {
    overflow-x: auto;
    margin-bottom: 32px;
}
.rd-gopro-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.rd-gopro-table th,
.rd-gopro-table td {
    padding: 10px 16px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
}
.rd-gopro-feature-col {
    text-align: left !important;
    font-weight: 500;
    color: #374151;
}
.rd-gopro-table thead th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.rd-gopro-plan-pro {
    background: rgba(249, 115, 22, 0.03);
}
.rd-gopro-table thead .rd-gopro-plan-pro {
    background: rgba(249, 115, 22, 0.08);
    color: #f97316;
}
.rd-gopro-check {
    color: #16a34a;
    font-size: 18px;
    width: 18px;
    height: 18px;
}
.rd-gopro-dash {
    color: #cbd5e1;
    font-size: 16px;
}
.rd-gopro-table tbody tr:hover {
    background: #f8fafc;
}
.rd-gopro-table tbody tr:last-child td {
    border-bottom: none;
}
.rd-gopro-cta {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}
.rd-gopro-btn-pro {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: opacity 0.15s, transform 0.15s;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
}
.rd-gopro-btn-pro:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: #fff;
}
.rd-gopro-btn-pro .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Go Pro tab styling */
.rd-tab[data-tab="gopro"] {
    color: #f59e0b;
}
.rd-tab[data-tab="gopro"]:hover {
    color: #d97706;
}
.rd-tab[data-tab="gopro"] .dashicons {
    color: #f59e0b;
}

/* === Limit Popup === */
.rd-limit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rd-fadeIn 0.15s ease;
}
.rd-limit-popup {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: rd-scaleIn 0.2s ease;
}
.rd-limit-popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    color: #94a3b8;
    cursor: pointer;
}
.rd-limit-popup-close:hover {
    color: #334155;
}
.rd-limit-popup-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316, #ea580c);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.rd-limit-popup-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #fff;
}
.rd-limit-popup h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
}
.rd-limit-popup p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 24px;
}
.rd-limit-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rd-limit-popup-actions .rd-gopro-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
}
.rd-limit-popup-actions .rd-btn-secondary {
    font-size: 13px;
    color: #64748b;
}
@keyframes rd-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes rd-scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
