/* RiceMill Pro — design tokens & layout */

:root {
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-soft: #ecfdf5;
  --secondary: #3b82f6;
  --tertiary: #f59e0b;
  --danger: #dc2626;
  --warning: #ea580c;
  --purple: #8b5cf6;

  --bg-page: #f4f7f6;
  --bg-sidebar: #f3f4f6;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --text: #111827;
  --text-muted: #6b7280;
  --text-light: #9ca3af;

  --radius: 10px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);

  --sidebar-w: 260px;
  --header-h: auto;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-page);
  line-height: 1.45;
  min-height: 100vh;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
}

.sidebar__brand {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}

.sidebar__title {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.sidebar__subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem 0.65rem 1.25rem;
  color: var(--text);
  font-size: 0.9rem;
  text-decoration: none;
  border-right: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.sidebar__link:hover {
  background: rgba(16, 185, 129, 0.08);
  text-decoration: none;
}

.sidebar__link svg {
  flex-shrink: 0;
  opacity: 0.75;
}

.sidebar__link--active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 600;
  border-right-color: var(--primary);
}

.sidebar__link--active svg {
  opacity: 1;
  color: var(--primary-dark);
}

.sidebar__footer {
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

/* Main */

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-page);
  border-bottom: 1px solid transparent;
}

