/* PSK Business ERP — accounts, expenses, reports, notifications and settings */

/* ---------- accounts ---------- */
.acct-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.acct-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); text-align: left; transition: border-color .15s, box-shadow .15s, transform .15s; }
.acct-card small { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.acct-card > b { font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.acct-card .card-link { margin-top: 6px; }
.acct-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.acct-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-50); color: var(--secondary); }
.acct-card.cash .acct-ic { background: var(--amber-50); color: #D97706; }
.acct-card.selectable { cursor: pointer; }
.acct-card.selectable:hover { border-color: #C4CDDC; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.acct-card.active { border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .13); }
.ledger-pick { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.ledger-pick .field { flex: 1 1 280px; max-width: 460px; }
.ledger-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.age-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.age-box { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.age-box small { color: var(--muted); font-size: 12px; font-weight: 600; }
.age-box b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.age-3 b { color: var(--danger); }
.pl { font-size: 13.5px; }
.pl-head { margin-top: 16px; padding-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); border-bottom: 1px solid var(--line); }
.pl-head:first-child { margin-top: 0; }
.pl-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line-2); color: var(--text-2); }
.pl-row b { font-weight: 600; color: var(--text); }
.pl-row.sub { font-weight: 700; color: var(--text); background: var(--surface-2); padding: 9px 10px; margin: 0 -10px; border-radius: 8px; border-bottom: 0; }
.pl-row.sub b { font-weight: 700; }
.pl-row.total { margin: 14px -10px 0; padding: 12px 10px; border-radius: 10px; background: var(--navy-50); color: var(--primary); font-size: 15.5px; font-weight: 700; border-bottom: 0; }
.pl-row.total b { color: var(--primary); font-weight: 700; }
.pl-row.loss { background: var(--red-50); color: #B91C1C; }
.pl-row.loss b { color: #B91C1C; }

/* ---------- reports ---------- */
.rep-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 16px; }
.rep-cat { padding: 10px; position: sticky; top: 12px; max-height: calc(100dvh - 110px); overflow-y: auto; }
.rep-pick { display: none; flex-direction: column; gap: 6px; }
.rep-pick span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.rep-group + .rep-group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.rep-group-title { display: flex; align-items: center; gap: 7px; padding: 6px 10px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rep-link { display: block; padding: 7px 10px; border-radius: 8px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.rep-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.rep-link.active { background: var(--blue-50); color: var(--secondary-600); font-weight: 600; }
.rep-main > * + *, #rep-out > * + * { margin-top: 16px; }
.rep-head { padding: 18px; }
.rep-head-top { display: flex; align-items: flex-start; gap: 14px; }
.rep-head-top p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.rep-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: linear-gradient(145deg, #2563EB, #173B68); color: #fff; }
.rep-group-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--secondary); }
.rep-range { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.util { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.util .progress { width: 80px; }

/* ---------- notifications ---------- */
.ntf-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.ntf-side { padding: 10px; position: sticky; top: 12px; }
.ntf-side-title { padding: 6px 10px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ntf-type { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 500; text-align: left; }
.ntf-type span { flex: 1; }
.ntf-type em { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 9px; background: #E9EEF5; color: var(--text-2); }
.ntf-type:hover { background: var(--surface-2); color: var(--text); }
.ntf-type.active { background: var(--blue-50); color: var(--secondary-600); font-weight: 600; }
.ntf-type.active em { background: #fff; color: var(--secondary-600); }
.ntf-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.ntf-bar .check { min-height: 0; font-size: 13px; }
.ntf-count { margin-left: auto; }
.ntf-list { display: flex; flex-direction: column; gap: 10px; }
.ntf { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--secondary); border-radius: var(--radius); box-shadow: var(--shadow-xs); transition: box-shadow .15s; }
.ntf:hover { box-shadow: var(--shadow-md); }
.ntf.sev-critical { border-left-color: var(--danger); }
.ntf.sev-warning { border-left-color: var(--accent); }
.ntf.read { background: var(--surface-2); border-left-color: #CBD3E1; }
.ntf.read h4 { font-weight: 500; color: var(--text-2); }
.ntf-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--blue-50); color: var(--secondary); }
.ntf.sev-critical .ntf-ic { background: var(--red-50); color: var(--danger); }
.ntf.sev-warning .ntf-ic { background: var(--amber-50); color: #D97706; }
.ntf.read .ntf-ic { background: #EEF1F6; color: #64748B; }
.ntf-body { flex: 1; min-width: 0; }
.ntf-top { display: flex; align-items: center; gap: 8px; }
.ntf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--secondary); flex: none; }
.ntf-body p { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.ntf-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ntf-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex: none; }

/* ---------- settings ---------- */
.set-save { display: flex; justify-content: flex-end; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.logo-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 150px; margin: 14px 0; border: 1px dashed #C4CDDC; border-radius: var(--radius); background: var(--surface-2); padding: 16px; }
.logo-box img { max-width: 160px; max-height: 110px; object-fit: contain; border-radius: 10px; }
.swatch { width: 14px; height: 14px; border-radius: 4px; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.list-card h3 .icon { color: var(--secondary); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 11px; border-radius: 8px; background: #EEF2F8; color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.tag.used { background: var(--blue-50); color: #1D4ED8; }
.tag button { width: 20px; height: 20px; border: 0; border-radius: 6px; background: transparent; color: inherit; opacity: .55; display: grid; place-items: center; padding: 0; }
.tag button:hover { opacity: 1; background: rgba(23, 59, 104, .1); }
.tag > span { margin-right: 4px; }
.tag-add { display: flex; gap: 8px; }
.tag-add .input { flex: 1; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.role-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, transform .15s; }
.role-card:hover { border-color: #C4CDDC; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.role-card.active { border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .13); }
.role-card b { font-size: 14.5px; font-weight: 650; margin-top: 4px; }
.role-card small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.role-card em { font-style: normal; font-size: 11.5px; color: var(--text-2); font-weight: 600; margin-top: 4px; }
.role-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--navy-50); color: var(--primary); }
.perm { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; }
.perm.yes { background: var(--green-50); color: var(--success); }
.perm.no { background: #F1F4F9; color: #B6C0D2; }
.perm-table th.ta-center { text-align: center; text-transform: capitalize; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.store { display: flex; flex-direction: column; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); line-height: 1.35; }
.store small { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; color: var(--text-2); }
.store b { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.csv-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.danger-zone { border-color: #F3C7C7; background: linear-gradient(180deg, #FFFBFB, #fff); }
.danger-zone h3 .icon { color: var(--danger); }

@media (max-width: 1024px) {
  .rep-layout, .ntf-layout { grid-template-columns: minmax(0, 1fr); }
  .rep-cat, .ntf-side { position: static; max-height: none; }
  .rep-nav { display: none; }
  .rep-pick { display: flex; }
  .ntf-side { display: flex; flex-wrap: wrap; gap: 6px; }
  .ntf-side-title { width: 100%; }
  .ntf-type { width: auto; background: var(--surface-2); }
  .ntf-type span { flex: none; }
}
@media (max-width: 760px) {
  .age-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ntf { flex-wrap: wrap; }
  .ntf-actions { width: 100%; justify-content: flex-start; padding-left: 52px; }
  .ledger-actions .btn { flex: 1; }
  .ntf-count { margin-left: 0; }
}
@media (min-width: 761px) {
  [data-tour="accounts-kpis"], [data-tour="deliveries-kpis"], [data-tour="steel-kpis"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  [data-tour="vehicles-kpis"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
