html {
  font-size: clamp(14px, 0.9vw, 16px);
}

:root {
  --primary: #4f46e5;
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1f2937;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: opacity 0.2s ease;
}

body.page-leave {
  opacity: 0;
}

header {
  background: var(--card);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  border-bottom: 3px solid #b91c1c;
}

/* LEFT */
.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-logo {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex: 0 0 auto;
}

.header-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.header-title {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.app-name {
  font-weight: 700;
  font-size: 17px;
  color: #111827;
  letter-spacing: 0.01em;
}

.app-sub {
  font-size: 14px;
  font-weight: 600;
  color: #b91c1c;
}

/* NAV */
.header-nav {
  display: flex;
  gap: 22px;
}

.header-nav a {
  text-decoration: none;
  font-size: 22px;
  font-weight: 500;
  color: #374151;
  position: relative;
}

.header-nav a.active {
  color: var(--primary);
  font-weight: 600;
}

.header-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.25s ease;
}

.header-nav a:hover::after,
.header-nav a.active::after {
  width: 100%;
}

/* RIGHT */
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ACTION BUTTON */
.header-action {
  background: #eef2ff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.header-action svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.header-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

/* DIVIDER */
.header-divider {
  width: 1px;
  height: 28px;
  background: #e5e7eb;
}

/* USER */
.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 6px 10px;
  border-radius: 12px;
  cursor: pointer;

  transition: background 0.2s ease;
}

