.app-dashboard-workspace-shell {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 1rem 1.25rem 1.5rem;
}

.app-dashboard-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0 0 0.65rem;
    border: 0;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.app-dashboard-toolbar--compact {
    align-items: flex-start;
}

.app-dashboard-toolbar-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.75rem;
}

.app-dashboard-toolbar-context {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.85rem;
    min-width: 0;
    color: #374151;
    font-size: 0.86rem;
}

.app-dashboard-context-inline {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-dashboard-context-inline strong {
    color: #6b7280;
    font-weight: 700;
}

.app-dashboard-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

.app-dashboard-toolbar-actions--compact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.app-dashboard-toolbar-actions .rz-button {
    width: 100%;
    min-height: 2.75rem;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: none;
}

.app-dashboard-toolbar-actions--compact .rz-button {
    width: auto;
    min-height: 2rem;
}

.app-dashboard-icon-action.rz-button {
    width: 2rem;
    min-width: 2rem;
    height: 2rem;
    min-height: 2rem;
    padding: 0;
    border-radius: 999px;
}

.app-dashboard-compact-action.rz-button {
    min-height: 2rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
}

.app-dashboard-toolbar-actions .app-dashboard-primary-action,
.app-dashboard-toolbar-actions .app-dashboard-save-action {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.app-dashboard-toolbar-actions .app-dashboard-primary-action:hover,
.app-dashboard-toolbar-actions .app-dashboard-save-action:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.app-dashboard-edit-badge,
.app-dashboard-unsaved-indicator,
.app-dashboard-widget-status-badge,
.app-dashboard-tab-default,
.app-dashboard-widget-picker-category {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.app-dashboard-edit-badge {
    color: #1d4ed8;
    background: #eff6ff;
}

.app-dashboard-unsaved-indicator {
    border: 1px solid #fed7aa;
    color: #9a3412;
    background: #fff7ed;
}

.app-dashboard-tabs-shell {
    margin: 0;
    overflow: visible;
    border-bottom: 1px solid #e5e7eb;
}

.app-dashboard-tab-list {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.35rem 1.25rem;
    min-width: 0;
    padding: 0 0.15rem;
}

.app-dashboard-tab-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.app-dashboard-tab-chip::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 999px 999px 0 0;
    background: transparent;
}

.app-dashboard-tab-chip.is-active::after {
    background: #2563eb;
}

.app-dashboard-tab-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.75rem;
    padding: 0 0.05rem;
    border: 0;
    background: transparent;
    color: #6b7280;
    font-weight: 600;
    cursor: pointer;
}

.app-dashboard-tab-chip.is-active .app-dashboard-tab-button,
.app-dashboard-tab-button.is-active {
    color: #2563eb;
}

.app-dashboard-tab-default {
    background: #eff6ff;
    color: #2563eb;
}

.app-dashboard-tab-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.app-dashboard-tab-icon-button {
    width: 1.9rem;
    height: 1.9rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.app-dashboard-tab-icon-button:hover:not(:disabled) {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

.app-dashboard-tab-icon-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.app-dashboard-tab-icon-button.danger:hover:not(:disabled) {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.app-dashboard-tab-add-button {
    white-space: nowrap;
    color: #2563eb;
}

.app-dashboard-grid {
    --app-dashboard-grid-columns: 12;
    --app-dashboard-row-height: 64px;
    --app-dashboard-grid-gap: 0.375rem;
    display: grid;
    grid-template-columns: repeat(var(--app-dashboard-grid-columns), minmax(0, 1fr));
    grid-auto-rows: var(--app-dashboard-row-height);
    gap: var(--app-dashboard-grid-gap);
    align-items: stretch;
    width: 100%;
}

.app-dashboard-grid-item {
    min-width: 0;
    min-height: 0;
    height: 100%;
    grid-column: var(--grid-x) / span var(--grid-w);
    grid-row: var(--grid-y) / span var(--grid-h);
    transition:
        grid-column 140ms ease,
        grid-row 140ms ease,
        box-shadow 140ms ease,
        transform 140ms ease;
}

.app-dashboard-grid-item[data-edit-mode="true"] {
    outline: 2px dashed rgba(37, 99, 235, 0.28);
    outline-offset: 3px;
    border-radius: 6px;
    touch-action: none;
}

.app-dashboard-grid-item.is-dragging,
.app-dashboard-grid-item.is-resizing {
    z-index: 4;
    box-shadow: none;
}

.app-dashboard-widget-frame {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: none;
    overflow: hidden;
}

.app-dashboard-widget-frame:hover {
    border-color: #d1d5db;
    box-shadow: none;
}

.app-dashboard-widget-frame.is-editing {
    border-color: #bfdbfe;
    box-shadow: none;
}

.app-dashboard-widget-builder-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 0.95rem;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
}

.app-dashboard-widget-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.app-dashboard-widget-title {
    overflow: hidden;
    color: #111827;
    font-size: 0.92rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-dashboard-widget-status-badge {
    width: fit-content;
    background: #fef3c7;
    color: #92400e;
}

.app-dashboard-widget-actions,
.app-dashboard-widget-size-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0.3rem;
}

.app-dashboard-widget-actions {
    grid-column: 1 / -1;
}

.app-dashboard-widget-size-group {
    padding: 0.12rem;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #f9fafb;
}

.app-dashboard-widget-mobile-edit-actions {
    display: none;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.app-dashboard-widget-action-button,
.app-dashboard-widget-icon-button,
.app-dashboard-widget-chip-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.1rem;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #4b5563;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}

.app-dashboard-widget-action-button {
    padding: 0.34rem 0.65rem;
}

.app-dashboard-widget-icon-button {
    width: 2rem;
    padding: 0;
}

.app-dashboard-widget-chip-button {
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.55rem;
    border-radius: 999px;
}

.app-dashboard-widget-action-button:hover,
.app-dashboard-widget-icon-button:hover,
.app-dashboard-widget-chip-button:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

.app-dashboard-widget-icon-button.danger:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.app-dashboard-widget-drag-handle {
    cursor: grab;
    touch-action: none;
    user-select: none;
    font-size: 0.84rem;
    letter-spacing: 0.08em;
}

.app-dashboard-widget-drag-handle:active {
    cursor: grabbing;
}

.app-dashboard-widget-body {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: auto;
    padding: 1rem;
}

.app-dashboard-widget-render-host {
    min-height: 0;
    height: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.app-dashboard-widget-render-host > * {
    min-height: 0;
    height: 100%;
    flex: 1 1 auto;
}

.app-dashboard-widget-stack-fill {
    min-height: 0;
    height: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.app-dashboard-widget-stack-fill > * {
    min-height: 0;
}

.app-dashboard-widget-resize-handle {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 3;
    width: 2rem;
    height: 2rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    color: #4b5563;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: se-resize;
    touch-action: none;
    user-select: none;
}

.app-dashboard-widget-resize-handle:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

.app-dashboard-empty-card {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.app-dashboard-empty-card--tab {
    align-items: flex-start;
}

.app-dashboard-create-empty {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    margin: 0.75rem 0 0;
    padding: 1rem;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #ffffff;
    color: #111827;
}

.app-dashboard-create-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
}

.app-dashboard-create-empty__icon .material-symbols-outlined {
    font-size: 1.65rem;
}

.app-dashboard-create-empty__content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.45rem;
}

.app-dashboard-create-empty h2 {
    margin: 0;
    color: #111827;
    font-size: 1.1rem;
    font-weight: 700;
}

.app-dashboard-create-empty p {
    margin: 0;
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.5;
}

.app-dashboard-create-empty__suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.15rem 0 0;
    padding: 0;
    list-style: none;
}

.app-dashboard-create-empty__suggestions li {
    padding: 0.22rem 0.55rem;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    color: #374151;
    background: #f9fafb;
    font-size: 0.76rem;
    font-weight: 700;
}

.app-dashboard-create-empty__action.rz-button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 2.65rem;
    border-radius: 6px;
}

.app-dashboard-widget-picker {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.app-dashboard-widget-picker-item {
    text-align: left;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    padding: 0.95rem 1rem;
    cursor: pointer;
}

.app-dashboard-widget-picker-item:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.app-dashboard-widget-picker-item:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    background: #f9fafb;
}

.app-dashboard-widget-picker-header,
.app-dashboard-category-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.app-dashboard-category-chip {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #374151;
    border-radius: 999px;
    padding: 0.32rem 0.68rem;
    font-size: 0.78rem;
    font-weight: 650;
    cursor: pointer;
}

.app-dashboard-category-chip.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.app-dashboard-widget-picker-category {
    background: #eff6ff;
    color: #2563eb;
}

.app-dashboard-widget-picker-title {
    font-weight: 600;
    color: #111827;
}

.app-dashboard-widget-picker-text,
.app-dashboard-widget-picker-note {
    margin-top: 0.25rem;
    color: #4b5563;
    font-size: 0.88rem;
}

.app-dashboard-dialog-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.app-dashboard-dialog-body {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.app-dashboard-dialog-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.6rem;
}

.app-dashboard-config-grid {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.app-dashboard-config-field {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
}

.app-dashboard-config-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
}

.app-dashboard-widget-state {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 100%;
    justify-content: center;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1.5rem;
    background: #ffffff;
}

.app-dashboard-widget-state p {
    margin: 0;
    color: #475569;
}

.app-dashboard-widget-state--restricted {
    background: #ffffff;
    border-color: #fdba74;
}

.app-dashboard-widget-state--unavailable {
    background: #ffffff;
    border-color: #cbd5e1;
}

.app-dashboard-widget-state--error {
    background: #ffffff;
    border-color: #fecaca;
}

.app-dashboard-widget-state--warning {
    background: #ffffff;
    border-color: #fdba74;
}

.app-dashboard-widget-state--info {
    background: #ffffff;
    border-color: #bfdbfe;
}

.app-dashboard-widget-metric {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.app-dashboard-widget-metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
}

.app-dashboard-widget-metric-label {
    color: #475569;
    font-size: 0.88rem;
}

.app-dashboard-section {
    width: 100%;
    margin: 0 auto;
}

.app-dashboard-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: none;
    padding: 1rem 1.25rem;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.app-dashboard-card > .rz-card-body,
.app-dashboard-card > .rz-card-content {
    min-height: 0;
    height: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.app-dashboard-card > .rz-card-body > *,
.app-dashboard-card > .rz-card-content > * {
    min-height: 0;
    flex: 1 1 auto;
}

.not-authorized-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: none;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    color: #0f172a;
}

.not-authorized-title {
    font-weight: 700;
    font-size: 1rem;
}

.not-authorized-text {
    color: #475569;
    font-size: 0.9rem;
}

.weather-card {
    border-color: rgba(191, 219, 254, 0.95);
    background: #ffffff;
}

.revenue-card {
    border-color: rgba(187, 247, 208, 0.95);
    background: #ffffff;
}

.schedule-card {
    background: #ffffff;
}

.weather-row {
    align-items: center;
}

.weather-hero {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.weather-hero-row,
.revenue-hero-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
}

.hero-chart {
    flex: 1 1 auto;
    min-width: 260px;
    max-width: none;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    box-shadow: none;
    position: relative;
}

.hero-chart-svg {
    width: 100%;
    height: 120px;
}

.hero-chart-line {
    fill: none;
    stroke: #2563eb;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hero-chart-axis {
    stroke: #e2e8f0;
    stroke-width: 1;
}

.hero-chart-baseline {
    stroke: #e2e8f0;
    stroke-width: 1;
    stroke-dasharray: 4 6;
}

.hero-chart-zero {
    stroke: #ef4444;
    stroke-width: 1;
    stroke-dasharray: 3 4;
}

.hero-chart-icon {
    font-size: 14px;
}

.hero-chart-x-label,
.hero-chart-y-label {
    fill: #64748b;
    font-size: 10px;
}

.hero-chart-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.hero-chart-y span {
    position: absolute;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.75);
    padding: 0 2px;
    border-radius: 4px;
}

.hero-chart-x span {
    position: absolute;
    bottom: 2px;
    transform: translateX(-50%);
    color: #64748b;
    font-size: 10px;
}

.hero-chart-icons span {
    position: absolute;
    top: 72%;
    transform: translateX(-50%);
    font-size: 18px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.15));
}

