/* First Line Clean Credit - owner Admin website. Dark dashboard look; works on phone and computer. */
:root { --bg: #0b1220; --panel: #121b2e; --panel2: #18233a; --line: #26334d; --text: #e8edf5; --muted: #93a1b8;
  --gold: #e9b949; --green: #2fbf71; --red: #ff6b5e; --blue: #5aa9ff; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--blue); }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 14px; }
h1, h2 { margin: 0 0 10px; line-height: 1.2; } h2 { font-size: 18px; }

.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); }
.spin { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: s 0.8s linear infinite; }
@keyframes s { to { transform: rotate(360deg); } }

.brand { display: flex; gap: 10px; align-items: center; }
.brand b { display: block; font-size: 17px; } .brand small { color: var(--gold); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 11px; }
.logo { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #2d6cdf, #1b3f8f); display: grid; place-items: center; font-weight: 800; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700; padding: 10px 16px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--blue); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #1a1405; }
.btn.ghost { background: transparent; } .btn.sm { padding: 6px 12px; font-size: 14px; }
.btn:disabled { opacity: .6; cursor: default; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
input[type=email], input[type=password], input[type=search], input[type=number] { font: inherit; font-size: 17px; width: 100%; padding: 11px 12px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.msg { min-height: 1.4em; margin: 0; } .msg.bad { color: var(--red); }
.err { background: #3a1513; color: #ffd2cc; border: 1px solid #7a2a24; padding: 10px 14px; border-radius: 10px; margin: 0 0 16px; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.login-card h1 { margin-top: 8px; }

/* app shell */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 0; height: 100vh; }
.side nav { display: flex; flex-direction: column; gap: 4px; }
.side nav a { color: var(--text); text-decoration: none; padding: 10px 12px; border-radius: 10px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.side nav a:hover { background: var(--panel2); }
.side nav a.on { background: var(--panel2); box-shadow: inset 3px 0 0 var(--gold); }
.side-foot { margin-top: auto; font-size: 14px; }
.pill { background: var(--gold); color: #1a1405; border-radius: 99px; font-size: 12px; padding: 0 8px; }
.pill:empty { display: none; }
.main { padding: 20px 28px 60px; min-width: 0; }
.top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.top h1 { margin: 0; font-size: 26px; flex: 1; }
.who { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; }
.menu-btn { display: none; font-size: 22px; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 4px 12px; cursor: pointer; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .grid2 .card { margin-bottom: 0; } .grid2 { margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.stat b { display: block; font-size: 32px; line-height: 1.1; } .stat span { color: var(--muted); font-size: 14px; }
.stat.warn b { color: var(--red); } .stat.good b { color: var(--green); }
.status { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; font-size: 14px; font-weight: 600; background: var(--panel); }
.chip.on { border-color: var(--green); color: var(--green); } .chip.off { border-color: var(--muted); color: var(--muted); } .chip.warn { border-color: var(--gold); color: var(--gold); }
.list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.list.plain { list-style: none; padding: 0; }
.row { display: flex; gap: 10px; margin-bottom: 12px; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
td.late { color: var(--red); font-weight: 700; }

.sw { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; }
.sw input { width: 24px; height: 24px; margin-top: 2px; flex: none; accent-color: var(--green); }
.sw small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.num { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-weight: 600; padding: 14px 0; border-top: 1px solid var(--line); }
.num input { width: 100px; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 20; transform: translateX(-100%); transition: transform .2s; height: 100vh; }
  .app.menu-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.5); }
  .menu-btn { display: inline-block; }
  .main { padding: 14px 16px 60px; }
  .top h1 { font-size: 21px; }
  .who span { display: none; }
  .grid2 { grid-template-columns: 1fr; }
}
a.chip { text-decoration: none; color: inherit; }
a.chip.on { color: var(--green); } a.chip.warn { color: var(--gold); } a.chip.off { color: var(--muted); }