.topbar__titles h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.topbar__meta {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.topbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.topbar__context {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-right: 0.5rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  box-shadow: var(--shadow);
}

.icon-btn:hover {
  color: var(--text);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.content {
  padding: 0 1.5rem 2rem;
  flex: 1;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn--primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

.btn--secondary {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}

.btn--secondary:hover {
  background: #f9fafb;
}

.btn--outline {
  background: var(--bg-card);
  color: var(--primary-dark);
  border-color: var(--primary);
}

.btn--outline:hover {
  background: var(--primary-soft);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
}

.btn--lg {
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
}

.btn--block {
  width: 100%;
}

/* Cards */

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.card__pad {
  padding: 1.25rem;
}

.card__title {
  margin: 0 0 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card__head h2,
.card__head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

/* KPI grid */

.grid-kpi {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

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

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

.kpi {
  padding: 1.15rem;
}

.kpi__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.kpi__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.kpi__value {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.kpi__value--teal {
  color: #0d9488;
}

.kpi__value--blue {
  color: var(--secondary);
}

.kpi__value--green {
  color: #047857;
}

.kpi__value--orange {
  color: #d97706;
}

.kpi__trend {
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.kpi__trend--up {
  color: var(--primary);
}

.kpi__trend--down {
  color: var(--danger);
}

/* Grid two columns */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 960px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.grid-2--2-1 {
  grid-template-columns: 2fr 1fr;
}

@media (max-width: 1100px) {
  .grid-2--2-1 {
    grid-template-columns: 1fr;
  }
}

/* Tables */

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  text-align: left;
  padding: 0.65rem 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  background: #fafafa;
}

.data-table td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table__link {
  color: var(--secondary);
  font-weight: 600;
}

/* Badges */

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 999px;
  text-transform: uppercase;
}

.badge--success {
  background: #d1fae5;
  color: #065f46;
}

.badge--warning {
  background: #ffedd5;
  color: #9a3412;
}

.badge--danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge--info {
  background: #dbeafe;
  color: #1e40af;
}

.badge--neutral {
  background: #f3f4f6;
  color: #4b5563;
}

/* Farmer cell */

.farmer-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.farmer-cell__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
}

.farmer-cell__name {
  font-weight: 600;
}

.farmer-cell__id {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Pills variety */

.pill-variety {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Progress bars (stock) */

.progress-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.progress-row__label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
}

.progress-row__track {
  height: 8px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
}

.progress-row__fill {
  height: 100%;
  border-radius: 999px;
}

.progress-row__fill--teal {
  background: #14b8a6;
}

.progress-row__fill--blue {
  background: var(--secondary);
}

.progress-row__fill--brown {
  background: #92400e;
}

.progress-row__fill--purple {
  background: var(--purple);
}

/* Activity timeline */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.timeline__item {
  display: flex;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.timeline__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 0.35rem;
  flex-shrink: 0;
}

.timeline__dot--green {
  background: var(--primary);
}

.timeline__dot--blue {
  background: var(--secondary);
}

.timeline__dot--orange {
  background: var(--tertiary);
}

.timeline__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Section title row */

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.section-head a {
  font-size: 0.85rem;
  font-weight: 600;
}

/* Pagination */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pagination__pages {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pagination__pages a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 0.35rem;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
}

.pagination__pages a:hover {
  background: #f3f4f6;
}

.pagination__pages a.is-active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

/* Forms */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 720px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-grid--full .form-field--full {
  grid-column: 1 / -1;
}

.form-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

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

.input-wrap {
  position: relative;
}

.input-wrap .input {
  padding-left: 2.25rem;
}

.input-wrap__icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

/* Payment mode radios */

.pay-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .pay-options {
    grid-template-columns: 1fr;
  }
}

.pay-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pay-options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  margin: 0;
  transition: border-color 0.15s, background 0.15s;
}

.pay-options input:checked + label {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

/* Line toggle (milling) */

.toggle-line {
  display: inline-flex;
  flex-wrap: wrap;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.toggle-line input {
  position: absolute;
  opacity: 0;
}

.toggle-line label {
  padding: 0.5rem 1.25rem;
  margin: 0;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  background: #f9fafb;
}

.toggle-line input:checked + label {
  background: var(--primary-dark);
  color: #fff;
}

/* FAB */

.fab {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 50;
}

.fab:hover {
  background: var(--primary-dark);
  color: #fff;
  text-decoration: none;
}

/* Info callouts */

.callout {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.callout--info {
  background: #eff6ff;
  color: #1e3a8a;
}

.callout--warn {
  background: #fffbeb;
  color: #92400e;
}

/* Donut chart (CSS) */

.donut-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .donut-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.donut-card {
  text-align: center;
  padding: 1rem;
}

.donut {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  position: relative;
}

.donut--teal {
  background: conic-gradient(#14b8a6 0 75%, #e5e7eb 75% 100%);
}

.donut--blue {
  background: conic-gradient(#3b82f6 0 60%, #e5e7eb 60% 100%);
}

.donut--brown {
  background: conic-gradient(#92400e 0 12%, #e5e7eb 12% 100%);
}

.donut--gray {
  background: conic-gradient(#6b7280 0 50%, #e5e7eb 50% 100%);
}

.donut::after {
  content: "";
  position: absolute;
  width: 64px;
  height: 64px;
  background: #fff;
  border-radius: 50%;
}

.donut span {
  position: relative;
  z-index: 1;
}

.donut-card__sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Product inventory cards */

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 1000px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

.product-card {
  padding: 1.1rem;
  border: 1px solid var(--border);
}

.product-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.product-card__name {
  font-weight: 700;
  font-size: 0.95rem;
}

.product-card__cat {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.product-card__qty {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.product-card__qty small {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.product-card__foot {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.product-card--add {
  border-style: dashed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: var(--text-muted);
  cursor: default;
}

.product-card--add .plus {
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
}

/* Report cards grid */

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 1000px) {
  .report-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .report-grid {
    grid-template-columns: 1fr;
  }
}

.report-card {
  padding: 1.25rem;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.report-card--wide {
  grid-column: span 2;
}

@media (max-width: 1000px) {
  .report-card--wide {
    grid-column: span 1;
  }
}

.report-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.report-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-card__body {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.report-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--text);
}

/* Milling layout */

.milling-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 1100px) {
  .milling-layout {
    grid-template-columns: 1fr;
  }
}

.ratio-card {
  background: linear-gradient(145deg, #047857, #065f46);
  color: #fff;
  padding: 1.25rem;
  border-radius: var(--radius);
}

.ratio-card__label {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  opacity: 0.9;
}

.ratio-card__value {
  font-size: 2.25rem;
  font-weight: 800;
  margin: 0.5rem 0;
}

.ratio-card__bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  margin: 1rem 0;
  overflow: hidden;
}

.ratio-card__bar-fill {
  height: 100%;
  width: 80%;
  background: #fff;
  border-radius: 999px;
}

.monitor-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 140px;
  background: linear-gradient(180deg, #9ca3af 0%, #6b7280 100%);
}

.monitor-card__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: #fff;
  font-size: 0.8rem;
}

.tip-card {
  background: #ffe8d1;
  color: #7d4f2a;
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.tip-card strong {
  display: block;
  margin-bottom: 0.35rem;
}

/* Sales invoice */

.invoice-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.25rem;
}

@media (max-width: 1000px) {
  .invoice-layout {
    grid-template-columns: 1fr;
  }
}

.totals-box {
  text-align: right;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.totals-box__row {
  display: flex;
  justify-content: flex-end;
  gap: 2rem;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.totals-box__grand {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-top: 0.5rem;
}

/* Farmer payments summary */

.summary-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 900px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

.summary-hero {
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.summary-hero__value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.quick-actions {
  background: #eff6ff;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid #bfdbfe;
}

.quick-actions h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: #1d4ed8;
}

.quick-actions p {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  color: #3b82f6;
  font-style: italic;
}

.quick-actions__btns {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quick-actions__btns .btn {
  justify-content: flex-start;
  background: #fff;
  border: 1px solid #bfdbfe;
}

/* Filter bar */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.filter-bar .form-field {
  min-width: 160px;
}

/* Page footer (reports) */

.page-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0 0;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Utilities */

.mt-0 {
  margin-top: 0;
}

.mb-1 {
  margin-bottom: 1rem;
}

.text-right {
  text-align: right;
}

.text-danger {
  color: var(--danger);
  font-weight: 700;
}

.text-success {
  color: var(--primary-dark);
  font-weight: 700;
}

.flex {
  display: flex;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gap-sm {
  gap: 0.5rem;
}

/* Responsive sidebar */

@media (max-width: 900px) {
  .app {
    flex-direction: column;
  }

  .sidebar {
    position: relative;
    height: auto;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .sidebar__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem;
  }

  .sidebar__link {
    border-right: none;
    border-bottom: 3px solid transparent;
    border-radius: var(--radius-sm);
  }

  .sidebar__link--active {
    border-right: none;
    border-bottom-color: var(--primary);
  }

  .sidebar__footer {
    display: none;
  }
}
