/* Portal additions on top of the old theme (sb-admin.css + app.css + theme.css). */
[x-cloak] { display: none !important; }
.portal-toasts { position: fixed; top: 1rem; right: 1rem; z-index: 2000; width: 320px; }
.portal-toasts .alert { margin-bottom: .5rem; }
.sidebar .collapse-item.btn-link { font-size: .85rem; color: #3a3b45; padding: .5rem 1rem; text-decoration: none; }
.sidebar .collapse-item.btn-link:hover { background-color: #eaecf4; }
.table td, .table th { vertical-align: middle; }
.table-hover tbody tr.clickable { cursor: pointer; }
.sortable-handle { cursor: move; color: #b7b9cc; }
.money { text-align: right; white-space: nowrap; }
.portal-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1040; }
.portal-modal { position: fixed; inset: 0; z-index: 1050; overflow-y: auto; padding: 2rem 1rem; }
.portal-modal .modal-dialog { margin: 0 auto; max-width: var(--w, 640px); }
.portal-modal .modal-content { box-shadow: 0 .5rem 1rem rgba(0,0,0,.25); }
.login-container { min-height: 100vh; background: linear-gradient(135deg, #f8f9fc 0%, #e3e6f0 100%); }
.login-card { border: 0; border-radius: 1rem; box-shadow: 0 1rem 3rem rgba(0,0,0,.1); }
.login-btn { background: #005d2a; color: #fff; }
.login-btn:hover { background: #00491f; color: #fff; }
/* Summary cards: one row of six only where they fit (>= 1400px), else three per row,
   one per row on phones; large money figures stay inside their card. */
.counter-row-six { display: grid; grid-template-columns: 1fr; gap: .5rem; }
@media (min-width: 768px) { .counter-row-six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .counter-row-six { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.counter-card .counter-icon { font-size: 30px; flex: none; margin-right: .5rem; }
.counter-card .counter-text { min-width: 0; }
.counter-card .counter-value { font-size: 20px; white-space: nowrap; }
@media (min-width: 1400px) {
  .counter-row-six .counter-card .counter-icon { font-size: 22px; }
  .counter-row-six .counter-card .counter-value { font-size: clamp(15px, 1.05vw, 20px); }
}
/* Board cards: location / estimator / segment line; words never split mid-word. */
.project-card-footer { display: flex; align-items: baseline; gap: 6px; font-size: 12px; }
.project-card-footer > * { word-break: normal; overflow-wrap: normal; }
.project-card-footer .estimator { flex: 1 1 auto; min-width: 0; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-card-footer .location, .project-card-footer .segment { flex: 0 1 auto; max-width: 40%; font-weight: 700; }
.project-card-footer .segment { text-align: right; }
/* Phones: the logo fits the narrow sidebar and section headings wrap instead of clipping. */
.sidebar .sidebar-brand img { max-width: 100%; height: auto; }
@media (max-width: 767.98px) {
  .sidebar .sidebar-brand { padding: 1.5rem .5rem !important; height: auto; }
  .sidebar .sidebar-heading { white-space: normal; font-size: .6rem; padding: 0 .25rem; text-align: center; }
}
/* Phones: the table search box takes the card's width instead of sticking out to the left. */
@media (max-width: 575.98px) {
  .table-toolbar { float: none !important; width: 100%; }
  .table-toolbar .input-group { width: 100%; flex-wrap: nowrap; }
  .table-toolbar input.form-control { width: auto !important; min-width: 0; flex: 1 1 auto; }
}
/* Small inputs and dropdowns: the old theme's 8px top/bottom padding left 13px for 14px text
   inside the 31px box, cutting off the bottom of every letter. Bootstrap's own padding. */
.form-control-sm { padding-top: .25rem; padding-bottom: .25rem; line-height: 1.5; }
