/* Dhanshree Motors Finance - Lending ERP V1.0 (built by VIKANTIX TECH) */
:root {
  --ink: #17202a; --muted: #5d6b78; --line: #dbe2e8; --bg: #f5f7f9; --card: #ffffff;
  --brand: #8a1c1c; --brand-ink: #ffffff; --danger: #b42318; --ok: #11733e; --warn: #9a6200;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Tamil", sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: var(--brand); }
h1 { font-size: 1.6rem; margin: 0 0 .5rem; }
h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
h3 { font-size: 1rem; margin: 0 0 .35rem; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.25rem; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: .02em; }
.brand span { color: var(--brand); font-weight: 600; }
.top nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.top nav a { text-decoration: none; color: var(--ink); }
.top nav a:hover { color: var(--brand); }
.persona { font-size: .8rem; background: #f7e9e9; color: var(--brand); padding: .15rem .55rem; border-radius: 999px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 1.5rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 640px; margin: 0 auto 1.5rem; }
.actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.muted { color: var(--muted); }
.mt { margin-top: .75rem; }
.hint { color: var(--muted); font-size: .85rem; }
.stat { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.stat .num { font-size: 1.45rem; font-weight: 700; color: var(--brand); }
.btn { display: inline-block; background: var(--brand); color: var(--brand-ink); border: 1px solid var(--brand); border-radius: 8px; padding: .55rem 1.1rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.1); }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-small { padding: .3rem .7rem; font-size: .85rem; }
button.link { background: none; border: 0; color: var(--ink); font: inherit; cursor: pointer; padding: 0; }
button.link:hover { color: var(--brand); }
form.inline { display: inline-flex; gap: .4rem; align-items: center; margin: 0; }
.inline-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.field { margin-bottom: 1rem; border: 0; padding: 0; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .92rem; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=password], .field input[type=number], .field input[type=date], .field textarea, select, .inline-form input {
  width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
select { width: auto; }
input.small { width: 4.5rem; padding: .3rem .4rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.field input:focus, .field textarea:focus, select:focus { outline: 2px solid #e6a9a9; border-color: var(--brand); }
.has-error input, .has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .85rem; margin: .3rem 0 0; }
label.check { display: flex; gap: .5rem; align-items: center; font-weight: 400; margin-bottom: .3rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.flash { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; }
.flash-success { background: #e9f7ef; border-color: #b7e2c6; color: var(--ok); }
.flash-error { background: #fdecea; border-color: #f5c2bd; color: var(--danger); }
.flash-info { background: #eaf2fb; border-color: #c3d9ef; color: var(--brand); }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #f0f3f6; font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.row-actions { white-space: nowrap; }
.tag { display: inline-block; font-size: .75rem; padding: .1rem .5rem; border-radius: 999px; background: #eef1f4; color: var(--muted); text-transform: capitalize; }
.tag-pending, .tag-invited { background: #fff4d6; color: var(--warn); }
.tag-approved, .tag-active { background: #e9f7ef; color: var(--ok); }
.tag-rejected, .tag-suspended, .tag-disabled, .tag-expired { background: #fdecea; color: var(--danger); }
.tabs { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tabs a { padding: .35rem .8rem; border-radius: 999px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: #fff; }
.tabs a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.kv { display: grid; grid-template-columns: 9rem 1fr; gap: .4rem 1rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; background: #f0f3f6; padding: .75rem; border-radius: 8px; font-size: 1.05rem; letter-spacing: .05em; }
.wrapcode { word-break: break-all; font-size: .85rem; }
.perm-list { padding-left: 1.1rem; }
.perm-list code { background: #f0f3f6; padding: 0 .3rem; border-radius: 4px; font-size: .82rem; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv dt { margin-top: .5rem; } }

/* Dhanshree additions */
.who { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; font-size: .92rem; }
.mainnav, .subnav { display: flex; gap: .25rem; flex-wrap: wrap; padding: .4rem 1rem; background: var(--card); border-bottom: 1px solid var(--line); }
.subnav { background: #faf6f6; font-size: .88rem; align-items: center; }
.mainnav a, .subnav a { padding: .35rem .7rem; border-radius: 6px; text-decoration: none; color: var(--ink); }
.mainnav a:hover, .subnav a:hover { background: #f3eaea; }
.mainnav a.on, .subnav a.on { background: var(--brand); color: #fff; }
.pagehead { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.pagehead h1 { margin: 0; }
td.num, th.num, .plain td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.small { font-size: .85rem; }
.right { text-align: right; }
.mb { margin-bottom: 1rem; }
.bad, .stat .num.bad { color: var(--danger); }
tr.row-bad td { background: #fff6f5; }
.note { background: #fff4d6; border: 1px solid #f0d58c; padding: .6rem .8rem; border-radius: 8px; color: #6b4b00; }
.missing { color: var(--danger); font-style: italic; }
.todo { padding-left: 1.2rem; }
.todo li { margin-bottom: .4rem; }
.link-card { display: block; text-decoration: none; color: var(--ink); }
.link-card:hover { border-color: var(--brand); }
.link-card p { color: var(--muted); margin: 0; }
.tag-draft, .tag-submitted, .tag-recommended { background: #fff4d6; color: var(--warn); }
.tag-verified, .tag-posted, .tag-disbursed { background: #e9f7ef; color: var(--ok); }
.tag-closed, .tag-foreclosed { background: #e8eef7; color: #24527a; }
.tag-inactive, .tag-cancelled, .tag-reversed { background: #eceff2; color: var(--muted); }
table.plain { width: auto; min-width: 60%; margin-bottom: 1rem; }
table.plain td, table.plain th { border-bottom: 1px solid var(--line); padding: .4rem .7rem; background: transparent; }
tr.total td, tr.total th { font-weight: 700; border-top: 2px solid var(--ink); }
/* printable documents */
body.print { background: #e9ecef; }
.printbar { max-width: 210mm; margin: 0 auto; padding: .75rem 0; display: flex; gap: 1rem; flex-wrap: wrap; }
.paper { background: #fff; max-width: 210mm; margin: 0 auto 2rem; padding: 14mm 15mm; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.letterhead { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 2px solid var(--brand); padding-bottom: .6rem; margin-bottom: 1rem; }
.lh-name { font-size: 1.2rem; color: var(--brand); }
.paper table.grid { width: 100%; }
.paper table.grid th, .paper table.grid td { padding: .25rem .4rem; border: 1px solid #ccd3da; }
table.kfs { width: 100%; }
table.kfs th { width: 2rem; background: transparent; }
.stamp { display: inline-block; border: 2px solid var(--danger); color: var(--danger); padding: 0 .5rem; transform: rotate(-4deg); font-size: 1rem; }
.signs { display: flex; justify-content: space-between; margin-top: 3rem; gap: 2rem; }
.signs div { min-width: 40%; border-top: 1px solid #999; padding-top: .3rem; font-size: .9rem; }
.signs div:empty { border-top: 0; }
@media print {
  body.print, body { background: #fff; }
  .noprint { display: none !important; }
  .paper { box-shadow: none; margin: 0; padding: 0; max-width: none; }
  a { color: inherit; text-decoration: none; }
}
table.kfs td.num { white-space: normal; }
table.kfs td:nth-child(2) { width: 42%; }
.paper table.plain { max-width: 100%; }