.user-menu:hover {
  background: #f3f4f6;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;

  background: linear-gradient(135deg, #b91c1c, #7a0f1c);
  color: white;
  font-size: 13px;
  font-weight: 600;

  display: flex;
  align-items: center;
  justify-content: center;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
}

h2 {
  color: #b91c1c;
  margin: 0;
}

nav a {
  margin-right: 15px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

nav a.active {
  color: var(--primary);
}

.container {
  padding: 32px;
  min-width: 0;
}

button {
  background: var(--primary);
  border: none;
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease;
}

button:active {
  transform: scale(0.96);
}

button:hover {
  opacity: 0.9;
}

input,
select,
textarea {
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  transition:
    border 0.2s,
    box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

select {
  color: #111827;
}

select option[value=""] {
  color: #9ca3af;
}

.hidden {
  display: none !important;
}

/* ===== MODAL ===== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease;
}

.modal-box {
  position: relative;
  width: 480px;
  max-width: 95%;

  background: white;
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);

  display: flex;
  flex-direction: column;

  animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal textarea {
  resize: vertical;
}

.modal-header {
  padding: 22px 26px;
  border-bottom: 1px solid #e5e7eb;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #b91c1c;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #6b7280;
}

.modal-close:hover {
  color: #111827;
}

.modal-body {
  padding: 22px 26px;
}

.modal-footer {
  padding: 18px 26px;
  border-top: 1px solid #e5e7eb;

  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal-content {
  width: 100%;
  max-width: 720px;
  padding: 28px 32px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

.modal-content form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
}

.modal-content .full {
  grid-column: 1 / -1;
}

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 500;
}

.btn-primary:hover {
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  padding: 10px 18px;
  border-radius: 10px;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

/* Animations */
@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.form-group {
  margin-bottom: 14px;
}

.form-error {
  background: #fee2e2;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
}

.checkbox-group label {
  font-size: 13px;
  color: #374151;
}

.checkbox-group {
  display: flex;
  gap: 12px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;

  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;

  font-size: 13px;
  color: #374151;

  cursor: pointer;
  flex: 1;
}

.checkbox-item input {
  width: 16px;
  height: 16px;
}

.checkbox-item input[type="checkbox"] {
  accent-color: #4f46e5;
}

.checkbox-item:hover {
  border-color: var(--primary);
  background: #eef2ff;
}

.checkbox-item input:checked + span {
  font-weight: 500;
}

/* ===== CARDS ===== */

.card {
  background: white;
  padding: 24px;
  border-radius: 14px;
  margin-bottom: 28px;

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #374151;
}

.filter-row {
  display: flex;
  gap: 12px;
}

table {
  width: 100%;
  margin-bottom: 28px;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

thead {
  background: #f3f4f6;
}

thead th {
  text-align: center;
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  font-size: 14px;
  vertical-align: middle;
  border-right: 1px solid #e5e7eb;
}

th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #374151;
}

td .status-badge {
  justify-content: center;
}

td {
  color: #1f2937;
}

tbody tr {
  border-top: 1px solid #e5e7eb;
  transition:
    background 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
  cursor: default;
}

tbody tr:hover {
  background: #f9fafb;
  box-shadow: none;
}

tbody tr:nth-child(even) {
  background: #fafafa;
}

tbody tr:hover .status-badge {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

tbody td {
  text-align: left;
}

tbody td.icon-cell {
  text-align: center;
}

th:last-child,
td:last-child {
  border-right: none;
}

label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 6px;
  display: block;
}

/* APP */
.app-layout {
  --afh-layout-sidebar-width: clamp(70px, 18vw, 250px);
  display: flex;
  min-height: 100vh;
  min-width: 0;
  align-items: stretch;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}

.app-header {
  height: 72px;
  padding: 0 28px;
  position: static;
  z-index: 1300;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: linear-gradient(90deg, #ffffff, #f8fafc);

  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.global-banner {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 0 14px;
  background: linear-gradient(90deg, #7f1d1d, #b91c1c);
  color: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.22);
  box-shadow: 0 6px 16px rgba(127, 29, 29, 0.28);
}

.global-banner-text-wrap {
  position: relative;
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}

.global-banner-text {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate3d(0, -50%, 0);
  white-space: pre;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  will-change: transform;
  pointer-events: none;
}

.global-banner-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: #dc2626;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.14s ease,
    background 0.14s ease,
    box-shadow 0.14s ease;
}

.global-banner-close:hover {
  background: #ef4444;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
}

/* MAIN */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

header {
  height: 72px;
}

/* ===== SIDEBAR ===== */

.sidebar {
  width: var(--afh-layout-sidebar-width);
  min-width: var(--afh-layout-sidebar-width);
  max-width: var(--afh-layout-sidebar-width);
  flex: 0 0 var(--afh-layout-sidebar-width);
  background: var(--afh-color-primary);
  color: #fff;
  padding: 20px 16px;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 1200;
  height: 100vh;
  overflow-y: auto;
  overflow-x: visible;

  transition:
    width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar::-webkit-scrollbar {
  width: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.08);
}

.sidebar-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 10px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.068);
  color: #fff;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.sidebar-menu-toggle:hover {
  transform: translateY(-1px);
  background: rgba(136, 32, 32, 0.521);
  border-color: rgba(255, 255, 255, 0.36);
}

.sidebar-menu-toggle svg {
  width: 18px;
  height: 18px;
}

.sidebar-menu-toggle .label {
  font-size: 14px;
  font-weight: 600;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 15px;
  position: relative;
}

.sidebar-section:first-of-type {
  margin-top: 13px;
}

.sidebar-nav > .sidebar-section:first-of-type .sidebar-section-title.main {
  margin-top: 11px;
}

.sidebar-section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 12px 0 6px 10px;
  margin-bottom: 6px;

  color: #d1d5db;
  opacity: 0.85;
}

.sidebar-section-title.main {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;

  color: #ffffff;
  margin-top: 15px;
  margin-bottom: 1px;
  position: relative;
  padding-left: 14px;
}

.sidebar-section-title.main::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;

  width: 4px;
  height: 16px;
  border-radius: 2px;

  background: rgba(255, 255, 255, 0.6);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 14px;
  border-radius: 10px;

  font-size: 15px;
  font-weight: 500;
  color: #fff;
  text-decoration: none;

  transition:
    background 0.25s ease,
    transform 0.25s ease,
    padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.185);
  transform: translateX(4px);
}

.sidebar-link.active {
  background: #ffffff;
  color: #7a0f1c;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.sidebar-link-home {
  position: relative;
  justify-content: center;
  padding-left: 0px;
  padding-right: 0px;
  min-height: 60px;
  font-size: 18px;
  margin-bottom: 18px;
  border-radius: 0;
}

