/* ==========================================================================
   AFYAN LUXURY ERP DASHBOARD STYLESHEET
   Matching the Obsidian & Gold Design Architecture
   ========================================================================== */

body.afyan-on-dashboard #page-Workspaces .page-head,
body.afyan-on-dashboard #page-Workspaces .editor-js-container,
body.afyan-on-dashboard #page-Workspaces .codex-editor,
body.afyan-on-dashboard #page-Workspaces .workspace-content,
body.afyan-on-dashboard #page-Workspaces .onboarding-widget-box,
body.afyan-on-dashboard #page-Workspaces .widget-onboarding,
body.afyan-on-dashboard #page-Workspaces .widget-group,
body.afyan-on-dashboard #page-Workspaces .layout-side-section,
body.afyan-on-dashboard #page-Workspaces #afyan-dashboard-mount ~ * {
  display: none !important;
}

body.afyan-on-dashboard #page-Workspaces .page-body,
body.afyan-on-dashboard #page-Workspaces .page-wrapper,
body.afyan-on-dashboard #page-Workspaces .page-content,
body.afyan-on-dashboard #page-Workspaces .layout-main,
body.afyan-on-dashboard #page-Workspaces .layout-main-section-wrapper,
body.afyan-on-dashboard #page-Workspaces .layout-main-section {
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  min-height: calc(100vh - 60px) !important;
}

/* Page isolation: only the active page-container is visible */
#body > .page-container {
  box-sizing: border-box;
}

body.afyan-on-dashboard #page-Workspaces {
  display: block !important;
}

body.afyan-on-dashboard .page-container:not(#page-Workspaces) {
  display: none !important;
}

#afyan-dashboard-mount {
  display: block !important;
  width: 100% !important;
  min-height: calc(100vh - 60px) !important;
  position: relative !important;
  z-index: 10 !important;
}

.afyan-dashboard-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 18px 24px 36px 24px;
  background: #f8fafc;
  min-height: calc(100vh - 56px);
  box-sizing: border-box;
  font-family: var(--font-stack, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  color: #0f172a;
}

/* 1. Header Greeting Section */
.afyan-dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.afyan-greeting-title {
  font-size: 22px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.afyan-greeting-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.afyan-datetime-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 8px 16px;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.afyan-datetime-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.afyan-datetime-item svg {
  color: #94a3b8;
}

.afyan-refresh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.afyan-refresh-btn:hover {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
  transform: rotate(180deg);
}

/* 2. Main Grid Layout (Left Main Content 72% + Right Widgets 28%) */
.afyan-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.afyan-dash-left-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.afyan-dash-right-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* 3. Top Row KPI Cards */
.afyan-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.afyan-kpi-subtitle {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
  margin-bottom: 4px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.afyan-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.afyan-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
  border-color: #cbd5e1;
}

.afyan-kpi-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.afyan-kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-kpi-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  line-height: 1.3;
}

.afyan-kpi-value {
  font-size: 23px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  line-height: 1.2;
}

.afyan-kpi-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
}

.afyan-kpi-trend.trend-up {
  color: #16a34a;
}

.afyan-kpi-trend.trend-down {
  color: #dc2626;
}

.afyan-kpi-trend-sub {
  color: #94a3b8;
  font-weight: 400;
  margin-left: 2px;
}

/* 4. Charts Section (Revenue Overview + Business Segments) */
.afyan-charts-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
}

.afyan-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.afyan-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.afyan-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}

.afyan-card-action-link {
  font-size: 12px;
  font-weight: 600;
  color: #b45309;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
  cursor: pointer;
}

.afyan-card-action-link:hover {
  color: #78350f;
  text-decoration: underline;
}

/* Chart Legend */
.afyan-chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
}

.afyan-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.afyan-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Chart Canvas / SVG Container */
.afyan-chart-wrapper {
  position: relative;
  width: 100%;
  height: 190px;
}

.afyan-line-chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Donut Chart Layout */
.afyan-donut-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 190px;
}

.afyan-donut-svg-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
  flex-shrink: 0;
}

.afyan-donut-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.afyan-donut-center-val {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.1;
}

.afyan-donut-center-lbl {
  font-size: 9.5px;
  font-weight: 600;
  color: #64748b;
  margin-top: 2px;
}

.afyan-donut-legend-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.afyan-donut-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #334155;
}

.afyan-donut-legend-left {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.afyan-donut-legend-pct {
  font-weight: 700;
  color: #0f172a;
}

/* 5. Key Modules Grid (6 Columns) */
.afyan-modules-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.afyan-section-heading {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.afyan-modules-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.afyan-module-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.afyan-module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
  border-color: #f59e0b;
}

.afyan-module-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.afyan-module-title {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.afyan-module-count {
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.1;
  margin-bottom: 2px;
}

.afyan-module-subtitle {
  font-size: 10.5px;
  color: #64748b;
  margin-bottom: 10px;
}

.afyan-module-link {
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: auto;
}

/* 6. Lower Left Grid (Recent Activity + Upcoming Calendar) */
.afyan-lower-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Recent Activity List */
.afyan-activity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.afyan-activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #f8fafc;
  cursor: pointer;
}

.afyan-activity-item:last-child {
  border-bottom: none;
}

.afyan-activity-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.afyan-activity-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-activity-text {
  font-size: 12px;
  font-weight: 500;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.afyan-activity-time {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Upcoming Calendar */
.afyan-calendar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.afyan-calendar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

.afyan-calendar-date-pill {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 8px;
  text-align: center;
  min-width: 52px;
  flex-shrink: 0;
}

.afyan-cal-day {
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
}

.afyan-cal-name {
  font-size: 9.5px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
}

.afyan-calendar-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.afyan-cal-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.afyan-cal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.afyan-cal-title {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.afyan-cal-time {
  font-size: 11px;
  color: #64748b;
  padding-left: 13px;
}

/* 7. Right Column Widgets */

/* Quick Actions 2x3 Grid */
.afyan-quick-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.afyan-quick-action-btn {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  text-decoration: none;
  color: #1e293b;
  transition: all 0.2s ease;
  cursor: pointer;
  text-align: left;
}

.afyan-quick-action-btn:hover {
  background: #fffbeb;
  border-color: #fde68a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.08);
}

.afyan-qa-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #fff7ed;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b45309;
}

.afyan-qa-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.2;
}

/* My Tasks Checklist */
.afyan-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.afyan-task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #f8fafc;
  transition: opacity 0.2s ease;
}

.afyan-task-item:last-child {
  border-bottom: none;
}

.afyan-task-item.completed .afyan-task-title {
  text-decoration: line-through;
  color: #94a3b8;
}

.afyan-task-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.afyan-task-checkbox:hover {
  border-color: #f59e0b;
}

.afyan-task-checkbox.checked {
  background: #f59e0b;
  border-color: #f59e0b;
}

.afyan-task-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.afyan-task-title {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

.afyan-task-item.completed {
  opacity: 0.55;
}

.afyan-task-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.afyan-task-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  text-transform: uppercase;
}

.afyan-task-due {
  font-size: 10.5px;
  color: #94a3b8;
}

/* Notifications Widget */
.afyan-notifications-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.afyan-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #f8fafc;
  cursor: pointer;
}

.afyan-notif-item:last-child {
  border-bottom: none;
}

.afyan-notif-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.afyan-notif-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.afyan-notif-title {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.afyan-notif-sub {
  font-size: 11px;
  color: #64748b;
}

.afyan-notif-time {
  font-size: 10.5px;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Tooltip for chart points */
.afyan-chart-tooltip {
  position: absolute;
  background: #0f172a;
  color: #ffffff;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
  transform: translate(-50%, -120%);
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 50;
  opacity: 0;
  transition: opacity 0.15s ease;
}

/* Empty State Message */
.afyan-empty-msg {
  padding: 16px 8px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
  font-style: italic;
}

/* ==========================================================================
   CRM & SALES WORKSPACE SPECIFIC STYLES
   ========================================================================== */

.afyan-sales-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.afyan-sales-title {
  font-size: 22px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.afyan-sales-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.afyan-btn-new-lead {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #d97706;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
}

.afyan-btn-new-lead:hover {
  background: #b45309;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.35);
}

.afyan-dropdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s ease;
}

.afyan-dropdown-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Sales Middle Row (Pipeline Funnel + Sales Performance) */
.afyan-sales-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 20px;
  margin-bottom: 20px;
}

/* Sales Pipeline Layout */
.afyan-pipeline-layout {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 180px;
}

.afyan-funnel-col {
  width: 175px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.afyan-funnel-svg {
  width: 100%;
  height: 160px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.04));
}

.afyan-funnel-slice {
  transition: opacity 0.2s ease, filter 0.2s ease;
  cursor: pointer;
}

.afyan-funnel-slice:hover {
  opacity: 0.85;
  filter: brightness(1.1);
}

.afyan-stages-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.afyan-stage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #334155;
  padding: 2px 0;
}

.afyan-stage-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #1e293b;
}

.afyan-stage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.afyan-stage-name {
  font-size: 12px;
  font-weight: 600;
}

.afyan-stage-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.afyan-stage-count {
  font-weight: 700;
  color: #0f172a;
  width: 28px;
  text-align: right;
  font-size: 12.5px;
}

.afyan-stage-pct {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  width: 32px;
  text-align: right;
}

/* Sales Performance Points */
.afyan-sales-chart-dot {
  cursor: pointer;
  transition: r 0.15s ease;
}

.afyan-sales-chart-dot:hover {
  r: 6;
}

/* Sales Bottom Row (Recent Leads + Quick Actions) */
.afyan-sales-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

/* Recent Leads Table Card */
.afyan-leads-table-container {
  overflow-x: auto;
  margin-top: 4px;
}

.afyan-leads-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.afyan-leads-table th {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.afyan-leads-table td {
  padding: 12px 12px;
  font-size: 12.5px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.afyan-lead-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.afyan-lead-row:hover {
  background: #f8fafc;
}

.afyan-lead-row:last-child td {
  border-bottom: none;
}

.lead-name-cell {
  font-weight: 600;
  color: #0f172a;
}

.lead-company-cell {
  color: #475569;
}

.lead-source-cell {
  color: #64748b;
}

.lead-owner-cell {
  color: #475569;
}

.lead-date-cell {
  color: #64748b;
  font-size: 11.5px;
  white-space: nowrap;
}

.lead-arrow-cell {
  text-align: right;
  padding-right: 6px;
}

.afyan-lead-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}

.afyan-empty-cell {
  padding: 24px 12px;
  text-align: center;
  color: #94a3b8;
  font-style: italic;
  font-size: 12px;
}

/* Sales Quick Actions Grid (2 columns x 3 rows) */
.afyan-sales-qa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.afyan-sales-qa-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.afyan-sales-qa-btn:hover {
  background: #fefce8;
  border-color: #fde68a;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
}

.afyan-sales-qa-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-sales-qa-label {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.2;
}

/* ==========================================================================
   9. Customers Workspace Specific Styling
   ========================================================================== */

.afyan-customer-dashboard {
  animation: afyanFadeIn 0.3s ease-out;
}

/* Customer Workspace Header */
.afyan-cust-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.afyan-cust-header-left {
  display: flex;
  flex-direction: column;
}

.afyan-cust-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.4px;
  margin: 0;
  line-height: 1.2;
}

.afyan-cust-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 2px 0 0 0;
}

.afyan-cust-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Customer Search Box & Dropdown in Header */
.afyan-cust-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.afyan-cust-search-icon {
  position: absolute;
  left: 11px;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.afyan-cust-search-input {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 12px 7px 32px;
  font-size: 12.5px;
  color: #0f172a;
  width: 190px;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  height: 35px;
}

.afyan-cust-search-input::placeholder {
  color: #94a3b8;
  font-size: 12px;
}

.afyan-cust-search-input:focus {
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.12);
  width: 220px;
}

.afyan-cust-dropdown-wrapper {
  position: relative;
}

.afyan-cust-dropdown-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  height: 35px;
}

.afyan-cust-dropdown-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.afyan-cust-dropdown-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  min-width: 160px;
  z-index: 1000;
  padding: 4px;
}

.afyan-cust-menu-item {
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s;
}

.afyan-cust-menu-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.afyan-cust-menu-item.active {
  background: #fef3c7;
  color: #b45309;
  font-weight: 700;
}

/* Customer Table Card Header */
.afyan-cust-table-header {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.afyan-cust-table-header .afyan-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.afyan-cust-header-arrow {
  color: #94a3b8;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

/* Primary + New Customer Button */
.afyan-cust-btn-new {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
  transition: all 0.2s ease;
}

.afyan-cust-btn-new:hover {
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
  transform: translateY(-1px);
}

/* Middle Section: 68% Customers Table / 32% Selected Customer Info */
.afyan-cust-middle-grid {
  display: grid;
  grid-template-columns: 2.15fr 1fr;
  gap: 14px;
  margin-top: 14px;
  transition: all 0.3s ease;
}

.afyan-cust-middle-grid.full-table-mode {
  grid-template-columns: 1fr !important;
}

.afyan-cust-middle-grid.full-table-mode #afyan-cust-selected-card {
  display: none !important;
}

.afyan-cust-table-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.afyan-cust-table-container {
  overflow-x: auto;
  min-height: 290px;
}

.afyan-cust-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.afyan-cust-table thead th {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}

.afyan-cust-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}

