/* =========================================================
   BRIOCOM SOLUTIONS
   EXCEL VIEWER & ANALYZER
   Premium Spreadsheet Interface
   ========================================================= */


/* =========================================================
   PAGE VARIABLES
   ========================================================= */

.excel-viewer-page {

    --ev-red: #d71920;
    --ev-red-dark: #b51218;
    --ev-red-soft: #fff1f2;

    --ev-black: #111111;
    --ev-dark: #1c1c1c;
    --ev-text: #252525;
    --ev-muted: #707070;

    --ev-white: #ffffff;

    --ev-border: #e5e7eb;
    --ev-border-dark: #d1d5db;

    --ev-surface: #f7f8fa;
    --ev-surface-2: #f1f3f5;

    --ev-green: #15803d;
    --ev-green-soft: #ecfdf3;

    --ev-blue: #2563eb;
    --ev-blue-soft: #eff6ff;

    --ev-yellow: #a16207;
    --ev-yellow-soft: #fefce8;

    --ev-shadow-sm:
        0 1px 2px rgba(0, 0, 0, 0.04);

    --ev-shadow:
        0 10px 30px rgba(0, 0, 0, 0.06);

    --ev-shadow-lg:
        0 20px 50px rgba(0, 0, 0, 0.09);

    --ev-radius-sm: 8px;
    --ev-radius: 14px;
    --ev-radius-lg: 20px;

    --ev-transition:
        180ms ease;

    width: 100%;
    min-height: 100vh;
    background: var(--ev-white);
    color: var(--ev-text);
}
/* =========================================================
   GENERAL RESET INSIDE PAGE
   ========================================================= */

.excel-viewer-page *,
.excel-viewer-page *::before,
.excel-viewer-page *::after {
    box-sizing: border-box;
}


.excel-viewer-page button,
.excel-viewer-page input,
.excel-viewer-page select {
    font: inherit;
}


.excel-viewer-page button {
    cursor: pointer;
}


/* =========================================================
   HERO SECTION
   ========================================================= */

.excel-hero {

    position: relative;

    width: 100%;

    padding:
        82px
        24px
        78px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #111111 0%,
            #191919 58%,
            #240b0d 100%
        );

    color: var(--ev-white);
}


.excel-hero::before {

    content: "";

    position: absolute;

    width: 420px;
    height: 420px;

    right: -160px;
    top: -180px;

    border-radius: 50%;

    border:
        1px solid
        rgba(255, 255, 255, 0.08);

    box-shadow:
        0 0 0 80px
        rgba(255, 255, 255, 0.015),
        0 0 0 160px
        rgba(255, 255, 255, 0.01);

    pointer-events: none;
}


.excel-hero::after {

    content: "";

    position: absolute;

    left: 0;
    bottom: 0;

    width: 100%;
    height: 4px;

    background: var(--ev-red);
}


.excel-hero-content {

    position: relative;

    z-index: 2;

    width: min(1180px, 100%);

    margin: 0 auto;
}


.excel-eyebrow {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 20px;

    padding:
        7px
        12px;

    border:
        1px solid
        rgba(255, 255, 255, 0.12);

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.05);

    color: #dddddd;

    font-size: 0.75rem;

    font-weight: 700;

    letter-spacing: 0.11em;

    text-transform: uppercase;
}


.excel-eyebrow::before {

    content: "";

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--ev-red);

    box-shadow:
        0 0 0 4px
        rgba(215, 25, 32, 0.12);
}


.excel-hero h1 {

    max-width: 780px;

    margin: 0;

    color: var(--ev-white);

    font-size:
        clamp(2.6rem, 6vw, 5.2rem);

    font-weight: 800;

    line-height: 0.98;

    letter-spacing: -0.045em;
}


.excel-hero h1 span {
    color: #e02a30;
}


.excel-hero p {

    max-width: 680px;

    margin:
        24px
        0
        0;

    color: #c7c7c7;

    font-size:
        clamp(1rem, 2vw, 1.16rem);

    line-height: 1.75;
}


.excel-hero-features {

    display: flex;

    flex-wrap: wrap;

    gap: 9px;

    margin-top: 30px;
}


.excel-hero-features span {

    display: inline-flex;

    align-items: center;

    min-height: 32px;

    padding:
        0
        12px;

    border:
        1px solid
        rgba(255, 255, 255, 0.11);

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.045);

    color: #dedede;

    font-size: 0.78rem;

    font-weight: 600;
}


/* =========================================================
   UPLOAD SECTION
   ========================================================= */

