/* ============================================
   IMAGE TO EXCEL — Tool Styles (v141 - Final)
   ✅ Fully scoped to .page-image-to-excel
   ✅ Fully Responsive for all 18 Languages
   ✅ Edit Mode, Delete Buttons, Hints, Modals
   ============================================ */

/* ============================================
   HERO SECTION & BADGES
   ============================================ */
.page-image-to-excel .ite-hero {
    text-align: center;
    padding: 1rem;
    margin-bottom: 2rem;
}

.page-image-to-excel .hero-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: var(--text-main);
    word-break: break-word;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-image-to-excel .hero-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
    display: none;
}

.page-image-to-excel .hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.page-image-to-excel .privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
}

.page-image-to-excel .privacy-badge svg {
    flex-shrink: 0;
    color: var(--accent);
    opacity: 0.85;
}

/* ============================================
   HERO AD WRAPPER
   ============================================ */
.page-image-to-excel .hero-ad-wrapper {
    display: block !important;
    margin: 0 auto 1.5rem;
    min-height: 90px;
    max-width: 970px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
}

.page-image-to-excel .hero-ad-wrapper ins.adsbygoogle {
    display: block !important;
    width: 100%;
    min-height: 90px;
    margin: 0 auto;
}

@media (max-width: 600px) {
    .page-image-to-excel .hero-ad-wrapper {
        min-height: 100px;
        margin-bottom: 1rem;
    }
    .page-image-to-excel .hero-ad-wrapper ins.adsbygoogle {
        min-height: 100px;
    }
}

/* ============================================
   WORKSPACE (2 columns)
   ============================================ */
.page-image-to-excel .ite-workspace {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
    align-items: start;
}

.page-image-to-excel .ite-upload-panel {
    position: sticky;
    top: 100px;
    align-self: start;
}

/* ============================================
   PANELS & TABS
   ============================================ */
.page-image-to-excel .panel {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

html.dark .page-image-to-excel .panel {
    background: linear-gradient(180deg, #1a2438 0%, #151d2e 100%);
    border-color: #2d3b52;
}

.page-image-to-excel .panel h2 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 10px;
}

.page-image-to-excel .upload-tabs {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-subtle);
    padding: 0.3rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

html.dark .page-image-to-excel .upload-tabs {
    background: #111827;
    border-color: #2d3b52;
}

.page-image-to-excel .tab-btn {
    flex: 1;
    padding: 0.6rem 0.5rem;
    background: transparent;
    border: none;
    border-radius: 7px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.page-image-to-excel .tab-btn svg { flex-shrink: 0; }
.page-image-to-excel .tab-btn:hover { color: var(--text-main); }

.page-image-to-excel .tab-btn.active {
    background: var(--bg-panel);
    color: var(--accent);
    box-shadow: var(--shadow);
}

html.dark .page-image-to-excel .tab-btn.active {
    background: #2a3a52;
    color: #93c5fd;
    box-shadow: 0 2px 8px rgba(96, 165, 250, 0.2);
}

.page-image-to-excel .tab-panel { display: none; }
.page-image-to-excel .tab-panel.active { display: block; }

/* ============================================
   DROP ZONE & URL INPUT
   ============================================ */
.page-image-to-excel .drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 2.5rem 1rem;
    text-align: center;
    cursor: pointer;
    background-color: var(--bg-main);
    margin-bottom: 1.25rem;
    transition: all 0.2s;
}

html.dark .page-image-to-excel .drop-zone {
    background: #131c2e;
    border-color: #3d4b62;
}

.page-image-to-excel .drop-zone:hover,
.page-image-to-excel .drop-zone:focus {
    border-color: var(--accent);
    outline: none;
}

.page-image-to-excel .drop-message svg {
    stroke: var(--accent);
    margin-bottom: 0.75rem;
}

.page-image-to-excel .drop-message p {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.page-image-to-excel .browse-link {
    color: var(--accent);
    font-weight: 600;
}

.page-image-to-excel .sub-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ✅ FIXED: URL Input & Button (Always Below on Desktop & Mobile) */
.page-image-to-excel .url-input-group {
    display: flex;
    flex-direction: column; /* ✅ Button ko neeche laane ke liye */
    gap: 8px;
    width: 100%;
    margin-bottom: 0.5rem;
}

.page-image-to-excel .url-input-group input[type="url"] {
    width: 100%;
    flex: none; /* ✅ Purana flex: 1 hatao */
    padding: 0.75rem 1rem;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    outline: none;
}

.page-image-to-excel .url-input-group .small-btn {
    width: 100%; /* ✅ Button ki chaudai poori */
    margin-top: 0;
    padding: 12px;
    flex-shrink: 0;
}

.page-image-to-excel .url-hint { 
    font-size: 0.78rem; 
    color: var(--text-muted); 
    font-style: italic; 
    margin-bottom: 1rem; 
    margin-top: 4px;
}
.page-image-to-excel .url-hint { font-size: 0.78rem; color: var(--text-muted); font-style: italic; margin-bottom: 1rem; }

/* ============================================
   IMAGE PREVIEW GRID & BOXES
   ============================================ */
.page-image-to-excel .multi-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 10px;
    margin-top: 15px;
    max-height: 220px;
    overflow-y: auto;
    padding: 5px;
    border-radius: 8px;
}

.page-image-to-excel .multi-preview-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-subtle);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    cursor: zoom-in;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.page-image-to-excel .multi-preview-item:hover {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-soft);
}