.afyan-cust-table tbody tr:hover {
  background: #f8fafc;
}

.afyan-cust-table tbody tr.afyan-row-selected {
  background: #fef3c7 !important;
  box-shadow: inset 3px 0 0 #d97706;
}

.afyan-cust-table tbody tr.afyan-row-selected td {
  color: #1e293b;
}

.afyan-cust-table tbody tr.afyan-row-selected .cust-name-cell {
  color: #b45309;
  font-weight: 700;
}

.afyan-cust-table tbody td {
  padding: 9.5px 10px;
  font-size: 12px;
  border-bottom: 1px solid #f8fafc;
  color: #334155;
  vertical-align: middle;
}

.cust-name-cell {
  font-weight: 600;
  color: #0f172a;
}

.cust-type-cell {
  color: #64748b;
}

.cust-email-cell {
  color: #64748b;
}

.cust-phone-cell {
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 11.5px;
}

.afyan-cust-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.cust-date-cell {
  color: #64748b;
  font-size: 11.5px;
  white-space: nowrap;
}

/* Pagination Footer */
.afyan-cust-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid #f1f5f9;
}

.afyan-pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.afyan-page-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.afyan-page-btn:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f172a;
}

.afyan-page-btn.active {
  background: #d97706;
  color: #ffffff;
  font-weight: 700;
}

.afyan-page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.afyan-pagination-info {
  font-size: 11.5px;
  color: #64748b;
}

/* Right Selected Customer Card */
.afyan-cust-detail-card {
  display: flex;
  flex-direction: column;
}

.afyan-detail-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.afyan-detail-avatar-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.afyan-detail-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #e0f2fe;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-detail-title-box {
  min-width: 0;
}

.afyan-detail-name {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 3px 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.afyan-detail-tags {
  display: flex;
  align-items: center;
  gap: 6px;
}

.afyan-tag-type {
  background: #f1f5f9;
  color: #475569;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 6px;
}

.afyan-tag-status {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 6px;
}

.tag-active {
  background: #dcfce7;
  color: #16a34a;
}

.tag-inactive {
  background: #fee2e2;
  color: #ef4444;
}

.afyan-detail-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.afyan-detail-action-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.afyan-detail-action-btn:hover {
  border-color: #d97706;
  color: #d97706;
  background: #fffbeb;
}

.afyan-detail-section {
  padding: 9px 0;
  border-bottom: 1px solid #f8fafc;
}

.afyan-detail-sec-title {
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.afyan-detail-sec-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.afyan-detail-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #475569;
}

.afyan-billing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
}

.billing-lbl {
  color: #64748b;
}

.billing-val {
  font-weight: 600;
  color: #0f172a;
}

.afyan-manager-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.afyan-manager-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f59e0b;
  color: #ffffff;
  font-weight: 700;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-manager-name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.afyan-manager-role {
  font-size: 10.5px;
  color: #64748b;
}

.afyan-btn-view-details {
  width: 100%;
  margin-top: 12px;
  padding: 9px;
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.afyan-btn-view-details:hover {
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.25);
  transform: translateY(-1px);
}

/* Bottom Section: 50% Customer Segmentation / 50% Recent Activities */
.afyan-cust-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.afyan-cust-seg-layout {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 20px;
  padding: 8px 0;
}

.afyan-cust-seg-donut-box {
  display: flex;
  justify-content: center;
  align-items: center;
}

.afyan-cust-seg-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 130px;
}

.afyan-seg-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
}

.afyan-seg-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-weight: 500;
}

.afyan-seg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.afyan-seg-pct {
  font-weight: 700;
  color: #0f172a;
}

.afyan-cust-activities-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 0;
}

.afyan-cust-activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.afyan-cust-activity-item:hover {
  transform: translateX(2px);
}

.afyan-cust-activity-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-cust-activity-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.afyan-cust-activity-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.afyan-cust-activity-time {
  font-size: 10.5px;
  color: #94a3b8;
}

/* 8. Responsive Breakpoints */
@media (max-width: 1280px) {
  .afyan-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .afyan-modules-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .afyan-charts-grid,
  .afyan-sales-charts-grid {
    grid-template-columns: 1fr;
  }
  .afyan-sales-bottom-grid {
    grid-template-columns: 1fr;
  }
  .afyan-cust-middle-grid {
    grid-template-columns: 1fr;
  }
  .afyan-cust-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .afyan-dashboard-grid {
    grid-template-columns: 1fr;
  }
  .afyan-dash-right-col {
    grid-template-columns: repeat(2, 1fr);
    display: grid;
  }
  .afyan-dash-right-col .afyan-card:first-child {
    grid-column: span 2;
  }
  .afyan-sales-bottom-grid {
    grid-template-columns: 1fr;
  }
  .afyan-cust-middle-grid {
    grid-template-columns: 1fr;
  }
  .afyan-cust-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .afyan-rate-caption {
    display: none !important;
  }
  .afyan-dashboard-container {
    padding: 12px 14px 28px 14px;
  }
  .afyan-dash-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .afyan-datetime-badge {
    flex-wrap: wrap;
    gap: 6px;
  }
  .afyan-kpi-grid {
    grid-template-columns: 1fr;
  }
  .afyan-modules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .afyan-lower-grid {
    grid-template-columns: 1fr;
  }
  .afyan-dash-right-col {
    display: flex;
    flex-direction: column;
  }
  .afyan-donut-layout {
    flex-direction: column;
    height: auto;
  }
  .afyan-pipeline-layout {
    flex-direction: column;
  }
  .afyan-sales-qa-grid {
    grid-template-columns: 1fr;
  }
  .afyan-cust-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .afyan-cust-header-right {
    width: 100%;
  }
  .afyan-cust-table-toolbar {
    gap: 8px;
  }
  .afyan-cust-toolbar-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  .afyan-cust-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .afyan-filter-inputs-container {
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    gap: 6px;
  }
  .afyan-filter-cell {
    flex: 1 1 120px;
    min-width: 100px;
  }
  .afyan-filter-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .afyan-cust-seg-layout {
    flex-direction: column;
  }
}

/* ==========================================================================
   REPORTS HUB WORKSPACE STYLES
   Exact Match to Attached Reference UI
   ========================================================================== */

.afyan-reports-workspace {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 24px 28px 48px 28px;
  background: #f8fafc;
  font-family: var(--font-stack, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  color: #0f172a;
}

/* 1. Header Section */
.afyan-rep-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 20px;
  flex-wrap: wrap;
}

.afyan-rep-header-left {
  flex: 1;
  min-width: 200px;
}

.afyan-rep-title {
  font-size: 26px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.afyan-rep-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0;
  font-weight: 400;
}

.afyan-rep-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Search Box */
.afyan-rep-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 14px;
  width: 250px;
  height: 38px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.afyan-rep-search-box:focus-within {
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.12);
}

.afyan-rep-search-icon {
  margin-right: 8px;
  flex-shrink: 0;
}

.afyan-rep-search-input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 13px;
  color: #0f172a;
  padding: 0;
}

.afyan-rep-search-input::placeholder {
  color: #94a3b8;
}

.afyan-rep-search-clear {
  background: none;
  border: none;
  font-size: 16px;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  line-height: 1;
}

.afyan-rep-search-clear:hover {
  color: #0f172a;
}

/* Module Filter Dropdown */
.afyan-rep-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.afyan-rep-dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 14px;
  height: 38px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  min-width: 150px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.afyan-rep-dropdown-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.afyan-rep-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  min-width: 200px;
  z-index: 100;
  overflow: hidden;
  padding: 4px 0;
}

.afyan-rep-dropdown-item {
  padding: 8px 14px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease;
}

.afyan-rep-dropdown-item:hover,
.afyan-rep-dropdown-item.active {
  background: #fef3c7;
  color: #b45309;
  font-weight: 600;
}

/* 2. 8 Module Report Cards Grid */
.afyan-rep-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.afyan-rep-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  position: relative;
  min-height: 190px;
  box-sizing: border-box;
}

.afyan-rep-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  border-color: #e2e8f0;
  transform: translateY(-2px);
}

.afyan-rep-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.afyan-rep-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #fef3c7;
  color: #d97706;
}

.afyan-rep-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.3;
}

.afyan-rep-card-body {
  flex: 1;
  margin-bottom: 10px;
}

.afyan-rep-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.afyan-rep-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #475569;
  cursor: pointer;
  padding: 2px 0;
  transition: color 0.15s ease, transform 0.15s ease;
  user-select: none;
}

.afyan-rep-item:hover {
  color: #d97706;
  transform: translateX(3px);
}

.afyan-rep-item-arrow {
  color: #94a3b8;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.afyan-rep-item:hover .afyan-rep-item-arrow {
  color: #d97706;
}

.afyan-rep-item-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.afyan-rep-card-footer {
  text-align: right;
  margin-top: auto;
  padding-top: 6px;
}

.afyan-rep-view-all {
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.afyan-rep-view-all:hover {
  color: #d97706;
  text-decoration: underline;
}

/* 3. Bottom 3 Feature Action Cards */
.afyan-rep-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.afyan-rep-feature-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  min-height: 150px;
  box-sizing: border-box;
}

.afyan-rep-feature-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  border-color: #e2e8f0;
}

.afyan-rep-feature-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.afyan-rep-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-rep-feature-meta {
  flex: 1;
}