.excel-upload-section {

    width: min(1180px, calc(100% - 48px));

    margin:
        50px
        auto
        0;
}


.excel-upload-card {

    position: relative;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    min-height: 350px;

    padding:
        45px
        30px;

    border:
        1px dashed
        #cfd3d8;

    border-radius: var(--ev-radius-lg);

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fafafa 100%
        );

    text-align: center;

    box-shadow: var(--ev-shadow-sm);

    transition:
        border-color var(--ev-transition),
        background var(--ev-transition),
        box-shadow var(--ev-transition),
        transform var(--ev-transition);
}


.excel-upload-card:hover {

    border-color: #b9bdc2;

    box-shadow: var(--ev-shadow);
}


.excel-upload-card.drag-over {

    border-color: var(--ev-red);

    background: var(--ev-red-soft);

    box-shadow:
        0 0 0 4px
        rgba(215, 25, 32, 0.08);
}


.excel-upload-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 72px;
    height: 82px;

    margin-bottom: 22px;

    border:
        1px solid
        #dfe2e5;

    border-radius: 11px;

    background: var(--ev-white);

    color: var(--ev-red);

    font-size: 0.9rem;

    font-weight: 900;

    letter-spacing: -0.02em;

    box-shadow:
        0 8px 20px
        rgba(0, 0, 0, 0.06);

    transform: rotate(-2deg);
}


.excel-upload-icon::after {

    content: "";

    position: absolute;

    width: 72px;
    height: 82px;

    border:
        1px solid
        #eeeeee;

    border-radius: 11px;

    transform:
        translate(
            7px,
            5px
        )
        rotate(4deg);

    z-index: -1;
}


.excel-upload-card h2 {

    margin:
        0
        0
        10px;

    color: var(--ev-black);

    font-size: 1.55rem;

    font-weight: 750;

    letter-spacing: -0.025em;
}


.excel-upload-card > p {

    max-width: 550px;

    margin:
        0
        0
        24px;

    color: var(--ev-muted);

    line-height: 1.65;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.excel-upload-button,
.excel-primary-button,
.excel-secondary-button,
.excel-tool-button {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    border: 0;

    border-radius: var(--ev-radius-sm);

    font-weight: 700;

    transition:
        background var(--ev-transition),
        border-color var(--ev-transition),
        color var(--ev-transition),
        box-shadow var(--ev-transition),
        transform var(--ev-transition);
}


.excel-upload-button {

    min-height: 46px;

    padding:
        0
        22px;

    background: var(--ev-red);

    color: white;

    box-shadow:
        0 7px 18px
        rgba(215, 25, 32, 0.2);
}


.excel-upload-button:hover {

    background: var(--ev-red-dark);

    transform: translateY(-1px);

    box-shadow:
        0 10px 24px
        rgba(215, 25, 32, 0.24);
}


.excel-primary-button {

    min-height: 40px;

    padding:
        0
        16px;

    background: var(--ev-red);

    color: white;
}


.excel-primary-button:hover {

    background: var(--ev-red-dark);

    box-shadow:
        0 6px 15px
        rgba(215, 25, 32, 0.16);
}


.excel-secondary-button {

    min-height: 40px;

    padding:
        0
        15px;

    border:
        1px solid
        var(--ev-border);

    background: white;

    color: var(--ev-text);
}


.excel-secondary-button:hover {

    border-color: var(--ev-border-dark);

    background: var(--ev-surface);
}


.excel-tool-button {

    min-height: 42px;

    padding:
        0
        14px;

    border:
        1px solid
        var(--ev-border);

    background: white;

    color: var(--ev-text);

    white-space: nowrap;
}


.excel-tool-button:hover {

    border-color: var(--ev-border-dark);

    background: var(--ev-surface);
}


.excel-tool-button span {
    color: var(--ev-muted);
}


/* =========================================================
   UPLOAD HELP
   ========================================================= */

.excel-upload-help {

    display: flex;

    align-items: center;

    justify-content: center;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 19px;

    color: #8a8d91;

    font-size: 0.75rem;
}


.excel-upload-help strong {

    color: #555;

    font-weight: 700;
}


/* =========================================================
   ERROR MESSAGE
   ========================================================= */

.excel-message {

    display: flex;

    align-items: flex-start;

    gap: 13px;

    margin-top: 18px;

    padding: 16px 18px;

    border-radius: var(--ev-radius);

}


.excel-error-message {

    border:
        1px solid
        #fecaca;

    background:
        #fff7f7;

    color: #7f1d1d;
}


.message-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    flex: 0 0 auto;

    width: 27px;
    height: 27px;

    border-radius: 50%;

    background: #fee2e2;

    color: var(--ev-red);

    font-weight: 800;
}


