/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background-color: #f3f4f6;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    background-color: #f3f4f6;
}

.aurora-bg {
    display: none;
}

/* ===== DASHBOARD LAYOUT ===== */
.dash {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.dash-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
    z-index: 200;
    overflow-y: auto;
}

.dash-sidebar-logo {
    display: block;
    padding: 24px 20px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.dash-sidebar-logo-image {
    height: 24px;
    width: auto;
}

.dash-nav {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    color: rgba(15, 23, 42, 0.65);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: all 0.15s;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    text-align: left;
}

.dash-nav-item:hover {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.04);
}

.dash-nav-divider {
    height: 1px;
    margin: 8px 16px;
    background: rgba(15, 23, 42, 0.08);
}

.dash-nav-item--active {
    color: #7c4dff;
    background: rgba(124, 77, 255, 0.08);
    border-left: 3px solid #7c4dff;
    padding-left: 13px;
}

.dash-nav-item--logout {
    color: rgba(15, 23, 42, 0.45);
}

.dash-nav-item--logout:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.05);
}

.dash-sidebar-footer {
    padding: 12px 8px 16px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dash-org-switcher {
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(15, 23, 42, 0.55);
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== MAIN AREA ===== */
.dash-main {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
}

/* ===== HEADER ===== */
.dash-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 40px;
    background: #ffffff;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    z-index: 100;
}

.dash-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #0f172a;
    cursor: pointer;
    padding: 4px;
}

.dash-breadcrumb {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #0f172a;
}

.dash-breadcrumb-link {
    color: rgba(15, 23, 42, 0.55);
    text-decoration: none;
}

.dash-breadcrumb-link:hover {
    color: #7c4dff;
}

.dash-breadcrumb-sep {
    color: rgba(15, 23, 42, 0.3);
    flex-shrink: 0;
}

.dash-breadcrumb-current {
    color: #0f172a;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-header-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 12px;
}

.dash-org-badge {
    padding: 6px 12px;
    background: rgba(15, 23, 42, 0.06);
    border-radius: 20px;
    font-size: 0.8rem;
    color: rgba(15, 23, 42, 0.65);
}

.dash-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #7c4dff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
}

/* ===== CONTENT ===== */
.dash-content {
    flex: 1;
    min-width: 0;
    padding: 32px 40px;
}

/* ===== STAT CARDS ===== */
.dash-stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.dash-stat-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.dash-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.dash-stat-value {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 2rem;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 4px;
}

.dash-stat-label {
    font-size: 0.85rem;
    color: rgba(15, 23, 42, 0.55);
    font-weight: 400;
}

/* Keeps the value and its staff-only precise line as a single item, so the line stacks
   underneath rather than becoming a sibling flex item in `.dash-activity-item`. */
.dash-credit {
    display: inline-block;
    vertical-align: top;
}

.dash-credit-precise {
    display: block;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-style: normal;
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(15, 23, 42, 0.45);
}

/* ===== CARDS ===== */
.dash-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

/* ===== QUICK ACTIONS ===== */
.dash-quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.dash-quick-action {
    padding: 10px 18px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    color: rgba(15, 23, 42, 0.75);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

a.dash-quick-action {
    display: inline-block;
    text-decoration: none;
}

.dash-quick-action:hover {
    background: rgba(124, 77, 255, 0.06);
    border-color: rgba(124, 77, 255, 0.3);
    color: #7c4dff;
}

/* ===== SECTIONS ===== */
.dash-section {
    margin-bottom: 32px;
}

.dash-section-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 16px;
    color: #0f172a;
}

/* ===== ANALYTICS CHARTS ===== */
.dash-analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(520px, 100%), 1fr));
    gap: 24px;
}

.dash-analytics-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #0f172a;
}

.dash-analytics-card-subtitle {
    color: rgba(15, 23, 42, 0.65);
    font-size: 0.85rem;
    margin: 2px 0 16px;
}

.dash-analytics-card-note {
    color: rgba(15, 23, 42, 0.5);
    font-size: 0.75rem;
    margin: 8px 0 0;
}

.viz-root {
    width: 100%;
    height: auto;
}

.viz-bar {
    fill: #7c4dff;
}

.viz-hatch-bg {
    fill: transparent;
}

.viz-hatch-line {
    stroke: rgba(124, 77, 255, 0.35);
    stroke-width: 1.5;
}

.viz-series-orange {
    --viz-series-color: #eb6834;
}

.viz-series-neutral {
    --viz-series-color: #898781;
}

.viz-stack-segment {
    fill: var(--viz-series-color);
}

.viz-stack-hatch-bg {
    fill: var(--viz-series-color);
    fill-opacity: 0.15;
}

.viz-stack-hatch-line {
    stroke: var(--viz-series-color);
    stroke-opacity: 0.6;
    stroke-width: 1.5;
}