.afyan-rep-feature-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.afyan-rep-feature-desc {
  font-size: 12.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

.afyan-rep-feature-action {
  width: 100%;
}

.afyan-rep-btn-primary {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #b45309 0%, #d97706 50%, #b45309 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(180, 83, 9, 0.2);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.afyan-rep-btn-primary:hover {
  background: linear-gradient(135deg, #92400e 0%, #b45309 50%, #92400e 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(180, 83, 9, 0.3);
}

/* Empty State */
.afyan-rep-empty-state {
  grid-column: 1 / -1;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  color: #64748b;
  margin-bottom: 24px;
}

.afyan-rep-empty-state h3 {
  color: #0f172a;
  margin: 12px 0 6px 0;
  font-size: 16px;
  font-weight: 700;
}

.afyan-rep-empty-state p {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
}

.afyan-rep-empty-state .afyan-rep-btn-primary {
  display: inline-block;
  width: auto;
  padding: 8px 22px;
  margin: 0 auto;
}

/* Responsive Breakpoints */
@media (max-width: 1280px) {
  .afyan-rep-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .afyan-rep-cards-grid {
    grid-template-columns: 1fr;
  }
  .afyan-rep-features-grid {
    grid-template-columns: 1fr;
  }
  .afyan-rep-header {
    flex-direction: column;
    align-items: stretch;
  }
  .afyan-rep-header-right {
    flex-direction: column;
    align-items: stretch;
  }
  .afyan-rep-search-box {
    width: 100%;
  }
  .afyan-rep-dropdown-btn {
    width: 100%;
  }
}

/* ==========================================================================
   HR & PAYROLL WORKSPACE STYLES
   Exact Match to Attached Reference UI
   ========================================================================== */

.afyan-hr-workspace {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 22px 26px 40px 26px;
  background: #f8fafc;
  font-family: var(--font-stack, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  color: #0f172a;
}

/* 1. Header */
.afyan-hr-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.afyan-hr-header-left {
  flex: 1;
  min-width: 200px;
}

.afyan-hr-title {
  font-size: 24px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.afyan-hr-subtitle {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
}

.afyan-hr-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.afyan-hr-daterange-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 14px;
  height: 38px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.afyan-hr-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.afyan-hr-dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 14px;
  height: 38px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  min-width: 150px;
  transition: all 0.2s ease;
}

.afyan-hr-dropdown-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.afyan-hr-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  min-width: 200px;
  z-index: 100;
  padding: 4px 0;
  overflow: hidden;
}

.afyan-hr-dropdown-item {
  padding: 8px 14px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease;
}

.afyan-hr-dropdown-item:hover,
.afyan-hr-dropdown-item.active {
  background: #fef3c7;
  color: #b45309;
  font-weight: 600;
}

/* 2. Top 4 KPI Cards Grid */
.afyan-hr-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.afyan-hr-kpi-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.afyan-hr-kpi-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  border-color: #e2e8f0;
  transform: translateY(-2px);
}

.afyan-hr-kpi-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.afyan-hr-kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-hr-kpi-title {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.afyan-hr-kpi-val {
  font-size: 26px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.1;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.afyan-hr-kpi-trend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}

.afyan-hr-kpi-trend.up .trend-arrow {
  color: #16a34a;
}

.afyan-hr-kpi-trend.down .trend-arrow {
  color: #ef4444;
}

.afyan-hr-kpi-trend .trend-lbl {
  color: #94a3b8;
  font-weight: 400;
}

/* Common Card Styles */
.afyan-hr-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.afyan-hr-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.afyan-hr-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.afyan-hr-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.afyan-hr-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef3c7;
  color: #b45309;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.afyan-hr-filter-tag a {
  color: #b45309;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
}

.afyan-hr-card-link {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.afyan-hr-card-link:hover {
  color: #d97706;
  text-decoration: underline;
}

.afyan-hr-card-body {
  flex: 1;
}

.afyan-hr-card-body.p-0 {
  padding: 0 !important;
}

/* 3. Row 2: Attendance Overview & Department Wise */
.afyan-hr-row-2 {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.afyan-hr-att-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: #64748b;
}

.afyan-hr-att-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.afyan-hr-att-legend .legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.afyan-hr-att-svg-wrapper {
  position: relative;
  width: 100%;
}

.afyan-att-svg {
  width: 100%;
  height: 175px;
  display: block;
}

.afyan-att-bar-slice {
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.afyan-att-bar-slice:hover {
  opacity: 0.8;
}

.afyan-hr-dep-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 315px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.afyan-hr-dep-list::-webkit-scrollbar {
  width: 5px;
}

.afyan-hr-dep-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 4px;
}

.afyan-hr-dep-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.afyan-hr-dep-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.afyan-hr-dep-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
}

.afyan-hr-dep-item:hover,
.afyan-hr-dep-item.active {
  background: #fef3c7;
  color: #b45309;
}

.afyan-hr-dep-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.afyan-hr-dep-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-hr-dep-name {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.afyan-hr-dep-item.active .afyan-hr-dep-name,
.afyan-hr-dep-item:hover .afyan-hr-dep-name {
  color: #b45309;
}

.afyan-hr-dep-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.afyan-hr-dep-count {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.afyan-hr-dep-arrow {
  font-size: 16px;
  color: #94a3b8;
  line-height: 1;
}

/* 4. Row 3: Recent Employees & Quick Actions */
.afyan-hr-row-3 {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

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

.afyan-hr-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.afyan-hr-table td {
  font-size: 12.5px;
  padding: 10px 12px;
  border-bottom: 1px solid #f8fafc;
  vertical-align: middle;
}

.afyan-hr-table tbody tr:hover {
  background: #f8fafc;
  cursor: pointer;
}

.afyan-hr-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

.afyan-hr-qa-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.afyan-hr-qa-item {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.afyan-hr-qa-item:hover {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.afyan-hr-qa-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.afyan-hr-qa-title {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

/* 5. Row 4: Payroll Summary, Salary Structure, Leave Requests */
.afyan-hr-row-4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.afyan-hr-sum-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.afyan-hr-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #475569;
}

.afyan-hr-sum-row .val {
  font-weight: 600;
  color: #0f172a;
}

.afyan-hr-sum-row.net-pay {
  background: #fef3c7;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 6px;
}

.afyan-hr-sum-row.net-pay .lbl,
.afyan-hr-sum-row.net-pay .val {
  color: #b45309;
  font-weight: 600;
  font-size: 14px;
}

.afyan-hr-donut-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.afyan-hr-donut-svg-wrapper {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.afyan-hr-donut-svg {
  width: 100%;
  height: 100%;
}

.afyan-hr-donut-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.afyan-hr-donut-legend-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.afyan-hr-donut-legend-row .legend-left {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #475569;
}

.afyan-hr-donut-legend-row .legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.afyan-hr-donut-legend-row .legend-pct {
  font-weight: 700;
  color: #0f172a;
}

.afyan-hr-leaves-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.afyan-hr-leave-item {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, 0.7fr) minmax(0, 0.9fr);
  gap: 10px;
  align-items: center;
  font-size: 12px;
  padding: 9px 12px;
  background: #f8fafc;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.afyan-hr-leave-item:hover {
  background: #f1f5f9;
}

.afyan-hr-leave-item > * {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.afyan-hr-leave-item .name {
  font-weight: 600;
  color: #0f172a;
}

.afyan-hr-leave-item .date {
  color: #64748b;
}

.afyan-hr-leave-item .days {
  color: #94a3b8;
}

/* 6. Row 5: HR Documents, Payroll Reports, Productivity */
.afyan-hr-row-5 {
  display: grid;
  grid-template-columns: 1.3fr 0.85fr 0.85fr;
  gap: 16px;
  margin-bottom: 20px;
}

.afyan-hr-reports-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.afyan-hr-report-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.afyan-hr-report-item:hover {
  background: #f1f5f9;
}

.afyan-hr-report-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.afyan-hr-report-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-hr-report-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.afyan-hr-btn-view {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.afyan-hr-btn-view:hover {
  background: #fef3c7;
  color: #b45309;
  border-color: #d97706;
}

.afyan-hr-prod-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.afyan-hr-prod-item {
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.afyan-hr-prod-item .lbl {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.afyan-hr-prod-item .val-group {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.afyan-hr-prod-item .val {
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
}

.afyan-hr-prod-item .trend.up {
  font-size: 11px;
  font-weight: 700;
  color: #16a34a;
}

/* 7. Footer */
.afyan-hr-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  margin-top: 8px;
}

.afyan-hr-updated {
  font-size: 12px;
  color: #94a3b8;
}

.afyan-hr-footer-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

/* Responsive Breakpoints */
@media (max-width: 1280px) {
  .afyan-hr-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .afyan-hr-row-2,
  .afyan-hr-row-3 {
    grid-template-columns: 1fr;
  }
  .afyan-hr-row-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .afyan-hr-row-5 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .afyan-hr-kpi-grid {
    grid-template-columns: 1fr;
  }
  .afyan-hr-row-4,
  .afyan-hr-row-5 {
    grid-template-columns: 1fr;
  }
  .afyan-hr-header {
    flex-direction: column;
    align-items: stretch;
  }
  .afyan-hr-header-right {
    flex-direction: column;
    align-items: stretch;
  }
  .afyan-hr-daterange-btn,
  .afyan-hr-dropdown-btn {
    width: 100%;
  }
}

/* ==========================================================================
   REPORTS HUB - 4 VIEWS EXPANSION (Reporting & Dashboard, All Reports, Custom, Scheduled)
   ========================================================================== */

/* Top Navigation Tabs Bar */
.afyan-rep-tabs-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.afyan-rep-tabs-list {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  flex-wrap: wrap;
}

.afyan-rep-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.afyan-rep-tab-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.afyan-rep-tab-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
  border-color: #b45309;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}

.afyan-rep-tab-btn.active svg {
  stroke: #ffffff;
}

.afyan-rep-tab-count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
}

.afyan-rep-tab-btn.active .afyan-rep-tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* KPI Summary Cards Grid */
.afyan-rep-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.afyan-rep-view-scheduled-reports .afyan-rep-kpi-grid {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1400px) {
  .afyan-rep-view-scheduled-reports .afyan-rep-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991px) {
  .afyan-rep-view-scheduled-reports .afyan-rep-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .afyan-rep-view-scheduled-reports .afyan-rep-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.afyan-rep-kpi-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.afyan-rep-kpi-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  border-color: #e2e8f0;
}

.afyan-rep-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.afyan-rep-kpi-title {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  margin: 0;
}

.afyan-rep-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.afyan-rep-kpi-value {
  font-size: 26px;
  font-weight: 600;
  color: #0f172a;
  margin: 10px 0 4px 0;
  letter-spacing: -0.02em;
}

.afyan-rep-kpi-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: #059669;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Analytics Row (Charts + Breakdown) */
.afyan-rep-analytics-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.afyan-rep-chart-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.afyan-rep-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.afyan-rep-chart-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.afyan-rep-chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.afyan-rep-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.afyan-rep-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.afyan-rep-bars-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 190px;
  padding-top: 20px;
  gap: 12px;
}

.afyan-rep-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  height: 100%;
  justify-content: flex-end;
}

.afyan-rep-bar-group {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 150px;
  width: 100%;
  justify-content: center;
}

.afyan-rep-bar {
  width: 14px;
  border-radius: 4px 4px 0 0;
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 4px;
}

.afyan-rep-bar.billed {
  background: linear-gradient(180deg, #d97706 0%, #b45309 100%);
}

.afyan-rep-bar.collected {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.afyan-rep-bar-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  margin-top: 10px;
  text-align: center;
}

/* Department Breakdown List */
.afyan-rep-dep-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.afyan-rep-dep-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.afyan-rep-dep-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.afyan-rep-dep-track {
  width: 100%;
  height: 8px;
  background: #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
}

.afyan-rep-dep-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease;
}

/* Launchpad Grid */
.afyan-rep-launchpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.afyan-rep-launch-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  cursor: pointer;
}

.afyan-rep-launch-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
}

.afyan-rep-launch-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.afyan-rep-launch-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-rep-launch-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 2px 0;
}

.afyan-rep-launch-cat {
  font-size: 11.5px;
  color: #64748b;
  margin: 0;
}

.afyan-rep-launch-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid #f8fafc;
}

.afyan-rep-launch-metric {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.afyan-rep-launch-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
}

/* Data Tables */
.afyan-rep-table-container {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 24px;
}

.afyan-rep-table-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.afyan-rep-table-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.afyan-rep-table-wrapper {
  overflow-x: auto;
}

.afyan-rep-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.afyan-rep-table th {
  background: #f8fafc;
  padding: 11px 16px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e2e8f0;
}

.afyan-rep-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.afyan-rep-table tr:hover td {
  background: #f8fafc;
}

.afyan-rep-btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.afyan-rep-btn-sm.primary {
  background: #d97706;
  color: #ffffff;
  border: none;
}

.afyan-rep-btn-sm.primary:hover {
  background: #b45309;
}

.afyan-rep-btn-sm.outline {
  background: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.afyan-rep-btn-sm.outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.afyan-rep-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.afyan-rep-pill.active {
  background: #d1fae5;
  color: #065f46;
}

.afyan-rep-pill.paused {
  background: #fef3c7;
  color: #92400e;
}

.afyan-rep-pill.builder {
  background: #e0f2fe;
  color: #0369a1;
}

.afyan-rep-pill.query {
  background: #ede9fe;
  color: #6d28d9;
}

.afyan-rep-pill.pdf {
  background: #fee2e2;
  color: #991b1b;
}

.afyan-rep-pill.xlsx {
  background: #d1fae5;
  color: #065f46;
}

.afyan-rep-pill.csv {
  background: #fef3c7;
  color: #92400e;
}

/* Header Action Button */
.afyan-rep-btn-header {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #b45309 0%, #d97706 50%, #b45309 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0 16px;
  height: 38px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(180, 83, 9, 0.2);
  transition: all 0.2s ease;
  text-decoration: none;
  box-sizing: border-box;
}

.afyan-rep-btn-header:hover {
  background: linear-gradient(135deg, #92400e 0%, #b45309 50%, #92400e 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(180, 83, 9, 0.3);
  color: #ffffff;
}

@media (max-width: 1200px) {
  .afyan-rep-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .afyan-rep-analytics-row {
    grid-template-columns: 1fr;
  }
  .afyan-rep-launchpad-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .afyan-rep-kpi-grid {
    grid-template-columns: 1fr;
  }
  .afyan-rep-launchpad-grid {
    grid-template-columns: 1fr;
  }
  .afyan-rep-header {
    flex-direction: column;
    align-items: stretch;
  }
  .afyan-rep-header-right {
    flex-direction: column;
    align-items: stretch;
  }
  .afyan-rep-search-box {
    width: 100%;
  }
}

/* ==========================================================================
   REPORTING & DASHBOARD VIEW - PIXEL PERFECT STYLES (Matching Screenshot)
   ========================================================================== */

.afyan-rep-view-reporting-dashboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Header Controls */
.afyan-rep-daterange-wrapper,
.afyan-rep-export-wrapper {
  position: relative;
}

.afyan-rep-daterange-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 14px;
  height: 38px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.afyan-rep-daterange-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.afyan-rep-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border: none;
  border-radius: 8px;
  padding: 0 16px;
  height: 38px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.afyan-rep-export-btn:hover {
  background: linear-gradient(135deg, #b45309 0%, #92400e 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.35);
}

.afyan-rep-daterange-dropdown,
.afyan-rep-export-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  min-width: 220px;
  z-index: 1000;
  padding: 6px 0;
  display: none;
}

.afyan-rep-daterange-dropdown .afyan-rep-dropdown-item,
.afyan-rep-export-dropdown .afyan-rep-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease;
}

.afyan-rep-daterange-dropdown .afyan-rep-dropdown-item:hover,
.afyan-rep-export-dropdown .afyan-rep-dropdown-item:hover {
  background: #f8fafc;
  color: #0f172a;
}

.afyan-rep-daterange-dropdown .afyan-rep-dropdown-item.active {
  background: #fef3c7;
  color: #b45309;
  font-weight: 700;
}

/* 1. Top 4 KPI Cards Grid */
.afyan-rep-top-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.afyan-rep-top-kpi-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.afyan-rep-top-kpi-card:hover {
  border-color: #e2e8f0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.afyan-rep-card-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.afyan-rep-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-rep-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.afyan-rep-card-value {
  font-size: 26px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.afyan-rep-trend-row {
  display: flex;
  align-items: center;
}

.afyan-rep-trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
}

.afyan-rep-trend-badge.up {
  color: #16a34a;
}

.afyan-rep-trend-badge.down {
  color: #ef4444;
}

/* 2. Common Box Card */
.afyan-rep-box-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
}

.afyan-rep-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.afyan-rep-box-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.afyan-rep-view-all-link {
  font-size: 12.5px;
  font-weight: 600;
  color: #0284c7;
  text-decoration: none;
  transition: color 0.15s ease;
}

.afyan-rep-view-all-link:hover {
  color: #0369a1;
  text-decoration: underline;
}

/* 3. Middle Grid: Monthly Chart (65%) & Business Segment Donut (35%) */
.afyan-rep-mid-grid {
  display: grid;
  grid-template-columns: 1.75fr 1fr;
  gap: 16px;
}

.afyan-rep-legend-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.afyan-rep-legend-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.afyan-rep-legend-box {
  width: 14px;
  height: 7px;
  border-radius: 2px;
}

.afyan-rep-legend-box.rev {
  background: #f59e0b;
}

.afyan-rep-legend-box.exp {
  background: #1e3a5f;
}

/* Monthly Grouped Bars Chart */
.afyan-rep-chart-wrapper {
  display: flex;
  gap: 12px;
  height: 200px;
  margin-top: 6px;
}

.afyan-rep-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 22px;
  font-size: 10.5px;
  font-weight: 600;
  color: #94a3b8;
  width: 32px;
}

.afyan-rep-bars-area {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.afyan-rep-gridlines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.afyan-rep-gridline {
  width: 100%;
  height: 1px;
  background: #f1f5f9;
}

.afyan-rep-month-cols {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 2;
}

.afyan-rep-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  height: 100%;
  justify-content: flex-end;
  cursor: pointer;
}

.afyan-rep-col-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 175px;
  margin-bottom: 6px;
}

.afyan-rep-bar-stick {
  width: 13px;
  border-radius: 3px 3px 0 0;
  transition: all 0.3s ease;
}

.afyan-rep-bar-stick.exp {
  background: #1e3a5f;
}

.afyan-rep-bar-stick.rev {
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
}

.afyan-rep-col:hover .afyan-rep-bar-stick {
  filter: brightness(1.15);
  transform: scaleY(1.02);
  transform-origin: bottom;
}

.afyan-rep-col-lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  height: 16px;
  line-height: 16px;
}

