/* masters pages: parties, suppliers, direct truck owners, own vehicles, drivers, and the Trucks list. */

/* list rows */
.m-name { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.m-name-text { display: flex; flex-direction: column; min-width: 0; }
.m-title { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 700; }
.m-tile { width: 30px; height: 30px; border-radius: 9px; background: var(--info-bg); color: var(--info); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.m-tile.big { width: 46px; height: 46px; border-radius: 13px; }
.bal { display: inline-flex; flex-direction: column; align-items: flex-end; }
.bal .money.muted { color: var(--text2); }
.toolbar .search .input { min-height: 38px; }

/* form */
.m-date { display: flex; align-items: flex-start; gap: 4px; min-width: 0; }
.m-date .icon-btn { margin-top: 24px; }

/* detail page */
.m-archive { display: flex; justify-content: center; }
.m-archive .btn { color: var(--text2); }
.m-hero { display: flex; flex-direction: column; gap: 12px; }
.m-hero-top { display: flex; align-items: flex-start; gap: 12px; }
.m-hero-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text2); }
.m-hero-amount { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.2; }
.m-hero-label.good, .m-hero-amount.good { color: var(--good); }
.m-hero-label.bad, .m-hero-amount.bad { color: var(--bad); }
.m-hero-amount.muted { color: var(--text2); }
.m-progress { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.m-progress span { display: block; height: 100%; border-radius: 999px; background: var(--navy); }
.m-progress span.good { background: var(--good); }
.m-progress span.bad { background: var(--bad); }
.m-hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.m-quick { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.m-quick-item { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 12px; font-size: 12.5px; font-weight: 700; color: var(--text); text-decoration: none; min-width: 64px; }
a.m-quick-item:hover { background: var(--muted-bg); }
.m-quick-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--info-bg); color: var(--navy); display: flex; align-items: center; justify-content: center; }
.m-quick-item.off { color: var(--text2); cursor: default; }
.m-quick-item.off .m-quick-icon { background: var(--muted-bg); color: var(--text2); }
.m-hero-actions > .m-quick:only-child { margin: 0 auto; }
.m-table-card > .table-wrap { margin: 0 -18px; border-top: 1px solid var(--line); }
.m-table-card > .table-wrap:last-child { margin-bottom: -16px; }
.m-note { margin-top: 10px; }
.m-contact { gap: 12px; }
.m-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.m-fact-label { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text2); }
.m-fact-value { display: block; font-weight: 700; overflow-wrap: anywhere; }
.m-notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.m-plate { font-size: 20px; font-weight: 800; letter-spacing: .02em; }
.m-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 4px; }
.m-stat { display: flex; flex-direction: column; gap: 2px; background: var(--muted-bg); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.m-stat-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text2); }
.m-stat-value { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.m-stat-sub { font-size: 12px; font-weight: 600; color: var(--text2); }
.m-stat.good .m-stat-value { color: var(--good); }
.m-stat.bad .m-stat-value { color: var(--bad); }
.m-stat.warn { background: var(--warn-bg); }
.m-stat.warn .m-stat-value { color: var(--warn); }
.m-stat.good.fill { background: var(--good-bg); }
.m-stat.bad.fill { background: var(--bad-bg); }
.m-stat.good.fill .m-stat-label { color: var(--good); }
.m-stat.bad.fill .m-stat-label { color: var(--bad); }
.m-driver { gap: 12px; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.m-driver + .m-quick { justify-content: space-around; margin: 10px 0 0; border-top: 1px solid var(--line); padding-top: 10px; }
.m-papers { display: flex; flex-direction: column; }
.m-paper { display: flex; align-items: center; gap: 10px; min-height: 38px; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.m-paper:last-child { border-bottom: 0; }
.m-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); flex: none; }
.m-dot.good { background: var(--good); }
.m-dot.warn { background: #D98600; }
.m-dot.bad { background: var(--bad); }
.line-icon { display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; flex: none; background: var(--info-bg); color: var(--navy); }
.line-icon.payment-in { background: var(--good-bg); color: var(--good); }
.line-icon.payment-out { background: var(--bad-bg); color: var(--bad); }
.line-icon.other { background: var(--warn-bg); color: var(--warn); }
.card-list > .list-item { padding: 10px 4px; }
.card-list .list-item b { display: block; }
@media (max-width: 700px) {
  .m-hero-amount { font-size: 26px; }
  .m-quick { margin: 0; width: 100%; justify-content: space-between; }
  .m-hero-actions > .btn { width: 100%; }
  .m-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .m-stats .m-stat:first-child { grid-column: 1 / -1; }
}
.m-list .table td, .lg-card .table td, .card .lg-caption + .table-wrap td { vertical-align: middle; }
.m-sm-show { display: none !important; }
@media (max-width: 700px) {
  .m-sm-hide { display: none !important; }
  .m-sm-show { display: block !important; }
}