.viz-hit-area {
    fill: transparent;
}

.viz-stack:hover .viz-hit-area {
    fill: rgba(15, 23, 42, 0.04);
}

.viz-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}

.viz-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(15, 23, 42, 0.75);
    font-size: 0.8rem;
}

.viz-legend-swatch {
    width: 14px;
    height: 14px;
    border: 2px solid var(--viz-series-color);
    border-radius: 2px;
    background: color-mix(in srgb, var(--viz-series-color) calc(var(--viz-area-opacity, 0.1) * 100%), transparent);
}

.viz-legend--solid .viz-legend-swatch {
    background: var(--viz-series-color);
}

.viz-line {
    fill: none;
    stroke: #7c4dff;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.viz-line--dashed {
    stroke-dasharray: 6 5;
}

.viz-area {
    fill: #7c4dff;
    fill-opacity: 0.1;
    stroke: none;
}

.viz-point-dot,
.viz-end-dot {
    fill: #7c4dff;
    stroke: #ffffff;
    stroke-width: 2;
}

.viz-end-dot--partial {
    fill: #ffffff;
    stroke: #7c4dff;
    stroke-width: 2;
}

.viz-series-brand {
    --viz-series-color: #7c4dff;
    --viz-area-opacity: 0.26;
}

.viz-series-brand-light {
    --viz-series-color: #b39dff;
    --viz-area-opacity: 0.12;
}

.viz-stack-area {
    fill: var(--viz-series-color);
    fill-opacity: var(--viz-area-opacity, 0.1);
    stroke: none;
    pointer-events: none;
}

.viz-stack-line {
    fill: none;
    stroke: var(--viz-series-color);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    pointer-events: none;
}

.viz-stack-dot {
    fill: var(--viz-series-color);
    stroke: #ffffff;
    stroke-width: 2;
    pointer-events: none;
}

.viz-stack-dot--partial {
    fill: #ffffff;
    stroke: var(--viz-series-color);
}

.viz-gridline {
    stroke: rgba(15, 23, 42, 0.08);
    stroke-width: 1;
}

.viz-baseline {
    stroke: rgba(15, 23, 42, 0.16);
    stroke-width: 1;
}

.viz-axis-label {
    fill: rgba(15, 23, 42, 0.55);
    font-size: 17px;
    font-variant-numeric: tabular-nums;
}

.viz-value-label {
    fill: #0f172a;
    font-size: 19px;
    font-weight: 600;
}

/* ===== ACTIVITY LIST ===== */
.dash-activity-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    overflow-wrap: anywhere;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.02);
    border-radius: 8px;
}

.dash-activity-item > * {
    min-width: 0;
}

.dash-activity-action {
    font-size: 0.9rem;
    color: rgba(15, 23, 42, 0.8);
    text-transform: capitalize;
}

.dash-activity-actor {
    font-size: 0.8rem;
    color: rgba(15, 23, 42, 0.4);
    text-transform: none;
    margin-left: 8px;
}

.dash-activity-time {
    font-size: 0.8rem;
    color: rgba(15, 23, 42, 0.4);
}

/* ===== DATA TABLE ===== */
.dash-table-wrapper {
    overflow-x: auto;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
}

.dash-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.dash-table td {
    padding: 12px 16px;
    font-size: 0.9rem;
    color: #0f172a;
    overflow-wrap: anywhere;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.dash-table tbody tr:hover {
    background: rgba(15, 23, 42, 0.02);
}

.dash-table-sortable {
    cursor: pointer;
    user-select: none;
}

.dash-table-sortable:hover {
    color: rgba(15, 23, 42, 0.75);
}

.dash-table-sort-asc::after { content: ' \2191'; }
.dash-table-sort-desc::after { content: ' \2193'; }

.dash-table-empty {
    padding: 40px 20px;
    text-align: center;
    color: rgba(15, 23, 42, 0.4);
    font-size: 0.9rem;
}

/* ===== BADGES ===== */
.dash-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.02em;
}

