/* kalkX V2 — innlogging (bygger på kx.css) */
body.auth { min-height: 100vh; }
.auth-split { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }

/* Merkevarepanel med «Background Paths» (KokonutUI) */
.auth-brand { position: relative; overflow: hidden; background: #060607; color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 64px 72px; isolation: isolate; }
.auth-brand::before { content: ''; position: absolute; z-index: -1; top: -240px; left: -12%; width: 780px; height: 780px; background: radial-gradient(circle, rgba(249,115,22,.17), transparent 65%); animation: authBreathe 8s ease-in-out infinite; }
.auth-paths { position: absolute; inset: 0; z-index: -1; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent); }
.auth-paths canvas { width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .6s ease; color: rgba(251,146,60,.95); }
.auth-logo { width: 100%; max-width: 270px; height: auto; margin-bottom: 38px; animation: authUp .7s var(--ease) both; }
.auth-headline { font-size: clamp(24px, 2.5vw, 34px); font-weight: 700; letter-spacing: -.025em; line-height: 1.22; max-width: 470px; margin-bottom: 14px; animation: authUp .7s var(--ease) .08s both; }
.auth-headline em { font-style: normal; background: linear-gradient(90deg, #fdba74, #f97316); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-tagline { font-size: 15px; color: rgba(250,250,250,.55); max-width: 430px; line-height: 1.65; animation: authUp .7s var(--ease) .16s both; }
.auth-features { margin-top: 38px; display: flex; flex-direction: column; gap: 14px; }
.auth-feature { display: flex; align-items: center; gap: 14px; animation: authUp .7s var(--ease) both; }
.auth-feature:nth-child(1) { animation-delay: .3s; } .auth-feature:nth-child(2) { animation-delay: .38s; } .auth-feature:nth-child(3) { animation-delay: .46s; } .auth-feature:nth-child(4) { animation-delay: .54s; }
.auth-feature i { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; background: rgba(249,115,22,.12); border: 1px solid rgba(249,115,22,.25); color: #fb923c; backdrop-filter: blur(6px); transition: transform .2s ease; }
.auth-feature:hover i { transform: scale(1.08) rotate(-4deg); }
.auth-feature span { font-size: 14px; font-weight: 600; color: rgba(250,250,250,.88); }

/* Skjemapanel */
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 28px 24px; background: var(--bg); position: relative; }
.auth-panel::before { content: ''; position: fixed; top: -200px; right: -100px; width: 620px; height: 620px; background: radial-gradient(circle, var(--primary-soft), transparent 65%); pointer-events: none; }
.auth-wrap { width: 100%; max-width: 410px; position: relative; z-index: 1; }
.auth-mobile-logo { display: none; justify-content: center; margin-bottom: 30px; } .auth-mobile-logo img { height: 32px; }
.auth-card { background: var(--card); border: 1px solid var(--border); border-radius: 22px; padding: 34px; box-shadow: var(--shadow), var(--edge); animation: authUp .6s var(--ease) .08s both; }
.auth-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px; color: var(--primary); background: var(--primary-soft); border: 1px solid var(--primary-ring); }
.auth-title { font-size: 23px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 6px; }
.auth-sub { font-size: 13.5px; color: var(--fg3); margin-bottom: 26px; line-height: 1.55; }
.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: 10.5px; font-weight: 700; color: var(--fg3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 7px; }
.auth-input { position: relative; }
.auth-input > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--fg3); pointer-events: none; transition: color .15s; }
.auth-input input { padding: 12px 12px 12px 40px; border-radius: 11px; font-size: 14px; }
.auth-input:focus-within > svg { color: var(--primary); }
.auth-input input[type=password], .auth-input input#password { padding-right: 42px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: none; background: none; color: var(--fg3); display: grid; place-items: center; border-radius: 8px; transition: var(--t); }
.pw-toggle:hover { color: var(--fg); background: var(--hover); }
.pw-toggle .eye-off { display: none; } .pw-toggle.is-visible .eye-on { display: none; } .pw-toggle.is-visible .eye-off { display: block; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.auth-check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--fg3); user-select: none; }
.auth-link { font-size: 13px; color: var(--primary); font-weight: 600; background: none; border: none; padding: 0; cursor: pointer; }
.auth-link:hover { text-decoration: underline; }
.auth-note { display: none; font-size: 12.5px; color: var(--fg3); background: var(--subtle); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; margin-bottom: 16px; line-height: 1.55; }
.auth-note.open { display: block; }
.auth-submit { width: 100%; padding: 13px; font-size: 14px; margin-top: 8px; border-radius: 12px; }
.auth-err { background: rgba(239,68,68,.09); color: #fca5a5; border: 1px solid rgba(239,68,68,.25); border-radius: 11px; padding: 11px 14px; font-size: 13px; margin-bottom: 18px; display: flex; align-items: flex-start; gap: 9px; line-height: 1.45; }
[data-theme=light] .auth-err { color: #b91c1c; }
.auth-err svg { flex-shrink: 0; margin-top: 2px; color: var(--danger); }
.auth-info { background: var(--primary-soft); color: var(--fg); border: 1px solid var(--primary-ring); border-radius: 11px; padding: 11px 14px; font-size: 13px; margin-bottom: 18px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 24px 0 18px; color: var(--fg3); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-cta { display: flex; gap: 12px; padding: 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--subtle); }
.auth-cta-ic { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; background: var(--primary-soft); border: 1px solid var(--primary-ring); color: var(--primary); }
.auth-cta b { display: block; font-size: 13px; margin-bottom: 3px; }
.auth-cta p { font-size: 12.5px; color: var(--fg3); line-height: 1.55; }
.auth-cta a { color: var(--primary); font-weight: 600; } .auth-cta a:hover { text-decoration: underline; }
.auth-cta .btn { margin-top: 10px; }
.auth-foot { margin-top: 22px; text-align: center; font-size: 12px; color: var(--fg3); }
.auth-otp { display: flex; justify-content: center; margin: 4px 0 20px; }
.auth-alt { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin-top: 16px; font-size: 13px; }
.auth-alt form { margin: 0; }
.auth-theme { position: fixed; top: 16px; right: 16px; z-index: 5; }

@keyframes authUp { from { opacity: 0; transform: translateY(16px) } to { opacity: 1; transform: none } }
@keyframes authBreathe { 0%,100% { opacity: 1; transform: scale(1) } 50% { opacity: .7; transform: scale(1.06) } }
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-mobile-logo { display: flex; }
}
@media (max-width: 440px) { .auth-card { padding: 26px 22px; border-radius: 18px; } }
