/* ============================================================
   FINANCIAL OS — Components
   Every reusable UI pattern lives here
   ============================================================ */

/* ================================================================
   BUTTONS
   ================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  line-height: 1;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  user-select: none;
}
.btn i { font-size: 15px; }
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn:active { transform: translateY(0.5px); }

.btn-primary {
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-xs);
}
.btn-primary:hover {
  background: var(--brand-primary-hover);
  border-color: var(--brand-primary-hover);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-default);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--color-danger);
  color: white;
  border-color: var(--color-danger);
}
.btn-danger:hover { background: #B52929; }

.btn-success {
  background: var(--color-success);
  color: white;
  border-color: var(--color-success);
}
.btn-success:hover { background: #076640; }

/* Sizes */
.btn-sm { padding: 5px 10px; font-size: var(--text-xs); border-radius: var(--radius-sm); }
.btn-sm i { font-size: 13px; }
.btn-lg { padding: 10px 18px; font-size: var(--text-base); }
.btn-xl { padding: 12px 22px; font-size: var(--text-md); }
.btn-icon { padding: 7px; width: 34px; height: 34px; }
.btn-icon.btn-sm { width: 28px; height: 28px; padding: 5px; }

/* Loading state */
.btn.loading { color: transparent; pointer-events: none; }
.btn.loading::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-secondary.loading::after,
.btn-ghost.loading::after {
  border-color: rgba(0,0,0,0.15);
  border-top-color: var(--text-secondary);
}

/* Button group */
.btn-group {
  display: inline-flex;
  gap: 0;
}
.btn-group .btn { border-radius: 0; border-right-width: 0; }
.btn-group .btn:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.btn-group .btn:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-right-width: 1px;
}

/* ================================================================
   FORM CONTROLS
   ================================================================ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
}
.form-label .required { color: var(--color-danger); margin-left: 2px; }
.form-hint {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 2px;
}
.form-error {
  font-size: var(--text-xs);
  color: var(--color-danger);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.input, .select, .textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 8px 11px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  line-height: var(--leading-normal);
}
.input::placeholder, .textarea::placeholder { color: var(--text-disabled); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}
.input.error, .select.error, .textarea.error {
  border-color: var(--color-danger);
}
.input.error:focus {
  box-shadow: 0 0 0 3px rgba(197,48,48,0.1);
}
.input:disabled, .select:disabled, .textarea:disabled {
  background: var(--bg-subtle);
  color: var(--text-disabled);
  cursor: not-allowed;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7A99' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}

.textarea { resize: vertical; min-height: 80px; }

/* Input with icon */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrapper .input { padding-left: 34px; }
.input-wrapper .input-icon {
  position: absolute;
  left: 10px;
  color: var(--text-tertiary);
  font-size: 15px;
  pointer-events: none;
}
.input-wrapper .input-suffix {
  position: absolute;
  right: 10px;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}

/* Rupee input */
.input-rupee { padding-left: 26px; }
.input-rupee-prefix {
  position: absolute;
  left: 10px;
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  pointer-events: none;
  font-weight: var(--weight-medium);
}

/* Checkbox & Radio */
.checkbox-group, .radio-group {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
  width: 15px;
  height: 15px;
  accent-color: var(--brand-primary);
  cursor: pointer;
}
.checkbox-group label, .radio-group label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
}

/* Toggle switch */
.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}
.toggle {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  transition: background var(--transition-base);
  cursor: pointer;
}
.toggle input:checked + .toggle-track { background: var(--brand-primary); }
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition-base);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
}
.toggle input:checked ~ .toggle-thumb { transform: translateX(16px); }

/* Form layout */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-4);
}
.form-col-full { grid-column: 1 / -1; }

/* ================================================================
   CARDS
   ================================================================ */

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
}
.card-body { padding: var(--space-5); }
.card-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.card-header h2 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}
.card-header-actions { display: flex; align-items: center; gap: var(--space-2); }
.card-footer {
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* KPI / Metric card */
.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition-base);
}
.metric-card:hover { box-shadow: var(--shadow-md); }
.metric-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}
.metric-label i { font-size: 13px; }
.metric-value {
  font-size: var(--text-3xl);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  letter-spacing: -0.6px;
  line-height: 1;
}
.metric-value.success { color: var(--color-success); }
.metric-value.warning { color: var(--color-warning); }
.metric-value.danger  { color: var(--color-danger); }
.metric-value.info    { color: var(--color-info); }
.metric-change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  margin-top: 6px;
  color: var(--text-tertiary);
}
.metric-change .up { color: var(--color-success); font-weight: var(--weight-medium); }
.metric-change .dn { color: var(--color-danger);  font-weight: var(--weight-medium); }
.metric-subtext {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ================================================================
   BADGES & TAGS
   ================================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  line-height: 1.6;
}
.badge i { font-size: 11px; }
.badge-dot::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-success { background: var(--color-success-light); color: var(--color-success-text); }
.badge-success.badge-dot::before { background: var(--color-success); }
.badge-warning { background: var(--color-warning-light); color: var(--color-warning-text); }
.badge-warning.badge-dot::before { background: var(--color-warning); }
.badge-danger  { background: var(--color-danger-light);  color: var(--color-danger-text); }
.badge-danger.badge-dot::before  { background: var(--color-danger); }
.badge-info    { background: var(--color-info-light);    color: var(--color-info-text); }
.badge-info.badge-dot::before    { background: var(--color-info); }
.badge-purple  { background: var(--color-purple-light);  color: var(--color-purple-text); }
.badge-neutral { background: var(--gray-100); color: var(--gray-600); }

