/* LOGIN */

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(ellipse at 20% 10%, var(--ui-primary-soft-bg-strong) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(77, 132, 202, 0.10) 0%, transparent 45%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  border-radius: 22px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow:
    0 2px 4px rgba(21, 41, 70, 0.04),
    0 8px 24px rgba(21, 41, 70, 0.08),
    0 24px 64px rgba(21, 41, 70, 0.12);
}

/* BRAND / LEFT PANEL */

.auth-brand {
  background: linear-gradient(155deg, var(--primary-dark) 0%, var(--primary) 45%, var(--primary) 100%);
  color: #ffffff;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.auth-brand::after {
  content: "";
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.auth-brand-inner {
  position: relative;
  z-index: 1;
  padding: 52px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  gap: 28px;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}

.brand-logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-logo-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
}

.brand-logo-sub {
  font-size: 13px;
  opacity: 0.75;
  font-weight: 500;
  letter-spacing: 0.1px;
}

.brand-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

.brand-headline h1 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-headline p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  opacity: 0.85;
}

.brand-feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brand-feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  opacity: 0.9;
}

.brand-feat-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-footer-note {
  font-size: 12px;
  opacity: 0.55;
  font-weight: 500;
  letter-spacing: 0.2px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 20px;
  margin-top: auto;
}

/* AUTH PANEL */

.auth-panel {
  background: var(--panel);
  display: flex;
  flex-direction: column;
}

.auth-panel-inner {
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
}

.auth-brand-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 1.2px;
  margin-bottom: 22px;
}

.auth-brand-title-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.auth-tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
}

.auth-tab,
.theme-toggle,
.primary-button,
.secondary-button,
.danger-button,
.neutral-button,
.warning-button,
.theme-icon-button {
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.auth-tab {
  padding: 8px 14px;
  background: transparent;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 13px;
  border: none;
}

.auth-tab.active {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.theme-toggle,
.secondary-button,
.neutral-button {
  padding: 12px 16px;
  background: var(--panel-alt);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 600;
}

.theme-icon-button {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-alt);
  color: var(--text-soft);
  border: 1px solid var(--border);
  font-size: 18px;
  line-height: 1;
  border-radius: 10px;
}

html[data-theme="light"] .theme-icon-dark { display: none; }
html[data-theme="dark"] .theme-icon-light { display: none; }

.primary-button {
  width: 100%;
  padding: 13px 18px;
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  font-weight: 700;
  font-size: 14px;
  margin-top: 4px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.primary-button:hover {
  background: var(--ui-primary-soft-bg, rgba(110,162,229,0.12));
  border-color: var(--primary);
  color: var(--primary);
}

.login-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.2px;
}

.compact-button {
  width: auto;
  margin-top: 0;
  padding: 12px 18px;
}

.small-button {
  width: auto;
  margin-top: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
}

.action-height-button {
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.neutral-button {
  background: var(--panel-alt);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.warning-button {
  background: var(--warning);
  color: #111111;
}

.theme-toggle:hover,
.secondary-button:hover,
.danger-button:hover,
.neutral-button:hover,
.warning-button:hover,
.theme-icon-button:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}



.danger-button {
  padding: 14px 16px;
  background: var(--danger);
  color: #ffffff;
  font-weight: 700;
}

.full-width {
  width: 100%;
}

/* AUTH FORM */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form-header {
  margin-bottom: 4px;
}

.auth-form-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
}

.auth-form-header p {
  margin: 0;
  font-size: 13px;
}

.auth-hint-text {
  margin: 0;
  font-size: 12.5px;
  text-align: center;
  padding-top: 4px;
}

.register-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--ui-focus-ring);
  border: 1px solid var(--ui-primary-border);
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.register-notice svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--primary);
}

/* FIELDS */

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field.floating-field {
  gap: 0;
}

.field__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.1px;
}

.field span,
.checkbox-field span {
  font-weight: 600;
  color: var(--text-soft);
}

body[data-page="login"] .inline-actions .checkbox-field span,
body[data-page="login"] .inline-actions .link-button {
  font-size: 12px;
  line-height: 1.2;
}

body[data-page="login"] .inline-actions .checkbox-field {
  gap: 5px;
}

body[data-page="login"] {
  --bg-soft: var(--panel);
}

body[data-page="admin"] #create-user-modal-overlay .modal {
  --bg-soft: var(--panel);
  overflow: visible;
}

body[data-page="admin"] #create-user-modal-overlay select {
  color-scheme: dark;
}

