/* ─────────────────────────────────────────────────────────────────────────────
   [oko_auth] shortcode — login / register / password-reset card
   CSS prefix: .oko-auth-
   Design tokens from figma-export/src/app/screens/user/UserLoginScreen.tsx
───────────────────────────────────────────────────────────────────────────── */

/* ── Nav user dropdown ──────────────────────────────────────────────────────── */
.oko-nav-user {
  position: relative;
  list-style: none;
}
.oko-nav-user-btn {
  display:     flex;
  align-items: center;
  gap:         8px;
  background:  none;
  border:      none;
  cursor:      pointer;
  font-family: inherit;
  font-size:   14px;
  color:       inherit;
  padding:     0;
  line-height: 1;
}
.oko-nav-avatar {
  width:           32px;
  height:          32px;
  border-radius:   50%;
  background:      #9810fa;
  color:           #fff;
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       13px;
  font-weight:     600;
  flex-shrink:     0;
  letter-spacing:  0.02em;
}
.oko-nav-name {
  font-weight: 500;
}
.oko-nav-chevron {
  flex-shrink: 0;
  transition:  transform 0.15s;
}
.oko-nav-user.is-open .oko-nav-chevron {
  transform: rotate(180deg);
}
.oko-nav-dropdown {
  display:       none;
  position:      absolute;
  top:           calc(100% + 8px);
  right:         0;
  background:    #fff;
  border:        1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  box-shadow:    0 4px 16px rgba(0,0,0,0.1);
  min-width:     180px;
  z-index:       9999;
  overflow:      hidden;
}
.oko-nav-user.is-open .oko-nav-dropdown {
  display: block;
}
.oko-nav-drop-item {
  display:     block;
  width:       100%;
  padding:     11px 16px;
  font-size:   14px;
  color:       #111;
  text-decoration: none;
  background:  none;
  border:      none;
  cursor:      pointer;
  text-align:  left;
  font-family: inherit;
  transition:  background 0.1s;
  box-sizing:  border-box;
  line-height: 1.4;
}
.oko-nav-drop-item:hover {
  background: #f5f5f7;
  color:      #111;
}
.oko-nav-drop-logout {
  color: #dc2626;
}
.oko-nav-drop-logout:hover {
  background: rgba(220,38,38,0.06);
  color:      #dc2626;
}

/* ── Outer wrapper ─────────────────────────────────────────────────────────── */

.oko-auth-wrap {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 62px 32px 16px 32px;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

/* ── Card ──────────────────────────────────────────────────────────────────── */

.oko-auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.625rem;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.07);
  overflow: hidden;
}

/* ── Card header ───────────────────────────────────────────────────────────── */

.oko-auth-card-header {
  padding: 32px 36px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-align: center;
}

.oko-auth-title {
  font-size: 18px;
  font-weight: 500;
  color: #030213;
  margin: 0;
  line-height: 1.2;
}

.oko-auth-subtitle {
  font-size: 12.5px;
  color: #717182;
  margin: 4px 0 0;
  font-weight: 400;
}

/* ── Tabs ──────────────────────────────────────────────────────────────────── */

.oko-auth-tabs {
  display: flex;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0 36px;
}

.oko-auth-tab {
  flex: 1;
  padding: 14px 0;
  background: none;
  border-radius: 0px;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 400;
  color: #717182;
  transition: all 0.15s;
  font-family: ui-sans-serif, system-ui, sans-serif;
  margin-bottom: -1px;
}

.oko-auth-tab.is-active {
  border-bottom-color: #9810fa;
  font-weight: 600;
  color: #9810fa;
  background-color: transparent;
}

.oko-auth-tab:hover{
  background-color: transparent;
  color: #9810fa;
}

/* ── Panels ────────────────────────────────────────────────────────────────── */

.oko-auth-panel {
  display: none;
  padding: 28px 36px 32px;
}

.oko-auth-panel.is-active {
  display: block;
}

/* ── Form elements ─────────────────────────────────────────────────────────── */

.oko-auth-field {
  margin-bottom: 14px;
}

.oko-auth-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #030213;
  margin-bottom: 6px;
}

.oko-auth-optional {
  font-weight: 400;
  color: #b0b0ba;
}

.oko-auth-input {
  width: 100%;
  padding: 9px 12px !important;
  background: #f3f3f5 !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-radius: 0.625rem !important;
  font-size: 13.5px !important;
  color: #030213 !important;
  outline: none;
  box-sizing: border-box !important;
  font-family: ui-sans-serif, system-ui, sans-serif;
  transition: border-color 0.15s !important;
}

.oko-auth-input:focus {
  border-color: #9810fa;
}

/* ── Password field with eye toggle ────────────────────────────────────────── */

.oko-auth-pass-wrap {
  position: relative;
}

.oko-auth-pass-wrap .oko-auth-input {
  padding-right: 38px;
}

.oko-auth-pass-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #717182;
  display: flex;
  align-items: center;
  padding: 0;
}

/* ── Submit button ─────────────────────────────────────────────────────────── */

