/* Ahlan Operations — app additions beyond the mockup styles (forms, login, chat, wizard, charts). Load after ahlan.css. */
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label, .label-row { font-weight: 600; font-size: 14.5px; }
.label-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.field small, .help { font-size: 13px; color: var(--muted); }
.input { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.input:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(30, 90, 55, .12); }
.input svg.i { color: var(--muted); }
.input input, .input select, .input textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: inherit; padding: 11px 0; }
.input textarea { resize: vertical; min-height: 96px; }
.input.money::before { content: '৳'; color: var(--muted); font-weight: 600; }
.input.bad { border-color: var(--danger); }
.err { color: var(--danger); font-size: 13.5px; font-weight: 600; }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--green); }
.btn.block { width: 100%; justify-content: center; }
.link { color: var(--green); font-weight: 600; background: none; border: 0; padding: 0; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13.5px; margin: 16px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--bg); }
.login .photo { position: relative; background: #0f2a1d center / cover; color: #fff; padding: 64px 56px; display: flex; flex-direction: column; justify-content: center; }
.login .photo::before { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(10, 30, 20, .92) 0%, rgba(10, 30, 20, .7) 45%, rgba(10, 30, 20, .25) 100%); }
.login .photo > * { position: relative; max-width: 470px; }
.login .photo h1 { font-size: 36px; line-height: 1.3; margin: 0 0 12px; }
.login .photo p { font-size: 16px; opacity: .9; margin: 0 0 18px; }
.login .photo .rule { width: 72px; height: 3px; background: var(--cta); border-radius: 2px; margin-bottom: 22px; }
.login .feat { display: grid; gap: 14px; }
.login .feat div { display: flex; align-items: center; gap: 14px; font-size: 17px; }
.login .feat .ic { width: 40px; height: 40px; border-radius: 10px; background: rgba(245, 197, 107, .92); color: #3b2a07; display: grid; place-items: center; }
.login .photo .mlogo { display: none; }
.login .form-side { display: grid; place-items: center; padding: 40px 24px; }
.login form { width: 100%; max-width: 420px; }
.login .logo { display: block; width: 190px; margin: 0 auto 22px; }
.login h2 { font-size: 26px; margin: 0; }
.login .sub { color: var(--muted); margin: 2px 0 22px; }
.login .row { display: flex; justify-content: space-between; align-items: center; margin: 2px 0 18px; }
.login .mfeat { display: none; }

/* Chat */
.chat { display: grid; gap: 12px; }
.bubble { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: 15px; white-space: pre-wrap; word-break: break-word; }
.bubble.me { justify-self: end; background: #e3efdc; border: 1px solid #d3e3c8; border-bottom-right-radius: 5px; }
.bubble.ai { justify-self: start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.bubble .meta { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; text-align: right; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); font-size: 14px; color: var(--ink); }
.opt:hover, .opt.on { border-color: var(--green); color: var(--green); }
.composer { display: flex; gap: 10px; align-items: center; padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.composer textarea { flex: 1; border: 0; outline: 0; resize: none; font: inherit; background: transparent; min-height: 24px; max-height: 140px; }
.send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--green); color: #fff; display: grid; place-items: center; flex: none; }
.result-block { white-space: pre-wrap; word-break: break-word; background: #fffaf0; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }

/* Wizard */
.steps-bar { display: flex; gap: 6px; margin-bottom: 16px; }
.steps-bar span { flex: 1; text-align: center; font-size: 12.5px; color: var(--muted); }
.steps-bar span b { display: grid; place-items: center; width: 30px; height: 30px; margin: 0 auto 4px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); color: var(--muted); font-size: 14px; }
.steps-bar span.on b { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); }
.steps-bar span.done b { background: var(--green); border-color: var(--green); color: #fff; }
.steps-bar span.on { color: var(--ink); font-weight: 600; }
.photo-drop { display: grid; place-items: center; gap: 8px; min-height: 170px; padding: 18px; border: 2px dashed #d6caa9; border-radius: 16px; background: #fffaf0; text-align: center; color: var(--muted); }
.photo-drop img { max-width: 100%; max-height: 320px; border-radius: 10px; }
.sumrow { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.sumrow:first-child { border-top: 0; }
.sumrow.total { font-weight: 700; font-size: 17px; background: #fbf0d9; margin: 6px -10px 0; padding: 10px; border-radius: 10px; border: 0; }

/* 7-day bars */
.bars { display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 10px; height: 170px; padding-top: 10px; }
.bars .b { display: grid; justify-items: center; gap: 6px; height: 100%; align-content: end; font-size: 12.5px; color: var(--muted); }
.bars .b span { width: 100%; max-width: 38px; background: #a9c49b; border-radius: 6px 6px 2px 2px; min-height: 3px; }
.bars .b.today span { background: var(--green); }

/* Empty state, toast, countdown, misc */
.empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 22px 12px; color: var(--muted); }
.empty .ic { width: 52px; height: 52px; border-radius: 16px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; }
.empty .ic svg.i { width: 26px; height: 26px; }
.empty b { color: var(--ink); font-size: 16px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 50; display: flex; gap: 10px; align-items: center; padding: 11px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14.5px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.toast.ok { background: var(--green); } .toast.bad { background: var(--danger); }
.count { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.count div { background: #f6dfae; border-radius: 10px; text-align: center; padding: 8px 4px; font-size: 13px; }
.count b { display: block; font-size: 26px; line-height: 1.2; }
.status-line { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.status-line .d { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); }
.status-line .d.on { background: var(--up); }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-weight: 600; margin-bottom: 10px; background: none; border: 0; padding: 0; }
.otp { font: 700 22px/1.3 ui-monospace, monospace; letter-spacing: .08em; background: #fbf0d9; padding: 10px 14px; border-radius: 10px; display: inline-block; }
.todo-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.todo-item:first-child { border-top: 0; padding-top: 0; }
.todo-item .body { flex: 1; min-width: 0; }

.scrim { position: fixed; inset: 0; background: rgba(12, 20, 15, .45); z-index: 25; }
.mtop .brand .dome { width: 30px; height: 30px; color: var(--gold); }
a.avatar { color: #fff; }

@media (max-width: 900px) {
  .side.open { display: flex; position: fixed; inset: 0 auto 0 0; width: 272px; height: 100vh; z-index: 30; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .login { grid-template-columns: 1fr; }
  .login .photo { min-height: 230px; padding: 0; justify-content: center; align-items: center; }
  .login .photo::before { background: linear-gradient(180deg, rgba(10, 30, 20, .45), rgba(10, 30, 20, .78)); }
  .login .photo > :not(.mlogo) { display: none; }
  .login .photo .mlogo { display: block; width: 170px; }
  .login .form-side { margin-top: -26px; padding: 0 0 24px; place-items: stretch; position: relative; }
  .login form { max-width: none; background: var(--bg); border-radius: 24px 24px 0 0; padding: 24px 18px 0; }
  .login form .logo { display: none; }
  .login h2 { font-size: 21px; text-align: center; } .login .sub { text-align: center; }
  .login .mfeat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 22px; padding: 14px 6px; border-radius: 16px; background: #f0e7d3; text-align: center; font-size: 12.5px; }
  .login .mfeat svg.i { color: var(--gold); width: 24px; height: 24px; display: block; margin: 0 auto 4px; }
  .bars { gap: 6px; height: 140px; }
  .toast { bottom: 92px; }
}
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .kpis.k4, .kpis.k3 { grid-template-columns: 1fr 1fr; } .kpis.k3 .kpi:nth-child(3) { grid-column: 1 / -1; } }
@media (min-width: 901px) { .app { background: linear-gradient(to right, var(--sidebar) 236px, var(--bg) 236px); } .login .photo { clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%); } }
