/* ==========================================================================
   eLMS UI v2 — Full interface refresh
   Loads after style.css + modern-layout.css
   ========================================================================== */

body.elms-v2 {
  --ui-bg: #f4f6fb;
  --ui-bg-elevated: #ffffff;
  --ui-ink: #0f172a;
  --ui-ink-soft: #475569;
  --ui-ink-muted: #94a3b8;
  --ui-brand: #1d4ed8;
  --ui-brand-dark: #1e3a8a;
  --ui-brand-light: #3b82f6;
  --ui-accent: #ea580c;
  --ui-accent-soft: #fff7ed;
  --ui-success: #059669;
  --ui-border: #e2e8f0;
  --ui-border-strong: #cbd5e1;
  --ui-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --ui-shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
  --ui-radius: 16px;
  --ui-radius-sm: 10px;
  --ui-font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --ui-header-h: 72px;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(234, 88, 12, 0.06), transparent),
    var(--ui-bg) !important;
  color: var(--ui-ink);
  font-family: var(--ui-font) !important;
  font-size: 15px;
  line-height: 1.65;
}

body.elms-v2 p,
body.elms-v2 h1,
body.elms-v2 h2,
body.elms-v2 h3,
body.elms-v2 h4,
body.elms-v2 h5,
body.elms-v2 h6 {
  font-family: var(--ui-font) !important;
}

body.elms-v2 .wrapper {
  max-width: 1320px;
  width: 100%;
  padding: 0 28px;
}

/* ---- Top bar ---- */
body.elms-v2 #header {
  background: var(--ui-bg-elevated);
  border-bottom: 1px solid var(--ui-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1100;
}

body.elms-v2 #header > .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--ui-header-h);
  gap: 24px;
}

body.elms-v2 .logo2 {
  float: none;
  width: auto;
  max-width: 300px;
  flex-shrink: 0;
}

body.elms-v2 .logo2 img {
  max-height: 48px;
  width: auto;
  margin: 0;
}

body.elms-v2 .elms-brand a {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

body.elms-v2 .elms-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

body.elms-v2 .elms-brand-text strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--ui-ink);
  letter-spacing: -0.03em;
}

body.elms-v2 .elms-brand-text small {
  font-size: 12px;
  font-weight: 600;
  color: var(--ui-ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 2px;
}

/* Photo hero banners */
body.elms-v2 .elms-hero-photos .elms-hero-photo {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  list-style: none;
  margin: 0;
  padding: 0;
}

body.elms-v2 .elms-hero-photos .elms-hero-photo img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

body.elms-v2 .elms-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px 48px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.75) 100%);
  color: #fff;
  box-sizing: border-box;
}

body.elms-v2 .elms-hero-photos .elms-hero-title {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

body.elms-v2 .elms-hero-photos .elms-hero-text {
  margin: 0;
  max-width: 560px;
  font-size: 16px;
  opacity: 0.95;
}

body.elms-v2 .footer-brand-block {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

body.elms-v2 .footer-logo {
  max-width: 72px;
  height: auto;
  opacity: 0.95;
}

body.elms-v2 .footer-tagline {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.6;
  max-width: 360px;
  margin: 0;
}


body.elms-v2 .header-right {
  float: none;
  width: auto;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 0;
}

body.elms-v2 #header .top-links {
  padding-left: 0 !important;
}

body.elms-v2 #header .top-links ul {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.elms-v2 #header .top-links li {
  width: auto !important;
}

body.elms-v2 #header .top-links li a {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ui-ink-soft);
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

body.elms-v2 #header .top-links li a:hover {
  color: var(--ui-brand);
  background: rgba(29, 78, 216, 0.08);
  text-decoration: none;
}

body.elms-v2 #header .top-links li:last-child a,
body.elms-v2 #header .top-links li a[href*="signup"] {
  background: var(--ui-brand);
  color: #fff !important;
  border-color: var(--ui-brand);
}

body.elms-v2 #header .top-links li:last-child a:hover,
body.elms-v2 #header .top-links li a[href*="signup"]:hover {
  background: var(--ui-brand-dark);
  color: #fff !important;
}

body.elms-v2 .social {
  display: none;
}