.sidebar-link-home:not(.active)::before,
.sidebar-link-home:not(.active)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.95);
  pointer-events: none;
}

.sidebar-link-home:not(.active)::before {
  top: -7px;
}

.sidebar-link-home:not(.active)::after {
  bottom: -7px;
}

.sidebar-link-home.active {
  background: #ffffff;
  color: #7a0f1c;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.sidebar-link-home.active svg {
  color: #7a0f1c;
  stroke: #7a0f1c;
}

.sidebar-link.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.sidebar-link .icon {
  font-size: 18px;
  min-width: 24px;
  text-align: center;
}

.sidebar-provider-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  stroke-width: 2;
}

.sidebar-link .label {
  white-space: nowrap;
}

.sidebar-link span {
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.sidebar-sub {
  margin-left: 22px;
  padding-left: 1px;

  border-left: 2px solid rgba(255, 255, 255, 0.226);
  border-radius: 2px;
}

.sidebar-sub .sidebar-link {
  font-size: 15px;
  padding: 10px 14px;
}

/* ===== SB COLLAPSED ===== */

.app-layout.sidebar-collapsed {
  --afh-layout-sidebar-width: 84px;
}

.app-layout.sidebar-collapsed .sidebar {
  width: 84px;
  min-width: 84px;
  max-width: 84px;
  flex: 0 0 84px;
  padding: 20px 10px;
  overflow-x: visible;
}

.app-layout.sidebar-collapsed .sidebar-menu-toggle {
  margin: 2px auto 18px;
  width: 42px;
  height: 42px;
  padding: 0;
  justify-content: center;
}

.app-layout.sidebar-collapsed .sidebar-menu-toggle .label {
  display: none;
}

.app-layout.sidebar-collapsed .sidebar .label {
  display: none;
}

.app-layout.sidebar-collapsed .sidebar-section-title {
  display: none;
}

.app-layout.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding: 12px;
}

.app-layout.sidebar-collapsed .sidebar-link .label {
  display: none;
}

.app-layout.sidebar-collapsed .sidebar-sub {
  border-left: none;
  padding-left: 0;
  margin-left: 0;
}

.app-layout.sidebar-collapsed .sidebar-link[data-tooltip]:hover::after {
  content: none;
}

.app-layout.sidebar-collapsed .sidebar-section {
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.app-layout.sidebar-collapsed .sidebar-section::after {
  content: "";
  display: block;

  width: 44px;
  height: 2px;

  margin: 14px auto 0;

  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.75), transparent);

  border-radius: 2px;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.35);
}

.app-layout.sidebar-collapsed .sidebar-section:last-of-type::after {
  display: none;
}

.sidebar-link[data-tooltip] {
  position: relative;
}

.sidebar-hover-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  transform: translateY(-50%);

  background: #111827;
  color: #fff;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 2147483647;
  transition: opacity 0.12s ease;
}

.sidebar-hover-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
}

/* ===== STATUS ===== */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 12px;
  border-radius: 999px;

  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.status-kein {
  background: #f3f4f6;
  color: #374151;
}

.status-in_pruefung {
  background: #fff7ed;
  color: #c2410c;
}

.status-genehmigt {
  background: #ecfdf5;
  color: #047857;
}

/* ===== ICON ===== */

.icon-cell {
  text-align: center;
}

.icon-cell svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.icon-yes {
  color: #16a34a;
}

.icon-no {
  color: #e71f1f;
}

tbody tr:hover .icon-yes {
  filter: drop-shadow(0 0 6px rgba(22, 163, 74, 0.6));
}

tbody tr:hover .icon-no {
  filter: drop-shadow(0 0 6px rgba(220, 38, 38, 0.6));
}

/* ===== TRANSITION ===== */

.page {
  animation: pageIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-icon-home {
  width: 30px;
  height: 30px;
}

.scroll-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;

  width: 52px;
  height: 52px;
  border-radius: 50%;

  border: none;
  background: linear-gradient(135deg, #fa4747, #ff6868);
  color: #ffffff;

  font-size: 22px;
  font-weight: bold;
  line-height: 1;

  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.45),
    0 4px 10px rgba(0, 0, 0, 0.25);

  cursor: pointer;

  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.95);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
  z-index: 100;
}