.page-image-to-excel .multi-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}

.page-image-to-excel .multi-preview-item:hover img {
    opacity: 0.8;
}

.page-image-to-excel .multi-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s;
}

.page-image-to-excel .multi-preview-item .remove-btn:hover {
    background: #dc2626;
}

.page-image-to-excel .multi-preview-item .file-name-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.6rem;
    padding: 3px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 2;
}

/* ============================================
   PREVIEW HINT & CENTER MODAL
   ============================================ */
.page-image-to-excel .preview-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--bg-main);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px dashed var(--border-color);
    margin-top: 10px;
    margin-bottom: 1rem;
    animation: fadeInUp 0.3s ease;
}

.page-image-to-excel .preview-hint svg {
    flex-shrink: 0;
    color: var(--accent);
}

html.dark .page-image-to-excel .preview-hint {
    background: #131c2e;
    border-color: #3d4b62;
}

.page-image-to-excel .global-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 99999;
    display: none; 
    align-items: center;
    justify-content: center;
    pointer-events: none; 
}

.page-image-to-excel .global-preview-modal img {
    max-width: 85vw;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 4px solid #fff;
    background: #fff;
    object-fit: contain;
    animation: zoomInModal 0.2s ease-out;
}

@keyframes zoomInModal {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ============================================
   BULK HINT
   ============================================ */
.page-image-to-excel .bulk-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #1e40af;
}
html.dark .page-image-to-excel .bulk-hint {
    background: #1e3a8a;
    border-color: #3b82f6;
    color: #dbeafe;
}

/* ============================================
   CAMERA
   ============================================ */
.page-image-to-excel .camera-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.page-image-to-excel .camera-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-image-to-excel .camera-controls {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 24px;
    align-items: center;
    z-index: 15;
}

.page-image-to-excel .cam-btn {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-image-to-excel .capture-btn {
    width: 64px;
    height: 64px;
    background: #fff;
    border: 4px solid rgba(255, 255, 255, 0.6);
}

.page-image-to-excel .capture-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #fff;
}

.page-image-to-excel .camera-status {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(239, 68, 68, 0.95);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 10px;
    text-align: center;
    line-height: 1.4;
    max-width: 85%;
    width: max-content;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
}

.page-image-to-excel .camera-status.hidden {
    display: none !important;
}

/* ============================================
   LANGUAGE DROPDOWN & OCR OPTIONS
   ============================================ */
.page-image-to-excel .control-group {
    margin-top: 18px;
    margin-bottom: 1.25rem;
}

.page-image-to-excel .control-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-muted);
}

.page-image-to-excel select {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%232563eb%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 10px;
}

html.dark .page-image-to-excel select {
    background-color: #131c2e;
    border-color: #3d4b62;
}

.page-image-to-excel select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ============================================
   OCR OPTIONS (Fixed for both panels)
   ============================================ */
.page-image-to-excel .ocr-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    background: var(--bg-subtle);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.page-image-to-excel .ite-result-panel .ocr-options {
    background: transparent;
    border: none;
    padding: 0;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.page-image-to-excel .ocr-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
    color: var(--text-main);
    font-weight: 500;
    margin: 0;
}