/* ---- Main navigation ---- */
body.elms-v2 #menu {
  background: var(--ui-ink);
  min-height: 48px;
  box-shadow: var(--ui-shadow);
  border-bottom: 3px solid var(--ui-accent);
  position: sticky;
  top: var(--ui-header-h);
  z-index: 1000;
}

body.elms-v2 #menu ul#dropdown_menu li a {
  color: rgba(255, 255, 255, 0.88);
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

body.elms-v2 #menu ul#dropdown_menu li:hover,
body.elms-v2 #menu ul#dropdown_menu li.active {
  background: rgba(255, 255, 255, 0.08);
}

body.elms-v2 #menu ul#dropdown_menu li.active a {
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--ui-accent);
}

body.elms-v2 #menu ul#dropdown_menu li ul {
  background: var(--ui-bg-elevated) !important;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-sm);
  padding: 8px 0;
  margin-top: 0;
}

body.elms-v2 #menu ul#dropdown_menu li ul li a {
  color: var(--ui-ink) !important;
  padding: 12px 20px;
  font-weight: 500;
}

body.elms-v2 #menu ul#dropdown_menu li ul li:hover {
  background: var(--ui-bg);
}

body.elms-v2 #menu ul#dropdown_menu li ul li a:hover {
  color: var(--ui-brand) !important;
}

/* ---- Page shell ---- */
body.elms-v2 #middle {
  margin-top: 32px;
  margin-bottom: 40px;
}

body.elms-v2 #middle:not(:has(.leftbar)) {
  background: var(--ui-bg-elevated);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow);
  padding: 32px 36px;
}

body.elms-v2 h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--ui-ink);
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  line-height: 1.25;
}

body.elms-v2 h2 {
  background: none !important;
  text-shadow: none !important;
  color: var(--ui-ink) !important;
  font-size: 18px;
  font-weight: 700;
  padding: 0;
}

body.elms-v2 h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ui-ink-soft);
  line-height: 1.4;
}

/* ---- Sidebar cards (login, news) ---- */
body.elms-v2 .blue-box {
  background: var(--ui-bg-elevated);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow);
  overflow: hidden;
}

body.elms-v2 .blue-box h2 {
  background: linear-gradient(135deg, var(--ui-brand-dark) 0%, var(--ui-brand) 100%) !important;
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  padding: 16px 20px;
  margin: 0;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

body.elms-v2 .blue-inner {
  padding: 20px;
  background: var(--ui-bg-elevated);
}

body.elms-v2 .leftbar .blue-inner.news,
body.elms-v2 .rightbar .blue-inner.news {
  background: var(--ui-bg-elevated);
}

/* ---- Login panel ---- */
body.elms-v2 #login-box {
  position: sticky;
  top: calc(var(--ui-header-h) + 60px);
}

body.elms-v2 #login-box .blue-box {
  border: 2px solid rgba(29, 78, 216, 0.15);
  box-shadow: var(--ui-shadow-lg);
}

body.elms-v2 .login-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius-sm);
  font-size: 14px;
  font-family: var(--ui-font);
  background: #fff;
  box-sizing: border-box;
  margin: 6px 0 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body.elms-v2 .login-input:focus {
  outline: none;
  border-color: var(--ui-brand-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

body.elms-v2 .login-button,
body.elms-v2 input.login-button,
body.elms-v2 input[type="submit"].login-button {
  width: 100% !important;
  height: auto !important;
  min-height: 46px;
  line-height: 1.4 !important;
  text-indent: 0 !important;
  padding: 13px 20px !important;
  background: linear-gradient(135deg, var(--ui-accent) 0%, #c2410c 100%) !important;
  background-image: none !important;
  border: none !important;
  border-radius: var(--ui-radius-sm);
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 700;
  font-family: var(--ui-font);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
  -webkit-appearance: none;
  appearance: none;
}

body.elms-v2 .login-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4);
}

body.elms-v2 .rightbar .blue-inner p a {
  color: var(--ui-brand);
  font-weight: 600;
}

/* ---- Main content card ---- */
body.elms-v2 .content,
body.elms-v2 section.content {
  background: var(--ui-bg-elevated);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow);
  padding: 32px 36px;
}