.excel-error-message strong {

    display: block;

    margin-bottom: 3px;

    color: #991b1b;
}


.excel-error-message p {

    margin: 0;

    color: #7f1d1d;

    font-size: 0.87rem;

    line-height: 1.5;
}


/* =========================================================
   LOADING
   ========================================================= */

.excel-loading {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    min-height: 180px;

    padding: 30px;

    text-align: center;
}


.excel-spinner {

    width: 34px;
    height: 34px;

    margin-bottom: 15px;

    border:
        3px solid
        #ececec;

    border-top-color:
        var(--ev-red);

    border-radius: 50%;

    animation:
        excelSpin 0.8s linear infinite;
}


@keyframes excelSpin {

    to {
        transform: rotate(360deg);
    }

}


.excel-loading p {

    margin: 0;

    color: var(--ev-text);

    font-weight: 700;
}


.excel-loading span {

    margin-top: 5px;

    color: var(--ev-muted);

    font-size: 0.8rem;
}


/* =========================================================
   WORKBOOK SECTION
   ========================================================= */

.excel-workbook-section {

    width: min(1400px, calc(100% - 40px));

    margin:
        55px
        auto
        0;
}


/* =========================================================
   WORKBOOK HEADER
   ========================================================= */

.excel-workbook-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 25px;

    padding:
        22px
        24px;

    border:
        1px solid
        var(--ev-border);

    border-radius:
        var(--ev-radius-lg)
        var(--ev-radius-lg)
        0
        0;

    background: white;

    box-shadow: var(--ev-shadow-sm);
}


.excel-workbook-title-area {

    display: flex;

    align-items: center;

    gap: 14px;

    min-width: 0;
}


.excel-file-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    flex: 0 0 auto;

    width: 48px;
    height: 56px;

    border-radius: 9px;

    background: var(--ev-red-soft);

    color: var(--ev-red);

    font-size: 0.72rem;

    font-weight: 900;

    letter-spacing: 0.02em;
}


.excel-file-name-row {

    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 9px;
}


.excel-file-name-row h2 {

    max-width: 550px;

    margin: 0;

    overflow: hidden;

    color: var(--ev-black);

    font-size: 1.12rem;

    font-weight: 750;

    text-overflow: ellipsis;

    white-space: nowrap;
}


.excel-file-status {

    display: inline-flex;

    align-items: center;

    min-height: 24px;

    padding:
        0
        9px;

    border-radius: 999px;

    background: var(--ev-green-soft);

    color: var(--ev-green);

    font-size: 0.7rem;

    font-weight: 800;
}


.excel-workbook-meta {

    margin-top: 4px;

    color: var(--ev-muted);

    font-size: 0.78rem;
}


.excel-workbook-actions {

    display: flex;

    align-items: center;

    gap: 9px;

    flex-shrink: 0;
}


/* =========================================================
   STATISTICS
   ========================================================= */

.excel-stat-grid {

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 12px;

    padding:
        14px;

    border-right:
        1px solid
        var(--ev-border);

    border-left:
        1px solid
        var(--ev-border);

    background:
        #fafafa;
}


.excel-stat-card {

    display: flex;

    align-items: center;

    gap: 12px;

    min-height: 84px;

    padding:
        15px;

    border:
        1px solid
        var(--ev-border);

    border-radius: 12px;

    background: white;

    box-shadow: var(--ev-shadow-sm);
}


.excel-stat-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    flex: 0 0 auto;

    width: 38px;
    height: 38px;

    border-radius: 9px;

    background: var(--ev-surface);

    color: var(--ev-red);

    font-size: 0.95rem;

    font-weight: 800;
}


.excel-stat-card span {

    display: block;

    margin-bottom: 4px;

    color: var(--ev-muted);

    font-size: 0.72rem;

    font-weight: 600;
}


.excel-stat-card strong {

    display: block;

    color: var(--ev-black);

    font-size: 1.25rem;

    font-weight: 800;

    line-height: 1;
}


/* =========================================================
   TOOLBAR
   ========================================================= */

.excel-toolbar {

    display: flex;

    align-items: center;

    gap: 9px;

    padding:
        13px
        14px;

    border:
        1px solid
        var(--ev-border);

    border-top: 0;

    background: white;
}


.excel-search-box {

    position: relative;

    display: flex;

    align-items: center;

    flex: 1;

    min-width: 180px;

    max-width: 470px;
}