.hero-chart-y-label.zero {
    color: #ef4444;
    font-weight: 700;
}

.revenue-line {
    stroke: #16a34a;
}

.weather-hero-icon {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.weather-hero-icon-glyph {
    font-size: 1.8rem;
    color: #2563eb;
}

.weather-hero-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.weather-hero-temp {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
}

.weather-hero-meta {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
}

.weather-hero-sub {
    font-size: 0.8rem;
    color: #475569;
}

.forecast-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #cbd5f5;
}

.forecast-tile {
    flex: 1 1 90px;
    min-width: 90px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.5rem 0.6rem;
    text-align: center;
    box-shadow: none;
}

.forecast-icon {
    font-size: 1.1rem;
    margin: 0.15rem 0 0.1rem;
}

.forecast-date {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.82rem;
}

.forecast-value {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.98rem;
}

.forecast-meta {
    color: #475569;
    font-size: 0.75rem;
}

.forecast-sub {
    color: #64748b;
    font-size: 0.7rem;
}

.revenue-hero {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.revenue-hero-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
}

.revenue-hero-meta {
    font-size: 0.85rem;
    color: #475569;
}

.revenue-strip {
    border-top-color: #bbf7d0;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.schedule-day {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.schedule-day-label {
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.02em;
}

.schedule-entry {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f8fafc;
}