/* Business Segment Donut & Legend Layout */
.afyan-rep-segment-layout {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 200px;
}

.afyan-rep-segment-donut {
  flex-shrink: 0;
  position: relative;
}

.afyan-rep-donut-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.afyan-rep-donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.afyan-rep-donut-val {
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.1;
}

.afyan-rep-donut-lbl {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.afyan-rep-segment-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.afyan-rep-seg-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.afyan-rep-seg-left {
  display: flex;
  align-items: center;
  gap: 7px;
}

.afyan-rep-seg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.afyan-rep-seg-name {
  color: #475569;
  font-weight: 500;
}

.afyan-rep-seg-pct {
  font-weight: 700;
  color: #0f172a;
}

/* 4. Bottom Grid: Key Performance Indicators (65%) & Recent Reports (35%) */
.afyan-rep-bot-grid {
  display: grid;
  grid-template-columns: 1.75fr 1fr;
  gap: 16px;
}

.afyan-rep-kpi-inner-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.afyan-rep-mini-cards-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.afyan-rep-mini-card {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.afyan-rep-mini-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.afyan-rep-mini-lbl {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.afyan-rep-mini-val {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.afyan-rep-mini-trend {
  font-size: 11px;
  font-weight: 700;
}

.afyan-rep-mini-trend.up {
  color: #16a34a;
}

.afyan-rep-mini-trend.down {
  color: #ef4444;
}

/* Outstanding AR Highlight Card */
.afyan-rep-ar-card {
  background: #fffdfa;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 10px 14px;
  display: inline-flex;
  flex-direction: column;
  align-self: flex-start;
  cursor: pointer;
  transition: all 0.15s ease;
}

.afyan-rep-ar-card:hover {
  background: #fff7ed;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.12);
}

.afyan-rep-ar-lbl {
  font-size: 11.5px;
  font-weight: 700;
  color: #ea580c;
  margin-bottom: 2px;
}

.afyan-rep-ar-val-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.afyan-rep-ar-val {
  font-size: 19px;
  font-weight: 600;
  color: #0f172a;
}

.afyan-rep-ar-trend {
  font-size: 11px;
  font-weight: 700;
  color: #ef4444;
}

/* Recent Reports List */
.afyan-rep-recent-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.afyan-rep-recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.afyan-rep-recent-item:hover {
  background: #f8fafc;
}

.afyan-rep-recent-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-rep-recent-item:hover .afyan-rep-recent-icon {
  background: #fef3c7;
  color: #b45309;
}

.afyan-rep-recent-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.afyan-rep-recent-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.afyan-rep-recent-date {
  font-size: 11.5px;
  color: #64748b;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
  .afyan-rep-top-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .afyan-rep-mid-grid,
  .afyan-rep-bot-grid {
    grid-template-columns: 1fr;
  }
  .afyan-rep-mini-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .afyan-rep-top-kpi-grid {
    grid-template-columns: 1fr;
  }
  .afyan-rep-mini-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   AFYAN MEDICAL BILLING / RCM DASHBOARD STYLESHEET
   ========================================================================== */

.afyan-rcm-dashboard {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 18px 24px 36px 24px;
  background: #f8fafc;
  min-height: calc(100vh - 56px);
  box-sizing: border-box;
  font-family: var(--font-stack, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  color: #0f172a;
}

/* Header */
.afyan-rcm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.afyan-rcm-title {
  font-size: 22px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.afyan-rcm-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  font-weight: 500;
}

.afyan-rcm-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.afyan-rcm-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.afyan-rcm-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  user-select: none;
}

.afyan-rcm-filter-btn * {
  pointer-events: none;
}

.afyan-rcm-filter-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.afyan-rcm-mini-dropdown-btn * {
  pointer-events: none;
}

.afyan-rcm-mini-dropdown-btn {
  user-select: none;
}

.afyan-rcm-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 190px;
  max-height: 280px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  padding: 6px;
}

.afyan-rcm-dropdown-wrap.open > .afyan-rcm-dropdown-menu {
  display: block;
}

.afyan-rcm-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease;
}

.afyan-rcm-dropdown-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.afyan-rcm-dropdown-item.active {
  background: #fef3c7;
  color: #b45309;
}

/* 7 KPI Cards (Top 4, Bottom 3) */
.afyan-rcm-kpis-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.afyan-rcm-kpi-row-top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.afyan-rcm-kpi-row-bot {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.afyan-rcm-kpi-card {
  background: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 96px;
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.afyan-rcm-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.afyan-rcm-kpi-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.afyan-rcm-kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-rcm-kpi-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
}

.afyan-rcm-kpi-value {
  font-size: 23px;
  font-weight: 600;
  color: #0f172a;
  margin: 8px 0 4px 0;
  letter-spacing: -0.02em;
}

.afyan-rcm-kpi-trend-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
}

.afyan-rcm-kpi-trend {
  font-weight: 700;
}

.afyan-rcm-kpi-sub {
  color: #64748b;
  font-weight: 500;
}

/* Charts Grid */
.afyan-rcm-charts-grid {
  display: grid;
  grid-template-columns: minmax(0, 65%) minmax(0, 35%);
  gap: 16px;
  margin-bottom: 20px;
}

.afyan-rcm-card {
  background: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.afyan-rcm-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.afyan-rcm-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.afyan-rcm-trend-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.afyan-rcm-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.afyan-rcm-legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.afyan-rcm-chart-wrapper {
  position: relative;
  width: 100%;
  height: 210px;
}

.afyan-rcm-trend-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.afyan-rcm-trend-dot {
  cursor: pointer;
  transition: r 0.15s ease;
}

.afyan-rcm-trend-dot:hover {
  r: 5.5;
}

.afyan-rcm-chart-tooltip {
  position: absolute;
  background: #0f172a;
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 50;
  white-space: nowrap;
  transform: translate(-50%, -100%);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.afyan-rcm-mini-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.afyan-rcm-mini-dropdown-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.afyan-rcm-status-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 190px;
}

.afyan-rcm-status-donut-left {
  display: flex;
  align-items: center;
  justify-content: center;
}

.afyan-rcm-donut-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.afyan-rcm-donut-center-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.afyan-rcm-donut-total {
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.1;
}

.afyan-rcm-donut-sub {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  margin-top: 2px;
}

.afyan-rcm-status-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.afyan-rcm-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.afyan-rcm-status-lbl {
  display: flex;
  align-items: center;
  gap: 8px;
}

.afyan-rcm-status-metrics {
  display: flex;
  align-items: center;
  gap: 10px;
}

.afyan-rcm-status-cnt {
  font-weight: 700;
  color: #0f172a;
  width: 28px;
  text-align: right;
}

.afyan-rcm-status-pct {
  color: #64748b;
  width: 32px;
  text-align: right;
  font-size: 12px;
}

/* Tables Grid (Recent Claims + Quick Actions) */
.afyan-rcm-tables-grid {
  display: grid;
  grid-template-columns: minmax(0, 70%) minmax(0, 30%);
  gap: 16px;
  margin-bottom: 20px;
}

.afyan-rcm-viewall-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.15s ease;
}

.afyan-rcm-viewall-btn:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.afyan-rcm-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.afyan-rcm-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}

.afyan-rcm-table th {
  padding: 10px 12px;
  font-weight: 700;
  color: #64748b;
  font-size: 11.5px;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
}

.afyan-rcm-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #f8fafc;
  color: #1e293b;
  vertical-align: middle;
}

.afyan-rcm-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}

.afyan-rcm-table tbody tr:hover {
  background: #f8fafc;
}

.afyan-rcm-claim-id {
  font-weight: 700;
  color: #0f172a;
  font-family: monospace;
  font-size: 12px;
}

.afyan-rcm-patient-name {
  font-weight: 600;
  color: #0f172a;
}

.afyan-rcm-status-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.afyan-rcm-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.afyan-rcm-action-btn {
  background: #fdfbf7;
  border: 1px solid #fef3c7;
  border-radius: 10px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.afyan-rcm-action-btn:hover {
  transform: translateY(-2px);
  background: #fefce8;
  border-color: #fde68a;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.12);
}

.afyan-rcm-action-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fef3c7;
  color: #d97706;
  display: flex;
  align-items: center;
  justify-content: center;
}

.afyan-rcm-action-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
}

/* Bottom Analytics Row */
.afyan-rcm-analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.afyan-rcm-donut-body {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 180px;
}

.afyan-rcm-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.afyan-rcm-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.afyan-rcm-legend-lbl {
  display: flex;
  align-items: center;
  gap: 6px;
}

.afyan-rcm-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.afyan-rcm-legend-pct {
  font-weight: 700;
  color: #0f172a;
}

.afyan-rcm-bars-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
  justify-content: center;
}

