﻿html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100dvh;
    display: flex;
    justify-content: center; /* ✅ center horizontally */
    align-items: center; /* ✅ center vertically */
    background-color: white;
    overflow: auto;
}

.container, .navbar, .footer {
       display: none;
}

.main-container {
    display: grid;
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    box-sizing: border-box;
    /* ✅ Force it to behave like a centered block */
    margin: 0 auto;
    align-self: center;
    justify-self: center;
    padding: 10px;
}

.app-icon {
    width:80%;
    height: 80%;
    /*max-width: 150px;
    max-height: 148px;*/ /* adjust based on your layout */
    object-fit: contain;
}

.main-grid {
    display: grid;
    width: 100vw;
    height: auto;
    min-height: 0;
    overflow: auto;
    grid-template-columns: 350px 1fr !important;
    grid-template-rows: 150px auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.icon-cell, .header-cell {
    background-color: black;
    border-bottom: 1px solid #ccc;
}

.icon-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #ccc;
}

.header-cell {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Push left/right */
    background-color: whitesmoke;
    padding: 10px 20px;
    border-bottom: 1px solid #ccc;
}

    /* Style the text box */
    .header-cell input[type="text"] {
        flex: 1;
        margin-right: 10px;
        padding: 8px;
        font-size: 1rem;
        background-color: whitesmoke;
        border: none;
        border-radius: 4px;
    }


button {
    background-color: #2c2c2c !important; /* dark gray */
    border: 1px solid #555 !important; /* subtle border */
    color: #f0f0f0 !important; /* light text for contrast */
    font-size: 16px; /* smaller text & emoji size */
    padding: 2px 6px;
    margin: 2px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s !important;
}

    button:hover {
        background-color: #444 !important; /* slightly lighter on hover */
    }

    button:disabled {
        background-color: #555;
        color: #999;
        cursor: not-allowed;
    }

.fade {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

    .fade.show {
        opacity: 1;
    }

.chart-controls {
    background-color: #1f1f1f;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 6px 10px; /* smaller padding */
    margin: 6px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px; /* smaller gap */
    font-size: 14px; /* more compact text */
}

    .chart-controls label {
        font-weight: bold;
        color: #f0f0f0;
    }

    .chart-controls select {
        background-color: #2c2c2c;
        color: #f0f0f0;
        border: 1px solid #555;
        border-radius: 4px;
        padding: 2px 6px; /* smaller select padding */
        font-size: 14px;
    }

#alertConditionZone {
    margin-top: 10px;
}


#saveChartBtn {
    display: none;
}

  .list-cell {
    padding: 10px;
    overflow-y: auto;
    border-right: 1px solid #ccc;
    background-color: whitesmoke;
}

.draggable-field {
    border: 1px solid #ddd;
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 8px;
    margin: 4px;
    text-align: center;
    cursor: grab;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, background-color 0.2s;
}

    .draggable-field:hover {
        background-color: #e0e0e0;
        transform: scale(1.03);
    }

.field-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 5 columns */
    gap: 8px;
    margin-top: 10px;
}

#aiFieldBox {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.sql-results-box {
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.ai-field-item {
    background-color: #f0f0f0;
    border-radius: 8px;
    padding: 6px 10px;
    text-align: center;
    cursor: default; /* no drag */
    border: 1px solid #ddd;
}

.ai-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95em;
    box-sizing: border-box;
}

.ai-button {
    padding: 8px 16px;
    background-color: #0078d4;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    .ai-button:hover {
        background-color: #005a9e;
    }

.ai-response-box {
    white-space: pre-wrap;
    background: #f8f9fa;
    border: 1px solid #ccc;
    padding: 10px;
    max-height: 150px;
    overflow-y: auto;
    border-radius: 6px;
    margin-top: 15px;
}

#aiPromptInput {
    font-size: 1em;
}

#aiResponseBox {
    font-size: 1em;
}

#aiFieldBox {
    font-size: 1em;
}

.dropzone {
    background: #f0f0f0;
}


.firm-id-box {
    width: 100%;
    margin-bottom: 10px;
    padding: 6px;
    font-size: 0.95rem;
    font-weight: bold;
    background-color: whitesmoke; /* matches layout */
    border: 1px solid whitesmoke; /* ✅ blended border */
    border-radius: 4px;
    text-align: center;
    color: #333;
}

.report-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.report-list a {
    color: #007bff;
    text-decoration: none;
}

.section-header {
    font-weight: bold;
    text-transform: uppercase;
    margin-top: 10px;
    padding-left: 0; /* 🔄 No indent */
    color: #333;
    cursor: default;
}

.report-item {
    padding-left: 20px;
    margin-bottom: 6px;
}

    .report-item a {
        text-decoration: none;
        color: #007bff;
    }

.report-item a:hover {
    text-decoration: underline;
}


.report-title-stack {
    display: flex;
    flex-direction: column;
    flex: 1;
    margin-right: 10px;
}

    .report-title-stack input[type="text"] {
        padding: 8px;
        font-size: 1rem;
        background-color: whitesmoke;
        border: none;
        border-radius: 4px;
    }

table.table-sm td, table.table-sm th {
    font-size: 0.85em;
    padding: 4px 6px;
}

#lastRefresh {
    font-size: 0.85rem;
    color: gray;
    padding-top: 2px;
}

.iframe-cell {
    overflow: auto;
    min-height: 0;
    background-color: white;
    border: none;
}

    .iframe-cell #reportContainer {
        width: 100%;
        height: 100%;
        border: none;
    }

#sqlResultsBox canvas {
    width: 100% !important;
    height: 400px !important;
    max-width: 800px;
    margin: 0 auto;
    display: block;
}