.schedule-entry.own {
    border-color: #2563eb;
    box-shadow: none;
    background: #e0f2fe;
}

.schedule-time {
    font-weight: 700;
    color: #0f172a;
    min-width: 88px;
}

.schedule-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.schedule-title {
    font-weight: 600;
    color: #0f172a;
}

.schedule-meta {
    color: #475569;
    font-size: 0.9rem;
}

@media (min-width: 720px) {
    .app-dashboard-workspace-shell {
        gap: 1rem;
        padding: 1rem 1.5rem 1.5rem;
    }

    .app-dashboard-toolbar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 0 0.65rem;
    }

    .app-dashboard-toolbar-actions {
        grid-template-columns: repeat(3, max-content);
        justify-content: flex-end;
        align-items: center;
        min-width: max-content;
    }

    .app-dashboard-toolbar-actions .rz-button {
        width: auto;
        min-width: 8.5rem;
    }

    .app-dashboard-tabs-shell {
        margin-inline: 0;
    }

    .app-dashboard-tab-list {
        padding-inline: 0;
    }

    .app-dashboard-widget-builder-bar {
        grid-template-columns: auto minmax(8rem, 1fr) auto;
    }

    .app-dashboard-widget-actions {
        grid-column: auto;
        justify-content: flex-end;
    }
}