.afyan-rcm-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.afyan-rcm-bar-label {
  width: 95px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.afyan-rcm-bar-track {
  flex: 1;
  height: 7px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}

.afyan-rcm-bar-fill {
  height: 100%;
  background: #3b82f6;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.afyan-rcm-bar-amt {
  font-weight: 700;
  color: #0f172a;
  font-size: 12px;
}

.afyan-rcm-bar-pct {
  color: #64748b;
  font-size: 11.5px;
}

/* Footer Banner */
.afyan-rcm-footer-banner {
  background: #fdfbf7;
  border: 1px solid #fef3c7;
  border-radius: 10px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: #b45309;
}

.afyan-rcm-footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.afyan-rcm-footer-shield {
  display: flex;
  align-items: center;
  color: #b45309;
}

.afyan-rcm-footer-sep {
  color: #fde68a;
  font-weight: 300;
}

.afyan-rcm-footer-brand {
  font-weight: 600;
  color: #92400e;
  letter-spacing: -0.01em;
}

/* Responsive */
@media (max-width: 1200px) {
  .afyan-rcm-kpi-row-top,
  .afyan-rcm-kpi-row-bot {
    grid-template-columns: repeat(2, 1fr);
  }
  .afyan-rcm-charts-grid,
  .afyan-rcm-tables-grid {
    grid-template-columns: 1fr;
  }
  .afyan-rcm-analytics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .afyan-rcm-kpi-row-top,
  .afyan-rcm-kpi-row-bot {
    grid-template-columns: 1fr;
  }
  .afyan-rcm-actions-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   ACCOUNTING DASHBOARD STYLES
   Exact Match to Reference UI
   ========================================================================== */

.afyan-acc-dashboard {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 22px 26px 40px 26px;
  background: #f8fafc;
  font-family: var(--font-stack, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  color: #0f172a;
}

/* 1. Header */
.afyan-acc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.afyan-acc-header-left {
  flex: 1;
  min-width: 200px;
}

.afyan-acc-title {
  font-size: 24px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.afyan-acc-subtitle {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
}

.afyan-acc-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.afyan-acc-dropdown-wrap {
  position: relative;
}

.afyan-acc-filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 14px;
  height: 36px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.afyan-acc-filter-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.afyan-acc-dropdown-chevron {
  color: #94a3b8;
  margin-left: 2px;
  transition: transform 0.2s ease;
}

.afyan-acc-dropdown-wrap.open .afyan-acc-dropdown-chevron {
  transform: rotate(180deg);
}

.afyan-acc-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  min-width: 210px;
  z-index: 1000;
  padding: 4px 0;
}

.afyan-acc-dropdown-wrap.open .afyan-acc-dropdown-menu {
  display: block;
}

.afyan-acc-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 12.5px;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease;
}

.afyan-acc-dropdown-item:hover {
  background: #f8fafc;
  color: #0f172a;
}

.afyan-acc-dropdown-item.active {
  color: #d97706;
  font-weight: 700;
  background: #fffbeb;
}

/* 2. Top KPI Cards */
.afyan-acc-kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.afyan-acc-kpi-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.afyan-acc-kpi-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: #e2e8f0;
}

.afyan-acc-kpi-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.afyan-acc-kpi-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-acc-kpi-title {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.afyan-acc-kpi-val {
  font-size: 24px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.afyan-acc-kpi-trend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.afyan-acc-trend-pill {
  font-weight: 600;
}

.afyan-acc-trend-label {
  color: #94a3b8;
  font-size: 11.5px;
}

/* 3. Row 1 Charts Grid */
.afyan-acc-charts-grid {
  display: grid;
  grid-template-columns: 1.75fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.afyan-acc-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.afyan-acc-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.afyan-acc-card-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.afyan-acc-inexp-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.afyan-acc-chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

.afyan-acc-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.afyan-acc-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.afyan-acc-mini-dropdown-btn {
  height: 28px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.afyan-acc-mini-dropdown-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.afyan-acc-chart-wrapper {
  position: relative;
  height: 230px;
  width: 100%;
}

.afyan-acc-chart-tooltip {
  position: absolute;
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
  white-space: nowrap;
}

.afyan-acc-bar {
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.afyan-acc-bar:hover {
  opacity: 0.85;
}

.afyan-acc-donut-body {
  display: flex;
  align-items: center;
  gap: 20px;
}

.afyan-acc-donut-left {
  flex-shrink: 0;
}

.afyan-acc-donut-center-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.afyan-acc-donut-total {
  font-size: 14.5px;
  font-weight: 600;
  color: #0f172a;
}

.afyan-acc-donut-sub {
  font-size: 10px;
  color: #64748b;
  font-weight: 500;
  margin-top: 2px;
}

.afyan-acc-donut-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.afyan-acc-donut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.afyan-acc-donut-lbl {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-weight: 500;
}

.afyan-acc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.afyan-acc-donut-pct {
  font-weight: 700;
  color: #0f172a;
  font-size: 12px;
}

/* 4. Row 2: Recent JVs & Quick Actions */
.afyan-acc-row2-grid {
  display: grid;
  grid-template-columns: 1.75fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.afyan-acc-viewall-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s ease;
}

.afyan-acc-viewall-btn:hover {
  color: #0f172a;
}

.afyan-acc-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.afyan-acc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.afyan-acc-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.afyan-acc-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.afyan-acc-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.afyan-acc-row:hover {
  background: #f8fafc;
}

.afyan-acc-status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.afyan-acc-overdue-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  background: #fee2e2;
  color: #ef4444;
}

.afyan-acc-qa-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.afyan-acc-qa-btn {
  background: #fdfbf7;
  border: 1px solid #fef3c7;
  border-radius: 10px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.afyan-acc-qa-btn:hover {
  background: #fef9ee;
  border-color: #fde68a;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(217, 119, 6, 0.08);
}

.afyan-acc-qa-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #b45309;
  display: flex;
  align-items: center;
  justify-content: center;
}

.afyan-acc-qa-title {
  font-size: 12px;
  font-weight: 600;
  color: #78350f;
  text-align: center;
}

/* 5. Row 3: 3 Column Financial Summaries */
.afyan-acc-row3-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.afyan-acc-total-row td {
  border-top: 1.5px solid #e2e8f0;
  background: #f0f9ff;
  padding: 10px 10px;
}

/* 6. Row 4: 3 Column Financial Statements & Expenses */
.afyan-acc-row4-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.afyan-acc-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.afyan-acc-statement-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 12.5px;
}

.afyan-acc-statement-row.highlight-gold {
  background: #fef9ee;
  border: 1px solid #fde68a;
}

.afyan-acc-statement-row.highlight-gold .afyan-acc-stat-lbl {
  color: #92400e;
  font-weight: 700;
}

.afyan-acc-statement-row.highlight-gold .afyan-acc-stat-val {
  color: #b45309;
  font-weight: 600;
  font-size: 13.5px;
}

.afyan-acc-stat-lbl {
  color: #475569;
  font-weight: 500;
}

.afyan-acc-stat-val {
  color: #0f172a;
  font-weight: 600;
}

/* 7. Bottom Footers and Banners (Removed / Hidden) */
.workspace-footer,
.page-footer,
.web-footer,
.report-footer,
.desk-footer,
.layout-footer,
footer,
.afyan-acc-footer-banner,
.afyan-acc-dashboard .afyan-acc-footer-banner,
.afyan-rcm-footer-banner,
.afyan-rcm-dashboard .afyan-rcm-footer-banner,
.afyan-on-dashboard .workspace-footer,
.afyan-on-dashboard .page-footer,
.afyan-on-dashboard .web-footer,
.afyan-on-dashboard .report-footer,
.afyan-on-dashboard footer {
  display: none !important;
}

/* Responsive */
@media (max-width: 1200px) {
  .afyan-acc-kpis-grid,
  .afyan-inv-kpis-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .afyan-acc-charts-grid,
  .afyan-acc-row2-grid,
  .afyan-acc-row3-grid,
  .afyan-acc-row4-grid,
  .afyan-inv-charts-grid,
  .afyan-inv-row2-grid,
  .afyan-inv-row3-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .afyan-acc-kpis-grid,
  .afyan-inv-kpis-grid {
    grid-template-columns: 1fr;
  }
  .afyan-acc-qa-grid,
  .afyan-inv-qa-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   INVENTORY & PURCHASING DASHBOARD STYLES
   ========================================================================== */

.afyan-inv-dashboard {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 22px 26px 40px 26px;
  background: #f8fafc;
  font-family: var(--font-stack, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  color: #0f172a;
}

/* 1. Header */
.afyan-inv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.afyan-inv-header-left {
  flex: 1;
  min-width: 200px;
}

.afyan-inv-title {
  font-size: 24px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.afyan-inv-subtitle {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
}

.afyan-inv-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.afyan-inv-dropdown-wrap {
  position: relative;
}

.afyan-inv-filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 14px;
  height: 36px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  user-select: none;
}

.afyan-inv-filter-btn * {
  pointer-events: none;
}

.afyan-inv-filter-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.afyan-inv-dropdown-chevron {
  color: #94a3b8;
  margin-left: 2px;
  transition: transform 0.2s ease;
}

.afyan-inv-dropdown-wrap.open .afyan-inv-dropdown-chevron {
  transform: rotate(180deg);
}

.afyan-inv-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  min-width: 210px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 1000;
  padding: 4px 0;
}

.afyan-inv-dropdown-wrap.open .afyan-inv-dropdown-menu,
.afyan-inv-dropdown-wrap.open .afyan-acc-dropdown-menu {
  display: block !important;
}

.afyan-inv-mini-dropdown-btn {
  height: 28px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.afyan-inv-mini-dropdown-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.afyan-inv-mini-dropdown-btn * {
  pointer-events: none;
}

.afyan-inv-mini-dropdown-menu {
  min-width: 120px !important;
  width: auto !important;
  right: 0 !important;
  top: calc(100% + 4px) !important;
  padding: 4px !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  z-index: 1000 !important;
}

.afyan-inv-mini-dropdown-menu .afyan-inv-dropdown-item {
  padding: 7px 12px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.afyan-inv-mini-dropdown-menu .afyan-inv-dropdown-item:hover {
  background: #f8fafc !important;
  color: #d97706 !important;
}

.afyan-inv-mini-dropdown-menu .afyan-inv-dropdown-item.active {
  background: #fffbeb !important;
  color: #d97706 !important;
  font-weight: 600 !important;
}

.afyan-inv-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 12.5px;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease;
}

.afyan-inv-dropdown-item:hover {
  background: #f8fafc;
  color: #0f172a;
}

.afyan-inv-dropdown-item.active {
  color: #d97706;
  font-weight: 700;
  background: #fffbeb;
}

/* 2. Top 4 KPI Cards */
.afyan-inv-kpis-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.afyan-inv-kpi-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.afyan-inv-kpi-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: #e2e8f0;
}

.afyan-inv-kpi-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.afyan-inv-kpi-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-inv-kpi-title {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.afyan-inv-kpi-val {
  font-size: 24px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.afyan-inv-kpi-trend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.afyan-inv-trend-pill {
  font-weight: 600;
}

.afyan-inv-trend-label {
  color: #94a3b8;
  font-size: 11.5px;
}

/* 3. Row 1 Charts Grid: Stock Summary (50%) & Inventory Value Trend (50%) */
.afyan-inv-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.afyan-inv-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.afyan-inv-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  position: relative;
  z-index: 50;
}

.afyan-inv-card-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.afyan-inv-view-all {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}

.afyan-inv-view-all:hover {
  color: #d97706;
}

/* Stock Summary Donut */
.afyan-inv-donut-body {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 10px 0;
  gap: 16px;
}

.afyan-inv-donut-left {
  position: relative;
  width: 170px;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.afyan-inv-donut-center-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.afyan-inv-donut-total {
  font-size: 24px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.1;
}

.afyan-inv-donut-sub {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: capitalize;
}

.afyan-inv-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  max-width: 220px;
}

.afyan-inv-donut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
}

.afyan-inv-donut-lbl {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-weight: 500;
}

.afyan-inv-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.afyan-inv-donut-cnt {
  font-weight: 700;
  color: #0f172a;
  margin-right: 8px;
}

.afyan-inv-donut-pct {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  min-width: 32px;
  text-align: right;
}

/* Inventory Value Trend Line Chart */
.afyan-inv-trend-chart-wrap {
  width: 100%;
  height: 220px;
  position: relative;
  margin-top: 10px;
}

.afyan-inv-trend-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* 4. Row 2 Grid: Recent POs (68%) & Quick Actions (32%) */
.afyan-inv-row2-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

/* Recent Purchase Orders Table */
.afyan-inv-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.afyan-inv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.afyan-inv-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  border-bottom: 1px solid #f1f5f9;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.afyan-inv-table td {
  padding: 12px 12px;
  border-bottom: 1px solid #f8fafc;
  color: #334155;
  vertical-align: middle;
}

.afyan-inv-table-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.afyan-inv-table-row:hover {
  background: #f8fafc;
}

.afyan-inv-po-num {
  font-weight: 600;
  color: #1e293b;
}

.afyan-inv-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.afyan-inv-amt {
  font-weight: 700;
  color: #0f172a;
}

/* Quick Actions 2-Col Grid */
.afyan-inv-qa-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.afyan-inv-qa-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  gap: 8px;
}

.afyan-inv-qa-btn:hover {
  border-color: #fcd34d;
  background: #fffdfa;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.08);
}

.afyan-inv-qa-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #fef3c7;
  color: #b45309;
  display: flex;
  align-items: center;
  justify-content: center;
}

.afyan-inv-qa-title {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  text-align: center;
}

/* 5. Row 3 Grid: Top Items (60%) & Stock Alerts (40%) */
.afyan-inv-row3-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.afyan-inv-item-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.afyan-inv-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-inv-item-name {
  font-weight: 600;
  color: #1e293b;
}

.afyan-inv-cat-pill {
  font-size: 11.5px;
  color: #64748b;
  background: #f8fafc;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Stock Alerts */
.afyan-inv-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.afyan-inv-alert-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
}

.afyan-inv-alert-card:hover {
  background: #f8fafc;
  border-color: #f1f5f9;
}

.afyan-inv-alert-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.afyan-inv-alert-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-inv-alert-icon.danger {
  background: #fee2e2;
  color: #ef4444;
}

.afyan-inv-alert-icon.warning {
  background: #fef3c7;
  color: #f59e0b;
}

.afyan-inv-alert-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.afyan-inv-alert-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
}

.afyan-inv-alert-sub {
  font-size: 11.5px;
  color: #64748b;
}

.afyan-inv-alert-time {
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 500;
}

/* ==========================================================================
   SETTINGS WORKSPACE DASHBOARD STYLES
   Exact Match to Attached Reference Preview
   ========================================================================== */

.afyan-settings-dashboard {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 24px 32px 48px 32px;
  background: #f8fafc;
  font-family: var(--font-stack, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  color: #0f172a;
}

/* 1. Header */
.afyan-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
  gap: 16px;
  flex-wrap: wrap;
}

.afyan-settings-header-left {
  flex: 1;
  min-width: 200px;
}

.afyan-settings-title {
  font-size: 26px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.afyan-settings-subtitle {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
}

.afyan-settings-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.afyan-settings-search-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 14px;
  height: 38px;
  min-width: 250px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.afyan-settings-search-icon {
  color: #94a3b8;
  flex-shrink: 0;
}

#afyan-settings-search-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: #1e293b;
  width: 100%;
}

.afyan-settings-btn-gold,
.afyan-settings-btn-orange {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  height: 38px !important;
  padding: 0 22px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25) !important;
}

.afyan-settings-btn-gold:hover,
.afyan-settings-btn-orange:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4) !important;
}

.afyan-settings-btn-gold.afyan-btn-sm,
.afyan-settings-btn-orange.afyan-btn-sm {
  height: 32px !important;
  padding: 0 14px !important;
  font-size: 12px !important;
  border-radius: 6px !important;
}