.excel-search-icon {

    position: absolute;

    left: 13px;

    color: #8b8f94;

    font-size: 1.05rem;

    pointer-events: none;
}


.excel-search-box input {

    width: 100%;

    height: 42px;

    padding:
        0
        40px;

    border:
        1px solid
        var(--ev-border);

    border-radius: var(--ev-radius-sm);

    outline: none;

    background: var(--ev-surface);

    color: var(--ev-text);

    font-size: 0.86rem;

    transition:
        border-color var(--ev-transition),
        box-shadow var(--ev-transition),
        background var(--ev-transition);
}


.excel-search-box input::placeholder {
    color: #999da2;
}


.excel-search-box input:focus {

    border-color:
        rgba(215, 25, 32, 0.5);

    background: white;

    box-shadow:
        0 0 0 3px
        rgba(215, 25, 32, 0.07);
}


.excel-search-clear {

    position: absolute;

    right: 7px;

    display: flex;

    align-items: center;

    justify-content: center;

    width: 28px;
    height: 28px;

    border: 0;

    border-radius: 50%;

    background: transparent;

    color: #777;

    font-size: 1.1rem;
}


.excel-search-clear:hover {
    background: #e9eaec;
}


/* =========================================================
   EXPORT DROPDOWN
   ========================================================= */

.excel-export-dropdown {

    position: relative;
}


.excel-export-menu {

    position: absolute;

    top: calc(100% + 7px);

    right: 0;

    z-index: 50;

    min-width: 190px;

    padding: 6px;

    border:
        1px solid
        var(--ev-border);

    border-radius: 11px;

    background: white;

    box-shadow: var(--ev-shadow-lg);
}


.excel-export-menu button {

    display: block;

    width: 100%;

    padding:
        10px
        11px;

    border: 0;

    border-radius: 7px;

    background: transparent;

    color: var(--ev-text);

    text-align: left;

    font-size: 0.82rem;

    font-weight: 600;
}


.excel-export-menu button:hover {

    background: var(--ev-surface);

    color: var(--ev-red);
}


/* =========================================================
   FILTER PANEL
   ========================================================= */

.excel-filter-panel,
.excel-analysis-panel {

    border:
        1px solid
        var(--ev-border);

    border-top: 0;

    background:
        #fafafa;
}


.excel-filter-header,
.excel-analysis-header {

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 20px;

    padding:
        20px
        22px;

    border-bottom:
        1px solid
        var(--ev-border);

    background: white;
}


.section-label {

    display: block;

    margin-bottom: 5px;

    color: var(--ev-red);

    font-size: 0.68rem;

    font-weight: 800;

    letter-spacing: 0.1em;

    text-transform: uppercase;
}


.excel-filter-header h3,
.excel-analysis-header h3 {

    margin: 0;

    color: var(--ev-black);

    font-size: 1.1rem;

    font-weight: 750;
}


.excel-panel-close {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 32px;
    height: 32px;

    border: 1px solid
        var(--ev-border);

    border-radius: 8px;

    background: white;

    color: #666;

    font-size: 1.2rem;

    line-height: 1;
}


.excel-panel-close:hover {

    background: var(--ev-surface);

    color: var(--ev-black);
}


.excel-filter-content {

    display: grid;

    grid-template-columns:
        1fr
        1fr
        1fr
        auto;

    align-items: end;

    gap: 12px;

    padding: 20px;
}


.excel-filter-field label {

    display: block;

    margin-bottom: 7px;

    color: #555;

    font-size: 0.74rem;

    font-weight: 700;
}


.excel-filter-field input,
.excel-filter-field select,
.excel-analysis-select {

    width: 100%;

    min-height: 42px;

    padding:
        0
        11px;

    border:
        1px solid
        var(--ev-border);

    border-radius: 8px;

    outline: none;

    background: white;

    color: var(--ev-text);

    font-size: 0.82rem;
}


.excel-filter-field input:focus,
.excel-filter-field select:focus,
.excel-analysis-select:focus {

    border-color:
        rgba(215, 25, 32, 0.45);

    box-shadow:
        0 0 0 3px
        rgba(215, 25, 32, 0.06);
}


.excel-filter-actions {

    display: flex;

    gap: 8px;
}


/* =========================================================
   ANALYSIS PANEL
   ========================================================= */

.excel-analysis-grid {

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 12px;

    padding: 18px 20px;
}


.excel-analysis-card {

    padding: 15px;

    border:
        1px solid
        var(--ev-border);

    border-radius: 11px;

    background: white;
}


