.aw-ghl-dashboard {
    --aw-bg: #f5f6f8;
    --aw-panel: #ffffff;
    --aw-text: #171717;
    --aw-muted: #667085;
    --aw-border: #e4e7ec;
    --aw-accent: #c99b45;
    --aw-accent-light: #ead39f;
    --aw-dark: #171717;
    --aw-error-bg: #fff1f0;
    --aw-error-text: #b42318;

    width: 100%;
    padding: 28px;
    border-radius: 20px;
    background: var(--aw-bg);
    color: var(--aw-text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
    box-sizing: border-box;
}

.aw-ghl-dashboard *,
.aw-ghl-dashboard *::before,
.aw-ghl-dashboard *::after {
    box-sizing: border-box;
}

/* Header */

.aw-ghl-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.aw-ghl-eyebrow,
.aw-ghl-panel-header > span {
    display: block;
    color: var(--aw-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.4px;
    line-height: 1.2;
    text-transform: uppercase;
}

.aw-ghl-header h2 {
    margin: 6px 0;
    color: var(--aw-dark);
    font-size: clamp(29px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.05;
}

.aw-ghl-header p {
    margin: 0;
    color: var(--aw-muted);
    font-size: 14px;
}

/* Date filters */

.aw-ghl-date-filters {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.aw-ghl-date-filters label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--aw-muted);
    font-size: 12px;
    font-weight: 700;
}

.aw-ghl-date-filters input,
.aw-ghl-date-filters button {
    min-height: 44px;
    border-radius: 9px;
    font: inherit;
}

.aw-ghl-date-filters input {
    min-width: 150px;
    padding: 8px 11px;
    border: 1px solid var(--aw-border);
    outline: none;
    background: #ffffff;
    color: var(--aw-text);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.aw-ghl-date-filters input:focus {
    border-color: var(--aw-accent);
    box-shadow: 0 0 0 3px rgba(201, 155, 69, 0.15);
}

.aw-ghl-date-filters button {
    padding: 10px 18px;
    border: 0;
    background: var(--aw-dark);
    color: #ffffff;
    cursor: pointer;
    font-weight: 800;
    transition:
        transform 0.2s ease,
        opacity 0.2s ease,
        background 0.2s ease;
}

.aw-ghl-date-filters button:hover {
    background: #2a2a2a;
    transform: translateY(-1px);
}

.aw-ghl-date-filters button:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

/* Error message */

.aw-ghl-message {
    display: none;
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid #fecdca;
    border-radius: 9px;
    background: var(--aw-error-bg);
    color: var(--aw-error-text);
    font-size: 14px;
    line-height: 1.5;
}

.aw-ghl-message.is-visible {
    display: block;
}

/* Summary cards */

.aw-ghl-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.aw-ghl-summary-card,
.aw-ghl-panel {
    border: 1px solid var(--aw-border);
    background: var(--aw-panel);
    box-shadow: 0 8px 28px rgba(16, 24, 40, 0.055);
}

.aw-ghl-summary-card {
    position: relative;
    min-height: 155px;
    padding: 22px;
    border-radius: 15px;
    overflow: hidden;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.aw-ghl-summary-card::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--aw-accent),
        var(--aw-accent-light)
    );
    content: "";
}

.aw-ghl-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 13px 32px rgba(16, 24, 40, 0.08);
}

.aw-ghl-summary-card > span,
.aw-ghl-summary-card > small {
    display: block;
    color: var(--aw-muted);
}

.aw-ghl-summary-card > span {
    font-size: 14px;
    font-weight: 700;
}

.aw-ghl-summary-card > strong {
    display: block;
    margin: 15px 0 8px;
    color: var(--aw-dark);
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
}

.aw-ghl-summary-card > small {
    font-size: 12px;
    line-height: 1.4;
}

/* Main chart panels */

.aw-ghl-chart-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 0.85fr)
        minmax(0, 1.15fr);
    gap: 16px;
}

.aw-ghl-panel {
    min-width: 0;
    padding: 22px;
    border-radius: 15px;
}

.aw-ghl-panel-header {
    margin-bottom: 22px;
}

.aw-ghl-panel-header h3 {
    margin: 5px 0 0;
    color: var(--aw-dark);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.2;
}

/* Source chart */

.aw-ghl-source-layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: center;
    gap: 28px;
    min-height: 250px;
}

.aw-ghl-source-chart {
    position: relative;
    width: 190px;
    max-width: 100%;
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: 50%;
    background: #eaecf0;
    transition: background 0.3s ease;
}

