/* Home and analytics widgets share the app's new ink/teal identity. */
[dir=rtl] .fw-kpi, [dir=rtl] .fw-delivery-widget, [dir=rtl] .fw-system-widget, [dir=rtl] .fw-analytics-widget, [dir=rtl] .fw-chart-document { font-family:"Noto Sans Arabic",Arial,sans-serif; }
[dir=rtl] .fw-kpi h3, [dir=rtl] .fw-delivery-heading h3 { font-size:14px; }
[dir=rtl] .fw-kpi p, [dir=rtl] .fw-widget-header p { font-size:12px; }
.fw-kpi-grid, .fw-delivery-grid, .fw-system-grid, .fw-analytics-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin-bottom:22px; }
.fw-delivery-grid, .fw-system-grid, .fw-analytics-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.fw-kpi, .fw-delivery-widget, .fw-system-widget, .fw-analytics-widget, .fw-balance-widget { color:var(--fw-ink,#183b42); background:var(--fw-surface,#fff); border:1px solid #dfebeb; border-radius:20px; min-width:0; box-shadow:0 6px 18px #183b4204; }
.fw-kpi { padding:25px; display:flex; align-items:flex-start; gap:17px; }
.fw-kpi-primary { background:#173d42; color:#fff; border-color:#173d42; }
.fw-kpi-icon, .fw-system-icon, .fw-widget-glyph { flex:0 0 42px; height:42px; width:42px; display:inline-flex; align-items:center; justify-content:center; border-radius:13px; background:#e7f6ef; color:#168477; font-size:23px; }
.fw-kpi-primary .fw-kpi-icon { color:#92e1c9; background:#ffffff14; }
.fw-icon-blue { background:#ebf3fc; color:#5a8baa; }
.fw-icon-violet { background:#f0edfc; color:#8f79b2; }
.fw-kpi-copy { min-width:0; }
.fw-kpi h3 { margin:0 0 12px; color:inherit; font-size:12px; font-weight:650; line-height:1.6; }
.fw-kpi-value { display:block; font-size:34px; font-weight:750; line-height:1.1; letter-spacing:-.035em; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.fw-kpi p { color:#81969a; font-size:11px; line-height:1.6; margin:13px 0 0; }
.fw-kpi-primary p { color:#a7c9c5; }
.fw-delivery-widget { padding:20px 23px; }
.fw-delivery-heading { display:flex; align-items:center; gap:12px; margin-bottom:18px; }
.fw-delivery-heading .fw-kpi-icon { flex-basis:32px; width:32px; height:32px; font-size:20px; border-radius:10px; }
.fw-delivery-heading h3 { margin:0; font-size:13px; line-height:1.6; flex:1; }
.fw-delivery-heading strong { font-size:23px; font-variant-numeric:tabular-nums; }
.fw-metric-track { height:7px; border-radius:6px; overflow:hidden; background:#eaf3ef; }
.fw-metric-track > span { display:block; width:0; height:100%; border-radius:inherit; background:#3ca98f; }
.fw-delivery-failed .fw-kpi-icon { color:#bb6d73; background:#fff0f0; }
.fw-delivery-failed .fw-metric-track { background:#f7edee; }
.fw-delivery-failed .fw-metric-track > span { background:#c98688; }
.fw-system-widget { padding:25px; display:grid; grid-template-columns:52px minmax(0,1fr); gap:18px; }
.fw-system-icon { width:52px; height:52px; border-radius:16px; font-size:29px; }
.fw-system-copy h3 { font-size:17px; font-weight:700; margin:1px 0 19px; }
.fw-system-copy dl { margin:0; display:grid; gap:12px; }
.fw-system-copy dl > div { display:flex; gap:15px; justify-content:space-between; align-items:center; }
.fw-system-copy dt { font-size:12px; font-weight:500; color:#71858a; }
.fw-system-copy dd { margin:0; font-size:13px; font-weight:700; }
.fw-system-widget footer { grid-column:1 / -1; padding-top:16px; border-top:1px solid #e6eeee; display:flex; gap:9px; flex-wrap:wrap; }
.fw-system-widget .btn, .fw-balance-widget .btn { border-radius:10px; font-size:12px; min-height:38px; padding:9px 13px; }
.fw-widget-secondary { background:#eff5f3; color:#50786f; border-color:#e1ece7; }
.fw-status-pill { display:inline-flex; border-radius:20px; padding:4px 9px; color:#238874; background:#e6f7ed; font-size:11px; }
.fw-status-warning { color:#9d7b43; background:#fcf3e5; }
.fw-widget-header { display:flex; align-items:center; gap:12px; padding:21px 24px; border-bottom:1px solid #e6eeee; }
.fw-widget-header > div { min-width:0; flex:1; }
.fw-widget-header h3 { margin:0; font-size:15px; font-weight:700; line-height:1.5; color:inherit; }
.fw-widget-header p { margin:6px 0 0; color:#82949a; font-size:11px; line-height:1.5; }
.fw-widget-glyph { flex-basis:35px; width:35px; height:35px; font-size:21px; border-radius:11px; }
.fw-widget-expand { display:grid; place-items:center; flex:0 0 31px; height:31px; border-radius:9px; border:1px solid #e5eeee; color:#7d9296; background:transparent; }
.fw-widget-expand:hover { color:#168477; background:#eef6f3; }
.fw-widget-expand[hidden] { display:none; }
.fw-widget-body { padding:12px 16px 16px; }
.fw-widget-body iframe { width:100%; min-height:370px; display:block; color-scheme:light; }
.fw-analytics-widget.fw-widget-wide, .fw-analytics-widget.is-expanded { grid-column:1 / -1; }
.fw-balance-widget { padding:24px; }
.fw-balance-widget h3 { font-size:16px; margin-bottom:18px; }
.fw-balance-widget > strong { font-size:29px; }
.fw-balance-widget p { color:#82949a; font-size:12px; margin:10px 0 18px; }
.fw-chart-document { margin:0; padding:0; font:13px/1.6 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:#365459; background:#fff; }
.fw-chart-shell { width:100%; min-height:330px; overflow:hidden; }
.fw-chart-toolbar { display:flex; align-items:center; gap:7px; padding:4px 3px 12px; }
.fw-chart-summary { flex:1; color:#8a9d9f; font-size:11px; min-width:0; }
.fw-chart-toolbar button { font:inherit; font-size:11px; padding:5px 10px; border:1px solid #e1ece8; background:#f6faf8; color:#447c6f; border-radius:8px; cursor:pointer; white-space:nowrap; }
.fw-chart-toolbar button:disabled { opacity:.45; cursor:wait; }
.fw-chart-toolbar button:hover { background:#e9f5ee; }
.fw-chart-toolbar button[aria-expanded=true] { color:#fff; border-color:#168477; background:#168477; }
.fw-chart-state { min-height:276px; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#8b9e9c; gap:9px; text-align:center; padding:20px; }
.fw-chart-state[hidden], .fw-chart-data[hidden], .fw-chart-document #chart[hidden] { display:none; }
.fw-chart-state p { margin:6px 0; max-width:260px; }
.fw-chart-spinner { width:30px; height:30px; border:3px solid #e5f1eb; border-top-color:#57ae94; border-radius:50%; animation:fwChartSpin .8s linear infinite; }
.fw-chart-state.is-error { color:#a76f69; }
.fw-chart-state.is-error .fw-chart-spinner, .fw-chart-state.is-empty .fw-chart-spinner { display:none; }
.fw-chart-data { overflow:auto; max-height:300px; margin-top:14px; border:1px solid #dceae3; border-radius:10px; }
.fw-chart-data table { width:100%; border-collapse:collapse; font-size:12px; text-align:start; }
.fw-chart-data th, .fw-chart-data td { padding:9px 12px; border-bottom:1px solid #e9f1ed; white-space:nowrap; text-align:start; }
.fw-chart-data th { font-size:11px; font-weight:650; color:#548475; background:#edf6f1; position:sticky; top:0; }
.fw-chart-data tr:last-child td { border-bottom:0; }
.fw-chart-data caption { padding:10px; color:#7a938a; font-size:11px; text-align:start; caption-side:top; }
.fw-chart-document .apexcharts-tooltip { color:#294d46; border-radius:10px; border-color:#dfebe5; box-shadow:0 8px 24px #17392f16; }
.fw-chart-document .apexcharts-legend { gap:4px; }
.fw-chart-document .apexcharts-legend-series { display:flex!important; gap:5px; align-items:center; }
.fw-chart-document .apexcharts-canvas { margin:auto; }
[data-theme=dark] .fw-kpi, [data-theme=dark] .fw-delivery-widget, [data-theme=dark] .fw-system-widget, [data-theme=dark] .fw-analytics-widget, [data-theme=dark] .fw-balance-widget { color:#d7eae8; border-color:#29484b; background:#17353c; }
[data-theme=dark] .fw-kpi-primary { background:#1c5052; border-color:#285e5c; }
[data-theme=dark] .fw-widget-header, [data-theme=dark] .fw-system-widget footer { border-color:#2c474b; }
[data-theme=dark] .fw-kpi-icon, [data-theme=dark] .fw-widget-glyph, [data-theme=dark] .fw-system-icon { background:#284d47; color:#75c0ac; }
[data-theme=dark] .fw-chart-document { color:#c7ddda; background:#17353c; }
[data-theme=dark] .fw-chart-toolbar button, [data-theme=dark] .fw-chart-data th { color:#a1cbbd; background:#1b3b39; border-color:#31584f; }
[data-theme=dark] .fw-chart-data, [data-theme=dark] .fw-chart-data td { border-color:#31514a; }
@keyframes fwChartSpin { to { transform:rotate(360deg); } }
@media (max-width:1100px) { .fw-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.fw-kpi-primary { grid-column:1 / -1; }.fw-kpi-value { font-size:32px; } }
@media (max-width:767px) { .fw-kpi-grid, .fw-delivery-grid, .fw-system-grid, .fw-analytics-grid { grid-template-columns:minmax(0,1fr); gap:13px; margin-bottom:16px; }.fw-kpi { padding:20px; }.fw-delivery-widget { padding:18px; }.fw-widget-header { padding:17px; gap:10px; }.fw-widget-body { padding:9px; }.fw-system-widget { padding:20px; grid-template-columns:42px minmax(0,1fr); gap:12px; }.fw-system-icon { width:42px;height:42px; }.fw-chart-summary { font-size:10px; }.fw-chart-toolbar button { padding:5px 8px; } }
@media (prefers-reduced-motion:reduce) { .fw-chart-spinner { animation:none; border-color:#57ae94; } }
