:root {
  --ink: #13221d; --muted: #6d7d77; --line: #dfe8e4; --paper: #fff;
  --canvas: #f1f5f3; --green: #0d5a46; --green-dark: #0a4637;
  --lime: #d9f45b; --danger: #a93636; --success: #17694f;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--canvas); }
button, input { font: inherit; }
button { cursor: pointer; }
.login-page { min-height: 100vh; background: #edf3f0; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 43%) 1fr; }
.brand-panel { padding: clamp(2rem, 6vw, 5rem); background: radial-gradient(circle at 80% 18%, #2e7a6428 0 18%, transparent 19%), linear-gradient(145deg, #0a3026, #0d5643); color: #fff; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.brand-panel::after { content: ""; position: absolute; width: 420px; height: 420px; border: 1px solid #cfe94d30; border-radius: 50%; right: -210px; bottom: -160px; box-shadow: 0 0 0 55px #d9f45b0a, 0 0 0 110px #d9f45b08; }
.brand-badge, .mobile-brand span, .logo span { width: 3rem; height: 3rem; border-radius: .85rem; background: var(--lime); color: #173a30; display: grid; place-items: center; font-weight: 900; letter-spacing: -.05em; }
.brand-panel h1 { max-width: 32rem; margin: .7rem 0 1rem; font-size: clamp(2.4rem, 5vw, 4.8rem); line-height: .98; letter-spacing: -.055em; }
.lead { max-width: 31rem; color: #b7d0c7; font-size: 1.1rem; line-height: 1.7; }
.eyebrow { color: #5d766d; font-size: .75rem; font-weight: 800; letter-spacing: .14em; margin: 0; }
.brand-panel .eyebrow { color: var(--lime); }
.brand-footer { position: relative; z-index: 1; font-size: .82rem; color: #91b2a7; }
.form-panel, .center-shell { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }
.form-card { width: min(100%, 430px); background: var(--paper); border: 1px solid var(--line); border-radius: 1.3rem; padding: clamp(1.7rem, 4vw, 2.7rem); box-shadow: 0 24px 80px #153b3020; }
.form-card h2 { font-size: 2rem; letter-spacing: -.04em; margin: .55rem 0 .4rem; }
.muted { color: var(--muted); line-height: 1.6; }
.form-card > .muted { margin: 0 0 1.6rem; }
.form-card form { display: grid; gap: 1.05rem; }
.form-card label { display: grid; gap: .48rem; font-size: .88rem; font-weight: 700; }
.form-card input { width: 100%; height: 3.15rem; border: 1px solid #d7e2de; border-radius: .8rem; padding: 0 .95rem; background: #fbfdfc; color: var(--ink); outline: none; transition: .18s; }
.form-card input:focus { border-color: #2f8169; box-shadow: 0 0 0 3px #2f81691b; background: #fff; }
.password-field { position: relative; }
.password-field input { padding-right: 4.8rem; }
.password-toggle { position: absolute; right: .55rem; top: 50%; transform: translateY(-50%); border: 0; background: #edf4f1; color: var(--green); border-radius: .5rem; padding: .4rem .6rem; font-size: .74rem; font-weight: 800; }
.form-card form > button { height: 3.2rem; margin-top: .2rem; border: 0; border-radius: .8rem; background: var(--green); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: space-between; padding: 0 1.05rem; box-shadow: 0 10px 24px #0d5a4630; }
.form-card form > button:hover { background: var(--green-dark); }
button.is-loading { opacity: .72; pointer-events: none; }
.mobile-brand { display: none; align-items: center; gap: .75rem; font-weight: 850; margin-bottom: 2rem; }
.mobile-brand span, .logo span { width: 2.5rem; height: 2.5rem; border-radius: .7rem; }
.mobile-brand.visible { display: flex; }
.demo-box { margin-top: 1.4rem; padding: 1rem; border-radius: .9rem; background: #f1f6f4; border: 1px solid #dfeae6; }
.demo-box strong { font-size: .82rem; }
.demo-box p { font-size: .78rem; margin: .42rem 0; color: #40554d; word-break: break-all; }
.demo-box small { display: block; color: #70827b; font-size: .72rem; margin-top: .65rem; }
.alert { margin: 0 0 1rem; padding: .85rem 1rem; border-radius: .75rem; font-size: .84rem; border: 1px solid; }
.alert.error { background: #fff1f1; color: var(--danger); border-color: #efd1d1; }
.alert.success { background: #eef9f4; color: var(--success); border-color: #cae9dc; }
.compact { max-width: 470px; }
.topbar { height: 74px; background: #0d4435; color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(1rem, 4vw, 3.5rem); border-bottom: 1px solid #245d4d; }
.logo { color: #fff; text-decoration: none; display: flex; align-items: center; gap: .8rem; font-weight: 850; }
.account { display: flex; align-items: center; gap: 1rem; }
.account > div { text-align: right; }
.account strong, .account small { display: block; }
.account strong { font-size: .9rem; }
.account small { font-size: .72rem; color: #9fc0b5; margin-top: .15rem; }
.account button { border: 1px solid #4d796c; background: transparent; color: #fff; border-radius: .6rem; padding: .5rem .75rem; font-size: .8rem; }
.dashboard { max-width: 1080px; margin: auto; padding: clamp(2rem, 6vw, 5rem) 1.25rem; }
.dashboard h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.05em; margin: .5rem 0; }
.dashboard > .muted { margin-bottom: 2rem; }
.role-card { background: #fff; border: 1px solid var(--line); border-radius: 1.2rem; padding: 1.5rem; display: flex; align-items: center; gap: 1rem; box-shadow: 0 12px 40px #173b3010; }
.role-icon { width: 4rem; height: 4rem; border-radius: 1rem; background: #e6f3ee; color: var(--green); display: grid; place-items: center; font-size: 1.4rem; font-weight: 900; }
.role-card > div:nth-child(2) { flex: 1; }
.role-card span { font-size: .7rem; letter-spacing: .12em; color: #71817b; font-weight: 800; }
.role-card h2 { font-size: 1.2rem; margin: .28rem 0; }
.role-card p { margin: 0; color: var(--muted); font-size: .88rem; }
.role-card > b { background: #e7f7ef; color: #227257; padding: .42rem .7rem; border-radius: 2rem; font-size: .75rem; }
@media (max-width: 760px) {
  .login-shell { display: block; }
  .brand-panel { display: none; }
  .form-panel { min-height: 100vh; padding: 1.1rem; }
  .mobile-brand { display: flex; }
  .form-card { box-shadow: none; border-radius: 1rem; }
  .account > div { display: none; }
  .role-card { align-items: flex-start; flex-wrap: wrap; }
  .role-card > div:nth-child(2) { min-width: calc(100% - 5rem); }
  .role-card > b { margin-left: 5rem; }
}
