/* Dashboard shell, display controls, data controls, and shared page layout. */

.main-content {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
}

.app-shell {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-shell {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: row;
    overflow: hidden;
}

.dashboard-shell {
    --card-bg-agent: #FFFFFF;
    min-height: 100%;
    background: var(--page-bg-agent);
    padding: 16px;
    color: var(--text-color-primary);
}

.dashboard-shell.dashboard-authenticated {
    background:
        radial-gradient(
            ellipse 25% 25% at 100% 0%,
            rgba(22, 127, 229, 0.20) 0%,
            rgba(22, 127, 229, 0.11) 42%,
            rgba(22, 127, 229, 0.04) 72%,
            rgba(22, 127, 229, 0) 100%
        ),
        var(--page-bg-agent);
}

.dashboard-top-grid {
    display: grid;
    grid-template-columns: minmax(680px, 2fr) minmax(360px, 1fr);
    gap: var(--card-gap);
    align-items: stretch;
    margin-bottom: var(--card-gap);
}

.dashboard-eyebrow {
    margin-bottom: 12px;
    color: var(--edm-accent-blue-dark);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.dashboard-context-primary {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 18px;
}

.dashboard-context-primary .dashboard-eyebrow {
    margin-bottom: 0;
    white-space: nowrap;
}

.dashboard-view-switch {
    min-height: 38px;
    padding: 3px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border: 1px solid rgba(22, 127, 229, 0.16);
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: 0 4px 14px rgba(35, 60, 90, 0.07);
}

.dashboard-view-switch[hidden] {
    display: none !important;
}

.dashboard-view-mode-button {
    min-height: 30px;
    padding: 5px 13px;
    border: 0;
    border-radius: 7px;
    color: var(--text-color-secondary);
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transition: color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.dashboard-view-mode-button:hover {
    color: var(--edm-accent-dark);
    background: var(--edm-background-accent);
}

.dashboard-view-mode-button:focus-visible {
    outline: 2px solid rgba(137, 177, 87, 0.32);
    outline-offset: 2px;
}

.dashboard-view-mode-button.active {
    color: #FFFFFF;
    background: var(--edm-accent);
    box-shadow: 0 4px 10px rgba(137, 177, 87, 0.22);
}

.dashboard-overview-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--card-gap);
}

.dashboard-overview-column > .overview-summary-card {
    height: auto;
    flex: 1;
}

.dashboard-expanded-layout {
    min-height: 0;
    flex: 1;
}

.dashboard-expanded-overview {
    height: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--card-gap);
}

.expanded-overview-card,
.dashboard-expanded-agent-card {
    height: 100%;
}

.expanded-overview-card {
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.expanded-overview-card .agent-card-header {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 20px;
}

.expanded-overview-card .agent-card-title {
    font-size: 18px;
}

.expanded-overview-value {
    align-self: flex-start;

}

.expanded-overview-meta {
    margin-top: auto;
    padding-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.expanded-overview-meta .agent-meta-row {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
}

.expanded-overview-meta .agent-meta-label {
    min-width: 0;
    font-size: 16px;
    line-height: 1.3;
}

.expanded-overview-meta .agent-pill {
    width: 100%;
    padding: 9px 18px;
    overflow: hidden;
    font-size: 18px;
    text-overflow: ellipsis;
}

.expanded-overview-value > *,
.expanded-overview-meta .agent-pill > * {
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
}

.dashboard-expanded-agent-card {
    padding: var(--card-padding);
    flex-direction: column;
    justify-content: flex-start;
}

.dashboard-expanded-agent-card .agent-card-content {
    min-width: 0;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    align-items: center;
}

.dashboard-expanded-agent-card .agent-meta-stack,
.dashboard-expanded-agent-card .battery-main-row {
    min-width: 0;
}

#dashboard-expanded-agent-ess .agent-card-content {
    display: block;
}

#dashboard-expanded-agent-ess .battery-main-row {
    height: 100%;
}

