/* ===== LOGIN ONLY (body.coluns-login) ===== */
body.coluns-login {
  margin: 0;
  min-height: 100%;
  background: #f4f7fc !important;
}

body.coluns-login #coluns-access-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

body.coluns-login .section.hero,
body.coluns-login .hero,
body.coluns-login .hero-body,
body.coluns-login .section.hero.is-fullheight {
  background: transparent !important;
  background-image: none !important;
  min-height: 100vh !important;
  position: relative;
  z-index: 1;
}

body.coluns-login .hero-body {
  align-items: center !important;
}

body.coluns-login .column {
  background: #fff !important;
  border-radius: 20px !important;
  padding: 2rem 1.75rem !important;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(47, 107, 255, 0.06) !important;
  border: 1px solid rgba(47, 107, 255, 0.08);
}

body.coluns-login .block img,
body.coluns-login img[alt*="Logo"],
body.coluns-login img[alt*="Coluns"],
body.coluns-login img[alt*="Corp"],
body.coluns-login img.coluns-lockup {
  max-height: 52px !important;
  max-width: 280px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  margin-inline: auto;
  display: block;
}

body.coluns-login .coluns-portal-sub {
  margin-top: 0.55rem;
  font-size: 0.9rem;
  color: #64748b;
}

body.coluns-login .coluns-portal-title {
  display: none !important;
}

body.coluns-login .title,
body.coluns-login .content,
body.coluns-login .content p {
  color: #1f2937 !important;
}

/* Дубль «Вход» / Sign In — скрываем до срабатывания JS */
body.coluns-login h3.title,
body.coluns-login h1.title,
body.coluns-login h2.title,
body.coluns-login .is-3.title {
  display: none !important;
}

body.coluns-login .coluns-login-hint {
  margin: 0 0 1rem !important;
  font-size: 0.95rem !important;
  line-height: 1.45 !important;
  color: #64748b !important;
  font-weight: 400 !important;
  text-align: center;
}

body.coluns-login hr {
  background: rgba(15, 23, 42, 0.08) !important;
  height: 1px !important;
  border: none !important;
  display: none !important;
}

/* Hide only email/local fallback — NEVER use :first-of-type here:
   JS removes empty <p>, then the OIDC CTA becomes first-of-type and disappears. */
body.coluns-login .content p:has(a[href="/auth/identity"]),
body.coluns-login a[href="/auth/identity"] {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}

/* OIDC CTA — also without body class (JS may load late) */
body.coluns-login a.button[href^="/auth/oidc/"],
a.button[href^="/auth/oidc/"] {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: #2f6bff !important;
  color: #fff !important;
  border: none !important;
  width: 100%;
  max-width: 100%;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  font-size: 1rem !important;
  border-radius: 12px !important;
  min-height: 3rem !important;
  height: auto !important;
  padding: 0.85rem 1.25rem !important;
  box-shadow: 0 8px 20px rgba(47, 107, 255, 0.25);
  text-decoration: none !important;
}

body.coluns-login .content > p {
  margin-top: 1rem !important;
}

body.coluns-login .coluns-footer {
  display: block;
}

/* ===== APP (body.coluns-app) — light readable admin ===== */
body.coluns-app {
  background: #f3f5f9 !important;
  color: #1f2937 !important;
}

body.coluns-app #coluns-access-canvas,
body.coluns-app .coluns-footer {
  display: none !important;
}

/* Sidebar */
body.coluns-app .aside,
body.coluns-app aside.aside,
body.coluns-app .menu,
body.coluns-app .main-sidebar,
body.coluns-app nav.navbar.is-dark,
body.coluns-app .navbar.is-black {
  background: #ffffff !important;
  color: #1f2937 !important;
  border-right: 1px solid #e5e7eb !important;
  box-shadow: none !important;
}

body.coluns-app .menu-label {
  color: #64748b !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  font-size: 0.72rem !important;
}

body.coluns-app .menu-list a,
body.coluns-app .menu-list a.is-active,
body.coluns-app .aside a,
body.coluns-app .navbar-item,
body.coluns-app .navbar-link {
  color: #1f2937 !important;
  background: transparent !important;
  font-size: 0.95rem !important;
}

body.coluns-app .menu-list a:hover,
body.coluns-app .menu-list a.is-active,
body.coluns-app .aside a.is-active {
  background: #eef3ff !important;
  color: #1d4ed8 !important;
  border-radius: 8px;
}

/* Top bar */
body.coluns-app .navbar,
body.coluns-app nav.navbar,
body.coluns-app .navbar-brand,
body.coluns-app .navbar-menu {
  background: #ffffff !important;
  color: #1f2937 !important;
  border-bottom: 1px solid #e5e7eb !important;
  box-shadow: none !important;
}

body.coluns-app .navbar-item,
body.coluns-app .navbar-link,
body.coluns-app .navbar strong,
body.coluns-app .navbar span {
  color: #1f2937 !important;
}

/* Main content */
body.coluns-app .section,
body.coluns-app .main-content,
body.coluns-app .hero,
body.coluns-app .hero-body,
body.coluns-app main,
body.coluns-app #app {
  background: #f3f5f9 !important;
  color: #1f2937 !important;
}

body.coluns-app .title,
body.coluns-app .subtitle,
body.coluns-app h1,
body.coluns-app h2,
body.coluns-app h3,
body.coluns-app h4,
body.coluns-app p,
body.coluns-app label,
body.coluns-app td,
body.coluns-app th,
body.coluns-app li,
body.coluns-app .content {
  color: #1f2937 !important;
}

body.coluns-app .has-text-grey,
body.coluns-app .has-text-grey-light,
body.coluns-app .has-text-light,
body.coluns-app .has-text-white {
  color: #64748b !important;
}

body.coluns-app .box,
body.coluns-app .card,
body.coluns-app .table,
body.coluns-app .modal-card,
body.coluns-app .panel {
  background: #ffffff !important;
  color: #1f2937 !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06) !important;
}

body.coluns-app .table th {
  background: #f8fafc !important;
  color: #334155 !important;
}

body.coluns-app .table td {
  border-color: #e5e7eb !important;
}

body.coluns-app .input,
body.coluns-app .textarea,
body.coluns-app .select select,
body.coluns-app input,
body.coluns-app select,
body.coluns-app textarea {
  background: #ffffff !important;
  color: #1f2937 !important;
  border-color: #cbd5e1 !important;
}

body.coluns-app .button.is-primary,
body.coluns-app a.button.is-primary {
  background: #2f6bff !important;
  border-color: #2f6bff !important;
  color: #fff !important;
}

body.coluns-app .logo,
body.coluns-app .aside .logo,
body.coluns-app .navbar-brand .logo {
  color: #1f2937 !important;
  font-weight: 700 !important;
}

/* Brand mark next to product name if only text present */
body.coluns-app .aside .logo::before,
body.coluns-app a.navbar-item[href="/"] img {
  /* lockup handled via HTML replace where possible */
}

body.coluns-app .is-dark,
body.coluns-app .has-background-dark,
body.coluns-app .has-background-black {
  background-color: #ffffff !important;
  color: #1f2937 !important;
}