/* Invoice status badges */
.status-draft    { background: var(--gray-100);           color: var(--gray-600); }
.status-sent     { background: var(--color-info-light);   color: var(--color-info-text); }
.status-viewed   { background: var(--color-purple-light); color: var(--color-purple-text); }
.status-paid     { background: var(--color-success-light);color: var(--color-success-text); }
.status-overdue  { background: var(--color-danger-light); color: var(--color-danger-text); }
.status-cancelled{ background: var(--gray-100);           color: var(--gray-500); }
.status-partial  { background: var(--color-warning-light);color: var(--color-warning-text); }

/* ================================================================
   TABLE
   ================================================================ */

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
}
.table-wrapper::-webkit-scrollbar { height: 4px; }
.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: var(--radius-full);
}

.data-table {
  width: 100%;
  font-size: var(--text-sm);
  border-collapse: separate;
  border-spacing: 0;
}
.data-table thead th {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
  text-align: left;
}
.data-table thead th:first-child { border-radius: var(--radius-lg) 0 0 0; }
.data-table thead th:last-child  { border-radius: 0 var(--radius-lg) 0 0; }
.data-table thead th.sortable { cursor: pointer; }
.data-table thead th.sortable:hover { color: var(--text-primary); }
.data-table thead th.sort-asc::after  { content: ' ↑'; opacity: 0.6; }
.data-table thead th.sort-desc::after { content: ' ↓'; opacity: 0.6; }

.data-table tbody tr {
  transition: background var(--transition-fast);
  cursor: default;
}
.data-table tbody tr:hover td { background: var(--bg-subtle); }
.data-table tbody tr.selected td { background: var(--brand-primary-light); }