.excel-analysis-card span {

    display: block;

    margin-bottom: 7px;

    color: var(--ev-muted);

    font-size: 0.72rem;

    font-weight: 600;
}


.excel-analysis-card strong {

    color: var(--ev-black);

    font-size: 1.2rem;

    font-weight: 800;
}


.excel-column-analysis {

    margin:
        0
        20px
        20px;

    padding: 18px;

    border:
        1px solid
        var(--ev-border);

    border-radius: 12px;

    background: white;
}


.excel-column-analysis-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 12px;
}


.excel-column-analysis-header h4 {

    margin: 0;

    color: var(--ev-black);

    font-size: 0.9rem;
}


.excel-column-analysis-header span {

    color: var(--ev-muted);

    font-size: 0.72rem;
}


.excel-analysis-select {

    max-width: 360px;
}


.excel-column-stats {

    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 9px;

    margin-top: 13px;
}


.excel-column-stats > div {

    padding:
        11px;

    border:
        1px solid
        var(--ev-border);

    border-radius: 8px;

    background: var(--ev-surface);
}


.excel-column-stats span {

    display: block;

    margin-bottom: 4px;

    color: var(--ev-muted);

    font-size: 0.67rem;
}


.excel-column-stats strong {

    color: var(--ev-black);

    font-size: 0.84rem;

    word-break: break-word;
}


/* =========================================================
   SPREADSHEET CARD
   ========================================================= */

.excel-spreadsheet-card {

    overflow: hidden;

    border:
        1px solid
        var(--ev-border);

    border-top: 0;

    background: white;

    box-shadow: var(--ev-shadow);
}


/* =========================================================
   FORMULA BAR
   ========================================================= */

.excel-formula-bar {

    display: flex;

    align-items: center;

    height: 44px;

    border-bottom:
        1px solid
        var(--ev-border);

    background:
        #fafafa;
}


.excel-name-box {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 76px;
    height: 100%;

    border-right:
        1px solid
        var(--ev-border);

    background: white;

    color: var(--ev-text);

    font-size: 0.75rem;

    font-weight: 700;
}


.excel-formula-symbol {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 48px;

    color: #8a8d91;

    font-family: Georgia, serif;

    font-size: 0.9rem;

    font-style: italic;

    font-weight: 700;
}


.excel-formula-value {

    flex: 1;

    min-width: 0;

    padding:
        0
        10px;

    overflow: hidden;

    color: #5d6064;

    font-size: 0.77rem;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* =========================================================
   TABLE WRAPPER
   ========================================================= */

.excel-table-wrapper {

    position: relative;

    width: 100%;

    max-height: 650px;

    overflow: auto;

    background: white;

    scrollbar-width: thin;

    scrollbar-color:
        #c8cbd0
        #f5f5f5;
}


.excel-table-wrapper::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}


.excel-table-wrapper::-webkit-scrollbar-track {
    background: #f5f5f5;
}


.excel-table-wrapper::-webkit-scrollbar-thumb {

    border:
        2px solid
        #f5f5f5;

    border-radius: 10px;

    background: #c8cbd0;
}


.excel-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #aeb2b7;
}


.excel-table-container {

    min-width: max-content;

    min-height: 300px;
}


/* =========================================================
   GENERATED SPREADSHEET TABLE
   ========================================================= */

.excel-table-container table {

    width: max-content;

    min-width: 100%;

    border-collapse: separate;

    border-spacing: 0;

    table-layout: auto;

    font-size: 0.78rem;
}


.excel-table-container th,
.excel-table-container td {

    min-width: 120px;

    max-width: 360px;

    height: 36px;

    padding:
        7px
        10px;

    border-right:
        1px solid
        #e6e7e9;

    border-bottom:
        1px solid
        #e6e7e9;

    color: #333;

    text-align: left;

    vertical-align: middle;

    white-space: nowrap;
}


.excel-table-container th {

    position: sticky;

    top: 0;

    z-index: 10;

    background:
        #f4f5f6;

    color: #36383b;

    font-size: 0.72rem;

    font-weight: 750;
}


.excel-table-container th:first-child {

    position: sticky;

    left: 0;

    z-index: 20;

    min-width: 48px;

    width: 48px;

    background: #eceeef;

    text-align: center;
}


.excel-table-container td:first-child {

    position: sticky;

    left: 0;

    z-index: 5;

    min-width: 48px;

    width: 48px;

    background: #f8f8f8;

    color: #888;

    text-align: center;

    font-size: 0.7rem;

    font-weight: 600;
}