@media (max-width: 980px) {
    .hero-chart {
        display: none;
    }
}

@media (max-width: 900px) {
    .app-dashboard-grid {
        --app-dashboard-grid-columns: 6;
    }

    .app-dashboard-grid-item {
        grid-column: var(--grid-x-tablet) / span var(--grid-w-tablet);
    }
}

@media (max-width: 600px) {
    .app-dashboard-workspace-shell {
        padding: 1rem;
    }

    .app-dashboard-toolbar {
        top: 0;
        padding: 0 0 0.65rem;
        border-radius: 0;
    }

    .app-dashboard-toolbar-actions .rz-button {
        justify-content: center;
    }

    .app-dashboard-tab-list {
        gap: 0.35rem 0.75rem;
    }

    .app-dashboard-tab-chip {
        max-width: 100%;
    }

    .app-dashboard-tab-button span:first-child {
        overflow: hidden;
        max-width: min(68vw, 18rem);
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .app-dashboard-tab-actions {
        flex-wrap: wrap;
    }

    .app-dashboard-grid {
        --app-dashboard-grid-columns: 1;
        grid-auto-rows: auto;
        gap: 1rem;
    }

    .app-dashboard-grid-item {
        grid-column: 1 / span 1;
        grid-row: auto;
    }

    .app-dashboard-widget-builder-bar {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .app-dashboard-widget-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .app-dashboard-widget-body {
        padding: 0.85rem;
    }

    .app-dashboard-widget-resize-handle {
        display: none;
    }
}

/* WYSIWYG dashboard editor */
.app-dashboard-editor-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.25rem;
    align-items: start;
}

.app-dashboard-editor-canvas {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.app-dashboard-editor-panel {
    position: sticky;
    top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: none;
}

.app-dashboard-editor-panel-empty,
.app-dashboard-editor-panel-header,
.app-dashboard-editor-panel-section {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.app-dashboard-editor-panel-empty span,
.app-dashboard-editor-panel-header span,
.app-dashboard-editor-panel-section label {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-dashboard-editor-panel-empty p,
.app-dashboard-editor-panel-header p {
    margin: 0;
    color: #475569;
    font-size: 0.88rem;
    line-height: 1.45;
}

.app-dashboard-editor-panel-header h2 {
    margin: 0;
    color: #111827;
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.app-dashboard-editor-size-grid,
.app-dashboard-editor-panel-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.app-dashboard-editor-size-grid button,
.app-dashboard-editor-panel-actions button {
    min-height: 2.4rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    color: #374151;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.app-dashboard-editor-size-grid button:hover,
.app-dashboard-editor-panel-actions button:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.app-dashboard-editor-size-grid button.is-active {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.app-dashboard-editor-panel-actions button.danger {
    grid-column: 1 / -1;
    color: #b91c1c;
}

.app-dashboard-editor-panel-actions button.danger:hover {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.app-dashboard-editor-layout-meta dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0;
}

.app-dashboard-editor-layout-meta dl div {
    padding: 0.55rem 0.65rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
}

.app-dashboard-editor-layout-meta dt {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.app-dashboard-editor-layout-meta dd {
    margin: 0.1rem 0 0;
    color: #111827;
    font-size: 0.95rem;
    font-weight: 800;
}

.app-dashboard-grid[data-edit-mode="true"] {
    padding: 0;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    background:
        linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px),
        #f8fafc;
    background-size: calc((100% - 11 * var(--app-dashboard-grid-gap)) / 12 + var(--app-dashboard-grid-gap)) calc(var(--app-dashboard-row-height) + var(--app-dashboard-grid-gap));
}

.app-dashboard-grid-item[data-edit-mode="true"] {
    outline: 0;
    border-radius: 6px;
    touch-action: none;
}

.app-dashboard-widget-frame.is-editing {
    border-color: #e5e7eb;
    cursor: pointer;
}

.app-dashboard-widget-frame.is-editing:hover,
.app-dashboard-widget-frame.is-editing.is-selected {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.16);
}

.app-dashboard-widget-frame.is-editing.is-selected::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    border: 2px solid #2563eb;
    border-radius: 6px;
}

.app-dashboard-widget-wysiwyg-toolbar {
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    top: 0.75rem;
    z-index: 5;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    opacity: 0;
    transform: translateY(-0.25rem);
    transition: opacity 120ms ease, transform 120ms ease;
    pointer-events: none;
}

.app-dashboard-widget-frame.is-editing:hover .app-dashboard-widget-wysiwyg-toolbar,
.app-dashboard-widget-frame.is-editing.is-selected .app-dashboard-widget-wysiwyg-toolbar,
.app-dashboard-widget-frame.is-editing:focus-within .app-dashboard-widget-wysiwyg-toolbar {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.app-dashboard-widget-wysiwyg-toolbar .app-dashboard-widget-title-group {
    gap: 0;
}

.app-dashboard-widget-wysiwyg-toolbar .app-dashboard-widget-title {
    font-size: 0.78rem;
}

.app-dashboard-widget-frame.is-editing.is-selected .app-dashboard-widget-resize-handle,
.app-dashboard-widget-frame.is-editing:hover .app-dashboard-widget-resize-handle {
    opacity: 1;
    pointer-events: auto;
}

.app-dashboard-widget-frame.is-editing .app-dashboard-widget-resize-handle {
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
}

.app-dashboard-widget-frame.is-editing:focus {
    outline: none;
}

@media (max-width: 1100px) {
    .app-dashboard-editor-shell {
        grid-template-columns: 1fr;
    }

    .app-dashboard-editor-panel {
        position: static;
        order: -1;
    }
}

@media (max-width: 600px) {
    .app-dashboard-editor-panel {
        padding: 0.85rem;
    }

    .app-dashboard-editor-size-grid,
    .app-dashboard-editor-panel-actions,
    .app-dashboard-editor-layout-meta dl {
        grid-template-columns: 1fr;
    }

    .app-dashboard-grid[data-edit-mode="true"] {
        padding: 0;
        background-image: none;
    }

    .app-dashboard-widget-wysiwyg-toolbar {
        position: static;
        margin: 0.5rem;
        grid-template-columns: auto minmax(0, 1fr) auto auto;
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .app-dashboard-widget-mobile-edit-actions {
        grid-column: 1 / -1;
        display: flex;
    }
}

/* Dashboard widget settings popup */
.app-dashboard-editor-shell--canvas-only {
    grid-template-columns: minmax(0, 1fr);
}

.app-dashboard-widget-settings-popup {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: -0.25rem;
    color: #111827;
}

.app-dashboard-widget-settings-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
    padding: 1.1rem 1.15rem 1rem;
    border: 1px solid #dbeafe;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 72%);
}

.app-dashboard-widget-settings-icon {
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    font-size: 1.1rem;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.app-dashboard-widget-settings-header span {
    display: inline-flex;
    margin-bottom: 0.25rem;
    color: #2563eb;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-dashboard-widget-settings-header h2 {
    margin: 0;
    overflow: hidden;
    color: #111827;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-dashboard-widget-settings-header p {
    margin: 0.35rem 0 0;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.45;
}

.app-dashboard-widget-settings-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.15rem;
    border-inline: 1px solid #e5e7eb;
    background: #ffffff;
}

.app-dashboard-widget-settings-field,
.app-dashboard-widget-settings-section {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.app-dashboard-widget-settings-field label,
.app-dashboard-widget-settings-section-title {
    color: #334155;
    font-size: 0.82rem;
    font-weight: 800;
}

.app-dashboard-widget-settings-field small {
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.35;
}

.app-dashboard-widget-settings-field .rz-textbox,
.app-dashboard-widget-settings-field input {
    min-height: 2.55rem;
    border-radius: 6px;
}

.app-dashboard-widget-settings-section {
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.app-dashboard-widget-settings-empty {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.9rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f8fafc;
}

.app-dashboard-widget-settings-empty strong {
    color: #111827;
    font-size: 0.9rem;
}

.app-dashboard-widget-settings-empty p {
    margin: 0;
    color: #64748b;
    font-size: 0.84rem;
}

.app-dashboard-widget-settings-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
    padding: 0.85rem 1.15rem 1.05rem;
    border: 1px solid #e5e7eb;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: #f8fafc;
}

.app-dashboard-widget-settings-footer button {
    min-height: 2.45rem;
    padding: 0 0.95rem;
    border-radius: 6px;
    font-weight: 750;
    cursor: pointer;
}

.app-dashboard-widget-settings-footer .secondary {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
}

.app-dashboard-widget-settings-footer .secondary:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.app-dashboard-widget-settings-footer .primary {
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.app-dashboard-widget-settings-footer .primary:hover {
    border-color: #1d4ed8;
    background: #1d4ed8;
}

@media (max-width: 600px) {
    .app-dashboard-widget-settings-header {
        grid-template-columns: 1fr;
    }

    .app-dashboard-widget-settings-header h2 {
        white-space: normal;
    }

    .app-dashboard-widget-settings-footer {
        flex-direction: column-reverse;
    }

    .app-dashboard-widget-settings-footer button {
        width: 100%;
    }
}

/* Dashboard docking/fit improvements */
.app-dashboard-grid[data-edit-mode="true"] {
    background-size: calc((100% - 11 * var(--app-dashboard-grid-gap)) / 12 + var(--app-dashboard-grid-gap)) calc(var(--app-dashboard-row-height) + var(--app-dashboard-grid-gap));
}

.app-dashboard-widget-render-host .shift-overview-page {
    gap: 0.75rem;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.app-dashboard-widget-render-host .shift-overview-card {
    gap: 0.75rem;
    padding: 0.85rem;
    border-radius: 8px;
}

.app-dashboard-widget-render-host .shift-overview-card .table-container {
    min-height: 320px;
}

.app-dashboard-widget-render-host .employee-week-overview.employee-week-overview--widget {
    gap: 0.75rem;
}

.app-dashboard-widget-render-host .employee-week-grid {
    gap: 0.75rem;
}

.app-dashboard-widget-render-host .employee-week-row {
    gap: 0.5rem;
}

.app-dashboard-widget-render-host .employee-week-cell {
    border-radius: 8px;
    padding: 0.6rem;
}

@media (max-width: 900px) {
    .app-dashboard-grid {
        --app-dashboard-row-height: 60px;
        --app-dashboard-grid-gap: 0.375rem;
    }
}

@media (max-width: 600px) {
    .app-dashboard-grid {
        --app-dashboard-grid-gap: 0.375rem;
    }

    .app-dashboard-widget-render-host .shift-overview-card .table-container {
        min-height: 260px;
    }
}

/* Document upload dashboard widget */
.document-upload-dashboard-widget,
.goods-cost-dashboard-widget {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 100%;
    width: 100%;
    color: #111827;
}

.document-upload-dashboard-widget {
    justify-content: center;
    padding: .15rem;
}

.document-upload-dashboard-widget--dropzone {
    aspect-ratio: 1 / 1;
    max-width: min(100%, 26rem);
}

.document-upload-dashboard-widget__dropzone {
    align-items: center;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1.5px dashed #93c5fd;
    border-radius: 14px;
    color: #111827;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    justify-content: center;
    min-height: 12rem;
    padding: 1rem;
    position: relative;
    text-align: center;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
    width: 100%;
}

.document-upload-dashboard-widget__dropzone:hover,
.document-upload-dashboard-widget__dropzone:focus-within {
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    border-color: #2563eb;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .12);
    transform: translateY(-1px);
}

.document-upload-dashboard-widget__input {
    cursor: pointer;
    inset: 0;
    opacity: 0;
    position: absolute;
    width: 100%;
    z-index: 2;
}

.document-upload-dashboard-widget__icon {
    align-items: center;
    border: 1.5px solid #93c5fd;
    border-radius: 14px;
    color: #2563eb;
    display: inline-flex;
    height: 2.75rem;
    justify-content: center;
    position: relative;
    width: 2.75rem;
}

.document-upload-dashboard-widget__icon::before {
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 999px 999px 0 0;
    content: "";
    height: 0.7rem;
    position: absolute;
    top: 0.65rem;
    width: 1.25rem;
}

.document-upload-dashboard-widget__icon::after {
    background: currentColor;
    box-shadow: 0 -0.42rem 0 -0.06rem currentColor, -0.32rem -0.32rem 0 -0.1rem currentColor, 0.32rem -0.32rem 0 -0.1rem currentColor;
    content: "";
    height: 1rem;
    position: absolute;
    top: 1rem;
    width: 2px;
}

.document-upload-dashboard-widget__eyebrow,
.goods-cost-dashboard-widget__eyebrow {
    color: #2563eb;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.document-upload-dashboard-widget strong,
.goods-cost-dashboard-widget h3 {
    margin: 0;
    color: #111827;
    font-size: clamp(1.12rem, 1.6vw, 1.45rem);
    font-weight: 850;
    letter-spacing: -.035em;
}

.document-upload-dashboard-widget__text,
.goods-cost-dashboard-widget p {
    margin: 0;
    color: #6b7280;
    line-height: 1.45;
}

.document-upload-dashboard-widget__formats,
.document-upload-dashboard-widget__status {
    color: #64748b;
    font-size: .76rem;
    font-weight: 700;
}

.document-upload-dashboard-widget__status {
    color: #1d4ed8;
    animation: dashboard-upload-pulse 1.2s ease-in-out infinite;
}

@keyframes dashboard-upload-pulse {
    0%, 100% { opacity: .72; }
    50% { opacity: 1; }
}

.goods-cost-dashboard-widget__header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.goods-cost-dashboard-widget__header > div:first-child {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-width: 0;
}

.goods-cost-dashboard-widget__badge {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #1d4ed8;
    flex: 0 0 auto;
    font-size: .75rem;
    font-weight: 800;
    padding: .32rem .65rem;
}

.goods-cost-dashboard-widget__chart {
    align-items: end;
    display: grid;
    gap: .45rem;
    grid-auto-flow: column;
    grid-auto-columns: minmax(34px, 1fr);
    min-height: 13rem;
    overflow-x: auto;
    padding: .25rem .15rem 0;
    scrollbar-width: thin;
}

.goods-cost-dashboard-widget__bar-column {
    align-items: center;
    display: grid;
    gap: .35rem;
    grid-template-rows: auto 1fr auto;
    height: 100%;
    min-width: 34px;
}

.goods-cost-dashboard-widget__bar-value,
.goods-cost-dashboard-widget__bar-label {
    color: #64748b;
    font-size: .68rem;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
}

.goods-cost-dashboard-widget__bar-track {
    align-items: end;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    border: 1px solid #e5e7eb;
    border-radius: 999px 999px 6px 6px;
    display: flex;
    height: 100%;
    min-height: 8rem;
    overflow: hidden;
    width: 100%;
}

.goods-cost-dashboard-widget__bar-track span {
    background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
    border-radius: inherit;
    display: block;
    width: 100%;
}

.goods-cost-dashboard-widget__state,
.goods-cost-dashboard-widget__empty {
    align-items: center;
    background: #f8fafc;
    border: 1px dashed #dbe3ef;
    border-radius: 10px;
    color: #64748b;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .35rem;
    justify-content: center;
    min-height: 10rem;
    padding: 1rem;
    text-align: center;
}

.goods-cost-dashboard-widget__state.is-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.app-dashboard-config-select,
.app-dashboard-config-input {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #111827;
    font: inherit;
    min-height: 2.45rem;
    padding: .55rem .7rem;
    width: 100%;
}

.app-dashboard-config-field small {
    color: #64748b;
    line-height: 1.35;
}

@media (max-width: 720px) {
    .goods-cost-dashboard-widget__header {
        flex-direction: column;
    }

    .goods-cost-dashboard-widget__chart {
        grid-auto-columns: minmax(30px, 1fr);
        min-height: 11rem;
    }
}