.oko-auth-btn-submit {
  width: 100%;
  padding: 10px 16px;
  background: #9810fa;
  color: #fff;
  border: none;
  border-radius: 0.625rem;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.oko-auth-btn-submit:hover {
  background: #7a00e6;
}

.oko-auth-btn-submit:disabled {
  background: rgba(139, 0, 255, 0.4);
  cursor: not-allowed;
}

/* ── Forgot password link ──────────────────────────────────────────────────── */

.oko-auth-forgot-row {
  text-align: center;
  margin-top: 14px;
}

.oko-auth-forgot-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12.5px;
  color: #717182;
  text-decoration: none;
  text-decoration-color: rgba(0, 0, 0, 0.2);
  font-family: ui-sans-serif, system-ui, sans-serif;
  box-shadow: none;
}

.oko-auth-forgot-btn:hover{
  background-color: transparent;
  color: #9810fa;
}

/* ── Two-column name grid ──────────────────────────────────────────────────── */

.oko-auth-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

/* ── Role pills ────────────────────────────────────────────────────────────── */

.oko-auth-role-group {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.oko-auth-role-btn {
  flex: 1;
  height: 36px;
  padding: 7px 0;
  border-radius: 0.625rem;
  background: transparent;
  color: #717182;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  transition: all 0.15s;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.oko-auth-role-btn.is-active {
  background: #9810fa;
  color: #fff;
  border-color: #9810fa;
  font-weight: 600;
}

.oko-auth-role-hint {
  font-size: 11.5px;
  color: #b0b0ba;
  margin: 0;
}

/* ── RODO consent ──────────────────────────────────────────────────────────── */

.oko-auth-rodo-row {
  margin-bottom: 22px;
}

.oko-auth-rodo-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 12.5px;
  color: #717182;
  line-height: 1.5;
}

.oko-auth-link {
  color: #9810fa;
  text-decoration: none;
}

/* ── Reset password intro ──────────────────────────────────────────────────── */

.oko-auth-reset-intro {
  font-size: 13.5px;
  color: #717182;
  margin: 0 0 18px;
  line-height: 1.5;
}

.oko-panel-logo-img {
    width: 54px;
    height: auto;
    display: block;
    margin: 0 auto 28px auto;
}

/* ── Flash messages ────────────────────────────────────────────────────────── */

.oko-auth-flash {
  margin: 28px 36px 0px 36px;
  padding: 10px 14px;
  border-radius: 0.625rem;
  font-size: 13px;
}

.oko-auth-flash.is-error {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.15);
}

.oko-auth-flash.is-success {
  background: rgba(22, 163, 74, 0.08);
  color: #16a34a;
  border: 1px solid rgba(22, 163, 74, 0.15);
}

/* ── Loading spinner ───────────────────────────────────────────────────────── */

.oko-auth-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: oko-spin 0.7s linear infinite;
}

@keyframes oko-spin {
  to { transform: rotate(360deg); }
}

/* ── Footer text ───────────────────────────────────────────────────────────── */

.oko-auth-footer-text {
  text-align: center;
  font-size: 11.5px;
  color: #b0b0ba;
  margin-top: 20px;
}

/* ── Logged-in state ───────────────────────────────────────────────────────── */

.oko-auth-logged-in {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.625rem;
  padding: 20px 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  max-width: 440px;
  width: 100%;
}

.oko-auth-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(139, 0, 255, 0.12);
  color: #9810fa;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.oko-auth-user-info {
  flex: 1;
}

.oko-auth-user-name {
  font-size: 14px;
  font-weight: 500;
  color: #030213;
  margin: 0;
  margin-bottom: 0 !important;
}

.oko-auth-user-role {
  font-size: 12.5px;
  color: #717182;
  margin: 2px 0 0;
  margin-bottom: 0 !important;
}

.oko-auth-btn-logout {
  padding: 7px 14px;
  background: transparent;
  color: #717182;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0.625rem;
  font-size: 12.5px;
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, sans-serif;
  transition: border-color 0.15s, color 0.15s;
}

.oko-auth-btn-logout:hover {
  border-color: rgba(139, 0, 255, 0.25);
  color: #9810fa;
  background-color: transparent;
}

.oko-auth-btn-logout:focus {
  color: #9810fa;
  background-color: transparent;
}

/* ── Login overlay (interceptor) ───────────────────────────────────────────── */

.oko-auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.oko-auth-overlay-card {
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .oko-auth-card-header,
  .oko-auth-tabs,
  .oko-auth-panel {
    padding-left: 20px;
    padding-right: 20px;
  }

  .oko-auth-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ── Mobile avatar obok burgera ─────────────────────────────────────────── */
.oko-mobile-avatar {
  position: absolute;
  right: 45px;
  top: 48%;
  transform: translateY(-50%);
  z-index: 9999;
  text-decoration: none;
  display: none;
}

@media (max-width: 980px) {
  .oko-mobile-avatar {
    display: flex;
    align-items: center;
  }
	
  li.oko-nav-user {
    display: none !important;
  }
}