:root{
  /* Umeed brand colors (edit these) */
  --umeed-primary:#8b1e1e;   /* maroon */
  --umeed-accent:#b08d57;    /* gold */
  --bg:#070a12;
  --text:#eef2ff;
  --muted:rgba(238,242,255,.72);
  --card:rgba(255,255,255,.07);
  --border:rgba(255,255,255,.14);
  --shadow:0 30px 90px rgba(0,0,0,.45);
  --radius:22px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 18% 10%, rgba(139,30,30,.28), transparent 55%),
    radial-gradient(900px 600px at 90% 22%, rgba(176,141,87,.18), transparent 60%),
    var(--bg);
}

a{color:inherit}
.muted{color:var(--muted)}
.small{font-size:12px;color:var(--muted);line-height:1.4}
.page{
  /* Use SVH for mobile browser UI so the full login is always visible */
  min-height: 100svh;
  display:grid;
  place-items:center;
  padding:24px;
}

.auth-shell{
  width:min(980px, 100%);
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
  background:rgba(255,255,255,.03);
}

.auth-grid{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  min-height:560px;
}

.auth-left, .auth-right{
  padding:34px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.auth-left{
  background: rgba(255,255,255,.02);
}

.auth-right{
  background:
    radial-gradient(520px 420px at 30% 30%, rgba(255,255,255,.08), transparent 60%),
    linear-gradient(135deg, rgba(139,30,30,.85), rgba(139,30,30,.25));
  position:relative;
}

.brand-chip{
  position:absolute;
  top:18px;
  left:18px;
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(0,0,0,.16);
  backdrop-filter: blur(5px);
}

.brand-chip img{width:26px;height:26px;object-fit:contain}
.brand-chip strong{font-size:13px;letter-spacing:.2px}

.auth-inner{width:min(380px, 100%)}
h1,h2{margin:0 0 10px}
h1{font-size:30px}
h2{font-size:30px}

.social{
  display:flex;
  gap:10px;
  margin:12px 0 18px;
}
.icon{
  width:42px;height:42px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.05);
  color:var(--text);
  cursor:pointer;
}

.form{display:grid;gap:12px;margin-top:10px}
.field span{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin:0 0 6px;
}
.field input{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:var(--text);
  outline:none;
}
.field input:focus{
  border-color: rgba(176,141,87,.70);
  box-shadow: 0 0 0 4px rgba(176,141,87,.14);
}

.link{
  color:rgba(238,242,255,.90);
  text-decoration:none;
  font-size:13px;
}
.link:hover{text-decoration:underline}

.btn{
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.05);
  color:var(--text);
  cursor:pointer;
  font-weight:800;
  letter-spacing:.2px;
}
.btn.primary{
  background: linear-gradient(135deg, var(--umeed-primary), rgba(139,30,30,.55));
  border-color: rgba(139,30,30,.70);
}
.btn.primary:hover{filter:brightness(1.05)}
.btn.ghost{background:transparent}
.btn.ghost:hover{
  border-color: rgba(176,141,87,.55);
  box-shadow: 0 0 0 4px rgba(176,141,87,.12);
}

.actions-row{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  margin-top:8px;
}

.role-cards{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:12px;
  margin-top:16px;
}
.role{
  border:1px solid var(--border);
  background:rgba(255,255,255,.05);
  border-radius:16px;
  padding:14px 14px;
  text-decoration:none;
  transition: transform .12s ease, background .12s ease;
}
.role:hover{
  transform: translateY(-1px);
  background:rgba(255,255,255,.07);
}
.role h3{margin:0 0 6px;font-size:16px}
.role p{margin:0}

.overlay-signup{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(7,10,18,.66);
  backdrop-filter: blur(5px);
  transform: translateX(110%);
  transition: transform .45s ease;
}
.auth-shell.show-signup .overlay-signup{
  transform: translateX(0%);
}
.overlay-card{
  width:min(440px, calc(100% - 40px));
  border-radius: var(--radius);
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  box-shadow: var(--shadow);
  padding:24px;
}

/* Responsive */
@media (max-width: 860px){
  .page{ place-items: start center; padding: 14px; }
  .auth-shell{ border-radius: 18px; }
  .auth-grid{grid-template-columns: 1fr; min-height:unset;}
  .auth-right{display:none;}
  .auth-left{padding:20px;}
  .role-cards{grid-template-columns: 1fr;}
}

/* Very small phones: allow scrolling without cutting content */
@media (max-width: 380px){
  .page{ padding: 12px; }
  h1, h2{ font-size: 26px; }
  .auth-left{ padding: 18px; }
}