.aw-ghl-source-chart::after {
    position: absolute;
    inset: 32px;
    border-radius: 50%;
    background: #ffffff;
    content: "";
}

.aw-ghl-chart-center {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    pointer-events: none;
}

.aw-ghl-chart-center strong {
    color: var(--aw-dark);
    font-size: 31px;
    font-weight: 800;
    line-height: 1;
}

.aw-ghl-chart-center span {
    margin-top: 6px;
    color: var(--aw-muted);
    font-size: 12px;
    font-weight: 600;
}

.aw-ghl-source-legend {
    display: flex;
    flex-direction: column;
    gap: 13px;
    min-width: 0;
}

.aw-ghl-source-legend p {
    margin: 0;
    color: var(--aw-muted);
    font-size: 14px;
}

.aw-ghl-legend-row {
    display: grid;
    grid-template-columns: 11px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    font-size: 14px;
}

.aw-ghl-legend-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.aw-ghl-legend-label {
    min-width: 0;
    color: var(--aw-text);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.aw-ghl-legend-value {
    color: var(--aw-muted);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

/* Stage chart */

.aw-ghl-stage-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
    max-height: 395px;
    padding-right: 7px;
    overflow-y: auto;
}

.aw-ghl-stage-list::-webkit-scrollbar {
    width: 6px;
}

.aw-ghl-stage-list::-webkit-scrollbar-track {
    border-radius: 20px;
    background: #f2f4f7;
}

.aw-ghl-stage-list::-webkit-scrollbar-thumb {
    border-radius: 20px;
    background: #cfd4dc;
}

.aw-ghl-stage-row {
    display: grid;
    grid-template-columns:
        minmax(125px, 0.9fr)
        minmax(120px, 1.8fr)
        38px;
    align-items: center;
    gap: 12px;
    color: var(--aw-text);
    font-size: 13px;
}

.aw-ghl-stage-row > span:first-child {
    font-weight: 600;
    line-height: 1.25;
}

.aw-ghl-stage-row.is-zero {
    opacity: 0.43;
}

.aw-ghl-stage-track {
    height: 9px;
    border-radius: 100px;
    background: #f0f2f5;
    overflow: hidden;
}

.aw-ghl-stage-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        var(--aw-accent),
        var(--aw-accent-light)
    );
    transition: width 0.4s ease;
}

.aw-ghl-stage-count {
    color: var(--aw-dark);
    text-align: right;
    font-weight: 800;
}

/* Footer */

.aw-ghl-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 15px;
    color: var(--aw-muted);
    font-size: 12px;
    line-height: 1.4;
}

/* Loading state */

.aw-ghl-dashboard.is-loading {
    cursor: wait;
}

.aw-ghl-dashboard.is-loading .aw-ghl-summary-card strong {
    animation: aw-ghl-pulse 1.1s infinite alternate;
}

@keyframes aw-ghl-pulse {
    from {
        opacity: 0.4;
    }

    to {
        opacity: 1;
    }
}

/* Tablet */

@media (max-width: 1000px) {
    .aw-ghl-header {
        align-items: stretch;
        flex-direction: column;
    }

    .aw-ghl-date-filters {
        justify-content: flex-start;
    }

    .aw-ghl-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .aw-ghl-chart-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile */

@media (max-width: 620px) {
    .aw-ghl-dashboard {
        padding: 16px;
        border-radius: 12px;
    }

    .aw-ghl-header {
        gap: 18px;
        margin-bottom: 18px;
    }

    .aw-ghl-header h2 {
        font-size: 31px;
    }

    .aw-ghl-date-filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .aw-ghl-date-filters label,
    .aw-ghl-date-filters input {
        width: 100%;
        min-width: 0;
    }

    .aw-ghl-date-filters button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .aw-ghl-summary-grid {
        grid-template-columns: 1fr;
    }

    .aw-ghl-summary-card {
        min-height: 138px;
    }

    .aw-ghl-source-layout {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .aw-ghl-source-legend {
        width: 100%;
    }

    .aw-ghl-stage-row {
        grid-template-columns:
            minmax(90px, 0.9fr)
            minmax(80px, 1.5fr)
            28px;
        gap: 8px;
        font-size: 12px;
    }

    .aw-ghl-panel {
        padding: 18px;
    }

    .aw-ghl-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Very small mobile screens */

@media (max-width: 390px) {
    .aw-ghl-date-filters {
        grid-template-columns: 1fr;
    }

    .aw-ghl-date-filters button {
        grid-column: auto;
    }

    .aw-ghl-source-chart {
        width: 165px;
    }

    .aw-ghl-source-chart::after {
        inset: 28px;
    }
}