.dashboard-shell.select-data-expanded .dashboard-overview-column > .overview-summary-card {
    flex: 0 0 auto;
}

.dashboard-shell.select-data-expanded .agent-page-grid {
    grid-template-columns: 1fr;
}

.dashboard-shell.select-data-expanded .agent-page-grid .agent-context-card {
    display: none;
}

.dashboard-shell.select-data-expanded-workload,
.dashboard-shell.select-data-expanded-ess {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dashboard-shell.select-data-expanded-workload .dashboard-top-grid,
.dashboard-shell.select-data-expanded-ess .dashboard-top-grid {
    flex: 0 0 auto;
}

.dashboard-shell.select-data-expanded-workload .dashboard-pages-shell,
.dashboard-shell.select-data-expanded-ess .dashboard-pages-shell {
    min-height: 0;
    flex: 1 1 auto;
}

.dashboard-shell.select-data-expanded #dashboard-page-agent-workload,
.dashboard-shell.select-data-expanded #dashboard-page-agent-ess {
    width: 100%;
    height: 100%;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
}

.dashboard-shell.select-data-expanded #dashboard-page-agent-workload > .graph-card,
.dashboard-shell.select-data-expanded #dashboard-page-agent-ess > .graph-card {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.dashboard-shell.select-data-expanded #dashboard-page-agent-workload .agent-graph,
.dashboard-shell.select-data-expanded #dashboard-page-agent-ess .agent-graph {
    height: auto !important;
    min-height: 0;
    flex: 1 1 0;
    overflow: hidden;
}

.dashboard-context-bar {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    margin-bottom: var(--card-gap);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.dashboard-context-title {
    margin: 0;
    color: var(--text-color-primary);
    font-size: 24px;
    font-weight: 500;
    line-height: 1.2;
}

.dashboard-account-info {
    width: fit-content;
    height: 42px;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 0;
    background: transparent;
    white-space: nowrap;
}

.dashboard-account-label {
    color: var(--edm-text-subtitle);
    font-size: 14px;
    font-weight: 500;
}

.dashboard-account-value {
    max-width: 240px;
    overflow: hidden;
    color: var(--edm-text-body);
    font-size: 15px;
    font-weight: 600;
    text-overflow: ellipsis;
}

.dashboard-controls-card {
    background: var(--card-bg-agent);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 22px 24px;
    margin-bottom: 0;
    height: 100%;
}

.dashboard-controls-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.dashboard-start-button-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.dashboard-current-time-control {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    min-width: 132px;
}

.dashboard-current-time-label {
    color: var(--text-color-secondary);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
}

.dashboard-time-text {
    color: var(--text-color-primary);
    font-size: 44px;
    font-weight: 500;
    line-height: 0.95;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    padding: 6px 10px;
    border: 1px solid var(--edm-background-header);
    border-radius: 8px;
}

.dashboard-select-data-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.dashboard-controls-section-title {
    color: var(--text-color-primary);
    font-size: var(--font-size-card-title);
    font-weight: 500;
}

.dashboard-select-data-toggle {
    border: 0;
    background: transparent;
    padding: 0;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.dashboard-select-data-toggle:hover,
.dashboard-select-data-toggle:focus,
.dashboard-select-data-toggle:active {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.dashboard-select-data-collapse {
    padding-top: 2px;
}

.dashboard-filter-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--edm-text-subtitle);
    font-size: var(--font-size-label);
    font-weight: 500;
    margin-bottom: 8px;
}

.dashboard-label-icon {
    width: 20px;
    height: 20px;
    color: var(--text-color-secondary);
    flex: 0 0 auto;
}

.dashboard-filter-label-text {
    flex: 0 0 auto;
}

.dashboard-upload-pill {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 180px;
    height: 25px;
    padding: 2px 4px 2px 10px;
    border-radius: var(--card-radius-pill);
    background: var(--edm-background-accent-blue);
    color: var(--edm-accent-blue-dark);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}

.dashboard-upload-pill-hidden {
    display: none;
}

.dashboard-upload-pill-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-upload-pill-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin-left: 3px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: currentColor;
    font: inherit;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}