.dash-badge--gold   { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.dash-badge--purple { background: rgba(124, 77, 255, 0.1);  color: #6d28d9; }
.dash-badge--blue   { background: rgba(37, 99, 255, 0.1);   color: #1d4ed8; }
.dash-badge--gray   { background: rgba(15, 23, 42, 0.06);   color: rgba(15, 23, 42, 0.6); }
.dash-badge--green  { background: rgba(22, 163, 74, 0.1);   color: #15803d; }
.dash-badge--red    { background: rgba(220, 38, 38, 0.1);   color: #b91c1c; }

/* ===== BUTTONS ===== */
.dash-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.dash-btn--primary {
    background: #7c4dff;
    color: #ffffff;
}

.dash-btn--primary:hover {
    background: #651fff;
}

.dash-btn--secondary {
    background: rgba(15, 23, 42, 0.06);
    color: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.dash-btn--secondary:hover {
    background: rgba(15, 23, 42, 0.1);
}

.dash-btn--danger {
    background: #b91c1c;
    color: #ffffff;
}

.dash-btn--danger:hover {
    background: #991b1b;
}

.dash-btn--danger-outline {
    background: rgba(185, 28, 28, 0.06);
    color: #b91c1c;
    border: 1px solid rgba(185, 28, 28, 0.3);
}

.dash-btn--danger-outline:hover {
    background: rgba(185, 28, 28, 0.12);
}

.dash-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.dash-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.dash-btn--primary:disabled:hover {
    background: #7c4dff;
}

.dash-btn--secondary:disabled:hover {
    background: rgba(15, 23, 42, 0.06);
}

.dash-btn--danger:disabled:hover {
    background: #b91c1c;
}

.dash-btn--danger-outline:disabled:hover {
    background: rgba(185, 28, 28, 0.06);
}

.dash-spinner {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: 3px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    opacity: 0.8;
    animation: dashSpin 0.6s linear infinite;
}

@keyframes dashSpin {
    to { transform: rotate(360deg); }
}

/* ===== CHECKOUT OVERLAY ===== */
.dash-checkout-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1500;
}

.dash-checkout-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 380px;
    padding: 32px 36px;
    text-align: center;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(15, 23, 42, 0.18);
}

.dash-checkout-panel .dash-spinner {
    color: #7c4dff;
}

.dash-checkout-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.3rem;
    font-weight: 500;
    color: #0f172a;
}

.dash-checkout-body {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(15, 23, 42, 0.65);
}

/* ===== PAGINATION ===== */
.dash-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px 0;
}

.dash-pagination-btn {
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 6px;
    color: rgba(15, 23, 42, 0.7);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
}

.dash-pagination-btn:hover:not(:disabled) {
    border-color: rgba(15, 23, 42, 0.25);
    color: #0f172a;
}

.dash-pagination-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.dash-pagination-info {
    font-size: 0.85rem;
    color: rgba(15, 23, 42, 0.5);
}

/* ===== EMPTY STATE ===== */
.dash-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.dash-empty-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.3rem;
    color: rgba(15, 23, 42, 0.45);
    margin-bottom: 8px;
}

.dash-empty-description {
    font-size: 0.9rem;
    color: rgba(15, 23, 42, 0.4);
    margin-bottom: 24px;
    max-width: 400px;
}

/* ===== FORMS ===== */
.dash-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dash-form--row {
    flex-direction: row;
    align-items: flex-end;
    flex-wrap: wrap;
}

.dash-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dash-form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(15, 23, 42, 0.75);
}

.dash-form-hint {
    font-size: 0.78rem;
    color: rgba(15, 23, 42, 0.45);
    font-weight: 400;
}

.dash-form-error {
    padding: 12px 16px;
    background: rgba(211, 47, 47, 0.07);
    border: 1px solid rgba(211, 47, 47, 0.25);
    border-radius: 8px;
    color: #c62828;
    font-size: 0.9rem;
}

.dash-form-input {
    padding: 10px 14px;
    border: 1.5px solid rgba(15, 23, 42, 0.15);
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dash-form-input:focus {
    border-color: #7c4dff;
    box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.1);
}

.dash-form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(15, 23, 42, 0.03);
}

.dash-form-input option {
    background: #ffffff;
    color: #0f172a;
}

.dash-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dash-form--tight {
    gap: 8px;
}

.dash-form-input--fill {
    flex: 1;
}

.dash-form-input--stacked {
    margin-bottom: 12px;
}

.dash-form-label--block {
    display: block;
    margin-bottom: 4px;
}

.dash-form-note {
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.dash-form-warning {
    color: #b91c1c;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.dash-form-inline-error {
    color: #b91c1c;
    font-size: 0.85rem;
    margin: 8px 0;
}

.dash-text-danger {
    color: #b91c1c;
    font-weight: 600;
}

/* ===== PICKER LIST ===== */
.dash-picker-list {
    max-height: 160px;
    overflow-y: auto;
    margin: 4px 0 12px;
}

.dash-picker-option {
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
}

.dash-picker-option:hover {
    background: rgba(124, 77, 255, 0.06);
}

.dash-picker-option--selected {
    background: rgba(124, 77, 255, 0.1);
}

/* ===== TABS ===== */
.dash-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
    padding-bottom: 0;
}

.dash-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(15, 23, 42, 0.5);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: -1px;
}

.dash-tab:hover {
    color: rgba(15, 23, 42, 0.8);
}

.dash-tab--active {
    color: #7c4dff;
    border-bottom-color: #7c4dff;
}