.data-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
  background: var(--bg-surface);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody td.text-right { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tbody td.text-center { text-align: center; }
.data-table tbody td.muted { color: var(--text-tertiary); font-size: var(--text-xs); }

.data-table .col-amount {
  font-weight: var(--weight-medium);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.data-table .col-actions {
  text-align: right;
  white-space: nowrap;
}
.data-table .row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.data-table tbody tr:hover .row-actions { opacity: 1; }

/* Table customer name cell */
.table-entity {
  display: flex;
  align-items: center;
  gap: 10px;
}
.table-entity-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: var(--weight-semibold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.table-entity-name {
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  line-height: 1.3;
}
.table-entity-sub {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 1px;
}

/* ================================================================
   MODALS
   ================================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,20,32,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-4);
  animation: fadeIn var(--transition-base) ease;
}
.modal {
  background: var(--bg-surface);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp var(--transition-slow) ease;
}
.modal.modal-lg { max-width: 760px; }
.modal.modal-xl { max-width: 960px; }
.modal.modal-sm { max-width: 400px; }

.modal-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-header h3 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
}
.modal-close {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 16px;
}
.modal-close:hover { background: var(--bg-subtle); color: var(--text-primary); }

.modal-body {
  padding: var(--space-5) var(--space-6);
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
}
.modal-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  flex-shrink: 0;
  background: var(--bg-subtle);
}

/* ================================================================
   TABS
   ================================================================ */

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-default);
  margin-bottom: var(--space-5);
}
.tab-item {
  padding: 9px 16px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-tertiary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition-fast);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.tab-item:hover { color: var(--text-primary); }
.tab-item.active {
  color: var(--brand-primary);
  border-bottom-color: var(--brand-primary);
}
.tab-item .tab-count {
  font-size: var(--text-xs);
  background: var(--bg-inset);
  border-radius: var(--radius-full);
  padding: 1px 6px;
  color: var(--text-tertiary);
}
.tab-item.active .tab-count {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

/* Pill tabs */
.tabs-pill {
  display: flex;
  gap: 4px;
  background: var(--bg-inset);
  border-radius: var(--radius-lg);
  padding: 3px;
  border: 1px solid var(--border-subtle);
}
.tab-pill {
  padding: 5px 12px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.tab-pill:hover { color: var(--text-primary); }
.tab-pill.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

/* ================================================================
   FILTERS / TOOLBAR
   ================================================================ */

.page-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.page-toolbar-left  { display: flex; align-items: center; gap: var(--space-2); flex: 1; min-width: 0; }
.page-toolbar-right { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.filter-chip:hover { border-color: var(--border-strong); color: var(--text-primary); }
.filter-chip.active {
  background: var(--brand-primary-light);
  border-color: var(--brand-primary-mid);
  color: var(--brand-primary);
}

/* Date range display */
.date-range-display {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: var(--text-sm);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.date-range-display:hover { border-color: var(--border-strong); color: var(--text-primary); }
.date-range-display i { font-size: 15px; color: var(--text-tertiary); }

/* ================================================================
   EMPTY STATE
   ================================================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-8);
  text-align: center;
}
.empty-state-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-xl);
  background: var(--bg-inset);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--text-disabled);
  margin-bottom: var(--space-4);
}
.empty-state h3 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: 6px;
}
.empty-state p {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  max-width: 340px;
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-5);
}

/* ================================================================
   TOAST NOTIFICATIONS
   ================================================================ */

.toast-container {
  position: fixed;
  top: var(--space-5);
  right: var(--space-5);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  color: var(--text-primary);
  pointer-events: all;
  min-width: 260px;
  max-width: 380px;
  animation: slideInRight var(--transition-slow) ease;
}
.toast i { font-size: 17px; flex-shrink: 0; }
.toast-message { flex: 1; }
.toast-close {
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 15px;
  flex-shrink: 0;
  padding: 2px;
}
.toast-close:hover { color: var(--text-primary); }
.toast.success { border-left: 3px solid var(--color-success); }
.toast.success i { color: var(--color-success); }
.toast.error   { border-left: 3px solid var(--color-danger); }
.toast.error i { color: var(--color-danger); }
.toast.warning { border-left: 3px solid var(--color-warning); }
.toast.warning i { color: var(--color-warning); }
.toast.info    { border-left: 3px solid var(--color-info); }
.toast.info i  { color: var(--color-info); }

/* ================================================================
   SKELETON LOADING
   ================================================================ */

.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
.skeleton-text  { height: 14px; margin-bottom: 6px; }
.skeleton-text.w-sm  { width: 120px; }
.skeleton-text.w-md  { width: 200px; }
.skeleton-text.w-lg  { width: 280px; }
.skeleton-text.w-full { width: 100%; }
.skeleton-h1    { height: 28px; width: 200px; }
.skeleton-badge { height: 22px; width: 72px; border-radius: var(--radius-full); }
.skeleton-btn   { height: 34px; width: 110px; border-radius: var(--radius-md); }
.skeleton-card  { height: 96px; border-radius: var(--radius-xl); }
.skeleton-avatar{ width: 32px; height: 32px; border-radius: var(--radius-md); }

/* ================================================================
   DROPDOWN
   ================================================================ */

.dropdown-wrapper { position: relative; display: inline-flex; }
.dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--bg-raised);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  min-width: 180px;
  padding: 4px;
  animation: fadeInDown var(--transition-fast) ease;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}
.dropdown-item:hover { background: var(--bg-subtle); color: var(--text-primary); }
.dropdown-item i { font-size: 15px; width: 16px; color: var(--text-tertiary); }
.dropdown-item.danger { color: var(--color-danger-text); }
.dropdown-item.danger:hover { background: var(--color-danger-light); }
.dropdown-item.danger i { color: var(--color-danger); }
.dropdown-divider { height: 1px; background: var(--border-subtle); margin: 4px 0; }

/* ================================================================
   PROGRESS & CHARTS
   ================================================================ */

.progress-bar-wrapper {
  height: 6px;
  background: var(--bg-inset);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--transition-slower) ease;
}
.progress-bar-fill.success { background: var(--color-success); }
.progress-bar-fill.warning { background: var(--color-warning); }
.progress-bar-fill.danger  { background: var(--color-danger); }
.progress-bar-fill.info    { background: var(--brand-primary); }

/* ================================================================
   DIVIDER & SEPARATOR
   ================================================================ */

.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-5) 0;
}
.divider-vertical {
  width: 1px;
  height: 20px;
  background: var(--border-subtle);
}

/* ================================================================
   CONFIRM DIALOG
   ================================================================ */

.confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: var(--space-4);
}
.confirm-icon.danger {
  background: var(--color-danger-light);
  color: var(--color-danger);
}
.confirm-icon.warning {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

/* ================================================================
   KEYFRAMES
   ================================================================ */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Topbar breadcrumb item ── */
.topbar-breadcrumb-item {
  color: var(--text-tertiary); text-decoration: none; font-size: 13px;
  transition: color var(--transition-fast);
}
.topbar-breadcrumb-item:hover { color: var(--text-primary); }

/* ── Dropdown (used in topbar user menu) ── */
.dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--radius-md);
  font-size: 13px; color: var(--text-secondary);
  cursor: pointer; transition: all var(--transition-fast);
  text-decoration: none; background: none; border: none;
  width: 100%; text-align: left; font-family: var(--font-sans);
}
.dropdown-item:hover { background: var(--bg-subtle); color: var(--text-primary); }
.dropdown-item svg  { width:14px; height:14px; flex-shrink:0; color: var(--text-tertiary); }
.dropdown-item.danger { color: var(--color-danger-text); }
.dropdown-item.danger:hover { background: var(--color-danger-light); }
.dropdown-item.danger svg { color: var(--color-danger); }
