﻿:root {
  --maroon: #0f1b4c;
  --maroon-dark: #0a1337;
  --accent: #6366F1;
  --ink: #1e2a3a;
  --muted: #6b6b73;
  --line: #e4e4ea;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(120deg, #f4f6fb 0%, #ffffff 55%, #f4f6fb 100%);
  position: relative; overflow-x: hidden;
}
.login { min-height: 100vh; display: flex; align-items: center; justify-content: space-around; padding: 40px 6vw 80px; }

/* decorative right-hand red shapes */
.shape { position: fixed; top: 0; bottom: 0; right: 0; z-index: 0; }
.shape-dark  { width: 12vw; background: var(--maroon); clip-path: polygon(40% 0, 100% 0, 100% 100%, 70% 100%); }
.shape-light { width: 7vw;  background: var(--accent);      clip-path: polygon(60% 0, 100% 0, 100% 100%, 0 100%); opacity: .9; }

/* soft building skyline built from gradients */
.skyline {
  position: fixed; left: 0; bottom: 40px; width: 62vw; height: 55vh; z-index: 0; opacity: .5;
  background:
    linear-gradient(#aebbd1, #c9d3e3) 12% 100% / 9% 55% no-repeat,
    linear-gradient(#9fb0cb, #c3cfe2) 24% 100% / 8% 80% no-repeat,
    linear-gradient(#8fa3c3, #bccadf) 36% 100% / 14% 100% no-repeat,
    linear-gradient(#a7b6cf, #cbd5e5) 52% 100% / 10% 62% no-repeat,
    linear-gradient(#b4c1d6, #d3dbe8) 66% 100% / 9% 45% no-repeat;
  -webkit-mask-image: linear-gradient(to top, #000 40%, transparent);
          mask-image: linear-gradient(to top, #000 40%, transparent);
}

.brand { position: relative; z-index: 1; max-width: 420px; }
.brand-mark { display: flex; align-items: center; gap: 14px; margin-bottom: 40px; }
.brand-mark span { font-size: .72rem; letter-spacing: .04em; color: #4a4a50; font-weight: 500; max-width: 180px; line-height: 1.3; }
.brand h1 { font-size: 2.3rem; line-height: 1.2; margin: 0; font-weight: 700; color: #3a3a40; }
.brand h1 em { font-style: normal; color: var(--maroon); }

.card {
  position: relative; z-index: 1; width: 100%; max-width: 540px; background: #fff;
  border-radius: 28px; padding: 48px 46px 36px; box-shadow: 0 20px 60px rgba(30, 20, 40, .12);
}
.icon-circle {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 22px;
  background: #e8e9fd; color: var(--accent); display: grid; place-items: center;
}
.card h2 { text-align: center; margin: 0 0 6px; font-size: 1.7rem; font-weight: 700; }
.subtitle { text-align: center; color: var(--muted); font-size: .95rem; margin: 0 0 28px; }

label { display: block; font-weight: 500; font-size: .95rem; margin: 0 0 8px; }
.field { position: relative; margin-bottom: 22px; }
.field input {
  width: 100%; height: 56px; padding: 0 48px; font: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px; background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: #8d8d96; }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99, 102, 241, .25); }
.lead { position: absolute; left: 16px; top: 19px; color: #8d8d96; }
.toggle { position: absolute; right: 12px; top: 10px; border: 0; background: none; color: #8d8d96; cursor: pointer; padding: 6px; }
.toggle:hover { color: var(--accent); }

.row { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 24px; font-size: .95rem; }
.check { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 400; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.link { color: var(--ink); font-weight: 500; text-decoration: none; }
.link:hover { color: var(--accent); text-decoration: underline; }

.btn-primary {
  width: 100%; height: 60px; border: 0; border-radius: 12px; background: var(--maroon); color: #fff;
  font: 600 1.05rem 'Poppins', sans-serif; cursor: pointer; transition: background .15s, transform .05s;
}
.btn-primary:hover { background: var(--maroon-dark); }
.btn-primary:active { transform: translateY(1px); }
.help { text-align: center; color: var(--muted); font-size: .9rem; margin: 28px 0 0; }

.alert { background: #fdecee; color: #8a1424; border: 1px solid #f4c3ca; border-radius: 10px; padding: 12px 14px; margin-bottom: 20px; font-size: .9rem; }

footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; height: 40px; padding: 0 28px;
  background: var(--maroon); color: #fff; font-size: .85rem; display: flex; justify-content: space-between; align-items: center;
}
footer a { color: #fff; text-decoration: none; margin-left: 16px; }
footer a:hover { text-decoration: underline; }

/* dashboard placeholder */
.dash { display: grid; place-items: center; min-height: 100vh; }
.dash-card { background: #fff; border-radius: 24px; padding: 40px; box-shadow: 0 20px 60px rgba(30, 20, 40, .12); max-width: 520px; text-align: center; }
.dash-card h1 { margin-top: 0; }

@media (max-width: 900px) {
  .login { flex-direction: column; justify-content: flex-start; gap: 28px; padding-top: 28px; }
  .brand { text-align: center; }
  .brand-mark { justify-content: center; margin-bottom: 18px; }
  .brand h1 { font-size: 1.6rem; }
  .card { padding: 32px 22px; }
  .shape, .skyline { display: none; }
  footer { position: static; margin-top: 30px; flex-direction: column; height: auto; padding: 10px; gap: 4px; }
}


/* role toggle */
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #eef0f8; border-radius: 12px; padding: 4px; margin-bottom: 10px; }
.role { border: 0; background: none; height: 40px; border-radius: 9px; font: 500 .92rem 'Poppins', sans-serif; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.role.active { background: var(--maroon); color: #fff; box-shadow: 0 2px 8px rgba(15, 27, 76, .25); }
.role:not(.active):hover { color: var(--ink); }
.role-note { text-align: center; color: var(--muted); font-size: .82rem; margin: 0 0 20px; min-height: 1.2em; }

/* ---- compact card + selects (overrides) ---- */
.login { padding: 24px 6vw 64px; }
.card { max-width: 440px; padding: 26px 32px 20px; border-radius: 22px; max-height: calc(100vh - 80px); overflow-y: auto; }
.icon-circle { width: 52px; height: 52px; margin-bottom: 10px; }
.icon-circle svg { width: 22px; height: 22px; }
.card h2 { font-size: 1.35rem; margin-bottom: 2px; }
.subtitle { font-size: .85rem; margin-bottom: 14px; }
.roles { margin-bottom: 6px; }
.role { height: 34px; font-size: .85rem; }
.role-note { font-size: .76rem; margin-bottom: 12px; }
label { font-size: .85rem; margin-bottom: 5px; }
.field { margin-bottom: 12px; }
.field input, .field select { height: 44px; padding: 0 44px; font-size: .9rem; }
.field select {
  width: 100%; font-family: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; background-color: #fff;
  outline: none; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238d8d96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
  transition: border-color .15s, box-shadow .15s;
}
.field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99, 102, 241, .25); }
.field select:disabled { opacity: .6; }
.lead { top: 13px; }
.toggle { top: 6px; }
.row { margin: 0 0 14px; font-size: .85rem; }
.btn-primary { height: 48px; font-size: 1rem; }
.help { margin-top: 14px; font-size: .8rem; }
.alert { padding: 9px 12px; margin-bottom: 12px; font-size: .82rem; }
@media (max-height: 760px) { .icon-circle, .subtitle { display: none; } .card h2 { margin-bottom: 10px; } }

/* ---- logo ---- */
.brand-logo { height: clamp(110px, 20vh, 170px); width: auto; display: block; }
.brand-mark { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 26px; }
.brand-mark span { max-width: none; font-size: .72rem; letter-spacing: .1em; margin-left: 4px; }
.card-logo { display: block; width: 64px; height: 64px; object-fit: contain; margin: 0 auto 8px; }
@media (max-height: 760px) { .card-logo { display: none; } }
@media (max-width: 900px) { .brand-mark { align-items: center; } .brand-logo { height: 100px; } .card-logo { display: none; } }