.create-user-sector-field {
  position: relative;
}

.create-user-sector-field > select[hidden] {
  display: none !important;
}

.create-user-sector-picker {
  position: relative;
}

.create-user-sector-trigger {
  width: 100%;
  height: 45px;
  min-height: 45px;
  padding: 0;
  margin: 0;
  border-radius: 11px;
  border: 1.5px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  display: block;
  text-align: left;
  box-sizing: border-box;
  line-height: normal;
  font-size: 13px;
  font-weight: 600;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.create-user-sector-trigger::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 12px;
  height: 8px;
  transform: translateY(-50%);
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%239fb0c4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.15s ease;
}

.create-user-sector-picker.open .create-user-sector-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.create-user-sector-trigger:hover,
.create-user-sector-trigger:focus-visible,
.create-user-sector-picker.open .create-user-sector-trigger {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary) inset;
}

.create-user-sector-trigger-text {
  display: block;
  position: absolute;
  left: 16px;
  right: 42px;
  top: 50%;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font: inherit;
  line-height: 1.2;
  transform: translateY(-50%);
  pointer-events: none;
}

.create-user-sector-trigger.is-placeholder .create-user-sector-trigger-text {
  color: var(--text-soft);
}

.create-user-sector-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 30;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.32);
}

.create-user-sector-options {
  display: grid;
  gap: 4px;
  max-height: min(220px, 32vh);
  overflow-y: auto;
}

.create-user-sector-options::-webkit-scrollbar {
  width: 8px;
}

.create-user-sector-options::-webkit-scrollbar-thumb {
  background: rgba(159, 176, 196, 0.22);
  border-radius: 999px;
}

.create-user-sector-option {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.create-user-sector-option:hover,
.create-user-sector-option:focus-visible {
  outline: none;
  background: rgba(125, 177, 244, 0.1);
  border-color: rgba(125, 177, 244, 0.18);
}

.create-user-sector-option.is-selected {
  background: rgba(125, 177, 244, 0.16);
  border-color: rgba(125, 177, 244, 0.34);
}

.sector-status-picker {
  position: relative;
}

.sector-status-picker > select[hidden] {
  display: none !important;
}

.sector-status-trigger {
  width: 100%;
  min-height: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--ui-primary-border);
  background: var(--panel);
  color: var(--text);
  text-align: left;
  position: relative;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sector-status-trigger::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 10px;
  height: 7px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7' fill='none'%3E%3Cpath d='M1 1.25 5 5.25 9 1.25' stroke='%239fb0c4' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.15s ease;
  pointer-events: none;
}

.sector-status-picker.open .sector-status-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.sector-status-trigger:hover,
.sector-status-trigger:focus-visible,
.sector-status-picker.open .sector-status-trigger {
  outline: none;
  border-color: var(--ui-primary-border);
  box-shadow: 0 0 0 1px var(--ui-focus-ring) inset;
}

.sector-status-trigger-text {
  display: block;
  padding: 0 30px 0 10px;
  line-height: 38px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.sector-status-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 9999;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--ui-primary-border);
  background: var(--panel);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

.sector-status-options {
  display: grid;
  gap: 2px;
}

.sector-status-option {
  width: 100%;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.sector-status-option:hover,
.sector-status-option:focus-visible {
  outline: none;
  background: var(--ui-focus-ring);
  border-color: var(--ui-primary-soft-bg-strong);
}

.sector-status-option.is-selected {
  background: var(--ui-primary-soft-bg-strong);
  border-color: var(--ui-primary-border);
}

.toolbar-custom-select {
  position: relative;
  min-width: 0;
  display: inline-flex;
  align-items: center;
}

body[data-page="admin"] #view-prontuarios .card {
  overflow: visible;
}

.toolbar-custom-select--compact .toolbar-custom-trigger {
  min-height: 32px;
  height: 32px;
  border-radius: 8px;
}

.toolbar-custom-select--compact .toolbar-custom-trigger-text {
  padding: 0 32px 0 10px;
  font-size: 13px;
}

.toolbar-custom-select--compact .toolbar-custom-option {
  min-height: 32px;
  font-size: 13px;
}

.toolbar-custom-select--header .toolbar-custom-trigger {
  min-height: 48px;
  height: 48px;
  border-radius: 12px;
  border-width: 1.5px;
  border-color: var(--ui-primary-border);
  background: transparent;
  box-shadow: none;
}

.toolbar-custom-select--header .toolbar-custom-trigger-text {
  padding: 0 42px 0 14px;
  font-size: 13px;
  font-weight: 600;
}