.page-image-to-excel .ocr-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--accent);
    flex-shrink: 0;
}

html.dark .page-image-to-excel .ocr-options {
    background: #1e293b;
    border-color: #334155;
}

html.dark .page-image-to-excel .ite-result-panel .ocr-options {
    background: transparent;
    border: none;
}

html.dark .page-image-to-excel .ocr-option {
    color: #cbd5e1;
}

/* ============================================
   BUTTONS & PROGRESS
   ============================================ */
.page-image-to-excel .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.page-image-to-excel .btn:disabled { opacity: 0.5; cursor: not-allowed; }

.page-image-to-excel .primary-btn {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.page-image-to-excel .secondary-btn {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.page-image-to-excel .convert-btn { width: 100%; margin-top: 1rem; }

.page-image-to-excel .progress-container {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.page-image-to-excel .progress-bar-wrapper {
    width: 100%;
    height: 6px;
    background: var(--bg-subtle);
    border-radius: 3px;
    overflow: hidden;
}

.page-image-to-excel .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--purple));
    width: 0%;
    transition: width 0.3s;
}

.page-image-to-excel .progress-status { font-size: 0.82rem; color: var(--text-muted); }

/* ============================================
   RESULT PANEL & TABLE
   ============================================ */
.page-image-to-excel .ite-result-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    min-width: 0;
}

.page-image-to-excel .ite-result-panel .panel {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.page-image-to-excel .ite-result-panel .panel h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-family: var(--font-heading);
    font-weight: 600;
}

.page-image-to-excel .icon-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.page-image-to-excel .icon-btn:hover { color: var(--accent); border-color: var(--accent); }

.page-image-to-excel .table-wrapper {
    width: 100%;
    overflow: auto;
    max-height: 500px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.page-image-to-excel .result-table { 
    width: 100%; 
    border-collapse: collapse; 
    font-size: 0.9rem; 
}

.page-image-to-excel .result-table th { 
    background: var(--bg-subtle); 
    font-weight: 700; 
    padding: 0.6rem; 
    border: 1px solid var(--border-color); 
    min-width: 80px;
    word-break: break-word;
}

.page-image-to-excel .result-table td { 
    padding: 0.6rem; 
    border: 1px solid var(--border-color); 
    background: var(--bg-panel); 
    min-width: 80px;
    word-break: break-word;
}

.page-image-to-excel .result-table td[contenteditable="true"]:focus { outline: 2px solid var(--accent); background: #fff; }

.page-image-to-excel .table-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.page-image-to-excel .stat-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 0.55rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
}

.page-image-to-excel .stat-card strong { font-size: 1.1rem; color: var(--accent); margin-top: 4px; }

.page-image-to-excel .action-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }

/* ============================================
   EMPTY STATE
   ============================================ */
.page-image-to-excel .ite-result-panel .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-muted);
    min-height: 300px;
}

.page-image-to-excel .ite-result-panel .empty-state.hidden {
    display: none !important;
}

.page-image-to-excel .ite-result-panel .empty-state svg { stroke: var(--border-color); margin-bottom: 1rem; }
.page-image-to-excel .ite-result-panel .empty-state p { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.page-image-to-excel .ite-result-panel .empty-state span { font-size: 0.82rem; opacity: 0.7; }

/* ============================================
   CONTENT SECTIONS (How-to & FAQ)
   ============================================ */
.page-image-to-excel .content-section {
    margin-bottom: 3.5rem;
}

.page-image-to-excel .content-section h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.page-image-to-excel .steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.page-image-to-excel .step {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: var(--radius);
    transition: all 0.15s;
}

.page-image-to-excel .step:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.page-image-to-excel .step span {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    opacity: 0.15;
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.page-image-to-excel .step h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.page-image-to-excel .step p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.page-image-to-excel .faq-list details {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    padding: 1rem;
    transition: border-color 0.15s;
}

.page-image-to-excel .faq-list details[open] {
    border-color: var(--accent);
}

.page-image-to-excel .faq-list summary {
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-main);
}

.page-image-to-excel .faq-list summary::-webkit-details-marker {
    display: none;
}

.page-image-to-excel .faq-list summary::after {
    content: '+';
    font-size: 1.3rem;
    color: var(--accent);
    font-weight: 400;
}

.page-image-to-excel .faq-list details[open] summary::after {
    content: '−';
}

.page-image-to-excel .faq-list p {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ============================================
   EDIT MODE & DELETE BUTTONS
   ============================================ */
#toggleEditBtn {
    margin-right: 5px;
    color: #4b5563;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
#toggleEditBtn:hover {
    background: #e5e7eb;
    color: var(--accent);
}

#toggleEditBtn.active-edit-mode {
    background-color: #ef4444 !important;
    color: white !important;
    border-color: #dc2626 !important;
}