.scroll-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.scroll-to-top:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow:
    0 16px 36px #ff6868,
    0 6px 14px rgba(0, 0, 0, 0.3);
}

img,
svg,
table,
input,
textarea {
  max-width: 100%;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(20, 20, 20, 0.92);
  color: #fff;
  font-size: 15px;
  line-height: 1.2;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  max-width: 360px;
  min-width: 240px;
}

.toast.hidden {
  display: none;
}

.toast.show {
  display: block;
  animation: toastIn 160ms ease-out;
}

@keyframes toastIn {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* = USER MENU = */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.user-menu-btn {
  all: unset;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  height: 40px;
  padding: 0 14px;
  min-width: 190px;
  border-radius: 14px;

  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(8px);

  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease,
    background 0.14s ease,
    border-color 0.14s ease;
}

.user-menu-btn:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(79, 70, 229, 0.22);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.user-menu-btn:active {
  transform: translateY(0);
}

.user-menu-btn .avatar {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.user-menu-btn .user-name {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.user-menu-btn svg {
  width: 18px;
  height: 18px;
  opacity: 0.75;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}

.user-menu.open .user-menu-btn svg {
  transform: rotate(180deg);
  opacity: 0.95;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 190px;
  min-width: 190px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 24, 39, 0.1);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px);
  transform-origin: top right;
  animation: ddIn 140ms ease-out;
  z-index: 1000;
}

.user-dropdown::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 8px;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.92);
  border-left: 1px solid rgba(17, 24, 39, 0.1);
  border-top: 1px solid rgba(17, 24, 39, 0.1);
  transform: rotate(45deg);
}

.user-dropdown .dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;

  padding: 10px 12px;
  border-radius: 12px;
  border: 0;

  background: transparent;
  color: #111827;
  font-weight: 600;
  font-size: 13px;

  cursor: pointer;
  transition:
    background 0.12s ease,
    transform 0.12s ease;
}

.user-dropdown .dropdown-item:hover {
  background: rgba(79, 70, 229, 0.08);
  transform: translateY(-1px);
}

.user-dropdown .dropdown-item:active {
  transform: translateY(0);
}

.user-dropdown #logoutBtn {
  color: #b91c1c;
}

.user-dropdown #logoutBtn:hover {
  background: rgba(185, 28, 28, 0.1);
}

@keyframes ddIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* = FORCE USER MENU = */

#userMenuBtn {
  display: grid !important;
  grid-template-columns: 34px 1fr 18px !important;
  align-items: center !important;
  gap: 10px !important;

  padding: 6px 10px !important;
  border-radius: 999px !important;

  background: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid rgba(17, 24, 39, 0.1) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06) !important;

  min-width: 220px !important;
  max-width: 420px !important;
  height: 38px !important;
}

#userName {
  justify-self: start !important;
  max-width: 320px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

#userMenuBtn svg {
  justify-self: end !important;
  width: 18px !important;
  height: 18px !important;
  opacity: 0.75 !important;
}

#userDropdown {
  width: 180px !important;
  min-width: 180px !important;
  padding: 8px !important;
  border-radius: 14px !important;

  background: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid rgba(17, 24, 39, 0.1) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16) !important;
  backdrop-filter: blur(10px) !important;

  right: 0 !important;
  top: calc(100% + 10px) !important;
}

#userDropdown::before {
  content: "" !important;
  position: absolute !important;
  top: -6px !important;
  right: 10px !important;
  width: 12px !important;
  height: 12px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  border-left: 1px solid rgba(17, 24, 39, 0.1) !important;
  border-top: 1px solid rgba(17, 24, 39, 0.1) !important;
  transform: rotate(45deg) !important;
}

/* ===== PERM DISABLED ===== */
.is-disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  filter: grayscale(1);
  transform: none !important;
  box-shadow: none !important;
}

button.is-disabled:hover {
  background: transparent !important;
  opacity: 0.35 !important;
  transform: none !important;
}

.is-disabled:hover {
  transform: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