.dashboard-upload-pill-remove:hover,
.dashboard-upload-pill-remove:focus-visible {
    background: rgba(22, 127, 229, 0.12);
    outline: none;
}

.dashboard-inline-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.dashboard-dropdown .Select-control {
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--edm-background-accent-blue) !important;
    min-height: 42px;
    box-shadow: none !important;
}

.dashboard-dropdown-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 10px;
    align-items: center;
}

.dashboard-dropdown-custom-arrow .Select-arrow-zone {
    background-image: url("/assets/icons/icon_down_gray.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
}

.dashboard-dropdown-custom-arrow .Select-arrow {
    display: none !important;
}

.dashboard-dropdown-with-upload .Select-arrow-zone {
    width: 36px !important;
    height: 100%;
    background-image: url("/assets/icons/icon_down_gray.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
    pointer-events: none;
}

.dashboard-dropdown-with-upload .Select-arrow {
    display: none !important;
}

.dashboard-upload-plus-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: var(--card-radius-pill);
    background: var(--edm-background-accent-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: none;
}

.dashboard-upload-plus-spacer {
    width: 36px;
    height: 36px;
    display: block;
}

.dashboard-upload-plus-btn:hover,
.dashboard-upload-plus-btn:focus,
.dashboard-upload-plus-btn:active {
    background: var(--edm-accent-blue) !important;
    box-shadow: none !important;
    filter: none;
    opacity: 0.85;
}

.dashboard-upload-plus-btn .dashboard-inline-svg,
.dashboard-upload-plus-btn .dashboard-upload-plus-icon {
    width: 18px;
    height: 18px;
    transition: filter 0.15s ease;
}

.dashboard-upload-plus-btn:hover .dashboard-upload-plus-icon,
.dashboard-upload-plus-btn:focus .dashboard-upload-plus-icon,
.dashboard-upload-plus-btn:focus-visible .dashboard-upload-plus-icon,
.dashboard-upload-plus-btn:active .dashboard-upload-plus-icon {
    filter: brightness(0) invert(1);
}

.dashboard-upload-dropzone {
    border: 1.5px dashed #D9DEE5;
    border-radius: var(--card-radius);
    background: var(--panel-bg-agent);
    padding: 30px 22px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dashboard-upload-dropzone:hover {
    border-color: var(--color-accent-lime);
    background: #FAFDF5;
}

.dashboard-upload-dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.dashboard-upload-icon {
    width: 30px;
    height: 30px;
}

.dashboard-upload-title {
    color: var(--text-color-primary);
    font-size: 18px;
    font-weight: 500;
}

.dashboard-upload-hint,
.dashboard-upload-status {
    color: var(--text-color-muted);
    font-size: 14px;
}

.dashboard-upload-status {
    margin-top: 14px;
    min-height: 20px;
}

.dashboard-modal-close-btn {
    border: 0;
    border-radius: var(--card-radius-pill);
    background: var(--edm-accent);
    color: var(--edm-text-button);
    padding: 8px 20px;
}

.dashboard-modal-close-btn:hover,
.dashboard-modal-close-btn:focus {
    background: var(--edm-accent-dark);
    color: var(--edm-text-button);
    border: 0;
    box-shadow: none;
}

.dashboard-start-button {
    border-radius: var(--card-radius-pill);

    background: var(--edm-accent);
    min-width: 174px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dashboard-start-button-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.dashboard-start-button-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.dashboard-pages-shell {
    min-height: 0;
}

.dashboard-page-pane {
    min-height: 0;
}

.dashboard-page-grid {
    display: grid;
    gap: var(--card-gap);
}