body.elms-v2 .content table img {
  border-radius: var(--ui-radius-sm);
  box-shadow: var(--ui-shadow);
  border: 3px solid #fff;
}

body.elms-v2 #blue-button,
body.elms-v2 input#blue-button {
  background: linear-gradient(135deg, var(--ui-brand) 0%, var(--ui-brand-dark) 100%) !important;
  border: none;
  color: #fff;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--ui-radius-sm);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.3);
  transition: transform 0.15s;
}

body.elms-v2 #blue-button:hover {
  transform: translateY(-2px);
}

/* ---- Hero banner ---- */
body.elms-v2 .elms-hero.callbacks_container {
  border-radius: var(--ui-radius);
  border: 1px solid var(--ui-border);
  box-shadow: var(--ui-shadow-lg);
  margin-bottom: 28px;
  overflow: hidden;
}

body.elms-v2 .elms-hero-slide--1 {
  background: linear-gradient(125deg, #1e3a8a 0%, #1d4ed8 50%, #0ea5e9 100%);
}

body.elms-v2 .elms-hero-slide--2 {
  background: linear-gradient(125deg, #312e81 0%, #4f46e5 50%, #7c3aed 100%);
}

body.elms-v2 .elms-hero-slide--3 {
  background: linear-gradient(125deg, #9a3412 0%, #ea580c 50%, #f59e0b 100%);
}

body.elms-v2 .elms-hero-tag {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

body.elms-v2 .elms-hero-title {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

body.elms-v2 .elms-hero .callbacks_nav {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ---- News ticker ---- */
body.elms-v2 .leftbar .month {
  background: var(--ui-accent) !important;
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
}

body.elms-v2 .leftbar .news_detail a {
  color: var(--ui-ink);
  font-weight: 600;
  line-height: 1.4;
}

body.elms-v2 .leftbar .news_detail a:hover {
  color: var(--ui-brand);
}

/* ---- Buttons ---- */
body.elms-v2 .btn1,
body.elms-v2 a.btn1,
body.elms-v2 input.btn1 {
  background: var(--ui-brand) !important;
  background-image: none !important;
  color: #fff !important;
  border: none;
  padding: 10px 20px;
  border-radius: var(--ui-radius-sm);
  font-weight: 600;
  font-family: var(--ui-font);
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
  transition: all 0.2s;
}

body.elms-v2 .btn1:hover {
  background: var(--ui-brand-dark) !important;
  transform: translateY(-1px);
}

body.elms-v2 .btn2,
body.elms-v2 a.btn2 {
  background: var(--ui-bg) !important;
  background-image: none !important;
  color: var(--ui-ink-soft) !important;
  border: 1px solid var(--ui-border-strong);
  padding: 10px 20px;
  border-radius: var(--ui-radius-sm);
  font-weight: 600;
}

body.elms-v2 .btn2:hover {
  background: var(--ui-border) !important;
  color: var(--ui-ink) !important;
}

/* ---- Data grids (admin lists) ---- */
body.elms-v2 table.grid {
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  overflow: hidden;
  box-shadow: var(--ui-shadow);
  background: var(--ui-bg-elevated);
}

body.elms-v2 table.grid th {
  background: var(--ui-ink) !important;
  color: #fff !important;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 16px;
  border: none;
}

body.elms-v2 table.grid td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ui-border);
  font-size: 14px;
  vertical-align: middle;
}

body.elms-v2 table.grid tr:hover td {
  background: rgba(29, 78, 216, 0.04);
}

body.elms-v2 table.grid tr[bgcolor] td,
body.elms-v2 table.grid tr[style*="DBDBDB"] td {
  background: #f8fafc;
}

/* ---- Forms ---- */
body.elms-v2 table#detail {
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  overflow: hidden;
  background: var(--ui-bg-elevated);
  box-shadow: var(--ui-shadow);
}

body.elms-v2 table#detail td,
body.elms-v2 table#detail th {
  padding: 14px 18px;
  border-bottom: 1px solid var(--ui-border);
}

body.elms-v2 table#detail th {
  background: var(--ui-bg);
  font-weight: 600;
  color: var(--ui-ink-soft);
  width: 30%;
}

body.elms-v2 input[type="text"],
body.elms-v2 input[type="password"],
body.elms-v2 input[type="email"],
body.elms-v2 input[type="number"],
body.elms-v2 select,
body.elms-v2 textarea,
body.elms-v2 .txt-feild-small,
body.elms-v2 .dd1 {
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius-sm);
  padding: 10px 14px;
  font-family: var(--ui-font);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body.elms-v2 input:focus,
body.elms-v2 select:focus,
body.elms-v2 textarea:focus {
  outline: none;
  border-color: var(--ui-brand-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* ---- Alerts ---- */
body.elms-v2 #success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  border-radius: var(--ui-radius-sm);
  padding: 14px 18px;
  margin-bottom: 16px;
}

body.elms-v2 #error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: var(--ui-radius-sm);
  padding: 14px 18px;
  margin-bottom: 16px;
}

/* ---- Footer ---- */
body.elms-v2 #footer {
  background: var(--ui-ink);
  color: rgba(255, 255, 255, 0.85);
  margin-top: 48px;
  padding-top: 48px;
}

