/* ==========================================================================
   EXCEL TO TALLY XML ADVANCED TOOL SPECIFIC STYLES
   ========================================================================== */

:root {
    --excel-green: #107c41;
    --excel-green-hover: #0b5931;
    --tally-teal: #008080;
    --border-light: #dfe1e6;
    --text-dark: #172b4d;
    --text-muted: #6b778c;
    --bg-light: #f4f5f7;
    --shadow-sm: 0 2px 4px rgba(9, 30, 66, 0.04);
    --shadow-md: 0 4px 12px rgba(9, 30, 66, 0.08);
}

/* Main Structural Grid Wrapper */
.main-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 20px;
    align-items: start;
}

/* Sidebar Styling Component */
.readme-sidebar {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.readme-sidebar h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.instruction-list {
    list-style: none;
    margin-bottom: 20px;
}

.instruction-list li {
    font-size: 0.9rem;
    color: #42526e;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-light);
    line-height: 1.4;
}

.instruction-list li strong {
    color: var(--text-dark);
}

.sidebar-note {
    background: #fff9e6;
    border-left: 4px solid #ffab00;
    padding: 12px;
    border-radius: 0 6px 6px 0;
    font-size: 0.85rem;
    color: #5e6c84;
    line-height: 1.4;
}

/* Tool Workspace Content Area */
.tool-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.tool-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.tool-header p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 5px;
}

/* Configuration Control Panel Card */
.config-panel {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

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

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input[type="file"],
.form-group input[type="number"],
.form-group select {
    padding: 10px 12px;
    font-size: 0.95rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: #ffffff;
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--excel-green);
}

.form-group input[type="file"] {
    background: var(--bg-light);
    cursor: pointer;
}

/* Global Functional Button Rules Override */
.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    background-color: var(--excel-green);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.btn-block:hover {
    background-color: var(--excel-green-hover);
}

/* Live Mapping Data Preview Area */
#previewArea {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#previewArea h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* High Performance Table Scroll Wrapper */
.table-scroll-container {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: #ffffff;
}

table#dataPreview {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

table#dataPreview th {
    background: var(--bg-light);
    color: var(--text-dark);
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-light);
    white-space: nowrap;
}

table#dataPreview td {
    padding: 12px 16px;
    color: #42526e;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}

table#dataPreview tr:hover {
    background: #fafbfc;
}

.download-action-btn {
    padding: 14px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    background-color: var(--tally-teal);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    align-self: flex-end;
    transition: background-color 0.2s;
}

/* Status Alert Communication Boxes */
.status-box {
    padding: 15px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.4;
}

.status-box.success {
    background: #eaf6ed;
    color: #107c41;
    border: 1px solid #abf5d1;
}

.status-box.error {
    background: #fdeaea;
    color: #e52521;
    border: 1px solid #ffbdad;
}

.status-box.waiting {
    background: #f4f5f7;
    color: #42526e;
    border: 1px solid var(--border-light);
}

/* Layout Utilities Mask Controls */
.hidden-element {
    display: none !important;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS CONFIGURATIONS
   ========================================================================== */

@media (max-width: 992px) {
    .main-wrapper {
        grid-template-columns: 1fr;
        gap: 25px;
        margin: 20px auto;
    }
}

@media (max-width: 640px) {
    .input-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .config-panel, #previewArea {
        padding: 20px;
    }
    .download-action-btn {
        width: 100%;
    }
}