.toolbar-custom-select--header .toolbar-custom-trigger:hover,
.toolbar-custom-select--header .toolbar-custom-trigger:focus-visible,
.toolbar-custom-select--header.open .toolbar-custom-trigger {
  border-color: var(--ui-primary-border-strong);
  background: transparent;
  box-shadow: none;
}

.toolbar-custom-select--header .toolbar-custom-trigger::after {
  right: 16px;
}

.toolbar-custom-select--calendar .toolbar-custom-trigger {
  min-height: 38px;
  height: 38px;
  border-radius: 10px;
  background-image: none !important;
}

.toolbar-custom-select--calendar {
  width: 100%;
}

.toolbar-custom-select--calendar .toolbar-custom-trigger::after {
  content: "" !important;
  display: block !important;
  width: 12px !important;
  height: 8px !important;
  right: 12px !important;
  top: 50% !important;
  border: 0 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%239fb0c4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 12px 8px !important;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.15s ease;
}

.toolbar-custom-select--calendar .toolbar-custom-trigger-arrow {
  display: none !important;
}

.toolbar-custom-select--calendar .toolbar-custom-trigger--single-arrow {
  background: var(--panel) !important;
  background-image: none !important;
}

.toolbar-custom-select--calendar .toolbar-custom-trigger-text {
  padding: 0 34px 0 12px;
  font-size: 13px;
}

.toolbar-custom-select--calendar.open .toolbar-custom-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.toolbar-custom-select--calendar .toolbar-custom-option {
  min-height: 34px;
  font-size: 13px;
}

#cal-jump-panel .toolbar-custom-trigger,
#rec-cal-jump-panel .toolbar-custom-trigger,
#rec-cal-edit-date-jump-panel .toolbar-custom-trigger {
  background-image: none !important;
}

#cal-jump-panel .toolbar-custom-trigger::after,
#cal-jump-panel .toolbar-custom-trigger-arrow,
#rec-cal-jump-panel .toolbar-custom-trigger::after,
#rec-cal-jump-panel .toolbar-custom-trigger-arrow,
#rec-cal-edit-date-jump-panel .toolbar-custom-trigger::after,
#rec-cal-edit-date-jump-panel .toolbar-custom-trigger-arrow {
  content: "" !important;
  display: block !important;
  position: absolute;
  right: 12px !important;
  top: 50% !important;
  width: 12px !important;
  height: 8px;
  border: 0 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%239fb0c4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 12px 8px !important;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.15s ease;
  pointer-events: none;
}

#cal-jump-panel .toolbar-custom-trigger-arrow,
#rec-cal-jump-panel .toolbar-custom-trigger-arrow,
#rec-cal-edit-date-jump-panel .toolbar-custom-trigger-arrow {
  display: none !important;
}

#cal-jump-panel .toolbar-custom-trigger::before,
#rec-cal-jump-panel .toolbar-custom-trigger::before,
#rec-cal-edit-date-jump-panel .toolbar-custom-trigger::before {
  content: none !important;
  display: none !important;
}

#cal-jump-panel .toolbar-custom-select.open .toolbar-custom-trigger::after,
#rec-cal-jump-panel .toolbar-custom-select.open .toolbar-custom-trigger::after,
#rec-cal-edit-date-jump-panel .toolbar-custom-select.open .toolbar-custom-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.toolbar-custom-select--inline {
  width: fit-content;
  max-width: 100%;
}

.toolbar-custom-select--inline .toolbar-custom-trigger {
  min-height: 34px;
  height: 34px;
  border-radius: 10px;
  border-color: var(--ui-primary-border);
  background: transparent;
  box-shadow: none;
}

.toolbar-custom-select--inline .toolbar-custom-trigger-text {
  padding: 0 34px 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.toolbar-custom-select--inline .toolbar-custom-trigger::after {
  right: 10px;
  width: 10px;
  height: 7px;
  background-size: 10px 7px;
}

.toolbar-custom-select--inline .toolbar-custom-option {
  min-height: 32px;
  font-size: 12px;
}

.floating-field > .toolbar-custom-select {
  width: 100%;
  display: flex;
}

.toolbar-custom-select--modal .toolbar-custom-trigger {
  min-height: 45px;
  height: 45px;
  border-radius: 14px;
  background: var(--panel);
}

.toolbar-custom-select--modal .toolbar-custom-trigger-text {
  padding: 0 48px 0 16px;
  font-size: 14px;
  font-weight: 600;
}

.toolbar-custom-select--modal .toolbar-custom-option {
  min-height: 36px;
  font-size: 14px;
}

.toolbar-custom-select--modal .toolbar-custom-dropdown {
  z-index: 1300;
}

.modal .label-fixed-top label {
  background: var(--panel) !important;
}

.toolbar-custom-select > select[hidden] {
  display: none !important;
}

.toolbar-custom-trigger {
  width: 100%;
  min-height: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  text-align: left;
  position: relative;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.toolbar-custom-trigger::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 12px;
  height: 8px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%239fb0c4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  transition: transform 0.15s ease;
}

.toolbar-custom-select.open .toolbar-custom-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.toolbar-custom-trigger:hover,
.toolbar-custom-trigger:focus-visible,
.toolbar-custom-select.open .toolbar-custom-trigger {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary) inset;
}