.del-col-btn, .del-row-btn {
    position: absolute; 
    right: 2px; 
    top: 50%; 
    transform: translateY(-50%); 
    border: none; 
    background: #fee2e2; 
    color: red; 
    cursor: pointer; 
    font-weight: bold; 
    font-size: 16px;
    border-radius: 50% !important;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 5;
}

.del-col-btn:hover, .del-row-btn:hover {
    background: #ef4444 !important;
    color: white !important;
}

.table-edit-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #eff6ff;
    color: #1e40af;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
    border: 1px solid #bfdbfe;
}
.table-edit-hint strong {
    color: #ef4444;
    font-size: 16px;
    margin: 0 2px;
}

/* ============================================
   CUSTOM ERROR MODAL
   ============================================ */
.page-image-to-excel .custom-error-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.page-image-to-excel .custom-error-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.page-image-to-excel .custom-error-content {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px 40px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.page-image-to-excel .custom-error-modal.show .custom-error-content {
    transform: scale(1) translateY(0);
}

.page-image-to-excel .custom-error-icon {
    width: 70px;
    height: 70px;
    background: #fef2f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border: 4px solid #fee2e2;
}

html.dark .page-image-to-excel .custom-error-icon {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

.page-image-to-excel .custom-error-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    font-family: var(--font-heading);
}

.page-image-to-excel .custom-error-content p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.5;
}

.page-image-to-excel .custom-error-content .btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border-radius: 10px;
}

/* ============================================
   DARK MODE
   ============================================ */