body.elms-v2 #footer .wrapper {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 40px;
  align-items: start;
}

body.elms-v2 #footer h1 {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

body.elms-v2 .footer-links ul li a,
body.elms-v2 .contact-us a {
  color: rgba(255, 255, 255, 0.75);
  line-height: 2;
  transition: color 0.2s;
}

body.elms-v2 .footer-links ul li a:hover,
body.elms-v2 .contact-us a:hover {
  color: #fff;
}

body.elms-v2 .footer-middle img {
  max-width: 100%;
  height: auto;
  opacity: 0.9;
  filter: brightness(1.1);
}

body.elms-v2 .copyright {
  background: rgba(0, 0, 0, 0.25);
  margin-top: 40px;
  padding: 20px 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

body.elms-v2 #back a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ui-brand);
  font-weight: 600;
  margin-top: 20px;
}

/* ---- Support box ---- */
body.elms-v2 .support {
  background: var(--ui-accent-soft);
  border: 1px solid #fed7aa;
  border-radius: var(--ui-radius-sm);
  padding: 16px;
}

body.elms-v2 .support h2 {
  color: var(--ui-accent) !important;
}

body.elms-v2 #start-chat {
  background: var(--ui-brand);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
}

/* ---- Timetable cards ---- */
body.elms-v2 table.grid td div[style*="background:#f0f9ff"] {
  background: var(--ui-accent-soft) !important;
  border: 1px solid #fed7aa !important;
  border-radius: var(--ui-radius-sm) !important;
}

body.elms-v2 .content > table h1 {
  font-size: 26px;
  border-bottom: 3px solid var(--ui-accent);
  padding-bottom: 12px;
  margin-bottom: 8px;
}

body.elms-v2 .content > table h3 {
  color: var(--ui-brand);
  font-weight: 600;
  margin-bottom: 20px;
}

body.elms-v2 .content > table td {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ui-ink-soft);
}

body.elms-v2 .spcaer_div {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

body.elms-v2 .margin3px {
  margin: 0 !important;
}

/* Homepage three-column polish */
body.elms-v2 #middle:has(.leftbar) {
  gap: 28px;
}

body.elms-v2 .leftbar,
body.elms-v2 .rightbar {
  position: relative;
}

@media (max-width: 1024px) {
  body.elms-v2 #footer .wrapper {
    grid-template-columns: 1fr 1fr;
  }

  body.elms-v2 .footer-middle {
    grid-column: 1 / -1;
    text-align: center;
  }
}

@media (max-width: 768px) {
  body.elms-v2 #header > .wrapper {
    flex-direction: column;
    padding: 16px 0;
    min-height: auto;
  }

  body.elms-v2 .header-right {
    width: 100%;
    justify-content: center;
  }

  body.elms-v2 #menu ul#dropdown_menu {
    flex-direction: column;
  }

  body.elms-v2 #middle:not(:has(.leftbar)),
  body.elms-v2 .content,
  body.elms-v2 section.content {
    padding: 20px;
  }

  body.elms-v2 #footer .wrapper {
    grid-template-columns: 1fr;
  }
}
