/* Tool-specific styles only - base styles are in tool-layout.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0a0a0a;
    color: #e5e7eb;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #141414;
    border-bottom: 1px solid #374151;
    z-index: 100;
}

    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

    margin-top: 60px;
    padding: 48px 24px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    max-width: 720px;
    margin: 0 auto;
}

.tool-main {
    flex: 1;
    padding: 32px 24px 120px;
}

.tool-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.file-upload-zone {
    background-color: #0a0a0a;
    border: 2px dashed #374151;
    border-radius: 12px;
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 150ms ease;
    position: relative;
    outline: none;
}

.file-upload-zone.has-error {
    border-color: #dc2626;
    background-color: #7f1d1d;
}

.file-upload-zone.has-file {
    border-style: solid;
    border-color: #374151;
    padding: 24px;
}

.upload-icon {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    opacity: 0.7;
    color: #6b7280;
    letter-spacing: 2px;
}

.upload-primary {
    font-size: 16px;
    font-weight: 400;
    color: #e5e7eb;
    margin-bottom: 4px;
}

.upload-secondary {
    font-size: 14px;
    font-weight: 400;
    color: #9ca3af;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
}

.file-name {
    font-size: 15px;
    font-weight: 500;
    color: #e5e7eb;
    word-break: break-all;
}

.file-meta {
    font-size: 13px;
    color: #9ca3af;
    white-space: nowrap;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
}

.settings-title {
    font-size: 18px;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 4px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.setting-item > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.setting-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.select-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.select-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.select-input option {
    background-color: #1a1a1a;
}

.modal-hidden {
    display: none;
}

.progress-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
}

.progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.progress-label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background-color: #1a1a1a;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #6366f1;
    border-radius: 2px;
    width: 0%;
    transition: width 200ms ease;
}

.progress-page {
    font-size: 13px;
    color: #9ca3af;
}

.error-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.error-text {
    font-size: 14px;
    color: #fca5a5;
    flex: 1;
}

.error-dismiss {
    background: none;
    border: none;
    color: #fca5a5;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 150ms ease;
    flex-shrink: 0;
}

.error-dismiss:hover {
    color: #ffffff;
}

.output-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.summary-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.summary-stat {
    font-size: 14px;
    color: #9ca3af;
}

.summary-stat strong {
    color: #ffffff;
    font-weight: 600;
}

.summary-separator {
    font-size: 14px;
    color: #374151;
}

.table-selector {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.table-selector::-webkit-scrollbar {
    height: 4px;
}

.table-selector::-webkit-scrollbar-track {
    background: transparent;
}

.table-selector::-webkit-scrollbar-thumb {
    background-color: #374151;
    border-radius: 2px;
}

.table-tab {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #9ca3af;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.table-tab:hover {
    background-color: #374151;
    color: #e5e7eb;
}

.table-tab.active {
    background-color: #6366f1;
    border-color: #6366f1;
    color: #ffffff;
}

.table-tab .lock-icon {
    font-size: 11px;
    opacity: 0.7;
}

.table-preview-container {
    background-color: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
}

.table-scroll {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 400px;
    -webkit-overflow-scrolling: touch;
}

.table-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-scroll::-webkit-scrollbar-track {
    background: #0a0a0a;
}

.table-scroll::-webkit-scrollbar-thumb {
    background-color: #374151;
    border-radius: 3px;
}

.table-scroll::-webkit-scrollbar-corner {
    background: #0a0a0a;
}

.table-preview {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table-preview thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.table-preview th {
    background-color: #1a1a1a;
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid #6366f1;
    white-space: nowrap;
}

.table-preview th .col-type-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    color: #9ca3af;
    background-color: #2a2a2a;
    border: 1px solid #374151;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    vertical-align: middle;
}

.table-preview th .type-override {
    display: block;
    margin-top: 4px;
    background-color: #141414;
    border: 1px solid #374151;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 400;
    font-family: inherit;
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.table-preview th .type-override:focus {
    border-color: #6366f1;
}

.table-preview td {
    padding: 8px 12px;
    color: #e5e7eb;
    border-bottom: 1px solid #2a2a2a;
    white-space: nowrap;
}

.table-preview tbody tr:nth-child(odd) {
    background-color: #141414;
}

.table-preview tbody tr:nth-child(even) {
    background-color: #1a1a1a;
}

.table-preview tbody tr:hover {
    background-color: #222222;
}

.table-preview td.col-number,
.table-preview td.col-currency,
.table-preview td.col-percentage {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    text-align: right;
}

.row-count {
    font-size: 13px;
    color: #9ca3af;
}

.button-primary {
    background-color: #6366f1;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-secondary {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-download {
    background-color: #059669;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.button-xlsx {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
}

.button-xlsx:hover {
    background-color: #374151;
}

.pro-badge {
    color: #0a0a0a;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.pro-feature {
    position: relative;
    opacity: 0.6;
}

.pro-feature.unlocked {
    opacity: 1;
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.batch-section {
    padding: 24px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.batch-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.batch-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 6px;
}

.batch-item-icon {
    width: 36px;
    height: 36px;
    background-color: #2a2a2a;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.batch-item-info {
    flex: 1;
    min-width: 0;
}

.batch-item-name {
    font-size: 13px;
    color: #e5e7eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.batch-item-size {
    font-size: 12px;
    color: #9ca3af;
}

.batch-item-remove {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: color 150ms ease;
}

.batch-item-remove:hover {
    color: #ef4444;
}

.batch-item-status {
    font-size: 12px;
    font-weight: 500;
}

.batch-item-status.done {
    color: #10b981;
}

.batch-item-status.pending {
    color: #9ca3af;
}

.batch-item-status.error {
    color: #ef4444;
}

.batch-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid #374151;
    padding-top: 24px;
}

.batch-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.batch-tabs::-webkit-scrollbar {
    height: 4px;
}

.batch-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.batch-tabs::-webkit-scrollbar-thumb {
    background-color: #374151;
    border-radius: 2px;
}

.batch-tab {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #9ca3af;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.batch-tab:hover {
    background-color: #374151;
    color: #e5e7eb;
}

.batch-tab.active {
    background-color: #6366f1;
    border-color: #6366f1;
    color: #ffffff;
}

.batch-tab.error {
    border-color: #dc2626;
    color: #fca5a5;
}

.batch-download-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pro-cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.pro-cta-text {
    font-size: 14px;
    color: #d1d5db;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.modal-overlay.modal-hidden {
    display: none;
}

.modal-overlay.modal-visible {
    display: flex;
}

.modal {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 0;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #e5e7eb;
}

.modal-content {
    padding: 24px;
}

.pro-features-list {
    margin-bottom: 24px;
}

.pro-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.feature-check {
    width: 20px;
    height: 20px;
    background-color: #059669;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.feature-text {
    font-size: 15px;
    color: #e5e7eb;
}

.modal-cta {
    width: 100%;
    display: block;
}

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 300;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.footer {
    background-color: #0a0a0a;
    border-top: 1px solid #374151;
    padding: 32px 24px;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
    color: #6b7280;
}

.error-message {
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

.success-message {
    background-color: #064e3b;
    border: 1px solid #059669;
    color: #6ee7b7;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #374151;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
        padding: 32px 16px;
    }

        font-size: 28px;
        line-height: 36px;
    }

        font-size: 14px;
    }

    .tool-main {
        padding: 24px 16px 100px;
    }

    .tool-container {
        gap: 32px;
    }

    .settings-group {
        padding: 16px;
    }

    .output-section {
        padding: 16px;
    }

    .file-upload-zone {
        padding: 32px 16px;
    }

    .table-preview th,
    .table-preview td {
        padding: 6px 8px;
        font-size: 12px;
    }

    .pro-cta-content {
        flex-direction: column;
        gap: 10px;
    }

        padding: 0 16px;
    }

    .button-primary,
    .button-secondary {
        width: 100%;
    }

    .batch-section {
        padding: 16px;
    }

    .progress-section {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .summary-bar {
        flex-direction: column;
        gap: 4px;
    }

    .summary-separator {
        display: none;
    }

    .batch-item {
        flex-wrap: wrap;
    }
}