/* 3D dynamic logo (login pages) */
.logo-3d-wrap{
  display:flex;
  justify-content:center;
  margin: 12px 0 14px;
  perspective: 900px;
}
.logo-3d{
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 28px;
  transform-style: preserve-3d;
  transition: transform 180ms cubic-bezier(.2,.8,.2,1);
  will-change: transform;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 18px 55px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.10);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow:hidden;
  animation: loginLogoFloat 6.5s cubic-bezier(.2,.8,.2,1) infinite;
}
@keyframes loginLogoFloat{
  0%{ transform: translateY(0) rotateX(0) rotateY(0); }
  50%{ transform: translateY(-8px) rotateX(2deg) rotateY(-2deg); }
  100%{ transform: translateY(0) rotateX(0) rotateY(0); }
}
.logo-img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
  transform: translateZ(18px);
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.35));
}
.logo-glow{
  position:absolute;
  inset:-40%;
  background:
    radial-gradient(circle at 30% 20%, rgba(227,194,111,.35), transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(177,5,21,.28), transparent 60%);
  transform: translateZ(8px);
  opacity: .70;
  pointer-events:none;
}
.logo-shine{
  position:absolute;
  inset:-60%;
  background: linear-gradient(120deg,
    transparent 35%,
    rgba(255,255,255,.22) 45%,
    transparent 55%);
  transform: translateZ(10px) rotate(12deg);
  opacity: 0;
  pointer-events:none;
}
@media (hover:hover){
  .logo-3d:hover .logo-shine{
    opacity: .85;
    animation: loginShineMove 900ms cubic-bezier(.2,.8,.2,1) forwards;
  }
  @keyframes loginShineMove{
    from{ transform: translateZ(10px) translateX(-20%) rotate(12deg); }
    to{ transform: translateZ(10px) translateX(35%) rotate(12deg); }
  }
}
@media (max-width: 360px){
  .logo-3d{ width: 96px; height: 96px; border-radius: 24px; }
  .logo-img{ padding: 12px; }
}
@media (prefers-reduced-motion: reduce){
  .logo-3d{ animation: none; transition: none; }
}


/* ===== Premium fullscreen login (campus background + glass card) ===== */
body.login-premium{
  min-height: 100svh;
  background: var(--login-bg) center / cover no-repeat fixed !important;
  background-image: var(--login-bg) !important;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
}
body.login-premium::before{
  content:"";
  position:fixed;
  inset:0;
  background:
    radial-gradient(800px 500px at 20% 0%, rgba(139,30,30,.25), transparent 60%),
    radial-gradient(900px 600px at 85% 10%, rgba(176,141,87,.22), transparent 55%),
    linear-gradient(180deg, rgba(10,12,18,.55), rgba(10,12,18,.75));
  pointer-events:none;
}
body.login-premium .page{
  width: 100%;
  position:relative;
  z-index:1;
}
body.login-premium .auth-shell{
  width: min(560px, 100%);
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  box-shadow: 0 24px 70px rgba(0,0,0,.45);
  backdrop-filter: blur(8px);
  overflow: hidden;
  position: relative;
}
body.login-premium .auth-grid{
  grid-template-columns: 1fr !important;
}
body.login-premium .auth-right{ display:none !important; }
body.login-premium .auth-left{ padding: 18px 18px 16px !important; }
body.login-premium .auth-inner h1{
  text-align:center;
  margin-top: 6px;
}
body.login-premium .auth-inner .muted{
  text-align:center;
}
body.login-premium .login-logo{
  display:flex;
  justify-content:center;
  margin-top: 6px;
}
body.login-premium .auth-close{
  position:absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display:grid;
  place-items:center;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.18);
  color: rgba(255,255,255,.92);
  font-size: 22px;
  line-height: 1;
  transition: transform 180ms ease, background 180ms ease;
  z-index: 5;
}
body.login-premium .auth-close:hover{
  transform: scale(1.04);
  background: rgba(0,0,0,.26);
}

/* Make form fit on short mobile screens */
@media (max-height: 740px){
  body.login-premium{ align-items: flex-start; }
  body.login-premium .auth-shell{ margin-top: 16px; }
}

/* ===== Auto Dark / Light Cinematic Login Background ===== */
body.login-premium{
  min-height: 100vh;
  background-image: url("/assets/UMEED_INSIDE.jpg") !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

:root{
  --login-overlay: rgba(255,255,255,0.55);
  --card-bg: rgba(255,255,255,0.55);
  --card-border: rgba(255,255,255,0.35);
  --text: #0f172a;
  --muted: rgba(15,23,42,0.65);
}

html.dark, body.dark, [data-theme="dark"]{
  --login-overlay: rgba(0,0,0,0.55);
  --card-bg: rgba(15,18,24,0.55);
  --card-border: rgba(255,255,255,0.14);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.70);
}