.excel-table-container tbody tr:hover td {

    background:
        #fffafa;
}


.excel-table-container tbody tr:hover td:first-child {

    background:
        #f8eded;
}


.excel-table-container td.selected {

    position: relative;

    z-index: 4;

    outline:
        2px solid
        var(--ev-red);

    outline-offset: -2px;

    background:
        #fff7f7 !important;
}


.excel-table-container td.search-match {

    background:
        #fff4b8 !important;
}


.excel-table-container td.search-current {

    outline:
        2px solid
        #d97706;

    outline-offset: -2px;
}


/* =========================================================
   TABLE PLACEHOLDER
   ========================================================= */

.excel-table-placeholder {

    display: flex;

    align-items: center;

    justify-content: center;

    min-height: 300px;

    color: #888;

    font-size: 0.85rem;
}


/* =========================================================
   TABLE STATUS
   ========================================================= */

.excel-table-status {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    min-height: 38px;

    padding:
        0
        12px;

    border-top:
        1px solid
        var(--ev-border);

    background:
        #fafafa;

    color: #777;

    font-size: 0.7rem;
}


.excel-table-status-left {

    display: flex;

    align-items: center;

    gap: 9px;
}


.status-divider {
    color: #c4c5c7;
}


.excel-table-status-right {
    color: #666;

    font-weight: 600;
}


/* =========================================================
   SHEET TABS
   ========================================================= */

.excel-sheet-tabs {

    display: flex;

    align-items: flex-end;

    gap: 2px;

    min-height: 43px;

    padding:
        5px
        10px
        0;

    overflow-x: auto;

    border-top:
        1px solid
        var(--ev-border);

    background:
        #f1f2f3;

    scrollbar-width: thin;
}


.excel-sheet-tab {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 37px;

    max-width: 190px;

    padding:
        0
        15px;

    overflow: hidden;

    border:
        1px solid
        transparent;

    border-bottom: 0;

    border-radius:
        8px
        8px
        0
        0;

    background: transparent;

    color: #6b6e72;

    font-size: 0.74rem;

    font-weight: 650;

    text-overflow: ellipsis;

    white-space: nowrap;
}


.excel-sheet-tab:hover {

    background: #e8e9eb;

    color: var(--ev-text);
}


.excel-sheet-tab.active {

    border-color:
        var(--ev-border);

    background: white;

    color: var(--ev-red);

    box-shadow:
        0 -1px 0 white;
}


.excel-sheet-tab.active::before {

    content: "";

    width: 5px;
    height: 5px;

    margin-right: 7px;

    border-radius: 50%;

    background: var(--ev-red);
}


/* =========================================================
   SHORTCUTS
   ========================================================= */

.excel-shortcuts {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    flex-wrap: wrap;

    gap: 16px;

    padding:
        12px
        4px;

    color: #8a8d91;

    font-size: 0.7rem;
}


.excel-shortcuts > div {

    display: flex;

    align-items: center;

    gap: 5px;
}


.excel-shortcuts kbd {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 24px;
    height: 22px;

    padding:
        0
        5px;

    border:
        1px solid
        #d9dcdf;

    border-bottom-width: 2px;

    border-radius: 5px;

    background: white;

    color: #555;

    font-size: 0.65rem;

    font-weight: 700;
}


/* =========================================================
   INFORMATION SECTION
   ========================================================= */

.excel-information-section {

    width: min(1180px, calc(100% - 48px));

    margin:
        85px
        auto
        0;

    padding-bottom: 60px;
}


.excel-information-heading {

    max-width: 700px;

    margin-bottom: 30px;
}


.excel-information-heading h2 {

    margin:
        0
        0
        12px;

    color: var(--ev-black);

    font-size:
        clamp(1.7rem, 3vw, 2.4rem);

    font-weight: 800;

    letter-spacing: -0.035em;

    line-height: 1.1;
}


.excel-information-heading p {

    margin: 0;

    color: var(--ev-muted);

    line-height: 1.7;
}


/* =========================================================
   FEATURE GRID
   ========================================================= */

.excel-feature-grid {

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 14px;
}


.excel-feature-card {

    position: relative;

    min-height: 190px;

    padding:
        24px;

    overflow: hidden;

    border:
        1px solid
        var(--ev-border);

    border-radius: var(--ev-radius);

    background: white;

    box-shadow: var(--ev-shadow-sm);

    transition:
        transform var(--ev-transition),
        box-shadow var(--ev-transition),
        border-color var(--ev-transition);
}


.excel-feature-card:hover {

    transform: translateY(-3px);

    border-color:
        #d8dade;

    box-shadow: var(--ev-shadow);
}