html.dark .page-image-to-excel .result-table th { background: #1e2a3f; color: #e2e8f0; }
html.dark .page-image-to-excel .result-table td { background: #151d2e; color: #f1f5f9; }
html.dark .page-image-to-excel .empty-state p, html.dark .page-image-to-excel .empty-state span { color: #94a3b8; }
html.dark .page-image-to-excel .content-section h2 { color: #f1f5f9; }
html.dark .page-image-to-excel .step { background: #1e293b; border-color: #334155; }
html.dark .page-image-to-excel .step h3 { color: #f1f5f9; }
html.dark .page-image-to-excel .step p { color: #cbd5e1; }
html.dark .page-image-to-excel .faq-list details { background: #1e293b; border-color: #334155; }
html.dark .page-image-to-excel .faq-list summary { color: #f1f5f9; }
html.dark .page-image-to-excel .faq-list p { color: #cbd5e1; }

/* ============================================
   🚀 ULTIMATE RESPONSIVE FIX (All Languages)
   ============================================ */
@media (max-width: 1024px) {
    .page-image-to-excel .ite-workspace { grid-template-columns: 1fr; gap: 1.5rem; }
    .page-image-to-excel .ite-upload-panel { position: static; }
    .page-image-to-excel .hero-subtitle { font-size: 1.6rem; }
}

@media (max-width: 768px) {
    .page-image-to-excel .hero-section { padding: 0.5rem 0; }
    .page-image-to-excel .hero-subtitle { font-size: 1.4rem; padding: 0 0.5rem; }
    .page-image-to-excel .privacy-badge { font-size: 0.75rem; padding: 0.3rem 0.7rem; }
    .page-image-to-excel .ite-workspace { gap: 1rem; }
    .page-image-to-excel .panel { padding: 1.25rem; }
    .page-image-to-excel .tab-btn { padding: 0.6rem 0.3rem; font-size: 0.8rem; }
    .page-image-to-excel .tab-btn svg { width: 16px; height: 16px; }
    .page-image-to-excel .btn { width: 100%; }
    .page-image-to-excel .url-input-group { flex-direction: column; }
    .page-image-to-excel .url-input-group .btn { width: 100%; margin-top: 0.5rem; }
    .page-image-to-excel .ocr-options { flex-direction: column; gap: 0.6rem; }
    .page-image-to-excel .table-stats { grid-template-columns: 1fr 1fr 1fr; gap: 0.3rem; }
    .page-image-to-excel .stat-card { padding: 0.4rem; font-size: 0.65rem; }
    .page-image-to-excel .action-buttons { grid-template-columns: 1fr; }
    .page-image-to-excel .steps-grid { grid-template-columns: 1fr; }
    .page-image-to-excel .content-section h2 { font-size: 1.25rem; }
}

@media (max-width: 480px) {
    .page-image-to-excel .hero-subtitle { font-size: 1.2rem; }
    .page-image-to-excel .panel { padding: 1rem; }
    .page-image-to-excel .tab-text { display: none; }
    .page-image-to-excel .drop-zone { padding: 1.5rem 0.5rem; }
    .page-image-to-excel .drop-message p { font-size: 0.85rem; }
    .page-image-to-excel .sub-text { font-size: 0.7rem; }
    .page-image-to-excel .table-stats { grid-template-columns: 1fr; }
    .page-image-to-excel .stat-card { flex-direction: row; justify-content: space-between; padding: 0.5rem 1rem; }
}

/* 4. RTL Support (Urdu & Arabic) */
html[lang="ur"] .page-image-to-excel .drop-zone,
html[lang="ar"] .page-image-to-excel .drop-zone,
html[lang="ur"] .page-image-to-excel .url-input-group,
html[lang="ar"] .page-image-to-excel .url-input-group { direction: rtl; }
html[lang="ur"] .page-image-to-excel .tab-btn,
html[lang="ar"] .page-image-to-excel .tab-btn { flex-direction: row-reverse; }

/* 5. Long Text Fix (Hindi, Tamil, Telugu, etc.) */
.page-image-to-excel .hero-subtitle,
.page-image-to-excel .step h3,
.page-image-to-excel .faq-list summary,
.page-image-to-excel .ocr-option span {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

html.dark .page-image-to-excel .drop-zone:hover, html.dark .page-image-to-excel .drop-zone.dragover {
    background: rgba(96, 165, 250, 0.08);
    border-color: #60a5fa;
}

.page-image-to-excel .formula-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-subtle);
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
}
.page-image-to-excel .formula-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}
.page-image-to-excel .formula-btn {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
}
.page-image-to-excel .formula-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
.page-image-to-excel .result-table td.cell-selected {
    background-color: #bfdbfe !important;
    border: 2px solid #2563eb !important;
    box-shadow: inset 0 0 0 1px #2563eb;
}
html.dark .page-image-to-excel .result-table td.cell-selected {
    background-color: #1e3a8a !important;
    border-color: #60a5fa !important;
}

.page-image-to-excel .formula-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fefce8;
    color: #854d0e;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 8px;
    border: 1px solid #fde047;
}
.page-image-to-excel .formula-hint svg {
    flex-shrink: 0;
    color: #ca8a04;
}
html.dark .page-image-to-excel .formula-hint {
    background: rgba(234, 179, 8, 0.15);
    color: #fde047;
    border-color: rgba(234, 179, 8, 0.3);
}

/* ============================================
   FILE SUMMARY & CLEAR ALL BUTTON
   ============================================ */
.page-image-to-excel .file-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding: 8px 12px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.page-image-to-excel .file-summary #fileSummaryText {
    font-weight: 600;
    color: var(--text-main);
    word-break: break-word;
}

.page-image-to-excel .clear-all {
    background: transparent;
    border: none;
    color: var(--danger);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.page-image-to-excel .clear-all:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

html.dark .page-image-to-excel .file-summary {
    background: #1e293b;
    border-color: #334155;
}

html.dark .page-image-to-excel .clear-all:hover {
    background: rgba(239, 68, 68, 0.2);
}

@media (max-width: 480px) {
    .page-image-to-excel .file-summary {
        font-size: 0.78rem;
        padding: 6px 10px;
    }
    .page-image-to-excel .clear-all {
        font-size: 0.75rem;
    }
}