.toolbar-custom-trigger-text {
  display: block;
  padding: 0 38px 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.toolbar-custom-dropdown {
  position: absolute;
  left: 0;
  min-width: 100%;
  top: calc(100% + 6px);
  z-index: 9999;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

.toolbar-custom-options {
  display: grid;
  gap: 2px;
  max-height: min(260px, 36vh);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(159, 176, 196, 0.22) transparent;
}

.toolbar-custom-options::-webkit-scrollbar {
  width: 4px;
}

.toolbar-custom-options::-webkit-scrollbar-track {
  background: transparent;
}

.toolbar-custom-options::-webkit-scrollbar-thumb {
  background: rgba(159, 176, 196, 0.22);
  border-radius: 999px;
}

.toolbar-custom-option {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  white-space: nowrap;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.toolbar-custom-option:hover,
.toolbar-custom-option:focus-visible {
  outline: none;
  background: var(--ui-focus-ring);
  border-color: var(--ui-primary-soft-bg-strong);
}

.toolbar-custom-option.is-selected {
  background: var(--ui-primary-soft-bg-strong);
  border-color: var(--ui-primary-border);
}

body[data-page="login"] .inline-actions .link-button {
  font-weight: 600;
}

.field-input-wrap {
  position: relative;
  background: transparent;
}

.field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-soft);
  display: flex;
  align-items: center;
  pointer-events: none;
  opacity: 0.55;
  transition: opacity 0.15s ease, color 0.15s ease;
  z-index: 1;
}

.field-input-wrap:focus-within .field-icon {
  opacity: 1;
  color: var(--primary);
}

.field input,
.field select {
  width: 100%;
  height: 45px;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  padding: 0 12px;
  background: var(--bg-soft);
  color: var(--text);
  outline: none;
  font-size: 13px;
  line-height: normal;
  vertical-align: middle;
  display: block;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field .field-input-wrap input,
.field .field-input-wrap select {
  padding-left: 36px;
  box-shadow: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: none;
}

.field .field-input-wrap:focus-within {
  box-shadow: none;
}

.field.has-error .field-input-wrap input,
.field.has-error .field-input-wrap select,
.field.has-error input,
.field.has-error select {
  border-color: var(--ui-danger-border);
  box-shadow: none;
}

.field.has-error .field-input-wrap {
  box-shadow: none;
}

body[data-page="login"] .field-error-message,
.field-error-message {
  display: block;
  margin-top: 6px;
  color: var(--primary) !important;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  opacity: 1;
}

.field input::placeholder {
  color: var(--text-soft);
  opacity: 0.45;
}

.floating-field .field-input-wrap input::placeholder,
.floating-field .field-input-wrap textarea::placeholder {
  opacity: 0;
}

.floating-field:focus-within .field-input-wrap input::placeholder,
.floating-field:focus-within .field-input-wrap textarea::placeholder {
  opacity: 0.45;
}

.field select {
  padding-right: var(--select-padding-right);
}

/* PASSWORD FIELD */

.password-field .field-input-wrap input {
  padding-right: 46px;
}

.field .field-input-wrap.no-leading-icon input,
.field .field-input-wrap.no-leading-icon select {
  padding-left: 16px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-compact {
  margin-top: 28px;
}

.feedback-box {
  margin-bottom: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.feedback-box.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.feedback-box.info {
  background: var(--ui-primary-soft-bg);
  color: var(--text);
  border-color: var(--ui-primary-border);
}

.feedback-box.success {
  background: var(--ui-success-soft-bg);
  color: var(--success);
  border-color: var(--ui-success-border);
}

.feedback-box.error {
  background: var(--ui-danger-soft-bg);
  color: var(--danger);
  border-color: var(--ui-danger-border);
}