.feature-number {

    margin-bottom: 28px;

    color: var(--ev-red);

    font-size: 0.68rem;

    font-weight: 850;

    letter-spacing: 0.1em;
}


.excel-feature-card h3 {

    margin:
        0
        9px;

    color: var(--ev-black);

    font-size: 1rem;

    font-weight: 750;
}


.excel-feature-card p {

    margin: 0;

    color: var(--ev-muted);

    font-size: 0.82rem;

    line-height: 1.65;
}


/* =========================================================
   PRIVACY NOTICE
   ========================================================= */

.excel-privacy-notice {

    display: flex;

    align-items: flex-start;

    gap: 14px;

    width: min(1180px, calc(100% - 48px));

    margin:
        0
        auto
        70px;

    padding:
        20px;

    border:
        1px solid
        #dcefe3;

    border-radius: var(--ev-radius);

    background:
        #f7fcf8;
}


.privacy-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    flex: 0 0 auto;

    width: 32px;
    height: 32px;

    border-radius: 50%;

    background:
        var(--ev-green-soft);

    color:
        var(--ev-green);

    font-size: 0.8rem;

    font-weight: 900;
}


.excel-privacy-notice strong {

    display: block;

    margin-bottom: 4px;

    color: #166534;

    font-size: 0.83rem;
}


.excel-privacy-notice p {

    margin: 0;

    color: #4b6353;

    font-size: 0.75rem;

    line-height: 1.6;
}


/* =========================================================
   FOCUS ACCESSIBILITY
   ========================================================= */

.excel-viewer-page
button:focus-visible,
.excel-viewer-page
input:focus-visible,
.excel-viewer-page
select:focus-visible {

    outline:
        3px solid
        rgba(215, 25, 32, 0.2);

    outline-offset: 2px;
}


/* =========================================================
   HIDDEN STATE
   ========================================================= */

.excel-viewer-page
[hidden] {

    display: none !important;
}


/* =========================================================
   RESPONSIVE — 1100px
   ========================================================= */