/* 2. Top 4 Navigation Cards */
.afyan-settings-nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.afyan-settings-nav-card {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.afyan-settings-nav-card:hover {
  border-color: #d97706 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.15) !important;
}

.afyan-settings-nav-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.15) !important;
  color: #d97706 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-settings-nav-icon svg {
  stroke: #d97706 !important;
}

.afyan-settings-nav-info {
  display: flex;
  flex-direction: column;
}

.afyan-settings-nav-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 3px;
}

.afyan-settings-nav-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}

/* 3. Common Card Styles */
.afyan-settings-card {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  margin-bottom: 20px;
}

.afyan-settings-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.afyan-settings-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 2px 0;
}

.afyan-settings-card-subtitle {
  font-size: 12.5px;
  color: #64748b;
  margin: 0;
}

.afyan-settings-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.afyan-settings-edit-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* 4. Company Information Grid */
.afyan-company-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: flex-start;
}

.afyan-company-left {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 24px;
}

.afyan-company-logo-wrap {
  width: 135px;
  min-width: 120px;
  max-width: 145px;
  padding-top: 4px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-shrink: 0;
}

.afyan-company-logo-img {
  width: 100%;
  height: auto;
  max-height: 52px;
  object-fit: contain;
}

.afyan-company-details {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.afyan-company-name {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.afyan-company-addr-line {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 3px;
}

.afyan-company-loc-line {
  font-size: 13px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.afyan-company-loc-line svg {
  stroke: #94a3b8;
  flex-shrink: 0;
}

.afyan-company-contact-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.afyan-company-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
}

.afyan-company-contact-item svg {
  stroke: #64748b;
  flex-shrink: 0;
}

.afyan-company-contact-item a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.15s;
}

.afyan-company-contact-item a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.afyan-company-right {
  display: flex;
  flex-direction: column;
  padding-left: 32px;
  border-left: 1px solid #f1f5f9;
}

.afyan-kv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13.5px;
}

.afyan-kv-row:first-child {
  padding-top: 2px;
}

.afyan-kv-row:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.afyan-kv-label {
  color: #64748b;
  font-weight: 500;
}

.afyan-kv-val {
  color: #0f172a;
  font-weight: 600;
  text-align: right;
}

/* 5. Two Column Rows */
.afyan-settings-two-col {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.afyan-settings-two-col.equal {
  grid-template-columns: 1fr 1fr;
}

.afyan-settings-row-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  border-bottom: 1px solid #f1f5f9;
}

.afyan-settings-row-item:last-child {
  border-bottom: none;
}

.afyan-settings-row-item:hover {
  background: #f8fafc;
}

.afyan-row-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.afyan-row-icon-round {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.12) !important;
  color: #d97706 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-pref-icon {
  background: #f1f5f9 !important;
  color: #334155 !important;
}

.afyan-pref-icon svg {
  stroke: #334155 !important;
}

.afyan-row-texts {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.afyan-row-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
}

.afyan-row-sub {
  font-size: 12px;
  color: #64748b;
}

.afyan-row-item-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.afyan-row-val-text {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.afyan-chevron-right {
  stroke: #94a3b8;
  transition: stroke 0.15s;
}

.afyan-settings-row-item:hover .afyan-chevron-right {
  stroke: #0f172a;
}

/* 6. Badges */
.afyan-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
}

.afyan-badge.badge-green {
  background: #dcfce7;
  color: #166534;
}

.afyan-badge.badge-mint {
  background: #d1fae5;
  color: #065f46;
}

.afyan-badge.badge-gold,
.afyan-badge.badge-orange {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #b45309 !important;
}

.afyan-badge.badge-blue {
  background: #e0f2fe;
  color: #0369a1;
}

.afyan-badge.badge-rcm {
  background: #ede9fe;
  color: #5b21b6;
}

.afyan-badge.badge-coral {
  background: #ffe4e6;
  color: #9f1239;
}

.afyan-badge.badge-sky {
  background: #e0f2fe;
  color: #0284c7;
}

/* 7. Bottom Security Banner */
.afyan-security-banner {
  background: #fbf4e4;
  border: 1px solid #fae2b8;
  border-radius: 12px;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.afyan-security-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.afyan-security-shield-wrap {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #b45309;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-security-shield-wrap svg {
  stroke: #ffffff;
}

.afyan-security-texts {
  display: flex;
  flex-direction: column;
}

.afyan-security-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 2px;
}

.afyan-security-sub {
  font-size: 12px;
  color: #78350f;
  font-weight: 500;
}

.afyan-security-help-btn {
  background: #ffffff;
  border: 1px solid #d97706;
  color: #b45309;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.afyan-security-help-btn:hover {
  background: #fffbeb;
  border-color: #b45309;
  color: #92400e;
}

/* 8. Responsiveness */
@media (max-width: 1024px) {
  .afyan-settings-nav-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .afyan-settings-two-col {
    grid-template-columns: 1fr;
  }

  .afyan-settings-two-col.equal {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .afyan-settings-dashboard {
    padding: 16px;
  }

  .afyan-settings-nav-grid {
    grid-template-columns: 1fr;
  }

  .afyan-company-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .afyan-company-right {
    padding-left: 0;
    border-left: none;
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
  }

  .afyan-security-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .afyan-security-help-btn {
    align-self: flex-start;
  }
}

/* ==========================================================================
   AFYAN PROJECTS WORKSPACE & DASHBOARD
   ========================================================================== */

/* Hide Frappe default onboarding widgets */
.onboarding-widget-box,
[data-widget-name="onboarding"],
.widget-onboarding,
.user-onboarding,
.onb-panel {
  display: none !important;
}

.afyan-projects-workspace {
  padding: 24px 32px 60px 32px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: transparent;
  color: #0f172a;
  min-height: calc(100vh - 60px);
  box-sizing: border-box;
}

/* 1. Header */
.afyan-proj-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 20px;
}

.afyan-proj-title {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.afyan-proj-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}

.afyan-bc-sep {
  font-size: 11px;
  color: #cbd5e1;
}

.afyan-bc-active {
  color: #64748b;
  font-weight: 500;
}

.afyan-proj-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.afyan-proj-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.afyan-proj-search-icon {
  position: absolute;
  left: 12px;
  stroke: #94a3b8;
  pointer-events: none;
}

#afyan-proj-search-input {
  padding: 9px 14px 9px 34px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #334155;
  background: #ffffff;
  width: 230px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

#afyan-proj-search-input:focus {
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.afyan-proj-btn-new {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
  white-space: nowrap;
}

.afyan-proj-btn-new:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
  color: #ffffff;
}

/* 2. Filter Tabs */
.afyan-proj-tabs-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 20px;
}

.afyan-proj-tab-btn {
  background: transparent;
  border: none;
  padding: 10px 4px 12px 4px;
  font-size: 13.5px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease;
}

.afyan-proj-tab-btn:hover {
  color: #0f172a;
}

.afyan-proj-tab-btn.active {
  color: #0f172a;
  font-weight: 600;
}

.afyan-proj-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2.5px;
  background: #d97706;
  border-radius: 2px;
}

/* 3. Table Card */
.afyan-proj-table-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  margin-bottom: 36px;
}

.afyan-proj-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.afyan-proj-table thead th {
  padding: 14px 20px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
}

.afyan-proj-table tbody tr.afyan-proj-row {
  border-bottom: 1px solid #f8fafc;
  cursor: pointer;
  transition: background 0.15s ease;
}

.afyan-proj-table tbody tr.afyan-proj-row:hover {
  background: #f8fafc;
}

.afyan-proj-table tbody td {
  padding: 16px 20px;
  font-size: 13px;
  color: #64748b;
  vertical-align: middle;
}

.afyan-proj-cell-name .afyan-proj-name-text {
  font-weight: 600;
  color: #1e293b;
  font-size: 13.5px;
}

.afyan-proj-cell-client {
  color: #64748b;
}