/* ===== MODAL ===== */
.dash-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s;
}

.dash-modal-overlay--visible {
    opacity: 1;
}

.dash-modal {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    margin: 20px;
    box-shadow: 0 8px 40px rgba(15, 23, 42, 0.12);
}

.dash-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 0;
}

.dash-modal-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.3rem;
    font-weight: 500;
    color: #0f172a;
}

.dash-modal-close {
    background: none;
    border: none;
    color: rgba(15, 23, 42, 0.4);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.dash-modal-close:hover {
    color: #0f172a;
}

.dash-modal-body {
    padding: 20px 24px 24px;
}

/* ===== TOAST ===== */
.dash-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    z-index: 2000;
    pointer-events: none;
}

.dash-toast {
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: auto;
    max-width: 400px;
}

.dash-toast--visible {
    opacity: 1;
    transform: translateY(0);
}

.dash-toast--success { background: rgba(22, 163, 74, 0.95);  color: #ffffff; }
.dash-toast--error   { background: rgba(220, 38, 38, 0.95);  color: #ffffff; }
.dash-toast--warning { background: rgba(245, 158, 11, 0.95); color: #ffffff; }
.dash-toast--info    { background: rgba(37, 99, 255, 0.95);  color: #ffffff; }

/* ===== BILLING ===== */
.dash-card--stacked {
    margin-bottom: 24px;
}

.dash-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.dash-product-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.dash-product-card {
    text-align: center;
}

.dash-product-card--current {
    border-color: #7c4dff;
    border-width: 2px;
}

.dash-product-name {
    font-size: 1.3rem;
}

.dash-product-price {
    margin: 8px 0 4px;
    color: #0f172a;
}

.dash-product-detail {
    margin: 0 0 8px;
    color: rgba(15, 23, 42, 0.55);
}

.dash-product-detail--secondary {
    font-size: 0.85rem;
    color: rgba(15, 23, 42, 0.45);
}

.dash-product-action {
    display: inline-block;
    margin-top: 12px;
}

.dash-billing-heading {
    margin-bottom: 16px;
}

.dash-billing-note {
    font-size: 0.85rem;
    color: rgba(15, 23, 42, 0.55);
    margin-bottom: 8px;
}

.dash-billing-action {
    margin-top: 16px;
}

.dash-prompt-title {
    font-size: 1.1rem;
}

.dash-prompt-body {
    color: rgba(15, 23, 42, 0.55);
    margin: 8px 0 12px;
}

.dash-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.dash-amount {
    font-weight: 600;
}

.dash-amount--positive {
    color: #15803d;
}

.dash-amount--negative {
    color: #b91c1c;
}

/* ===== GETTING STARTED GUIDE ===== */
.dash-guide-intro {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(15, 23, 42, 0.7);
    max-width: 760px;
    margin-bottom: 24px;
}

.dash-guide-heading {
    margin-bottom: 12px;
}

.dash-guide-subheading {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    margin: 24px 0 8px;
}

.dash-guide-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(15, 23, 42, 0.7);
    max-width: 760px;
    margin-bottom: 12px;
}

.dash-guide-note {
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(15, 23, 42, 0.65);
    background: rgba(124, 77, 255, 0.06);
    border-left: 3px solid rgba(124, 77, 255, 0.4);
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    max-width: 760px;
    margin-bottom: 12px;
}

.dash-guide-list {
    list-style: disc;
    padding-left: 22px;
    margin: 0 0 12px;
    max-width: 760px;
}

.dash-guide-list li {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(15, 23, 42, 0.7);
    margin-bottom: 6px;
}

.dash-guide-list--quotes li {
    font-style: italic;
}

.dash-guide-step {
    margin-bottom: 24px;
}

.dash-guide-step:last-child {
    margin-bottom: 0;
}

.dash-guide-step-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #7c4dff;
    margin-bottom: 8px;
}

.dash-guide-action {
    display: inline-block;
    margin-bottom: 4px;
    text-decoration: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .dash {
        grid-template-columns: minmax(0, 1fr);
    }

    .dash-sidebar {
        left: -280px;
        transition: left 0.3s;
    }

    .dash-sidebar--open {
        left: 0;
    }

    .dash-main {
        grid-column: 1;
    }

    .dash-menu-toggle {
        display: block;
    }

    .dash-header {
        padding: 12px 16px;
    }

    .dash-content {
        padding: 20px 16px;
    }

    .dash-stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .dash-quick-actions {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .dash-org-badge {
        display: none;
    }

    .dash-toast-container {
        right: 12px;
        bottom: 12px;
        left: 12px;
    }

    .dash-toast {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .dash-stats-row {
        grid-template-columns: 1fr;
    }

    .dash-stat-card {
        padding: 16px;
    }

    .dash-stat-value {
        font-size: 1.5rem;
    }
}
