/* ==========================================================================
   COMPONENTS
   ========================================================================== */
@layer components {
  .image {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.4s ease;
  }

  .image-wrapper:hover .image {
    transform: scale(1.05);
  }

  .link-hover--standout:hover {
    color: var(--primary);
    transform: translateY(2px);
  }

  .link-hover--underline {
    padding-bottom: 2px;
  }

  /* Animated underline (from center) */
  .link-hover--underline::after {
    content: "";
    position: absolute;
    width: 0;
    height: 1.5px;
    bottom: 0;
    left: 50%;
    background-color: currentColor;
    transition:
      width 0.25s ease,
      left 0.25s ease;
    transform: translateX(-50%);
  }

  .link-hover--underline:hover::after {
    width: 100%;
  }

  .bouncy-btn {
    transition: transform 0.3s ease;
  }

  .bouncy-btn:not(:disabled):hover {
    transform: translateY(2px);
  }

  /* ==========================================================================
   LOADER
   ========================================================================== */
  #preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    z-index: 90;
  }

  #preloader .spinner {
    width: 80px;
    height: 80px;
    border: 5px solid #365cf5;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
  }

  @keyframes spin {
    from {
      -webkit-transform: rotate(0deg);
      -moz-transform: rotate(0deg);
      -ms-transform: rotate(0deg);
      -o-transform: rotate(0deg);
      transform: rotate(0deg);
    }

    to {
      -webkit-transform: rotate(360deg);
      -moz-transform: rotate(360deg);
      -ms-transform: rotate(360deg);
      -o-transform: rotate(360deg);
      transform: rotate(360deg);
    }
  }

  /* ==========================================================================
   SEPARATOR
   ========================================================================== */
  .separator {
    height: 1px;
    background: var(--border);
    border: none;
  }

  .separator[data-orientation="vertical"] {
    width: 1px;
    height: auto;
    align-self: stretch;
  }

  /* ==========================================================================
   BUTTON
   ========================================================================== */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: var(--text-sm);
    line-height: var(--text-sm-line-height);
    padding-inline: 0.625rem;
    background-clip: padding-box;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    font-weight: var(--fw-medium);
  }

  .btn:focus-within {
    outline: 2px solid color-mix(in oklab, var(--ring) 50%, transparent);
    outline-offset: 2px;
  }

  .btn[data-size="sm"] {
    height: 1.75rem;
  }

  .btn[data-size="md"] {
    height: 2rem;
    gap: 0.375rem;
  }

  .btn[data-size="lg"] {
    height: 2.25rem;
    gap: 0.375rem;
  }

  .btn svg,
  .btn .fa-solid,
  .btn .fa-brand {
    color: currentColor;
    fill: currentColor;
    width: var(--text-sm);
    height: var(--text-sm);
    font-size: var(--text-sm);
  }

  .btn[data-variant="primary"] {
    background: var(--primary);
    color: var(--primary-foreground);
  }

  .btn[data-variant="secondary"] {
    background: var(--secondary);
    color: var(--secondary-foreground);
  }

  .btn[data-variant="outline"],
  .btn[data-variant="outline-alt"] {
    border-color: var(--border);
    background: var(--background);
  }

  .btn[data-variant="outline-alt"] {
    color: var(--primary);
  }

  .btn[data-variant="outline"]:not(:disabled):hover,
  .btn[data-variant="outline-alt"]:not(:disabled):hover {
    background: var(--muted);
  }

  .btn[data-variant="destructive"] {
    background: color-mix(in oklab, var(--destructive) 10%, transparent);
    color: var(--destructive);
  }

  .btn[data-variant="destructive"]:not(:disabled):hover {
    background: color-mix(in oklab, var(--destructive) 20%, transparent);
  }

  /* ==========================================================================
   SWITCH
   ========================================================================== */
  .switch {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    border-radius: calc(infinity * 1px);
    border: 1px solid transparent;
    outline: none;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--input);
    width: 2.5rem;
    height: 1.5rem;
  }

  .switch[data-switch-state="checked"] {
    background: var(--primary);
  }

  .switch__thumb {
    pointer-events: none;
    display: block;
    border-radius: calc(infinity * 1px);
    background: var(--background);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    width: 1.25rem;
    height: 1.25rem;
  }

  .switch__thumb[data-switch-state="checked"] {
    transform: translateX(calc(100% - 2px));
  }

  /* ==========================================================================
   RADIO GROUP
   ========================================================================== */
  .radio-group {
    width: 100%;
    display: grid;
    gap: 0.5rem;
  }

  button.radio-group__item {
    position: relative;
    aspect-ratio: 1 / 1;
    width: 1rem;
    height: 1rem;
    border-radius: calc(infinity * 1px);
    border: 1px solid var(--input);
    outline: none;
  }

  button.radio-group__item::after {
    aspect-ratio: 1 / 1;
    width: 0.5rem;
    height: 0.5rem;
    content: "";
    position: absolute;
    inset: 50% 50%;
    transform: translate(-50%, -50%);
    border-radius: calc(infinity * 1px);
  }

  button.radio-group__item[data-state="checked"] {
    background: var(--primary);
    border-color: var(--primary);
  }

  button.radio-group__item[data-state="checked"]::after {
    background: var(--primary-foreground);
  }

  button.radio-group__item[aria-invalid="true"] {
    color: var(--destructive);
    box-shadow: 0 0 0 3px
      color-mix(in oklab, var(--destructive) 20%, transparent);
  }

  /* ==========================================================================
   COLLAPSIBLE
   ========================================================================== */
  .collapsible__content {
    --collapsible-content-height: 0;

    height: var(--collapsible-content-height);
    font-size: var(--text-sm);
  }

  .collapsible__content[data-state="closed"] {
    display: none;
  }

  .collapsible__content[data-state="open"] {
    display: block;
  }

  /* ==========================================================================
   POPOVER
   ========================================================================== */
  .popover {
    display: inline-block;
  }

  .popover__content[data-side="top"] {
    --tw-exit-y: -0.25rem;
    transform-origin: bottom center;
  }

  .popover__content[data-side="bottom"] {
    --tw-exit-y: 0.25rem;
    transform-origin: top center;
  }

  .popover__content[data-side="left"] {
    --tw-exit-x: 0.25rem;
    transform-origin: right center;
  }

  .popover__content[data-side="right"] {
    --tw-exit-x: -0.25rem;
    transform-origin: left center;
  }

  .popover__content {
    position: fixed;
    background: var(--popover);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    color: var(--popover-foreground);
    font-size: var(--text-sm);
    padding: 0.625rem;

    display: none;
    opacity: 0;
    transform: translate(var(--tw-exit-x, 0), var(--tw-exit-y, 0)) scale(0.95);
    transition:
      opacity 200ms cubic-bezier(0.16, 1, 0.3, 1),
      transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
  }

  .popover__content[data-state="open"],
  .popover__content[data-state="closed"] {
    display: block;
  }

  .popover__content[data-state="open"] {
    display: block;
    opacity: 1;
    z-index: 100;
    transform: translate(0, 0) scale(1);
    pointer-events: auto;
  }

  .popover__content[data-state="closed"] {
    display: block;
    opacity: 0;
    transform: translate(var(--tw-exit-x, 0), var(--tw-exit-y, 0)) scale(0.95);
    pointer-events: none;
  }

  .popover__content[data-side="top"] {
    --tw-exit-y: 0.5rem;
    transform-origin: bottom center;
  }

  .popover__content[data-side="bottom"] {
    --tw-exit-y: -0.5rem;
    transform-origin: top center;
  }

  .popover__content[data-side="left"] {
    --tw-exit-x: 0.5rem;
    transform-origin: right center;
  }

  .popover__content[data-side="right"] {
    --tw-exit-x: -0.5rem;
    transform-origin: left center;
  }

  .popover__header {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    font-size: var(--text-sm);
  }

  .popover__title {
    font-size: inherit;
    font-weight: var(--fw-medium);
  }

  .popover__description {
    font-size: inherit;
    color: var(--muted-foreground);
  }

  /* ==========================================================================
   ALERT (Server Side) & TOAST (Client Side)
   ========================================================================== */
  /* Variants */
  .alert[data-variant="success"],
  .toast[data-variant="success"] {
    --toast-bg: var(--toast-success-bg);
    --toast-border-color: var(--toast-success-border);
    --toast-color: var(--toast-success-color);
    --toast-icon-color: var(--toast-success-icon);
  }

  .alert[data-variant="error"],
  .toast[data-variant="error"] {
    --toast-bg: var(--toast-error-bg);
    --toast-border-color: var(--toast-error-border);
    --toast-color: var(--toast-error-color);
    --toast-icon-color: var(--toast-error-icon);
  }

  .alert[data-variant="warning"],
  .toast[data-variant="warning"] {
    --toast-bg: var(--toast-warning-bg);
    --toast-border-color: var(--toast-warning-border);
    --toast-color: var(--toast-warning-color);
    --toast-icon-color: var(--toast-warning-icon);
  }

  .alert[data-variant="info"],
  .toast[data-variant="info"] {
    --toast-bg: var(--toast-info-bg);
    --toast-border-color: var(--toast-info-border);
    --toast-color: var(--toast-info-color);
    --toast-icon-color: var(--toast-info-icon);
  }

  #toast-portal {
    position: fixed;
    z-index: 99999;
    width: 20rem;
    max-width: 20rem;
    height: var(--front-toast-height, 0px);
  }

  /* Position trục X */
  #toast-portal[data-position*="center"] {
    left: 50%;
    transform: translateX(-50%);
  }

  #toast-portal[data-position*="left"] {
    left: 1rem;
  }

  #toast-portal[data-position*="right"] {
    right: 1rem;
  }

  /* Position trục Y */
  #toast-portal[data-position*="bottom"] {
    bottom: 1rem;
  }

  #toast-portal[data-position*="top"] {
    top: 1rem;
  }

  /* Dùng ::after để nối dài phần hover vào của toast (hover bridge) */
  #toast-portal[data-position*="bottom"]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: calc(var(--toast-stack-height) * var(--front-toast-height));
  }

  #toast-portal[data-position*="top"]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: calc(var(--toast-stack-height) * var(--front-toast-height));
  }

  #toast-portal[data-position*="bottom"] .toast[data-mounted="false"] {
    opacity: 0;
    transform: translateY(100%) scale(0.96);
  }

  #toast-portal[data-position*="top"] .toast[data-mounted="false"] {
    opacity: 0;
    transform: translateY(-100%) scale(0.96);
  }

  .toast[data-mounted="true"] {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  #toast-portal > * {
    margin-block-start: 0.5rem;
    margin-block-end: 0.5rem;
  }

  .alert,
  .toast {
    display: grid;
    text-align: left;
    gap: 0.125rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--toast-border-color);
    box-shadow: var(--shadow-sm);
    position: relative;
    background: var(--toast-bg);
    color: var(--toast-color);
    transition:
      transform 0.2s ease,
      opacity 0.4s ease;
  }

  .toast {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
  }

  .toast[data-mounted="false"] {
    opacity: 0;
    transform: translateY(100%) scale(0.96);
  }

  .toast[data-mounted="true"] {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  .toast[data-removed="true"] {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    pointer-events: none;
  }

  .alert {
    animation: alertFadeIn 0.22s ease both;
  }

  .alert:has(.alert-action) {
    padding-right: 4.5rem;
  }

  .alert:has(svg, .fa-solid, .fa-brand),
  .toast:has(svg, .fa-solid, .fa-brand) {
    column-gap: 0.5rem;
    grid-template-columns: auto 1fr;
  }

  .alert svg,
  .alert .fa-solid,
  .alert .fa-brand,
  .toast svg,
  .toast .fa-solid,
  .toast .fa-brand {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    min-width: 1rem;
    transform: translateY(0.125rem);
    grid-row: span 2;
  }

  @keyframes alertFadeIn {
    from {
      opacity: 0;
      transform: translateY(-5px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .alert-title,
  .toast-title {
    font-size: var(--text-sm);
    font-weight: var(--fw-medium);
  }

  .alert-description,
  .toast-description {
    font-size: var(--text-sm);
    text-wrap: pretty;
    color: color-mix(in oklab, var(--alert-color) 60%, transparent);
  }

  .alert-action,
  .toast-action {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
  }

  .alert-close,
  .toast-close {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.45;
    color: inherit;
    transition: opacity 0.15s;
  }

  .alert-close:hover,
  .toast-close:hover {
    opacity: 1;
  }

  .alert + .alert {
    margin-block-start: 0.5rem;
    margin-block-end: 0.5rem;
  }

  .toast[data-variant="loading"] svg,
  .toast[data-variant="loading"] .fa-solid {
    translate: 0 0.125rem;
    animation: spin 1s linear infinite;
  }

  /* ==========================================================================
   FIELD
   ========================================================================== */
  .field__set {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .field__legend {
    font-size: var(--text-base);
  }

  .field__set > .field__legend,
  .field__set > .field__label {
    margin-bottom: 0.375rem;
  }

  .field__legend + .field__description {
    margin-top: -0.375rem;
  }

  .field-group {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .field[data-orientation="horizontal"] {
    flex-direction: row;
    align-items: center;
  }

  .field:has(.field__content) {
    align-items: start;
  }

  .field__content {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.125rem;
  }

  .field__label {
    display: flex;
    gap: 0.5rem;
    width: fit-content;
    user-select: none;
    line-height: 1.375;
    font-weight: var(--fw-medium);
    font-size: var(--text-sm);
    color: var(--foreground);
  }

  .field__label:has(.field) {
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
  }

  .field__label .field {
    padding: 0.675rem;
  }

  .field__label:has(.radio-group__item[data-state="checked"]) {
    color: var(--primary);
    background: color-mix(in oklab, var(--primary) 5%, transparent);
    border-color: var(--primary);
  }

  .field__description {
    font-size: var(--text-sm);
    text-align: left;
    color: var(--muted-foreground);
    text-wrap: balance;
  }

  .field[data-field-required] .field__label::after,
  .field__label:has(+ [data-field-required])::after {
    content: "*";
    margin-left: -0.25rem;
    color: var(--destructive);
  }

  .field__input:not(:has(.switch)) {
    height: 2rem;
    width: 100%;
    min-width: 0;
    padding: 0.25rem 0.625rem;
    line-height: 1.5;
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    outline: none;
  }

  textarea.field__input {
    min-height: 4rem;
    field-sizing: content;
    resize: vertical;
  }

  input[type="checkbox"].field__input {
    width: 1rem;
    height: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--input);
  }

  input[type="file"].field__input::file-selector-button {
    height: 100%;
    border: none;
    background: transparent;
    color: var(--foreground);
    font-size: var(--text-sm);
    font-weight: var(--fw-medium);
    font-family: inherit;
    padding: 0;
    cursor: pointer;
    transition: background 150ms;
  }

  input[type="file"].field__input {
    font-size: var(--text-sm);
  }

  .field__input::placeholder {
    color: var(--muted-foreground);
  }

  .field__input:focus-within {
    outline: 2px solid color-mix(in oklab, var(--ring) 50%, transparent);
  }

  .field__input:disabled,
  .field__input[readonly],
  .field[data-field-readonly] .field__input,
  .field[data-field-disabled] .field__input {
    background: color-mix(in oklab, var(--input) 50%, transparent);
    opacity: 0.5;
    pointer-events: none;
  }

  .field__input:disabled,
  .field[data-field-disabled] .field__input {
    cursor: not-allowed;
  }

  .field[aria-invalid] .field__input,
  .radio-group[aria-invalid] .field__label {
    border-color: var(--destructive);
  }

  .radio-group[aria-invalid] .field__label {
    color: var(--destructive);
  }

  .field[data-orientation="horizontal"] .field__input {
    width: auto;
  }

  .field__error {
    color: var(--destructive);
    font-size: var(--text-sm);
  }

  .field__error svg,
  .field__error .fa-solid,
  .field__error .fa-brand {
    width: var(--text-sm);
    height: var(--text-sm);
    vertical-align: baseline;
    margin-right: 0.25rem;
  }

  /* ==========================================================================
   MODAL
   ========================================================================== */
  .modal {
    display: grid;
    gap: 1rem;
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 100;
    min-width: 20rem;
    transform: translate(-50%, -50%);
    background: var(--background);
    border-radius: var(--radius-lg);
    padding: 1rem;
    transform-origin: center center;
  }

  @keyframes enter {
    from {
      opacity: 0;
      transform: translate3d(-50%, -50%, 0) scale(0, 0);
      filter: blur(0);
      display: none;
    }
  }

  @keyframes exit {
    from {
      opacity: 1;
      transform: translate3d(-50%, -50%, 0) scale(1, 1);
      filter: blur(0);
      display: grid;
    }

    to {
      opacity: 0;
      transform: translate3d(-50%, -50%, 0) scale(0.95, 0.95);
      filter: blur(1rem);
      display: none;
    }
  }

  .modal[data-state="open"] {
    animation: enter 0.15s ease 0s normal;
  }

  .modal[data-state="open"],
  .modal[data-state="open"] + .modal-overlay {
    display: grid;
  }

  .modal[data-state="closed"] {
    animation: exit 0.15s ease-out 0s normal;
  }

  .modal[data-state="closed"],
  .modal[data-state="closed"] + .modal-overlay {
    display: none;
  }

  body:has(.modal[data-state="open"]) {
    overflow: hidden;
  }

  .modal__header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .modal__title {
    font-weight: var(--fw-medium);
  }

  .modal__description {
    color: var(--muted-foreground);
  }

  .modal__footer {
    display: flex;
    justify-content: end;
    gap: 0.5rem;
    padding: 1rem;
    margin: 0 -1rem -1rem;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    background: var(--muted);
  }

  .modal__close {
    width: 1.75rem;
    height: 1.75rem;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
  }

  .modal__close svg,
  .modal__close .fa-solid {
    font-size: var(--text-base);
    width: var(--text-base);
    height: var(--text-base);
  }

  .modal-overlay {
    position: absolute;
    inset: 0;
    background: color-mix(in oklab, black 10%, transparent);
    backdrop-filter: blur(2px);
    z-index: 90;
  }

  .modal-overlay[data-state="closed"] {
    display: none;
  }

  /* ==========================================================================
   CARD
   ========================================================================== */
  .card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    color: var(--card-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 0;
    gap: 1rem;
  }

  .card__header {
    display: grid;
    grid-auto-rows: min-content;
    align-items: start;
    gap: 0.25rem;
    padding: 0 1rem;
  }

  .card__title {
    line-height: 1.375;
    font-weight: var(--fw-medium);
  }

  .card__description {
    font-size: var(--text-sm);
    color: var(--muted-foreground);
  }

  .card__header:has(.card__action) {
    grid-template-columns: 1fr auto;
  }

  .card__header .card__action {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .card__header:has(.card__description) .card__action {
    align-self: center;
  }

  .card__header .card__title,
  .card__header .card__description {
    grid-column: 1;
  }

  .card__header:has(.card__description) {
    grid-template-rows: auto auto;
  }

  .card__content {
    padding: 0 1rem;
  }

  .card__content > .alert {
    margin-block-end: 1rem;
  }

  .card__footer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
  }

  /* ==========================================================================
   SELECT
   ========================================================================== */
  .select-portal {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9000;
  }

  .select-portal .select__content {
    pointer-events: auto;
  }

  .select {
    position: relative;
    display: inline-block;
    width: 100%;
    font-size: var(--text-sm);
  }

  .select__trigger {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;

    width: 100%;
    min-height: 2rem;
    padding: 0.25rem 0.5rem;
    padding-left: 0.625rem;

    background: var(--background);
    border: 1px solid var(--input);
    border-radius: var(--radius-lg);
    color: var(--foreground);
    cursor: pointer;

    transition:
      border-color 120ms ease,
      box-shadow 120ms ease;
    user-select: none;
    outline: none;
  }

  .select[data-select-multiple] .select__trigger {
    min-height: 2rem;
    height: auto;
  }

  .select__trigger:hover:not([data-select-disabled]) {
    border-color: var(--ring);
  }

  .select__trigger:focus-visible {
    border-color: var(--ring);
  }

  .select__trigger[data-select-disabled],
  .select[data-select-disabled] .select__trigger {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
  }

  .select__value {
    display: flex;
    align-items: center;
    justify-self: self-start;
    font-size: var(--text-sm);
    line-height: var(--text-sm-line-height);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--foreground);
  }

  .select__value[data-select-placeholder] {
    font-size: var(--text-sm);
    color: var(--muted-foreground);
  }

  .select__tags {
    display: flex;
    align-content: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    flex: 1;
  }

  .select__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.125rem 0.5rem;
    background: var(--primary);
    color: var(--primary-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    cursor: default;
  }

  .select__tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--text-sm);
    height: var(--text-sm);
    cursor: pointer;
    color: var(--muted);
    transition:
      color 100ms ease,
      background 100ms ease;
    flex-shrink: 0;
  }

  .select__tag-remove i {
    font-size: var(--text-xs);
  }

  .select__tag-remove:hover {
    color: color-mix(in oklab, var(--muted) 80%, transparent);
  }

  .select__icon-wrapper {
    flex-shrink: 0;
    color: var(--muted-foreground);
    transition: transform 200ms ease;
    display: flex;
    align-items: center;
  }

  .select__icon-wrapper > i {
    font-size: var(--text-xs);
  }

  .select__viewport > .select__search-wrap .select__search {
    position: sticky;
    top: 0;
  }

  .select__content-wrapper {
    position: fixed;
    opacity: 0;
    visibility: hidden;

    overflow: hidden;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    z-index: 100;

    transform: translateY(-4px) scale(0.98);
  }

  .select__content {
    min-width: 10rem;
    max-height: 10rem;
    max-width: calc(100vw - 8px);
    overflow-y: scroll;
    padding: 0.25rem;

    pointer-events: none;
    transition:
      opacity 150ms ease,
      transform 150ms ease,
      visibility 150ms ease;
  }

  .select__content::-webkit-scrollbar {
    width: 6px;
  }

  .select__content::-webkit-scrollbar-track {
    background: transparent;
  }

  .select__content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
  }

  .select__content-wrapper[data-state="open"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .select__search-wrap {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border);
  }

  .select__search {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    background: var(--muted);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--foreground);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    outline: none;
    transition: border-color 120ms ease;
  }

  .select__search::placeholder {
    color: var(--muted-foreground);
  }

  .select__search:focus {
    border-color: var(--ring);
    background: var(--background);
  }

  .select__label {
    padding: 0.375rem 0.5rem;
    font-size: var(--text-xs);
    color: var(--muted-foreground);
    user-select: none;
  }

  .select__group + .select__group {
    margin-top: 4px;
    border-top: 1px solid var(--border);
    padding-top: 4px;
  }

  .select__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    color: var(--foreground);
    font-size: var(--text-sm);
    transition:
      background 80ms ease,
      color 80ms ease;
    user-select: none;
    position: relative;
  }

  .select__item:hover,
  .select__item[data-select-focused] {
    background: var(--accent);
    color: var(--accent-foreground);
  }

  .select__item[data-select-disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
  }

  .select__item[data-select-hidden] {
    display: none;
  }

  .select__item-indicator {
    flex-shrink: 0;
    width: var(--text-sm);
    height: var(--text-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    color: var(--foreground);
    opacity: 0;
  }

  .select__item-indicator i {
    font-size: var(--text-xs);
  }

  .select__item[data-select-selected] .select__item-indicator {
    opacity: 1;
  }

  /* ── Empty State ───────────────────────────────────────────── */
  .select__empty {
    padding: 1.5rem;
    text-align: center;
    font-size: var(--text-sm);
    color: var(--muted-foreground);
    display: none;
  }

  .select__empty[data-select-visible] {
    display: block;
  }

  /* ==========================================================================
   PAGINATION
   ========================================================================== */
  .pagination {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
  }

  .pagination-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--foreground);
    text-decoration: none;
    transition:
      background-color 0.15s ease,
      color 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
  }

  .pagination-item:first-child .pagination-link,
  .pagination-item:last-child .pagination-link {
    width: fit-content;
    padding: 0 0.5rem;
  }

  .pagination-link:hover:not([data-disabled]):not(
      .pagination-link[data-active]
    ) {
    background-color: var(--accent);
    color: var(--accent-foreground);
  }

  .pagination-link[data-active] {
    background-color: var(--primary);
    color: var(--primary-foreground);
    font-weight: var(--fw-medium);
    pointer-events: none;
  }

  .pagination-link[data-disabled] {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
  }

  .pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--muted-foreground);
  }

  /* ==========================================================================
   TABS
   ========================================================================== */
  .tabs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .tabs__list {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    padding: 3px;
    background-color: var(--muted);
    color: var(--muted-foreground);
  }

  .tabs__trigger {
    position: relative;
    display: inline-flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    height: calc(100% - 1px);
    padding: 0.125rem 0.375rem;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    white-space: nowrap;
    color: color-mix(in oklab, var(--foreground) 60%, transparent);
    text-decoration: none;
    background: transparent;
    cursor: pointer;
    outline: none;
    user-select: none;
  }

  .tabs__trigger .badge {
    max-height: 1.25rem;
    line-height: var(--text-xs-line-height);
  }

  .tabs__trigger:hover {
    color: var(--foreground);
  }

  .tabs__trigger:disabled {
    pointer-events: none;
    opacity: 0.5;
  }

  .tabs__trigger[data-state="active"] {
    background-color: var(--background);
    color: var(--foreground);
    box-shadow: var(--shadow-sm);
    border-color: var(--border);
  }

  .tabs__panel {
    display: none;
    flex: 1;
    outline: none;
  }

  .tabs__panel[data-tabs-panel-state="active"] {
    display: block;
  }

  [data-tabs-observe][data-tabs-panel-state="idle"] {
    display: none;
  }

  [data-tabs-observe][data-tabs-panel-state="active"] {
    display: revert;
  }

  /* ==========================================================================
   BADGE
   ========================================================================== */
  .badge {
    display: inline-flex;
    width: fit-content;
    flex-shrink: 0;
    min-height: 1.25rem;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    overflow: hidden;
    white-space: nowrap;
    border-radius: var(--radius-3xl);
    border: 1px solid transparent;
    padding: 0.125rem 0.5rem;
    font-size: var(--text-xs);
    line-height: var(--text-sm-line-height);
    font-weight: var(--fw-medium);
    outline: none;
  }

  .badge:focus-visible {
    border-color: var(--ring);
    box-shadow: 0 0 0 3px var(--ring) / 0.5;
  }

  .badge > svg,
  .badge > .fa-solid,
  .badge > .fa-brand {
    pointer-events: none;
    flex-shrink: 0;
    width: 12px;
    height: 12px;
  }

  .badge[data-variant="primary"] {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-color: transparent;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  }

  .badge[data-variant="secondary"] {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    border-color: transparent;
  }

  .badge[data-variant="destructive"] {
    background-color: var(--destructive);
    color: var(--destructive-foreground);
    border-color: transparent;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  }

  .badge[data-variant="warning"] {
    background-color: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
  }

  .badge[data-variant="outline"] {
    border-color: var(--border);
    color: var(--foreground);
    background: transparent;
  }

  /* ==========================================================================
   DROPDOWN
   ========================================================================== */
  .dropdown {
    position: relative;
    display: inline-block;
  }

  .dropdown__trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    position: relative;
    cursor: pointer;
    user-select: none;
    outline: none;
  }

  .dropdown__trigger svg,
  .dropdown__trigger .fa-solid,
  .dropdown__trigger .fa-brand {
    font-size: var(--text-xs);
    flex-shrink: 0;
  }

  .dropdown__content[data-state="open"]::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    height: 0.5rem;
  }

  .dropdown__content[data-state="open"][data-side="top"]::before {
    top: 100%;
    bottom: auto;
  }

  .dropdown__content,
  .dropdown__sub-content {
    position: fixed;
    min-width: 15rem;
    padding: 0.25rem;
    background: var(--background);
    border-radius: var(--radius-md);
    box-shadow:
      var(--shadow-md),
      0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent);
    outline: none;

    opacity: 0;
    transform-origin: var(--dropdown-transform-origin, top left);
    transform: scale(0.96) translateY(-4px);
    transition:
      opacity 130ms ease,
      transform 130ms ease;
  }

  .dropdown__content[data-state="open"] {
    display: block;
    pointer-events: auto;
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  .dropdown__content[data-state="closed"] {
    pointer-events: none;
  }

  .dropdown__sub {
    display: contents;
  }

  .dropdown__sub-trigger {
    position: relative;
  }

  .dropdown__sub-content[data-state="open"] {
    pointer-events: auto;
    opacity: 1;
    transform: scale(1) translateX(0);
  }

  .dropdown__sub-content[data-state="open"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: -0.5rem;
    width: 0.5rem;
    height: 100%;
  }

  .dropdown__sub-content[data-state="open"][data-side="left"]::before {
    left: auto;
    right: -0.5rem;
  }

  .dropdown__item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.25rem;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    cursor: default;
    user-select: none;
    outline: none;
    transition: background-color 60ms;
    position: relative;
  }

  .dropdown__item:hover {
    background: var(--muted);
  }

  .dropdown__item > * {
    display: flex;
    align-items: center;
    width: 100%;
    color: inherit;
    font-size: inherit;
    text-decoration: none;
  }

  .dropdown__item[data-highlighted] {
    background: var(--accent);
  }

  .dropdown__sub-trigger[data-state="open"] {
    background: var(--accent);
  }

  .dropdown__item[data-disabled] {
    opacity: 0.5;
    pointer-events: none;
  }

  .dropdown__label {
    padding: 0.375rem 0.25rem;
    font-size: var(--text-sm);
    font-weight: var(--fw-medium);
    color: var(--muted-foreground);
    user-select: none;
    line-height: 1;
  }

  .dropdown__item svg {
    width: 1rem;
    height: 1rem;
    margin-left: auto;
    color: var(--dropdown-muted);
    flex-shrink: 0;
  }

  .dropdown__item .fa-solid,
  .dropdown__item .fa-brand {
    margin-left: auto;
    color: var(--dropdown-muted);
    flex-shrink: 0;
  }

  /* ==========================================================================
   CAROUSEL
   ========================================================================== */
  .carousel {
    position: relative;
    max-width: 100%;
    overflow: hidden;
    color: var(--primary-foreground);
  }

  .carousel__inner {
    display: flex;
    transition: transform 0.6s ease-in-out;
    width: 100%;
  }

  .carousel__item {
    min-width: 100%;
    padding: 2rem 6rem;
  }

  @media (max-width: 992px) {
    .carousel__item {
      flex-direction: column;
      text-align: center;
      gap: 2rem;
    }
  }

  .carousel__content {
    flex: 1;
  }

  .carousel__title {
    color: var(--primary-foreground);
  }

  .carousel__title span {
    color: var(--primary-alt);
  }

  .carousel__description {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.95;
  }

  .carousel__btn {
    background: var(--secondary);
    color: var(--secondary-foreground-alt);
  }

  .carousel__image-wrapper {
    flex: 1;
    max-width: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
  }

  .carousel__control {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: color-mix(in oklab, var(--input) 25%, transparent);
    border-radius: calc(infinity * 1px);
    color: var(--primary-foreground);
    border: none;
    width: 3rem;
    height: 3rem;
    cursor: pointer;
    transition: all 250ms ease;
    backdrop-filter: blur(4px);
  }

  .carousel__control:hover {
    background-color: color-mix(in oklab, var(--input) 40%, transparent);
    transform: translateY(-50%) scale(1.1);
  }

  .carousel__control--prev {
    left: 0.5rem;
  }

  .carousel__control--next {
    right: 0.5rem;
  }

  @media (max-width: 768px) {
    .carousel__control--prev {
      left: 1rem;
    }

    .carousel__control--next {
      right: 1rem;
    }

    .carousel__control {
      width: 2rem;
      height: 2rem;
    }
  }

  .carousel__indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    z-index: 10;
    bottom: 1rem;
    left: 50%;
  }

  .carousel__indicator {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: var(--primary-foreground);
    opacity: 0.4;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .carousel__indicator[data-state="active"],
  .carousel__indicator:hover {
    opacity: 1;
    background-color: var(--primary-foreground);
  }

  /* ==========================================================================
   TABLE
   ========================================================================== */
  .tm-wrapper {
    position: relative;
    font-family: inherit;
    color: var(--foreground);
    font-size: var(--text-sm);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  .tm-header-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  .tm-data-wrapper {
    position: relative;
  }
  .tm-footer-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
  .tm-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  .tm-search-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .tm-search {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 0.75rem;
    gap: 0.5rem;
  }
  .tm-search:focus-within {
    outline: 2px solid color-mix(in oklab, var(--ring) 50%, transparent);
  }
  .tm-search__icon {
    color: var(--muted-foreground);
    display: flex;
    font-size: 0.875rem;
  }
  .tm-search__input {
    padding: 0.5rem 0;
    border: none;
    background: transparent;
    font-size: var(--text-sm);
    outline: none;
    color: var(--foreground);
    min-width: 200px;
    width: 100%;
  }
  .tm-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    align-items: center;
  }
  .tm-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--background);
    color: var(--foreground);
    font-size: var(--text-sm);
    cursor: pointer;
    white-space: nowrap;
  }
  .tm-filter-btn:hover {
    border-color: var(--primary);
    background: var(--muted);
  }
  .tm-filter-btn[data-state="open"] {
    border-color: var(--primary);
  }
  .tm-filter-btn__badge {
    padding: 1px 6px;
    border-radius: calc(infinity * 1px);
    background: var(--secondary);
    color: var(--primary);
    font-size: var(--text-xs);
    font-weight: var(--fw-semibold);
  }
  .tm-filter-panel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.25rem;
  }
  .tm-filter-panel__op,
  .tm-filter-panel__value {
    font-size: var(--text-sm);
  }
  .tm-filter-panel__actions {
    display: flex;
    gap: 0.5rem;
  }
  .tm-filter-panel__action-btn {
    flex: 1;
  }

  .tm-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
  }

  .tm-filter-pill {
    gap: 0.5rem;
  }

  .tm-filter-pill__text {
    font-size: var(--text-sm);
  }

  .tm-filter-pill__text > * {
    font-size: inherit;
  }

  .tm-filter-pill__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--text-sm);
    height: var(--text-sm);
    font-size: var(--text-sm);
    cursor: pointer;
    color: var(--muted);
    transition:
      color 100ms ease,
      background 100ms ease;
    flex-shrink: 0;
  }

  .tm-filter-pill__remove:hover {
    color: color-mix(in oklab, var(--muted) 80%, transparent);
  }

  .tm-scroll,
  .table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
  }

  .tm-table,
  .data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
    background: var(--background);
  }

  .tm-thead,
  .data-table thead {
    background: var(--muted);
  }

  .tm-th,
  .data-table thead th {
    padding: 0.625rem 0.5rem;
    text-align: left;
    font-size: var(--text-xs);
    font-weight: var(--fw-semibold);
    color: var(--muted-foreground);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    white-space: nowrap;
    user-select: none;
    border-bottom: 1px solid var(--border);
  }

  .tm-th--sortable {
    cursor: pointer;
  }

  .tm-th--sortable:hover {
    color: var(--foreground);
  }

  .tm-th--sortable .tm-th__label {
    font-size: inherit;
    font-weight: inherit;
    display: inline;
  }

  .tm-sort-icon {
    margin-left: 0.125rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
  }

  .tm-sort-icon i,
  .tm-sort-icon svg,
  .tm-sort-icon .fa-solid {
    width: calc(var(--text-xs) * 0.75);
    height: calc(var(--text-xs) * 0.75);
    font-size: calc(var(--text-xs) * 0.75);
    transition: color 0.15s;
  }

  .tm-th[data-tm-sort-dir] .tm-sort-icon {
    color: var(--primary);
  }

  /* Active */
  .tm-th[data-tm-sort-dir="asc"] .tm-th__label,
  .tm-th[data-tm-sort-dir="desc"] .tm-th__label,
  .tm-th[data-tm-sort-dir="asc"] .tm-sort-icon__asc,
  .tm-th[data-tm-sort-dir="desc"] .tm-sort-icon__desc {
    color: var(--primary);
  }

  /* Inactive (the opposite) */
  .tm-th[data-tm-sort-dir="asc"] .tm-sort-icon__desc,
  .tm-th[data-tm-sort-dir="desc"] .tm-sort-icon__asc {
    color: var(--border);
  }

  .tm-tbody .tm-tr,
  .data-table tbody tr {
    transition: background 0.1s;
  }
  .tm-tbody .tm-tr:nth-child(even),
  .data-table tbody tr:nth-child(even) {
    background: var(--background);
  }
  .tm-tbody .tm-tr:hover,
  .data-table tbody tr:hover {
    background: var(--secondary);
  }

  .tm-td,
  .data-table tbody td {
    padding: 0.625rem 0.5rem;
    font-size: var(--text-sm);
    color: var(--foreground);
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
  }

  .tm-tbody .tm-tr:last-child .tm-td,
  .data-table tbody tr:last-child td {
    border-bottom: none;
  }

  .tm-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--muted-foreground);
    font-size: var(--text-sm);
  }

  .tm-loading-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--background) 80%, transparent);
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    z-index: 10;
  }

  .tm-spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: tm-spin 0.7s linear infinite;
  }

  @keyframes tm-spin {
    to {
      transform: rotate(360deg);
    }
  }

  [data-tm-pagination] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
  }

  .tm-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--background);
    color: var(--foreground);
    font-size: var(--text-sm);
    cursor: pointer;
    text-decoration: none;
    transition:
      background 0.12s,
      border-color 0.12s,
      color 0.12s;
    user-select: none;
  }

  .tm-page-btn:hover:not(.tm-page-btn--disabled):not(.tm-page-btn--active) {
    background: var(--muted);
    border-color: var(--primary);
    color: var(--primary);
  }

  .tm-page-btn--active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
    cursor: default;
    font-weight: var(--fw-semibold);
  }

  .tm-page-btn--disabled {
    opacity: 0.1;
    cursor: not-allowed;
    pointer-events: none;
  }

  .tm-page-ellipsis {
    display: inline-flex;
    align-items: center;
    padding: 0 0.5rem;
    color: var(--muted-foreground);
    font-size: var(--text-sm);
    user-select: none;
  }

  /* ==========================================================================
   EMPTY
   ========================================================================== */
  .empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    text-align: center;
    text-wrap: balance;
    border-radius: var(--radius-xl);
    width: 100%;
    min-width: 0;
    padding: 1.5rem;
  }

  .empty__header {
    display: flex;
    flex-direction: column;
    max-width: var(--container-sm);
    min-width: 0;
    align-items: center;
    gap: 0.5rem;
  }

  .empty__media {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-lg);
    background-color: var(--muted);
    color: var(--muted-foreground);
    flex-shrink: 0;
    margin-bottom: 0.5rem;
  }

  .empty__media svg,
  .empty__media .fa-solid,
  .empty__media .fa-brand {
    pointer-events: none;
    width: 1rem;
    height: 1rem;
    font-size: 1rem;
  }

  .empty__title {
    font-size: var(--text-sm);
    font-weight: var(--fw-medium);
    letter-spacing: var(--tracking-tight);
  }

  .empty__description {
    font-size: var(--text-sm);
    color: var(--muted-foreground);
  }

  .empty__content {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    font-size: var(--text-base);
    text-wrap: balance;
    gap: 0.5rem;
    width: 100%;
    max-width: var(--container-sm);
    min-width: 0;
  }

  .banner {
    color: var(--primary-foreground);
    background: var(--banner-background);
  }

  .banner__icon {
    color: var(--primary-foreground);
  }

  .main-header {
    background: var(--background);
  }

  .web-logo {
    width: 4rem;
    height: 4rem;
  }

  .uni-name {
    color: var(--muted-foreground);
  }

  .search-bar {
    background: var(--input);
    width: 16rem;
    height: 2.5rem;
    color: var(--muted-foreground);
    transition: outline 100ms ease;
  }

  .search-bar__icon {
    color: var(--muted-foreground);
    width: 1rem;
    height: 1rem;
  }

  .search-bar__input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
  }

  .search-bar:focus-within {
    outline: 2px solid color-mix(in oklab, var(--ring) 50%, transparent);
  }

  .navbar {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }

  .navbar__item {
    cursor: pointer;
    color: var(--muted-foreground);
    text-transform: uppercase;
  }

  .navbar__item--active {
    color: var(--secondary-foreground-alt);
    border-bottom: 2px var(--secondary-foreground-alt) solid;
  }

  .navbar__item:hover .navbar-item__icon {
    transition: transform 250ms ease;
    transform: rotate(-180deg);
  }

  .navbar__item-content.dropdown__content,
  .navbar__item-content.dropdown__sub-content {
    padding: 0;
  }

  .navbar__item-content .dropdown__item:first-child,
  .navbar__item-content .dropdown__sub:first-child .dropdown__sub-trigger {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }

  .navbar__item-content .dropdown__item:last-child,
  .navbar__item-content .dropdown__sub:last-child .dropdown__sub-trigger {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
  }

  .navbar__item-content .dropdown__item:only-child,
  .navbar__item-content .dropdown__sub:only-child .dropdown__sub-trigger {
    border-radius: var(--radius-md);
  }

  .navbar__item-content .dropdown__item.dropdown__sub-trigger {
    padding: 0;
  }

  .navbar__item-content .dropdown__item:not(.dropdown__sub-trigger),
  .navbar__item-content .dropdown__item.dropdown__sub-trigger .navbar__link {
    padding: 0.5rem 1rem;
  }

  .navbar__item-content .dropdown__item:hover {
    color: var(--primary-foreground);
    background: var(--primary);
  }

  /* ==========================================================================
   USER MENU
   ========================================================================== */
  .user-menu {
    position: relative;
  }

  .user-menu__trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem;
    border-radius: 9999px;
    transition: background-color 150ms ease;
    cursor: pointer;
    border: none;
    background: transparent;
  }

  .user-menu__trigger:hover {
    background-color: var(--secondary);
  }

  .user-menu__avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--primary-foreground);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .user-menu__name {
    font-size: var(--text-sm);
    font-weight: var(--fw-medium);
    display: none;
  }

  @media (min-width: 768px) {
    .user-menu__name {
      display: inline;
    }
  }

  .user-menu__icon {
    font-size: var(--text-xs);
    opacity: 0.5;
  }

  .user-menu__dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    width: 12rem;
    background-color: var(--popover);
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    padding: 0.5rem 0;
    z-index: 100;
    display: none;
  }

  .user-menu__dropdown[data-state="open"] {
    display: block;
  }

  .user-menu__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: var(--text-sm);
    color: var(--foreground);
    transition: background-color 150ms ease;
    text-decoration: none;
  }

  .user-menu__item:hover {
    background-color: var(--secondary);
  }

  .user-menu__item i {
    width: 1rem;
    text-align: center;
  }

  .user-menu__item--destructive {
    color: var(--destructive);
  }

  .user-menu__item--destructive:hover {
    background-color: color-mix(in oklab, var(--destructive) 10%, transparent);
  }

  .user-menu__separator {
    height: 1px;
    background-color: var(--border);
    margin: 0.25rem 0;
  }

  footer {
    color: var(--footer-foreground);
    background: var(--footer-background);
  }

  .footer__faculty-name {
    color: var(--primary-foreground);
  }

  .footer__uni-name {
    color: var(--muted-foreground);
  }

  .footer__info {
    flex-basis: 30%;
  }

  .footer__nav-title {
    color: var(--primary-foreground);
  }

  .footer-content__item {
    width: 260px;
  }

  .footer__logo {
    height: 3rem;
    width: 3rem;
  }

  .footer__social-item {
    color: var(--primary-foreground);
  }

  .footer__social-link {
    display: block;
  }

  .footer__copyright {
    border-top: #1e2939 1px solid;
  }
}