.afyan-proj-cell-date {
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

/* Status Badges */
.afyan-proj-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

.afyan-proj-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.afyan-proj-badge-in-progress {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.afyan-proj-badge-in-progress .afyan-proj-badge-dot {
  background: #10b981;
}

.afyan-proj-badge-on-hold {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid rgba(249, 115, 22, 0.2);
}
.afyan-proj-badge-on-hold .afyan-proj-badge-dot {
  background: #ea580c;
}

.afyan-proj-badge-not-started {
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid rgba(20, 184, 166, 0.2);
}
.afyan-proj-badge-not-started .afyan-proj-badge-dot {
  background: #0d9488;
}

.afyan-proj-badge-completed {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.afyan-proj-badge-completed .afyan-proj-badge-dot {
  background: #22c55e;
}

.afyan-proj-badge-cancelled,
.afyan-proj-badge-default {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.afyan-proj-badge-cancelled .afyan-proj-badge-dot,
.afyan-proj-badge-default .afyan-proj-badge-dot {
  background: #94a3b8;
}

/* Progress Column */
.afyan-proj-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.afyan-proj-progress-bar {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  max-width: 90px;
}

.afyan-proj-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.afyan-fill-in-progress {
  background: #10b981;
}

.afyan-fill-on-hold {
  background: #f59e0b;
}

.afyan-fill-not-started {
  background: #0ea5e9;
}

.afyan-fill-completed {
  background: #10b981;
}

.afyan-fill-cancelled,
.afyan-fill-default {
  background: #94a3b8;
}

.afyan-proj-progress-text {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  min-width: 32px;
}

.afyan-proj-empty {
  text-align: center;
  padding: 40px 20px !important;
  color: #94a3b8;
  font-style: italic;
}

/* 4. Project Overview Section & KPI Cards */
.afyan-proj-overview-section {
  margin-top: 10px;
}

.afyan-proj-overview-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 16px 0;
  letter-spacing: -0.01em;
}

.afyan-proj-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.afyan-proj-kpi-card {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.afyan-proj-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.afyan-proj-kpi-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.afyan-proj-kpi-label {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
}

.afyan-proj-kpi-val {
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
}

.afyan-kpi-green {
  color: #10b981;
}

.afyan-kpi-orange {
  color: #f59e0b;
}

.afyan-kpi-emerald {
  color: #10b981;
}

.afyan-kpi-amber {
  color: #f59e0b;
}

/* Attendance Sidebar Parent Item */
.body-sidebar .afyan-attendance-sidebar-parent.selected,
.body-sidebar .afyan-attendance-sidebar-parent.active {
  background: rgba(16, 185, 129, 0.12) !important;
  border-left: 3px solid #10b981 !important;
  border-radius: 6px !important;
}

.body-sidebar .afyan-attendance-sidebar-parent.selected > .standard-sidebar-item *,
.body-sidebar .afyan-attendance-sidebar-parent.active > .standard-sidebar-item * {
  color: #34d399 !important;
  stroke: #34d399 !important;
  font-weight: 600 !important;
}

.body-sidebar .afyan-attendance-sidebar-parent > .standard-sidebar-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

.body-sidebar .afyan-attendance-sidebar-parent > .standard-sidebar-item:hover * {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

/* Projects & All Sidebar Dropdown Containers - Never highlight container */
.body-sidebar .afyan-projects-dropdown-parent,
.body-sidebar .afyan-projects-dropdown-parent.selected,
.body-sidebar .afyan-projects-dropdown-parent.active {
  background: transparent !important;
  box-shadow: none !important;
}

/* Highlight the dropdown button itself when selected/active */
.body-sidebar .afyan-projects-dropdown-parent.selected > .standard-sidebar-item,
.body-sidebar .afyan-projects-dropdown-parent.active > .standard-sidebar-item {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4) !important;
}

.body-sidebar .afyan-projects-dropdown-parent.selected > .standard-sidebar-item *,
.body-sidebar .afyan-projects-dropdown-parent.active > .standard-sidebar-item * {
  color: #ffffff !important;
  stroke: #ffffff !important;
  font-weight: 700 !important;
}

/* Open but unselected dropdown button */
.body-sidebar .afyan-projects-dropdown-parent.open:not(.selected):not(.active) > .standard-sidebar-item {
  background: transparent !important;
  box-shadow: none !important;
}

.body-sidebar .afyan-projects-dropdown-parent.open:not(.selected):not(.active) > .standard-sidebar-item * {
  color: #cbd5e1 !important;
  stroke: #cbd5e1 !important;
}

.body-sidebar .afyan-projects-dropdown-parent > .standard-sidebar-item:hover,
.body-sidebar .afyan-projects-dropdown-parent.open > .standard-sidebar-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

.body-sidebar .afyan-projects-dropdown-parent > .standard-sidebar-item:hover *,
.body-sidebar .afyan-projects-dropdown-parent.open > .standard-sidebar-item:hover * {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

/* Universal Orange Sidebar Submenu Item Highlight */
.afyan-projects-submenu .afyan-submenu-item.active,
.afyan-projects-submenu .afyan-submenu-item.afyan-project-pill-item.active {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  border-left: none !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.35) !important;
}

.afyan-projects-submenu .afyan-submenu-item.active *,
.afyan-projects-submenu .afyan-submenu-item.active .afyan-sub-icon svg,
.afyan-projects-submenu .afyan-submenu-item.afyan-project-pill-item.active .afyan-sub-icon svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .afyan-proj-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .afyan-projects-workspace {
    padding: 16px;
  }

  .afyan-proj-header {
    flex-direction: column;
    gap: 16px;
  }

  .afyan-proj-header-right {
    width: 100%;
    justify-content: space-between;
  }

  .afyan-proj-kpi-grid {
    grid-template-columns: 1fr;
  }

  .afyan-proj-table-card {
    overflow-x: auto;
  }
}

/* ==========================================================================
   AFYAN CLIENT INVOICING WORKSPACE STYLES
   Matching Reference Mockup & Premium Theme
   ========================================================================== */

.afyan-invoicing-workspace {
  padding: 24px 32px;
  background-color: transparent;
  min-height: 100vh;
  box-sizing: border-box;
  font-family: inherit;
  color: #0f172a;
}

/* Header */
.afyan-inv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 20px;
  flex-wrap: wrap;
}

.afyan-inv-header-left {
  flex: 1;
  min-width: 280px;
}

.afyan-inv-title {
  font-size: 28px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 6px 0;
  letter-spacing: -0.5px;
}

.afyan-inv-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.afyan-inv-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Dropdowns & Buttons */
.afyan-inv-dropdown-wrap {
  position: relative;
}

.afyan-inv-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.afyan-inv-filter-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.afyan-inv-filter-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.afyan-inv-filter-btn .afyan-inv-caret {
  transition: transform 0.2s ease;
  color: #64748b;
}

.afyan-inv-dropdown-wrap.open .afyan-inv-filter-btn .afyan-inv-caret {
  transform: rotate(180deg);
}

.afyan-inv-create-btn {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border: none;
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.afyan-inv-create-btn:hover {
  background: linear-gradient(135deg, #b45309 0%, #92400e 100%);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
  transform: translateY(-1px);
}

.afyan-inv-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 210px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 6px 0;
}

.afyan-inv-dropdown-wrap.open .afyan-inv-menu {
  display: block;
}

.afyan-inv-menu-item {
  padding: 8px 16px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.afyan-inv-menu-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.afyan-inv-menu-item.active {
  background: #fef3c7;
  color: #b45309;
  font-weight: 600;
}

/* 4 KPI Cards Grid */
.afyan-inv-kpis-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.afyan-inv-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.afyan-inv-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.afyan-inv-kpi-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-inv-icon-gold {
  background: #fef3c7;
  color: #d97706;
}

.afyan-inv-icon-green {
  background: #dcfce7;
  color: #16a34a;
}

.afyan-inv-icon-blue {
  background: #dbeafe;
  color: #2563eb;
}

.afyan-inv-kpi-content {
  flex: 1;
}

.afyan-inv-kpi-title {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 6px;
}

.afyan-inv-kpi-val {
  font-size: 26px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin-bottom: 6px;
}

.afyan-inv-kpi-trend {
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.afyan-inv-kpi-trend.up {
  color: #16a34a;
}

.afyan-inv-kpi-trend.down {
  color: #dc2626;
}

/* Charts Row */
.afyan-inv-charts-row {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.afyan-inv-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.afyan-inv-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  position: relative;
  z-index: 50;
}

.afyan-inv-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.afyan-inv-period-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.afyan-inv-period-btn:hover {
  background: #f1f5f9;
}

.afyan-inv-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 12px;
}

.afyan-inv-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.afyan-inv-legend-bar {
  width: 16px;
  height: 6px;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  border-radius: 3px;
}

.afyan-inv-legend-line {
  width: 16px;
  height: 2.5px;
  background: #0f172a;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.afyan-inv-legend-line::after {
  content: '';
  width: 6px;
  height: 6px;
  background: #0f172a;
  border-radius: 50%;
}

.afyan-inv-chart-container {
  width: 100%;
  overflow-x: auto;
}

/* Donut Chart */
.afyan-inv-donut-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.afyan-inv-donut-chart {
  flex-shrink: 0;
}

.afyan-inv-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.afyan-inv-donut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.afyan-inv-donut-item:hover {
  background: #f8fafc;
}

.afyan-inv-donut-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  font-weight: 500;
}

.afyan-inv-donut-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.afyan-inv-donut-pct {
  font-weight: 600;
  color: #0f172a;
}

/* Tables */
.afyan-inv-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.afyan-inv-link-btn {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.afyan-inv-link-btn:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.afyan-inv-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.afyan-inv-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.afyan-inv-table th {
  padding: 12px 14px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.afyan-inv-table td {
  padding: 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.afyan-inv-table tr:hover td {
  background: #f8fafc;
}

.afyan-inv-table-link {
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.afyan-inv-table-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

.afyan-inv-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.afyan-inv-badge.pending {
  background: #fef3c7;
  color: #d97706;
}

.afyan-inv-badge.sent {
  background: #e0f2fe;
  color: #0284c7;
}

.afyan-inv-badge.paid {
  background: #dcfce7;
  color: #16a34a;
}

.afyan-inv-badge.overdue {
  background: #fee2e2;
  color: #dc2626;
}

.afyan-inv-action-view-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.afyan-inv-action-view-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* Bottom Row: Recent Invoices & Quick Actions */
.afyan-inv-bottom-row {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.afyan-inv-quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.afyan-inv-action-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.afyan-inv-action-card:hover {
  border-color: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.12);
}

.afyan-inv-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fef3c7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d97706;
  transition: background 0.2s ease;
}

.afyan-inv-action-card:hover .afyan-inv-action-icon {
  background: #fde68a;
}

.afyan-inv-action-label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  line-height: 1.3;
}

/* Bottom Banner: Automated Recurring Invoices */
.afyan-inv-banner {
  background: linear-gradient(90deg, #fef8ee 0%, #fff7ed 100%);
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.afyan-inv-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.afyan-inv-banner-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.afyan-inv-banner-title {
  font-size: 15px;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 2px;
}

.afyan-inv-banner-desc {
  font-size: 13px;
  color: #92400e;
}

.afyan-inv-banner-btn {
  background: #ffffff;
  border: 1.5px solid #d97706;
  border-radius: 8px;
  padding: 8px 22px;
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.afyan-inv-banner-btn:hover {
  background: #d97706;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .afyan-inv-kpis-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .afyan-inv-charts-row,
  .afyan-inv-bottom-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .afyan-invoicing-workspace {
    padding: 16px;
  }
  .afyan-inv-header {
    flex-direction: column;
    gap: 14px;
  }
  .afyan-inv-header-right {
    width: 100%;
    justify-content: flex-start;
  }
  .afyan-inv-kpis-grid {
    grid-template-columns: 1fr;
  }
  .afyan-inv-donut-wrap {
    flex-direction: column;
  }
  .afyan-inv-quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .afyan-inv-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   EMPLOYEE COMMISSION WORKSPACE STYLING
   ========================================================================== */
.afyan-commission-workspace {
  padding: 24px 28px;
  max-width: 1600px;
  margin: 0 auto;
  font-family: var(--font-stack, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  color: #1e293b;
  box-sizing: border-box;
}

.afyan-comm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  gap: 16px;
  flex-wrap: wrap;
}

.afyan-comm-title-wrap {
  display: flex;
  flex-direction: column;
}

.afyan-comm-title {
  font-size: 26px;
  font-weight: 750;
  color: #0f172a;
  letter-spacing: -0.4px;
  margin: 0;
  line-height: 1.2;
}

.afyan-comm-subtitle {
  font-size: 13.5px;
  color: #64748b;
  margin-top: 4px;
}

.afyan-comm-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.afyan-comm-dropdown-wrap {
  position: relative;
}

.afyan-comm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.afyan-comm-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.afyan-comm-menu {
  display: none;
  position: absolute;
  top: 100%;
  margin-top: 4px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 100;
  min-width: 170px;
  overflow: hidden;
}

.afyan-comm-dropdown-wrap.open .afyan-comm-menu {
  display: block;
}

.afyan-comm-menu-item {
  padding: 8px 14px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.afyan-comm-menu-item:hover,
.afyan-comm-menu-item.active {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 600;
}

/* KPIs Grid */
.afyan-comm-kpis-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.afyan-comm-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.afyan-comm-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.afyan-comm-kpi-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-comm-icon-amber { background: #fef3c7; color: #d97706; }
.afyan-comm-icon-green { background: #dcfce7; color: #16a34a; }
.afyan-comm-icon-red { background: #fee2e2; color: #dc2626; }
.afyan-comm-icon-blue { background: #e0f2fe; color: #0284c7; }

.afyan-comm-kpi-content {
  display: flex;
  flex-direction: column;
}

.afyan-comm-kpi-title {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
}

.afyan-comm-kpi-val {
  font-size: 24px;
  font-weight: 750;
  color: #0f172a;
  margin: 3px 0;
  line-height: 1.2;
}

.afyan-comm-kpi-trend {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}

.afyan-comm-kpi-trend.up { color: #16a34a; }
.afyan-comm-kpi-trend.down { color: #dc2626; }

/* Grid Rows Layout (60% / 40%) */
.afyan-comm-row {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 20px;
  margin-bottom: 22px;
}

.afyan-comm-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
}

.afyan-comm-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.afyan-comm-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.afyan-comm-period-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
}

.afyan-comm-period-btn:hover {
  background: #f8fafc;
}

.afyan-comm-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.afyan-comm-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.afyan-comm-legend-bar-gold {
  width: 14px;
  height: 10px;
  background: #e5a93c;
  border-radius: 2px;
}

.afyan-comm-legend-bar-navy {
  width: 14px;
  height: 10px;
  background: #1e293b;
  border-radius: 2px;
}

.afyan-comm-chart-container {
  width: 100%;
  overflow-x: auto;
}

/* Donut Wrappers */
.afyan-comm-donut-wrap {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 16px;
  padding: 10px 0;
}

.afyan-comm-donut-chart {
  flex-shrink: 0;
}

.afyan-comm-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 140px;
}

.afyan-comm-donut-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: #334155;
  transition: opacity 0.2s ease;
}

.afyan-comm-donut-item:hover {
  opacity: 0.8;
}

.afyan-comm-donut-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.afyan-comm-donut-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.afyan-comm-donut-pct {
  font-weight: 600;
  color: #0f172a;
}

/* Tables */
.afyan-comm-link-btn {
  font-size: 12.5px;
  font-weight: 600;
  color: #2563eb;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}

.afyan-comm-link-btn:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.afyan-comm-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.afyan-comm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.afyan-comm-table th {
  padding: 10px 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid #e2e8f0;
}

.afyan-comm-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.afyan-comm-table tr:hover td {
  background: #f8fafc;
}

.afyan-comm-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
}

.afyan-comm-badge.paid {
  background: #dcfce7;
  color: #15803d;
}

.afyan-comm-badge.pending {
  background: #fef3c7;
  color: #b45309;
}

/* Stacked Right Column for Row 2 */
.afyan-comm-stacked-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Quick Actions Grid */
.afyan-comm-quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.afyan-comm-action-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.afyan-comm-action-card:hover {
  border-color: #d4af37;
  background: #fffdf7;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(212, 175, 55, 0.12);
}

.afyan-comm-action-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #fef3c7;
  color: #d97706;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-comm-action-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.2;
}

/* Commission Reports List */
.afyan-comm-reports-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.afyan-comm-report-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.afyan-comm-report-item:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.afyan-comm-report-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.afyan-comm-report-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #fef3c7;
  color: #b45309;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-comm-report-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.afyan-comm-report-action {
  color: #64748b;
  display: flex;
  align-items: center;
}

/* Bottom Banner */
.afyan-comm-banner {
  background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 6px;
}

.afyan-comm-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.afyan-comm-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #d97706;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-comm-banner-title {
  font-size: 15px;
  font-weight: 700;
  color: #92400e;
}

.afyan-comm-banner-desc {
  font-size: 13px;
  color: #b45309;
  margin-top: 2px;
}

.afyan-comm-banner-btn {
  background: #ffffff;
  border: 1px solid #d97706;
  color: #92400e;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.afyan-comm-banner-btn:hover {
  background: #fef3c7;
}

@media (max-width: 1200px) {
  .afyan-comm-kpis-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .afyan-comm-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .afyan-commission-workspace {
    padding: 16px;
  }
  .afyan-comm-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .afyan-comm-kpis-grid {
    grid-template-columns: 1fr;
  }
  .afyan-comm-donut-wrap {
    flex-direction: column;
  }
  .afyan-comm-quick-actions-grid {
    grid-template-columns: 1fr;
  }
  .afyan-comm-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   AFYAN TRUCK DISPATCHING WORKSPACE
   ========================================================================== */

.afyan-dispatch-workspace {
  padding: 18px 24px 48px 24px;
}

.afyan-dispatch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.afyan-dispatch-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.afyan-dispatch-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.afyan-dispatch-search-icon {
  position: absolute;
  left: 10px;
  color: #94a3b8;
  pointer-events: none;
}

#afyan-dispatch-search-input {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 12px 7px 32px;
  font-size: 13px;
  color: #1e293b;
  outline: none;
  min-width: 240px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#afyan-dispatch-search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.afyan-dispatch-btn-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #b45309;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.afyan-dispatch-btn-new:hover {
  background: #92400e;
  transform: translateY(-1px);
}

.afyan-dispatch-qa-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.afyan-dispatch-qa-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.afyan-dispatch-qa-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.afyan-dispatch-qa-item .qa-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.afyan-dispatch-qa-item .qa-text {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.afyan-dispatch-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  padding: 8px 0;
  flex-wrap: wrap;
  gap: 10px;
}

.afyan-dispatch-tabs-bar {
  display: flex;
  gap: 4px;
  padding: 8px 16px;
}

.afyan-dispatch-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.afyan-dispatch-tab-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.afyan-dispatch-tab-btn.active {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 600;
}

.afyan-dispatch-tab-btn .tab-count {
  font-size: 11px;
  font-weight: 600;
  background: #e2e8f0;
  color: #475569;
  padding: 1px 6px;
  border-radius: 10px;
}

.afyan-dispatch-tab-btn.active .tab-count {
  background: #0f172a;
  color: #ffffff;
}

.afyan-dispatch-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.afyan-dispatch-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.afyan-dispatch-table th {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 12px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.afyan-dispatch-table td {
  font-size: 13px;
  padding: 12px 18px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.afyan-dispatch-table tr:hover td {
  background: #f8fafc;
}

.afyan-dispatch-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
}

.afyan-dispatch-badge.badge-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.afyan-dispatch-badge.badge-green {
  background: #dcfce7;
  color: #15803d;
}

.afyan-dispatch-badge.badge-amber {
  background: #fef3c7;
  color: #b45309;
}

.afyan-dispatch-badge.badge-gray {
  background: #f1f5f9;
  color: #475569;
}

.afyan-dispatch-badge.badge-red {
  background: #fee2e2;
  color: #b91c1c;
}

.afyan-dispatch-row-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.afyan-dispatch-row-btn:hover {
  border-color: #cbd5e1;
  color: #0f172a;
  background: #f8fafc;
}

/* ==========================================================================
   INVOICE PAYMENTS WORKSPACE (Pixel-Perfect to Screenshot)
   ========================================================================== */

.afyan-inv-payments-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1e293b;
}

/* Header */
.afyan-inv-payments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.afyan-inv-payments-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.afyan-inv-payments-header-icon {
  width: 44px;
  height: 44px;
  background: #0f172a;
  color: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

.afyan-inv-payments-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.02em;
}

.afyan-inv-payments-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 2px 0 0 0;
}

.afyan-inv-payments-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.afyan-inv-payments-dropdown {
  position: relative;
}

.afyan-inv-pay-date-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.afyan-inv-pay-date-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.afyan-inv-pay-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  min-width: 190px;
  z-index: 100;
  display: none;
  padding: 6px 0;
}

.afyan-inv-payments-dropdown.open .afyan-inv-pay-dropdown-menu {
  display: block;
}

.afyan-inv-pay-dropdown-item {
  padding: 8px 16px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s;
}

.afyan-inv-pay-dropdown-item:hover,
.afyan-inv-pay-dropdown-item.active {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 600;
}

.afyan-inv-pay-add-btn {
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8.5px 18px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}

.afyan-inv-pay-add-btn:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

/* KPI Cards Grid (4 Columns) */
.afyan-inv-payments-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .afyan-inv-payments-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .afyan-inv-payments-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.afyan-inv-pay-kpi-card {
  border-radius: 12px;
  padding: 18px 20px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.afyan-inv-pay-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.afyan-inv-pay-kpi-card.kpi-blue {
  background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
  border-color: #dbeafe;
}

.afyan-inv-pay-kpi-card.kpi-green {
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  border-color: #dcfce7;
}

.afyan-inv-pay-kpi-card.kpi-amber {
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
  border-color: #fef3c7;
}

.afyan-inv-pay-kpi-card.kpi-red {
  background: linear-gradient(180deg, #fff1f2 0%, #ffffff 100%);
  border-color: #ffe4e6;
}

.afyan-inv-pay-kpi-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.afyan-inv-pay-kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.afyan-inv-pay-kpi-icon.icon-blue {
  background: #dbeafe;
  color: #2563eb;
}

.afyan-inv-pay-kpi-icon.icon-green {
  background: #dcfce7;
  color: #16a34a;
}

.afyan-inv-pay-kpi-icon.icon-amber {
  background: #fef3c7;
  color: #d97706;
}

.afyan-inv-pay-kpi-icon.icon-red {
  background: #ffe4e6;
  color: #e11d48;
}

.afyan-inv-pay-kpi-icon.icon-emerald {
  background: #d1fae5;
  color: #059669;
}

.afyan-inv-pay-kpi-label {
  font-size: 13.5px;
  font-weight: 600;
  color: #475569;
}

.afyan-inv-pay-kpi-val {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.afyan-inv-pay-kpi-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
  gap: 6px;
}

.afyan-inv-pay-kpi-sub {
  display: flex;
  align-items: center;
  gap: 5px;
}

.afyan-inv-pay-badge {
  padding: 2.5px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.afyan-inv-pay-badge.badge-green {
  background: #dcfce7;
  color: #15803d;
}

.afyan-inv-pay-badge.badge-emerald {
  background: #d1fae5;
  color: #059669;
}

.afyan-inv-pay-badge.badge-amber {
  background: #fef3c7;
  color: #b45309;
}

.afyan-inv-pay-badge.badge-red {
  background: #ffe4e6;
  color: #be123c;
}

/* Main 2-Column Grid */
.afyan-inv-payments-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px !important;
  gap: 20px;
  align-items: start;
  width: 100% !important;
  max-width: 100% !important;
}

.afyan-inv-payments-left-col,
.afyan-inv-payments-right-col {
  min-width: 0 !important;
  max-width: 100% !important;
}

@media (max-width: 1180px) {
  .afyan-inv-payments-main-grid {
    grid-template-columns: 1fr !important;
  }
}

.afyan-inv-pay-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  min-width: 0 !important;
}

/* Toolbar & Status Tabs */
.afyan-inv-pay-table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
  gap: 12px;
}

.afyan-inv-pay-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.afyan-inv-pay-tab {
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.afyan-inv-pay-tab:hover {
  color: #0f172a;
}

.afyan-inv-pay-tab.active {
  color: #0f172a;
  font-weight: 600;
  border-bottom-color: #0f172a;
}

.afyan-tab-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 10px;
}

.afyan-tab-pill.pill-green {
  background: #dcfce7;
  color: #166534;
}

.afyan-tab-pill.pill-amber {
  background: #fef3c7;
  color: #92400e;
}

.afyan-tab-pill.pill-red {
  background: #fee2e2;
  color: #991b1b;
}

.afyan-inv-pay-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.afyan-inv-pay-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.afyan-inv-pay-search-wrap svg {
  position: absolute;
  left: 10px;
  color: #94a3b8;
  pointer-events: none;
}

.afyan-inv-pay-search-input {
  padding: 7px 12px 7px 32px;
  font-size: 12.5px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  width: 260px;
  outline: none;
  transition: border-color 0.15s ease;
  background: #ffffff;
}

.afyan-inv-pay-search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.afyan-inv-pay-filter-btn {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.afyan-inv-pay-filter-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* Table */
.afyan-inv-pay-table-wrap {
  overflow-x: auto !important;
  width: 100% !important;
  max-width: 100% !important;
}

.afyan-inv-pay-table {
  width: 100% !important;
  min-width: 860px !important;
  border-collapse: collapse;
  font-size: 13px;
}

.afyan-inv-pay-table th {
  padding: 12px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
  white-space: nowrap;
}

.afyan-inv-pay-table td {
  padding: 13px 14px;
  text-align: left;
  color: #334155;
  border-bottom: 1px solid #f8fafc;
  vertical-align: middle;
  white-space: nowrap;
}

.afyan-inv-pay-table tbody tr:hover {
  background: #f8fafc;
}

.afyan-inv-pay-cb {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1.5px solid #cbd5e1;
  cursor: pointer;
  accent-color: #0f172a;
}

tr.afyan-invoice-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

tr.afyan-invoice-row:hover {
  background-color: #f8fafc;
}

tr.afyan-invoice-row.afyan-row-selected {
  background-color: #eff6ff !important;
}

.afyan-inv-link {
  color: #2563eb;
  font-weight: 500;
  text-decoration: none;
}

.afyan-inv-link:hover {
  text-decoration: underline;
}

.afyan-inv-client-cell {
  font-weight: 500;
  color: #0f172a;
}

.afyan-font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
}

.text-paid {
  color: #15803d;
  font-weight: 600;
}

.text-received {
  color: #059669;
  font-weight: 600;
}

.text-pending {
  color: #d97706;
  font-weight: 600;
}

.text-deductions {
  color: #e11d48;
  font-weight: 600;
}

.afyan-status-pill {
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-block;
  text-transform: capitalize;
}

.afyan-status-pill.pill-paid,
.afyan-status-pill.pill-full-paid {
  background: #dcfce7;
  color: #15803d;
}

.afyan-status-pill.pill-partial,
.afyan-status-pill.pill-partial-paid {
  background: #fef3c7;
  color: #b45309;
}

.afyan-status-pill.pill-overdue {
  background: #fee2e2;
  color: #dc2626;
}

.afyan-status-pill.pill-unpaid {
  background: #f1f5f9;
  color: #475569;
}

.afyan-inv-action-dots {
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}

.afyan-inv-action-dots:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.afyan-row-action-menu {
  position: absolute;
  right: 12px;
  top: 36px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  z-index: 80;
  display: none;
  min-width: 155px;
  padding: 5px 0;
  text-align: left;
}

.afyan-row-action-menu.open {
  display: block;
}

.afyan-row-action-item {
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s;
}

.afyan-row-action-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.afyan-empty-table-cell {
  text-align: center;
  padding: 40px 20px;
}

.afyan-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 13px;
}

/* Pagination Footer */
.afyan-inv-pay-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  font-size: 12.5px;
  color: #64748b;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
  gap: 10px;
}

.afyan-inv-pay-pagination-pages {
  display: flex;
  align-items: center;
  gap: 5px;
}

.afyan-inv-page-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.afyan-inv-page-btn:hover:not(:disabled) {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.afyan-inv-page-btn.active {
  background: #d97706;
  color: #ffffff;
  border-color: #d97706;
  font-weight: 600;
}

.afyan-inv-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Right Column Cards */
.afyan-inv-payments-right-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.afyan-form-card-header {
  padding: 16px 20px 0;
  border-bottom: 1px solid #f1f5f9;
}

.afyan-form-card-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 12px;
}

.afyan-form-subtabs {
  display: flex;
  gap: 16px;
}

.afyan-form-subtab {
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  padding: 8px 4px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s ease;
}

.afyan-form-subtab:hover {
  color: #0f172a;
}

.afyan-form-subtab.active {
  color: #2563eb;
  font-weight: 600;
  border-bottom-color: #2563eb;
}

.afyan-form-tab-content {
  display: none;
  padding: 18px 20px;
}

.afyan-form-tab-content.active {
  display: block;
}

.afyan-form-group {
  margin-bottom: 14px;
}

.afyan-form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 5px;
}

.afyan-req {
  color: #e11d48;
}

.afyan-form-select,
.afyan-form-input,
.afyan-form-textarea {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #ffffff;
  color: #1e293b;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s ease;
}

.afyan-form-select:focus,
.afyan-form-input:focus,
.afyan-form-textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.afyan-form-input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.afyan-form-input-with-icon svg {
  position: absolute;
  left: 10px;
  color: #94a3b8;
  pointer-events: none;
}

.afyan-form-input-with-icon input {
  padding-left: 32px;
}

.afyan-form-input-prefix {
  display: flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.afyan-form-input-prefix:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.afyan-input-prefix-sym {
  padding: 8px 12px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  font-size: 13px;
  border-right: 1px solid #e2e8f0;
}

.afyan-form-input.prefixed {
  border: none;
  outline: none;
  flex: 1;
  padding: 8px 12px;
}

.afyan-form-textarea {
  resize: vertical;
  min-height: 54px;
}

.afyan-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.afyan-btn-reset {
  flex: 1;
  padding: 9px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.afyan-btn-reset:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.afyan-btn-save-payment {
  flex: 2;
  padding: 9px;
  border: none;
  background: #0f172a;
  color: #ffffff;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.12);
}

.afyan-btn-save-payment:hover {
  background: #1e293b;
}

.afyan-btn-save-payment:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* History List in Tab 2 */
.afyan-pay-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
}

.afyan-pay-history-item {
  padding: 10px 12px;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.15s ease;
}

.afyan-pay-history-item:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.afyan-pay-history-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.afyan-pay-history-ref {
  font-weight: 600;
  font-size: 12.5px;
  color: #2563eb;
}

.afyan-pay-history-amount {
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
}

.afyan-pay-history-mid {
  font-size: 12px;
  color: #475569;
  margin-bottom: 4px;
}

.afyan-pay-history-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: #64748b;
}

.afyan-empty-history {
  padding: 24px 10px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

/* Quick Insights Card */
.afyan-insights-card {
  padding: 18px 20px;
}

.afyan-insights-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.afyan-insights-icon {
  color: #d97706;
}

.afyan-insights-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.afyan-insights-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.afyan-insight-bullet {
  display: flex;
  gap: 8px;
  font-size: 12.5px;
  color: #475569;
  line-height: 1.5;
}

.afyan-bullet-dot {
  color: #64748b;
  font-weight: 700;
}

.afyan-spin {
  animation: afyan-spin-anim 1s linear infinite;
}

@keyframes afyan-spin-anim {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

