/* --- GLOBAL FONT --- */
body {
    font-family: 'Lato', sans-serif;
}


*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
*::-webkit-scrollbar-track {
    background: transparent;
}
*::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.drag-icon {
    height: 32px;
}

/* --- COLORS & GRADIENTS --- */
.text-primary { color: #001B71; }
.bg-primary { background-color: #001B71; }

.btn-primary {
    background: linear-gradient(to bottom, #5ABD4E, #4CAF42);
    box-shadow: 0 4px 6px -1px rgba(90, 189, 78, 0.4);
    transition: all 0.2s ease;
}
.btn-primary:hover {
    background: linear-gradient(to bottom, #4CAF42, #439a3a);
    transform: translateY(-1px);
    box-shadow: 0 6px 10px -1px rgba(90, 189, 78, 0.5);
}

/* --- GLOSSY ROUNDED CARDS --- */
.dashboard-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 20px;
    box-shadow:
            0 10px 15px -3px rgba(0, 0, 0, 0.05),
            0 4px 6px -2px rgba(0, 0, 0, 0.025),
            inset 0 0 0 1px rgba(255,255,255,0.5); /* Inner highlight */
    overflow: hidden;
    position: relative;
    border: 2px solid #f0f4f8;
}

/* --- DRAG HANDLE --- */
.drag-handle {
    cursor: grab;
    padding: 12px 16px;
    background: linear-gradient(to bottom, #ffffff, #f9fafb);
    border-bottom: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}
.drag-handle:active { cursor: grabbing; }

/* --- AG GRID --- */
#rateGrid {
    height: 100%;
    width: 100%;
    --ag-borders: none;
    --ag-header-background-color: #f8fafc;
    --ag-row-hover-color: #f1f5f9;
    font-family: 'Lato', sans-serif;
}

.ag-header-cell-label {
    font-weight: 700;
    color: #475569;
}

.ag-row {
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.ag-row-even {
    background-color: #f4f3f3;
}

.ag-row.active {
    background: #e0f2fe !important;
    color: #001B71;
    font-weight: 700;
}

/* --- GRID STACK OVERRIDES --- */
.grid-stack-item-content {
    background: transparent !important;
    inset: 8px !important;
}

/* --- CHART --- */
.chart-container {
    flex-grow: 1;
    min-height: 0;
    position: relative;
    padding: 10px;
}
canvas { width: 100% !important; height: 100% !important; }

/* --- subscription --- */
.subscription-section-body {
    overflow: auto;
}

/* --- TABS --- */
.tab-btn {
    transition: all 0.2s;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
}

/* --- INPUTS --- */
input[type="text"], input[type="email"] {
    background-color: #f8fafc;
}
input:focus {
    background-color: #fff;
    border-color: #001B71;
    box-shadow: 0 0 0 3px rgba(0, 27, 113, 0.1);
}

/* --- ASK DL SPECIFIC --- */
#chatHistory {
    /*height: calc(100% - 160px);*/
    height: 300px;
}

#ai-tabs-body-container.inactive {
    max-height: 200px;
    height: 100%;
    overflow-y: auto;
}

#ai-tabs-body-container .ai-tabs-body.hidden {
    display: none;
}

.gs-id-0 > .grid-stack-item > .ui-resizable-se {
    right: 15px !important;
    bottom: 15px !important;
}

.border-primary {
    border-color: #001B71;
}

.formatted-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    max-width: 800px;
    color: #333;
}

.info-card {
    display: flex;
    background: #f9f9f9;
    border-left: 4px solid #001B71;
    margin: 15px 0;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.badge {
    background: #001B71;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    font-weight: bold;
}

.card-content strong {
    display: block;
    margin-bottom: 5px;
    color: #001B71;
}

#chatHistory p {
    margin-bottom: 10px;
}

#chatHistory li {
    margin-bottom: 10px;
}

#chatHistory table {
    margin: 10px 0;
}

#chatHistory thead tr, #chatHistory th {
    background: #001B71 !important;
    color: #fff !important;
}

#chatHistory strong, #chatHistory b {
    color: #001B71;
}

#chatHistory iframe {
    height: 100%;
    width: 100%;
}

#chatHistory div.video-container {
    width: 215px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    margin-right: 15px;
    flex-shrink: 0;
    overflow: clip;
}

#chatHistory input {
    margin-top: 5px;
    border-radius: 8px;
    padding: 10px;
    font-family: 'Lato', sans-serif;
    color: #252733;
    width: 100%;
    border: 1px solid #C5C7CD;
    background-color: #FCFDFE;
    display: block;
}

.drop-down-main select {
    width: 100%;
    padding: 11px 10px;
    border: 1px solid #C5C7CD;
    background-color: #FCFDFE;
    border-radius: 8px;
    outline: unset;
    font-size: 16px;
    font-family: 'Lato', sans-serif;
    color: #252733;
    appearance: none;
    background-image: url(../imgs/select-bg.svg);
    background-repeat: no-repeat;
    background-position: 95%;
}

@media (max-width: 640px) {
    .ag-header-cell-label {
        white-space: normal;
        word-break: break-word; /* Helps with very long words */
    }

    .ag-spanned-cell-wrapper .ag-cell {
        white-space: normal;
        word-break: break-word; /* Helps with very long words */
    }
}