:root {
  --primary: #0c2d64;
  --secondary: #9f2743;
  --p-dark: color-mix(in srgb, var(--primary) 85%, black);
  --p-light: color-mix(in srgb, var(--primary) 25%, white);
  --p-xlight: color-mix(in srgb, var(--primary) 10%, white);
  --s-dark: color-mix(in srgb, var(--secondary) 80%, black);
  --s-light: color-mix(in srgb, var(--secondary) 25%, white);
  --accent: #1e4a9e;
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --text-main: #111925;
  --text-muted: #64748b;
  --shadow-primary: 0 20px 45px rgba(15, 23, 42, 0.18);
  --shadow-soft: 0 14px 32px rgba(15, 23, 42, 0.08);
  --grad-primary: linear-gradient(135deg, var(--primary) 0%, var(--p-dark) 100%);
  --grad-secondary: linear-gradient(135deg, var(--secondary), var(--s-dark));
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-ui, 'Inter', sans-serif);
}

body {
  min-height: 100vh;
  background: #f5f6f8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  color: var(--text-main);
  padding: 20px;
  position: relative;
  padding-bottom: 50px;
}

.container {
  width: 100%;
  max-width: 560px;
  display: block;
  min-height: 560px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.06);
  position: relative;
  z-index: 10;
  transition: transform 0.5s ease;
}
.container:hover { transform: translateY(-4px); }
.hero {
  display: none;
}
.logo-box {
  display: none;
}
.logo-img {
  display: none;
}
.hero-tagline {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(159, 39, 67, 0.08);
  border: 1px solid rgba(159, 39, 67, 0.12);
  font-size: 10px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0.14em;
  color: var(--primary);
  margin-bottom: 12px;
}
.hero h1 {
  font-size: clamp(2rem, 2.6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
  text-transform: none;
  color: #0f172a;
}
.hero-sub {
  font-size: 14px;
  color: rgba(15, 23, 42, 0.72);
  line-height: 1.7;
  margin-bottom: 18px;
}
.features { display: flex; flex-direction: column; gap: 8px; }
.feature-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  padding: 12px 14px;
  transition: all 0.25s ease;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.02);
}
.feature-card:hover { background: #ffffff; border-color: rgba(159, 39, 67, 0.12); transform: translateY(-1px); }
.muro-link { text-decoration: none; display: block; margin-top: 24px; border-radius: 18px; }
.muro-card {
  border-color: rgba(159, 39, 67, 0.18);
  background: rgba(159, 39, 67, 0.04);
  box-shadow: inset 0 0 0 1px rgba(159, 39, 67, 0.02);
  cursor: pointer;
}
.muro-link:hover .muro-card {
  background: rgba(159, 39, 67, 0.06);
  border-color: rgba(159, 39, 67, 0.22);
  transform: translateX(2px);
}
.muro-link:hover .muro-card h3 { color: #0f172a; }
.muro-link:hover .muro-card p { color: var(--text-main); }
.muro-link:hover .muro-badge { background: var(--primary); color: #fff; }
.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  color: var(--secondary);
  background: rgba(12,45,100,0.04);
  border: 1px solid rgba(12,45,100,0.08);
  padding: 0;
}
.feature-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature-icon.orange, .feature-icon.blue, .feature-icon.green { background: rgba(12,45,100,0.04); color: var(--secondary); }
.feature-text h3 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
  color: #0f172a;
}
.feature-text p {
  font-size: 13px;
  color: rgba(15, 23, 42, 0.68);
  line-height: 1.4;
}
.panel {
  padding: 22px 26px 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: #ffffff;
}
.header { text-align: center; margin-bottom: 18px; padding-top: 30px; }
.login-muro-logo {
  width: min(390px, 82vw);
  max-width: 390px;
  height: auto;
  object-fit: contain;
  margin: 0 auto 20px;
  display: block;
  transform: none;
  filter: none;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}
.compact-muro-link {
  margin-top: 18px;
}
.compact-muro-card {
  padding: 14px 16px;
}
.mini-brand-row {
  display: flex;
  justify-content: center;
  margin-top: 18px;
  padding-top: 4px;
}
.mini-brand-logo {
  width: 250px;
  height: auto;
  object-fit: contain;
  opacity: 0.9;
}
.header h2 { font-size: clamp(1.7rem, 2vw, 2.3rem); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 12px; color: var(--primary); }
.header p { font-size: 15px; color: var(--text-muted); margin: 0; }
.tabs {
  display: flex;
  background: #f8fafc;
  padding: 6px;
  border-radius: 16px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}
.tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0.05em;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.tab.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  padding-left: 4px;
}
.input-control {
  width: 100%;
  padding: 16px 20px;
  background: rgba(248, 250, 252, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.30);
  border-radius: 16px;
  color: var(--text-main);
  font-weight: 600;
  font-size: 16px;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
}
.input-control::placeholder { color: #94a3b8; font-weight: 400; }
.input-control:focus {
  background: white;
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(12, 45, 100, 0.08);
}
.pass-wrapper { position: relative; width: 100%; }
.toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 5;
}
.toggle-pass:hover { color: var(--primary); background:#eef2f7; border-radius:10px; }
.toggle-pass svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.forgot { text-align: right; margin-top: -8px; margin-bottom: 24px; }
.forgot span { font-size: 13px; color: var(--text-muted); cursor: pointer; }
.forgot span:hover { color: var(--secondary); }
.btn-submit {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #0c2d64 0%, #143d7b 100%);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 14px 24px rgba(12, 45, 100, 0.12);
}
#btnLogin { background: var(--grad-secondary); box-shadow: 0 14px 24px var(--s-alpha20); }
#btnLogin:hover { background: var(--grad-secondary); box-shadow: 0 18px 28px var(--s-alpha20); }
.btn-submit:hover {
  background: linear-gradient(135deg, #0c2d64 0%, #0b234d 100%);
  transform: translateY(-2px);
  box-shadow: 0 18px 28px rgba(12, 45, 100, 0.16);
}
.btn-submit:active { transform: translateY(0); }
.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}
.role-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 20px 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #ffffff;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-main);
  transition: all .22s ease;
  position: relative;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.03);
}
.role-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; right: 0;
  height: 3px;
  border-radius: 16px 16px 0 0;
  background: var(--primary);
  transition: height .2s ease;
}
.role-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(15,23,42,0.11);
  border-color: rgba(12,45,100,0.18);
}
.role-card:hover::before { height: 5px; }
.role-card .role-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12,45,100,0.08);
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 4px;
}
.role-card .role-icon svg { width: 24px; height: 24px; }
.role-card .role-text { width: 100%; }
.role-card h4 { margin: 0 0 4px; font-size: 13px; font-weight: 800; color: var(--text-main); line-height: 1.3; white-space: normal; }
.role-card p { margin: 0; font-size: 11px; color: var(--text-muted); line-height: 1.45; white-space: normal; }
.role-card .role-arrow { display: none; }
.role-card.primary::before { background: var(--primary); }
.role-card.primary .role-icon { background: rgba(12,45,100,0.08); color: var(--primary); }
.role-card.secondary::before { background: var(--secondary); }
.role-card.secondary .role-icon { background: rgba(244,112,32,0.10); color: var(--secondary); }
.role-card.teal::before { background: #0f766e; }
.role-card.teal .role-icon { background: rgba(15,118,110,0.10); color: #0f766e; }
.role-card.purple::before { background: #7c3aed; }
.role-card.purple .role-icon { background: rgba(124,58,237,0.10); color: #7c3aed; }
.role-card.rose::before { background: #be123c; }
.role-card.rose .role-icon { background: rgba(190,18,60,0.10); color: #be123c; }
.modal {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(20px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s ease, visibility .28s ease;
}
.modal.open { opacity: 1; visibility: visible; pointer-events: auto; }
.modal-content {
  background: white;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 40px 36px;
  width: 100%;
  max-width: 560px;
  text-align: center;
  box-shadow: 0 18px 40px -12px rgba(0,0,0,0.22);
  transform: translateY(12px) scale(.98);
  transition: transform .32s cubic-bezier(.22,1,.36,1), opacity .28s ease;
  opacity: .01;
}
.modal.open .modal-content { transform: translateY(0) scale(1); opacity: 1; }
.modal.open .role-card { animation: roleCardIn .34s cubic-bezier(.22,1,.36,1) both; }
.modal.open .role-card:nth-child(2) { animation-delay: .04s; }
.modal.open .role-card:nth-child(3) { animation-delay: .08s; }
.modal.open .role-card:nth-child(4) { animation-delay: .12s; }
.modal.open .role-card:nth-child(5) { animation-delay: .16s; }
@keyframes roleCardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.password-change-modal{position:fixed;inset:0;z-index:3000;display:grid;place-items:center;padding:20px;background:rgba(15,23,42,.58);backdrop-filter:blur(7px)}
.password-change-modal[hidden]{display:none}
.password-change-dialog{width:min(100%,420px);padding:30px;border:1px solid var(--border,#e2e8f0);border-radius:20px;background:#fff;box-shadow:0 25px 70px rgba(15,23,42,.25)}
.privacy-consent-dialog{width:min(100%,600px);max-width:min(100%,600px)}
.password-change-dialog h2{margin:0;color:var(--primary);font-size:22px}
.password-change-dialog>p{margin:10px 0 22px;color:var(--muted);font-size:13px;line-height:1.5}
.password-change-dialog label{display:block;margin-top:14px;color:var(--text);font-size:12px;font-weight:800}
.password-field{display:flex;gap:8px;margin-top:7px}
.password-field input{width:100%;min-width:0;padding:11px 12px;border:1px solid var(--border);border-radius:10px;font:inherit}
.password-field button{border:1px solid var(--border);border-radius:10px;background:#f8fafc;color:var(--primary);padding:0 12px;font-weight:800;cursor:pointer}
.password-change-error{min-height:18px;margin:12px 0 0;color:#dc2626;font-size:12px;font-weight:700}
.password-change-error.is-valid{color:#16a34a}
.password-change-dialog .btn-submit:disabled{opacity:.45;cursor:not-allowed;transform:none;box-shadow:none}
@media(max-width:640px){.privacy-consent-dialog{width:min(100%,calc(100vw - 24px));max-width:calc(100vw - 24px);padding:22px 18px 16px}} 
@media(max-width:480px){.password-change-dialog{padding:24px 18px}}
.page-transition{position:fixed;inset:0;z-index:5000;display:flex;align-items:center;justify-content:center;background:rgba(248,250,252,.96);opacity:0;pointer-events:none;transition:opacity .22s ease}.page-transition.is-visible{opacity:1;pointer-events:auto}.page-transition__box{display:flex;flex-direction:column;align-items:center;gap:12px;color:var(--primary);font-size:13px;font-weight:700}.page-transition__spinner{width:28px;height:28px;border:3px solid rgba(12,45,100,.14);border-top-color:var(--primary);border-radius:50%;animation:spin .8s linear infinite}
#modalRole .modal-content { max-width: 760px; padding: 36px 32px; }
.role-title { font-size: 28px; margin-bottom: 8px; line-height: 1.05; color: var(--primary); }
.role-title strong { display: inline-block; font-weight: 900; background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.role-title .role-highlight { display: block; margin-top: 8px; font-size: 16px; color: var(--secondary); font-weight: 700; }
.role-desc { margin: 0 auto 20px; font-size: 14px; max-width: 680px; color: rgba(71, 85, 105, 0.92); }
.role-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(244,112,32,0.18); background: rgba(244,112,32,0.08); color: var(--secondary); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: none; margin-bottom: 14px; }
.modal-content h3 { font-size: 22px; font-weight: 800; margin-bottom: 10px; color: var(--primary); }
.modal-content p { color: var(--text-muted); font-size: 13px; margin-bottom: 28px; }
.error-msg {
  background: rgba(220, 38, 38, 0.1);
  color: #f87171;
  padding: 12px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 20px;
  border: 1px solid rgba(220, 38, 38, 0.2);
  display: none;
}
.error-msg.show { display: block; animation: shake 0.4s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (max-width: 1100px) {
  .container { max-width: 95vw; border-radius: 36px; }
  .hero { padding: 20px 24px 16px; }
  .hero h1 { font-size: 24px; }
  .hero-sub { font-size: 12px; margin-bottom: 16px; }
  .panel { padding: 24px 24px 24px; }
}
@media (max-width: 850px) {
  body { padding: 0; align-items: flex-start; }
  .container { grid-template-columns: 1fr; min-height: 100vh; border-radius: 0; border: none; box-shadow: none; }
  .hero { display: none; }
  .panel { padding: 40px 24px; min-height: 100vh; justify-content: center; }
  .header { margin-bottom: 8px; }
  .login-muro-logo { width: min(220px, 75vw); margin-bottom: 2px; }
  .header h2 { font-size: 20px; }
  .input-control { padding: 14px 16px; font-size: 14px; }
  .btn-submit { padding: 16px; font-size: 13px; }
  .modal-content { border-radius: 24px; padding: 32px 24px; max-width: 100%; }
  .role-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .role-card { min-height: 64px; padding: 12px 14px; }
}
@media (max-width: 400px) {
  .panel { padding: 32px 16px; }
  .tabs { margin-bottom: 20px; }
  .tab { font-size: 10px; padding: 9px 6px; }
  .role-grid { grid-template-columns: 1fr; }
  .role-card { min-height: 60px; }
  .login-muro-logo { width: min(180px, 78vw); margin-bottom: 1px; }
}
.spinner {
  width: 20px; height: 20px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: rotate 0.8s linear infinite;
  display: inline-block;
}
@keyframes rotate { to { transform: rotate(360deg); } }