@media (max-width: 1100px) {

    .excel-feature-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .excel-filter-content {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .excel-filter-actions {

        grid-column: 1 / -1;

        justify-content: flex-end;
    }


    .excel-column-stats {

        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


/* =========================================================
   RESPONSIVE — 850px
   ========================================================= */

@media (max-width: 850px) {

    .excel-hero {

        padding:
            65px
            20px
            65px;
    }


    .excel-upload-section,
    .excel-information-section,
    .excel-privacy-notice {

        width:
            calc(100% - 32px);
    }


    .excel-workbook-section {

        width:
            calc(100% - 24px);
    }


    .excel-workbook-header {

        align-items: flex-start;

        flex-direction: column;
    }


    .excel-workbook-actions {

        width: 100%;
    }


    .excel-workbook-actions button {

        flex: 1;
    }


    .excel-stat-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .excel-toolbar {

        flex-wrap: wrap;
    }


    .excel-search-box {

        flex-basis: 100%;

        max-width: none;
    }


    .excel-analysis-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   RESPONSIVE — 650px
   ========================================================= */

@media (max-width: 650px) {

    .excel-hero {

        padding:
            52px
            17px
            55px;
    }


    .excel-hero h1 {

        font-size:
            clamp(2.35rem, 13vw, 3.7rem);
    }


    .excel-hero p {

        font-size: 0.92rem;

        line-height: 1.65;
    }


    .excel-hero-features {

        gap: 6px;
    }


    .excel-hero-features span {

        font-size: 0.68rem;
    }


    .excel-upload-section {

        margin-top: 30px;
    }


    .excel-upload-card {

        min-height: 310px;

        padding:
            35px
            20px;
    }


    .excel-upload-card h2 {

        font-size: 1.3rem;
    }


    .excel-upload-help {

        line-height: 1.7;
    }


    .excel-information-section {

        margin-top: 60px;
    }


    .excel-feature-grid {

        grid-template-columns:
            1fr;
    }


    .excel-filter-content {

        grid-template-columns:
            1fr;
    }


    .excel-filter-actions {

        grid-column: auto;

        justify-content: stretch;
    }


    .excel-filter-actions button {

        flex: 1;
    }


    .excel-analysis-grid {

        grid-template-columns:
            1fr 1fr;
    }


    .excel-column-stats {

        grid-template-columns:
            1fr 1fr;
    }


    .excel-column-analysis-header {

        align-items: flex-start;

        flex-direction: column;
    }


    .excel-analysis-select {

        max-width: none;
    }


    .excel-table-wrapper {

        max-height: 500px;
    }


    .excel-table-container th,
    .excel-table-container td {

        min-width: 105px;

        max-width: 250px;

        padding:
            6px
            8px;

        font-size: 0.72rem;
    }


    .excel-table-container th:first-child,
    .excel-table-container td:first-child {

        min-width: 42px;

        width: 42px;
    }


    .excel-formula-bar {

        height: 40px;
    }


    .excel-name-box {

        width: 60px;
    }


    .excel-formula-symbol {

        width: 38px;
    }


    .excel-shortcuts {

        justify-content: flex-start;
    }


    .excel-privacy-notice {

        margin-bottom: 45px;
    }

}


/* =========================================================
   RESPONSIVE — 480px
   ========================================================= */

@media (max-width: 480px) {

    .excel-upload-section,
    .excel-information-section,
    .excel-privacy-notice {

        width:
            calc(100% - 20px);
    }


    .excel-workbook-section {

        width:
            calc(100% - 12px);
    }


    .excel-workbook-header {

        padding:
            17px;
    }


    .excel-stat-grid {

        gap: 7px;

        padding: 8px;
    }


    .excel-stat-card {

        min-height: 72px;

        padding:
            10px;

        gap: 8px;
    }


    .excel-stat-icon {

        width: 31px;
        height: 31px;

        font-size: 0.75rem;
    }


    .excel-stat-card strong {

        font-size: 1rem;
    }


    .excel-stat-card span {

        font-size: 0.63rem;
    }


    .excel-toolbar {

        padding:
            9px;
    }


    .excel-tool-button {

        flex: 1;

        padding:
            0
            9px;

        font-size: 0.73rem;
    }


    .excel-export-dropdown {

        flex: 1;
    }


    .excel-export-dropdown > .excel-tool-button {

        width: 100%;
    }


    .excel-filter-header,
    .excel-analysis-header {

        padding:
            16px;
    }


    .excel-filter-content {

        padding:
            16px;
    }


    .excel-analysis-grid {

        padding:
            12px;

        gap: 7px;
    }


    .excel-analysis-card {

        padding:
            11px;
    }


    .excel-column-analysis {

        margin:
            0
            12px
            12px;

        padding:
            13px;
    }


    .excel-table-status {

        font-size: 0.62rem;
    }


    .excel-information-heading h2 {

        font-size: 1.65rem;
    }


    .excel-privacy-notice {

        padding:
            15px;
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .excel-viewer-page *,
    .excel-viewer-page *::before,
    .excel-viewer-page *::after {

        scroll-behavior: auto !important;

        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }

}

/* =========================================================
   QUICKTRACK — BACK TO DASHBOARD BUTTON
   Responsive | Red, Black & White
   ========================================================= */

.excel-dashboard-navigation {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 22px 5% 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
}

.excel-dashboard-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    min-height: 44px;
    padding: 11px 18px;

    color: #ffffff;
    background: #111111;
    border: 1px solid #383838;
    border-radius: 9px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.4;

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.excel-dashboard-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 25px;
    height: 25px;

    color: #ffffff;
    background: #d71920;
    border-radius: 6px;

    font-size: 19px;
    line-height: 1;
    transition: transform 0.25s ease;
}

.excel-dashboard-button:hover {
    color: #ffffff;
    background: #1c1c1c;
    border-color: #d71920;
    box-shadow: 0 5px 20px rgba(215, 25, 32, 0.16);
    transform: translateY(-2px);
}

.excel-dashboard-button:hover .excel-dashboard-arrow {
    transform: translateX(-3px);
}

.excel-dashboard-button:focus-visible {
    outline: 2px solid #ff4545;
    outline-offset: 4px;
}

.excel-dashboard-button:active {
    transform: translateY(0);
}

/* Tablet */
@media (max-width: 768px) {
    .excel-dashboard-navigation {
        padding: 18px 20px 0;
    }

    .excel-dashboard-button {
        min-height: 43px;
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .excel-dashboard-navigation {
        padding: 14px 15px 0;
    }

    .excel-dashboard-button {
        gap: 8px;
        min-height: 42px;
        padding: 9px 12px;
        font-size: 12px;
        border-radius: 8px;
    }

    .excel-dashboard-arrow {
        width: 23px;
        height: 23px;
        font-size: 17px;
    }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .excel-dashboard-button,
    .excel-dashboard-arrow {
        transition: none;
    }

    .excel-dashboard-button:hover {
        transform: none;
    }
}

