/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

.payables-workspace :where(a, button, input[type="submit"], summary):focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

:root {
  --nuref-ink: #172033;
  --nuref-muted: #657085;
  --nuref-line: #e4e8ef;
  --nuref-surface: #ffffff;
  --nuref-canvas: #f6f8fb;
  --nuref-accent: #5146e5;
  --nuref-sidebar: #3027b8;
}

body { font-family: 'Inter', sans-serif; color: var(--nuref-ink); background: var(--nuref-canvas); }

.sidebar-brand { display: inline-flex; align-items: center; gap: .7rem; color: #fff; font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.sidebar-brand:hover { color: #fff; }
.sidebar-brand__mark { display: grid; grid-template-columns: repeat(2, 5px); gap: 3px; padding: 6px; border: 1px solid rgba(255,255,255,.25); border-radius: 9px; background: rgba(255,255,255,.12); }
.sidebar-brand__mark span { width: 5px; height: 5px; border-radius: 2px; background: #fff; }
.sidebar-brand__mark span:nth-child(2) { background: #fbbf24; }
.sidebar-brand__mark span:nth-child(3) { background: #a5b4fc; }
.sidebar-brand__menu { display: grid; gap: 3px; padding: 6px; opacity: .55; }
.sidebar-brand__menu span { width: 16px; height: 1.5px; background: #fff; border-radius: 999px; }

.vendors-page { max-width: 76rem; margin: 0 auto; padding: 1rem 0 3rem; }
.vendors-page__header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.eyebrow { margin: 0 0 .45rem; color: var(--nuref-accent); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.vendors-page h1 { margin: 0; font-size: clamp(2rem, 3vw, 2.65rem); line-height: 1; letter-spacing: -.04em; }
.vendors-page__intro { max-width: 38rem; margin: .75rem 0 0; color: var(--nuref-muted); font-size: 1rem; }
.vendors-primary-action, .vendors-search__submit { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem; border: 1px solid var(--nuref-accent); border-radius: .65rem; background: var(--nuref-accent); padding: .7rem 1rem; color: #fff; font-weight: 600; box-shadow: 0 4px 10px rgba(81,70,229,.15); transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.vendors-primary-action:hover, .vendors-search__submit:hover { background: #4338ca; color: #fff; transform: translateY(-1px); box-shadow: 0 7px 16px rgba(81,70,229,.2); }
.vendors-primary-action svg { width: 1.1rem; height: 1.1rem; }
.vendors-search { display: flex; gap: .75rem; margin-bottom: 1.25rem; }
.vendors-search__field { display: flex; align-items: center; flex: 1; gap: .7rem; min-height: 2.9rem; border: 1px solid #cfd6e2; border-radius: .65rem; background: var(--nuref-surface); padding: 0 .9rem; box-shadow: 0 1px 2px rgba(16,24,40,.03); }
.vendors-search__field:focus-within { border-color: var(--nuref-accent); box-shadow: 0 0 0 3px rgba(81,70,229,.12); }
.vendors-search__field svg { width: 1.1rem; height: 1.1rem; flex: 0 0 auto; color: #8490a3; }
.vendors-search__field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--nuref-ink); font-size: .92rem; }
.vendors-search__field input::placeholder { color: #8993a4; }
.vendors-search__submit { min-width: 5.5rem; border-color: #cfd6e2; background: #fff; color: var(--nuref-ink); box-shadow: none; }
.vendors-search__submit:hover { border-color: var(--nuref-accent); color: var(--nuref-accent); background: #fff; box-shadow: none; }
.vendors-table-card { overflow: hidden; border: 1px solid var(--nuref-line); border-radius: .85rem; background: var(--nuref-surface); box-shadow: 0 6px 18px rgba(23,32,51,.05); }
.vendors-table-card__header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--nuref-line); padding: 1.1rem 1.25rem; }
.vendors-table-card h2 { margin: 0; font-size: 1rem; letter-spacing: -.01em; }
.vendors-table-card__header p { margin: .25rem 0 0; color: var(--nuref-muted); font-size: .82rem; }
.vendors-table { width: 100%; border-collapse: collapse; text-align: left; }
.vendors-table th { background: #fbfcfe; color: #778196; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.vendors-table th, .vendors-table td { padding: .95rem 1.25rem; }
.vendors-table tbody tr { border-top: 1px solid var(--nuref-line); transition: background .15s ease; }
.vendors-table tbody tr:hover { background: #fafaff; }
.vendors-table td { font-size: .9rem; }
.vendor-name { color: #4038b8; font-weight: 600; }
.vendor-name:hover { color: #2d2695; text-decoration: underline; text-underline-offset: 3px; }
.muted-cell { color: var(--nuref-muted); }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.vendor-status { display: inline-flex; align-items: center; gap: .45rem; color: #344054; font-size: .82rem; font-weight: 600; }
.vendor-status span { width: .45rem; height: .45rem; border-radius: 50%; background: #22c55e; }
.vendor-status--inactive span { background: #94a3b8; }
.vendors-empty { margin: 0; padding: 3rem 1rem; color: var(--nuref-muted); text-align: center; }

@media (max-width: 639px) {
  .vendors-page { padding-top: .25rem; }
  .vendors-page__header { align-items: flex-start; flex-direction: column; gap: 1rem; margin-bottom: 1.25rem; }
  .vendors-primary-action { width: 100%; }
  .vendors-search { flex-direction: column; }
  .vendors-search__submit { width: 100%; }
  .vendors-table-wrap { overflow-x: auto; }
  .vendors-table { min-width: 44rem; }
}

@media (max-width: 639px) {
  .payables-workspace :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    font-size: 16px;
  }
}

/* Dashboard command center */
.dashboard-shell { max-width: 90rem; margin: 0 auto; padding: .5rem 0 3.5rem; color: var(--nuref-ink); }
.dashboard-shell * { box-sizing: border-box; }
.dashboard-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.75rem; }
.dashboard-header h1 { margin: 0; font-family: 'DM Sans', sans-serif; font-size: clamp(2rem, 3vw, 2.75rem); font-weight: 600; line-height: 1.05; letter-spacing: -.045em; text-wrap: balance; }
.dashboard-header__summary { max-width: 43rem; margin: .65rem 0 0; color: var(--nuref-muted); font-size: 1rem; line-height: 1.5; }
.dashboard-eyebrow, .dashboard-kicker { margin: 0 0 .4rem; color: #655be8; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.dashboard-header__actions { display: flex; align-items: center; gap: 1rem; flex: 0 0 auto; }
.dashboard-date { color: var(--nuref-muted); font-size: .82rem; }
.dashboard-primary-action { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 2.75rem; border: 1px solid #3730a3; border-radius: .65rem; background: #3730a3; padding: .7rem 1rem; color: #fff; font-size: .88rem; font-weight: 650; box-shadow: 0 5px 14px rgba(55,48,163,.17); transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.dashboard-primary-action:hover { background: #2d268f; color: #fff; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(55,48,163,.2); }
.dashboard-primary-action svg { width: 1.05rem; height: 1.05rem; }
.dashboard-primary-action:focus-visible, .dashboard-shell a:focus-visible { outline: 2px solid #5146e5; outline-offset: 3px; }

.dashboard-priority { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 5rem; margin-bottom: 1rem; border: 1px solid #f1dec4; border-radius: .8rem; background: #fffaf3; padding: 1rem 1.25rem; }
.dashboard-priority__intro { display: flex; align-items: center; gap: .9rem; }
.dashboard-priority__intro h2 { margin: 0; font-size: 1rem; font-weight: 650; letter-spacing: -.01em; }
.dashboard-priority__signal { width: .65rem; height: .65rem; flex: 0 0 auto; border-radius: 50%; background: #e79023; box-shadow: 0 0 0 5px rgba(231,144,35,.12); }
.dashboard-priority__signal--clear { background: #16a36a; box-shadow: 0 0 0 5px rgba(22,163,106,.12); }
.dashboard-priority__meta { display: flex; gap: .55rem; }
.dashboard-priority__meta span { border: 1px solid #ead9c5; border-radius: 999px; background: rgba(255,255,255,.7); padding: .4rem .7rem; color: #755b3e; font-size: .78rem; }
.dashboard-priority__meta strong { color: #4d3823; font-variant-numeric: tabular-nums; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem); align-items: start; gap: 1rem; }
.dashboard-main, .dashboard-aside { display: grid; gap: 1rem; min-width: 0; }
.dashboard-panel, .dashboard-finance { overflow: hidden; border: 1px solid var(--nuref-line); border-radius: .85rem; background: var(--nuref-surface); box-shadow: 0 5px 18px rgba(23,32,51,.045); }
.dashboard-panel { padding: 1.25rem; }
.dashboard-panel--compact { padding-bottom: .35rem; }
.dashboard-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.1rem; }
.dashboard-section-heading h2 { margin: 0; font-family: 'DM Sans', sans-serif; font-size: 1.08rem; font-weight: 600; letter-spacing: -.02em; }
.dashboard-section-heading > a { color: #5146e5; font-size: .8rem; font-weight: 650; text-decoration: none; }
.dashboard-section-heading > a:hover { color: #3730a3; text-decoration: underline; text-underline-offset: 3px; }

.dashboard-finance { position: relative; isolation: isolate; background: #172033; padding: 1.35rem; color: #fff; box-shadow: 0 12px 26px rgba(23,32,51,.13); }
.dashboard-finance::after { position: absolute; z-index: -1; top: -10rem; right: -7rem; width: 22rem; height: 22rem; border: 1px solid rgba(255,255,255,.06); border-radius: 50%; content: ''; }
.dashboard-section-heading--inverse .dashboard-kicker { color: #a9a3ff; }
.dashboard-section-heading--inverse h2 { color: #fff; }
.dashboard-section-heading--inverse > a { color: #c8c5ff; }
.dashboard-finance__value { margin: 2.1rem 0 0; font-family: 'DM Sans', sans-serif; font-size: clamp(2.25rem, 5vw, 3.8rem); font-weight: 600; line-height: 1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.dashboard-finance__value span { margin-right: .35rem; color: #aeb7ca; font-family: 'DM Mono', monospace; font-size: .85rem; font-weight: 500; letter-spacing: .05em; }
.dashboard-finance__caption { margin: .7rem 0 1.8rem; color: #aeb7ca; font-size: .85rem; }
.dashboard-finance__details { display: grid; grid-template-columns: minmax(12rem, .8fr) minmax(18rem, 1.2fr); gap: 1rem; border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.15rem; }
.dashboard-finance__details > div:first-child { display: flex; flex-direction: column; align-items: flex-start; }
.dashboard-finance__details > div > span, .dashboard-office-list > span { color: #939fb5; font-size: .69rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.dashboard-finance__details > div > strong { margin-top: .45rem; font-size: 1rem; font-variant-numeric: tabular-nums; }
.dashboard-finance__details > div > a { margin-top: .7rem; color: #c8c5ff; font-size: .75rem; font-weight: 600; }
.dashboard-office-list { border-left: 1px solid rgba(255,255,255,.12); padding-left: 1rem; }
.dashboard-office-list ul { margin: .45rem 0 0; padding: 0; list-style: none; }
.dashboard-office-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .2rem 0; color: #c7cfdd; font-size: .78rem; }
.dashboard-office-list li strong { color: #fff; font-weight: 550; font-variant-numeric: tabular-nums; }
.dashboard-office-list p { margin: .5rem 0 0; color: #aeb7ca; font-size: .8rem; }

.dashboard-queue { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--nuref-line); border-radius: .65rem; }
.dashboard-queue__item { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) 1rem; align-items: center; gap: .8rem; min-height: 4.7rem; padding: .8rem .95rem; color: var(--nuref-ink); transition: background-color .15s ease; }
.dashboard-queue__item:nth-child(odd) { border-right: 1px solid var(--nuref-line); }
.dashboard-queue__item:nth-child(-n+2) { border-bottom: 1px solid var(--nuref-line); }
.dashboard-queue__item:hover { background: #f8f9fc; color: var(--nuref-ink); }
.dashboard-queue__count { display: inline-flex; align-items: center; justify-content: center; width: 2.15rem; height: 2.15rem; border-radius: .55rem; background: #f0efff; color: #4338ca; font-family: 'DM Mono', monospace; font-size: .82rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.dashboard-queue__item--approval .dashboard-queue__count { background: #fff4dd; color: #9a5b05; }
.dashboard-queue__item--payment .dashboard-queue__count { background: #eaf7f1; color: #087a52; }
.dashboard-queue__item--reconciliation .dashboard-queue__count { background: #edf3f8; color: #426079; }
.dashboard-queue__copy { display: flex; min-width: 0; flex-direction: column; gap: .12rem; }
.dashboard-queue__copy strong { font-size: .85rem; font-weight: 650; }
.dashboard-queue__copy small { overflow: hidden; color: var(--nuref-muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-queue__item > svg { width: 1rem; height: 1rem; color: #9aa3b3; }

.dashboard-document-list { margin: 0 -1.25rem -1.25rem; padding: 0; border-top: 1px solid var(--nuref-line); list-style: none; }
.dashboard-document-list li + li { border-top: 1px solid var(--nuref-line); }
.dashboard-document-list li > a, .dashboard-list-row { display: flex; align-items: center; gap: .85rem; min-height: 4.2rem; padding: .75rem 1.25rem; color: var(--nuref-ink); transition: background-color .15s ease; }
.dashboard-document-list li > a:hover { background: #fafbfe; color: var(--nuref-ink); }
.dashboard-document-list__icon { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; flex: 0 0 auto; border: 1px solid #e3e7ee; border-radius: .5rem; color: #768297; }
.dashboard-document-list__icon svg { width: 1rem; height: 1rem; }
.dashboard-document-list__copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: .15rem; }
.dashboard-document-list__copy strong { overflow: hidden; font-size: .84rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-document-list__copy small { color: var(--nuref-muted); font-size: .71rem; }
.dashboard-status { display: inline-flex; align-items: center; min-height: 1.45rem; border-radius: 999px; background: #f0f2f5; padding: .2rem .55rem; color: #5e6878; font-size: .68rem; font-weight: 650; }
.dashboard-status--pending, .dashboard-status--paused { background: #fff4d8; color: #885612; }
.dashboard-status--completed, .dashboard-status--active { background: #e8f7f0; color: #08754f; }
.dashboard-status--cancelled { background: #feeceb; color: #ad2d27; }
.dashboard-list-row__value { font-size: .82rem; font-variant-numeric: tabular-nums; }
.dashboard-inline-empty { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--nuref-line); padding: 1.25rem 0 .2rem; }
.dashboard-inline-empty p { margin: 0; color: var(--nuref-muted); font-size: .85rem; }
.dashboard-inline-empty a { color: #5146e5; font-size: .82rem; font-weight: 650; }

.dashboard-facts { margin: 0 -1.25rem; }
.dashboard-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--nuref-line); padding: .95rem 1.25rem; }
.dashboard-facts dt { color: var(--nuref-muted); font-size: .79rem; }
.dashboard-facts dd { margin: 0; font-family: 'DM Mono', monospace; font-size: .92rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.dashboard-facts dd small { color: var(--nuref-muted); font-family: 'Inter', sans-serif; font-size: .68rem; font-weight: 400; }
.dashboard-shortcuts { margin: 0 -1.25rem; }
.dashboard-shortcuts a { display: flex; align-items: center; justify-content: space-between; min-height: 2.85rem; border-top: 1px solid var(--nuref-line); padding: .65rem 1.25rem; color: #344054; font-size: .8rem; font-weight: 550; transition: background-color .15s ease, color .15s ease; }
.dashboard-shortcuts a:hover { background: #fafbfe; color: #4338ca; }
.dashboard-shortcuts svg { width: 1rem; height: 1rem; color: #9ba4b3; }

.dashboard-empty { display: flex; align-items: center; gap: 1.5rem; min-height: 12rem; border: 1px solid var(--nuref-line); border-radius: .85rem; background: #fff; padding: 2rem; }
.dashboard-empty__icon { display: inline-flex; align-items: center; justify-content: center; width: 3.5rem; height: 3.5rem; flex: 0 0 auto; border-radius: .75rem; background: #f0efff; color: #5146e5; }
.dashboard-empty__icon svg { width: 1.8rem; height: 1.8rem; }
.dashboard-empty h2 { margin: 0; font-family: 'DM Sans', sans-serif; font-size: 1.25rem; }
.dashboard-empty p:last-child { max-width: 42rem; margin: .45rem 0 0; color: var(--nuref-muted); font-size: .88rem; line-height: 1.55; }

@media (max-width: 1023px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .dashboard-header { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .dashboard-header__actions { width: 100%; justify-content: space-between; }
  .dashboard-priority { align-items: flex-start; flex-direction: column; gap: .85rem; }
  .dashboard-finance__details { grid-template-columns: 1fr; }
  .dashboard-office-list { border-top: 1px solid rgba(255,255,255,.12); border-left: 0; padding-top: 1rem; padding-left: 0; }
  .dashboard-aside { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .dashboard-shell { padding-top: 0; }
  .dashboard-header h1 { font-size: 2rem; }
  .dashboard-header__actions { align-items: stretch; flex-direction: column-reverse; }
  .dashboard-date { display: none; }
  .dashboard-primary-action { width: 100%; }
  .dashboard-priority__meta { width: 100%; }
  .dashboard-priority__meta span { flex: 1; text-align: center; }
  .dashboard-queue { grid-template-columns: 1fr; }
  .dashboard-queue__item:nth-child(odd) { border-right: 0; }
  .dashboard-queue__item:not(:last-child) { border-bottom: 1px solid var(--nuref-line); }
  .dashboard-finance__value { font-size: 2.25rem; }
  .dashboard-document-list__icon { display: none; }
  .dashboard-document-list li > a, .dashboard-list-row { padding-right: 1rem; padding-left: 1rem; }
  .dashboard-status { max-width: 5.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dashboard-empty { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-shell a { scroll-behavior: auto; transition: none; }
}