@media (prefers-color-scheme: dark){
  :root{
    --login-overlay: rgba(0,0,0,0.55);
    --card-bg: rgba(15,18,24,0.55);
    --card-border: rgba(255,255,255,0.14);
    --text: rgba(255,255,255,0.92);
    --muted: rgba(255,255,255,0.70);
  }
}

body.login-premium::before{
  content:"";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.10), rgba(0,0,0,0.00) 40%),
    radial-gradient(circle at 70% 80%, rgba(0,0,0,0.25), rgba(0,0,0,0.00) 45%),
    var(--login-overlay);
  z-index: 0;
}

.login-wrapper,
.login-modal,
.login-card,
.login-container{
  position: relative;
  z-index: 1;
}

.login-card,
.login-modal{
  background: var(--card-bg) !important;
  border: 1px solid var(--card-border) !important;
  backdrop-filter: blur(6px) saturate(130%);
  -webkit-backdrop-filter: blur(6px) saturate(130%);
}

.login-card, .login-modal, .login-wrapper{
  color: var(--text) !important;
}

.login-card p, .login-modal p,
.login-card .subtext, .login-modal .subtext{
  color: var(--muted) !important;
}



/* ===== Auto Dark / Light Cinematic Login Background (v103) ===== */
:root{
  --login-overlay: rgba(255,255,255,0.55); /* light default */
  --login-card-bg: rgba(255,255,255,0.55);
  --login-card-border: rgba(255,255,255,0.35);
  --login-text: #0f172a;
  --login-muted: rgba(15,23,42,0.65);
}

/* If your site sets a dark theme class/attr */
html.dark, body.dark, [data-theme="dark"]{
  --login-overlay: rgba(0,0,0,0.55);
  --login-card-bg: rgba(15,18,24,0.55);
  --login-card-border: rgba(255,255,255,0.14);
  --login-text: rgba(255,255,255,0.92);
  --login-muted: rgba(255,255,255,0.70);
}

/* Otherwise follow system preference */
@media (prefers-color-scheme: dark){
  :root{
    --login-overlay: rgba(0,0,0,0.55);
    --login-card-bg: rgba(15,18,24,0.55);
    --login-card-border: rgba(255,255,255,0.14);
    --login-text: rgba(255,255,255,0.92);
    --login-muted: rgba(255,255,255,0.70);
  }
}

body.login-premium{
  min-height: 100vh;
  background-image: url("/assets/UMEED_INSIDE.jpg") !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

body.login-premium::before{
  content:"";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.10), rgba(0,0,0,0.00) 40%),
    radial-gradient(circle at 70% 80%, rgba(0,0,0,0.25), rgba(0,0,0,0.00) 45%),
    var(--login-overlay);
  z-index: 0;
  pointer-events: none;
}

/* Keep UI above overlay */
body.login-premium .page,
.login-wrapper,
.login-container,
.login-modal,
.login-card,
.auth-shell{
  position: relative;
  z-index: 1;
}

/* Glass card auto-adjust */
.auth-shell,
.login-card,
.login-modal{
  background: var(--login-card-bg) !important;
  border: 1px solid var(--login-card-border) !important;
  backdrop-filter: blur(6px) saturate(130%);
  -webkit-backdrop-filter: blur(6px) saturate(130%);
}

/* Text auto-adjust */
.auth-shell,
.login-card,
.login-modal{
  color: var(--login-text) !important;
}
.auth-shell p,
.login-card p,
.login-modal p,
.auth-shell .muted,
.login-card .muted{
  color: var(--login-muted) !important;
}

/* === Cinematic Background Blur (v104) === */
body.login-premium{
  min-height: 100vh;
  background-image: url("/assets/UMEED_INSIDE.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.login-premium::after{
  content: "";
  position: fixed;
  inset: 0;
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  background: rgba(0,0,0,0.25);
  z-index: 0;
}

html.dark body.login-premium::after,
[data-theme="dark"] body.login-premium::after{
  background: rgba(0,0,0,0.45);
}

@media (prefers-color-scheme: dark){
  body.login-premium::after{
    background: rgba(0,0,0,0.45);
  }
}

.login-wrapper,
.login-modal,
.login-card{
  position: relative;
  z-index: 1;
}
