@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* --------------------------------------------------------------------------------------
--------------------------------- Core style -------------------------------------------
-------------------------------------------------------------------------------------- */
:root {
  /* ======================================================================= */
  /* ========================== SERVIRA TOKENS 3.0 ========================== */
  /* ======================================================================= */

  /* ======================================================================= */
  /* =============================== BACKGROUNDS ============================ */
  /* ======================================================================= */
  --bg-app: #7c7c7c;
  --bg-page: #f3f5f4;
  --bg-surface: #ffffff;
  --bg-surface-soft: #f8fbfa;
  --bg-surface-muted: #eef3f1;
  --bg-elevated: #f5f8f7;
  --bg-topbar: #f2f2f2;
  --bg-dark-surface: #1f2228;

  /* ======================================================================= */
  /* ================================= BRAND ================================ */
  /* ======================================================================= */
  --color-accent: #3F8F8B;
  --color-accent-hover: #367a76;
  --color-accent-active: #2f6d69;
  --color-accent-strong: #2b5f5c;
  --color-accent-soft: rgba(63, 143, 139, 0.14);
  --color-accent-softer: rgba(63, 143, 139, 0.08);
  --color-accent-tint: #e8f3f2;

  /* ======================================================================= */
  /* ================================== TEXT ================================ */
  /* ======================================================================= */
  --text-primary: #111827;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-soft: #94a3b8;
  --text-on-primary: #ffffff;
  --text-on-dark: #f7faf8;
  --text-on-dark-muted: rgba(247, 250, 248, 0.72);

  /* ======================================================================= */
  /* ================================= BORDERS ============================== */
  /* ======================================================================= */
  --border-light: #edf1f5;
  --border-default: #e5e7eb;
  --border-strong: #d1d9e0;
  --border-dark-soft: rgba(255, 255, 255, 0.08);
  --border-dark-muted: rgba(255, 255, 255, 0.06);
  --border-focus: #3F8F8B;

  /* ======================================================================= */
  /* ================================= RADIUS =============================== */
  /* ======================================================================= */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 14px;
  --radius-pill: 999px;

  /* ======================================================================= */
  /* =========================== BUTTONS / INTERACTIVE ====================== */
  /* ======================================================================= */
  --button-primary-bg: var(--color-accent-hover);
  --button-primary-bg-hover: var(--color-accent-active);
  --button-primary-bg-active: var(--color-accent-hover);
  --button-primary-text: #ffffff;

  --button-secondary-bg: rgba(63, 143, 139, 0.06);
  --button-secondary-bg-hover: rgba(63, 143, 139, 0.10);
  --button-secondary-text: #2b5f5c;
  --button-secondary-border: rgba(63, 143, 139, 0.28);
  --button-secondary-border-hover: rgba(63, 143, 139, 0.36);

  --button-danger-bg: rgba(185, 28, 28, 0.06);
  --button-danger-bg-hover: rgba(185, 28, 28, 0.10);
  --button-danger-text: #b91c1c;
  --button-danger-border: rgba(185, 28, 28, 0.24);
  --button-danger-border-hover: rgba(185, 28, 28, 0.32);
  --button-danger-text-hover: #991b1b;

  --button-text-color: #2b5f5c;
  --button-text-color-hover: #3F8F8B;

  /* ======================================================================= */
  /* ================================= INPUTS =============================== */
  /* ======================================================================= */
  --input-bg: #ffffff;
  --input-bg-disabled: #f6f7f8;
  --input-border: #d0d7de;
  --input-border-hover: #bcc6d0;
  --input-border-focus: #3F8F8B;
  --input-text: #1d1d1d;
  --input-placeholder: #8a94a3;

  /* ======================================================================= */
  /* ================================= STATES =============================== */
  /* ======================================================================= */
  --state-success-bg: #e9f7ef;
  --state-success-border: #c3e7d2;
  --state-success-text: #1b5e20;

  --state-info-bg: #e8f2ff;
  --state-info-border: #c8dcff;
  --state-info-text: #0b4f8a;

  --state-error-bg: #fdecea;
  --state-error-border: #f5c6c0;
  --state-error-text: #b71c1c;

  --state-warning-bg: #fff7e6;
  --state-warning-border: #ffe1a8;
  --state-warning-text: #a66300;

  /* ======================================================================= */
  /* ================================= SHADOWS ============================== */
  /* ======================================================================= */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 18px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 24px rgba(15, 23, 42, 0.08);

  /* ======================================================================= */
  /* ======================= NAVIGATION / SECTION GRADIENTS ================= */
  /* ======================================================================= */
  --gradient-surface: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
  --gradient-surface-soft: linear-gradient(180deg, #f8fbfa 0%, #eef3f1 100%);
  --gradient-accent-soft: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(63, 143, 139, 0.06) 100%);
  --gradient-accent-strong: linear-gradient(180deg, #3F8F8B 0%, #2b5f5c 85%);
  --sidebar-bg: linear-gradient(180deg, #2f333a 0%, #1f2228 100%);
  --logo-bg: linear-gradient(180deg, #3F8F8B 0%, #2b5f5c 85%);

  /* ======================================================================= */
  /* ================================ TYPOGRAPHY ============================ */
  /* ======================================================================= */
  --font-ui: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans: var(--font-ui);

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.0625rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;

  --leading-tight: 1.15;
  --leading-snug: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.01em;

  /* ======================================================================= */
  /* ================================ LAYOUT ================================ */
  /* ======================================================================= */
  --header-height: 56px;
  --nav-collapsed-width: 60px;
  --subnav-expanded-width: 220px;
  --subnav-collapsed-width: 0px;
  --nav-gradient-size: calc(var(--nav-collapsed-width) + var(--subnav-expanded-width));

  /* ======================================================================= */
  /* ============================ LEGACY VARIABLES ========================== */
  /* ======================================================================= */
  --nav-bg: #0A162A;
  --nav-fg: #ffffff;
  --top-bg: #f2f2f2;
  --top-fg: #3a3a3a;
  --content-bg: #ffffff;
  --content-fg: #000000;
  --app-bg: #7c7c7c;
  --sidebar-bg: linear-gradient(180deg, #2f333a 0%, #1f2228 100%);
  --text-on-dark: #f7faf8;
  --primary-color: #14525c;
  --text-on-primary: #ffffff;
  --alert-success-bg: #e9f7ef;
  --alert-success-text: #1b5e20;
  --alert-success-border: #c3e7d2;
  --alert-info-bg: #e8f2ff;
  --alert-info-text: #0b4f8a;
  --alert-info-border: #c8dcff;
  --alert-error-bg: #fdecea;
  --alert-error-text: #b71c1c;
  --alert-error-border: #f5c6c0;
  --alert-warning-bg: #fff7e6;
  --alert-warning-text: #a66300;
  --alert-warning-border: #ffe1a8;
  --nav-logo-gradient: var(--logo-bg);
  --accent: #3F8F8B;
  --accent-hover: #367a76;
  --accent-strong: #2b5f5c;
  --accent-soft: rgba(63, 143, 139, 0.14);
}

body {
  min-height: 100vh;
  background: var(--app-bg);
  color: var(--content-fg);
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Banner */
.banner {
  padding: 12px 16px;
  margin: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 0;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  transition: all 150ms ease;
}

.banner.hidden {
  opacity: 0;
  max-height: 0;
  margin: 0 20px;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.banner-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.banner-text {
  flex: 1;
  line-height: 1.3;
}

.banner-close {
  margin-left: auto;
  border: none;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 120ms ease;
}

.banner-close:hover {
  opacity: 1;
}

.banner-success {
  background: var(--alert-success-bg);
  border-color: var(--alert-success-border);
  color: var(--alert-success-text);
}

.banner-error {
  background: var(--alert-error-bg);
  border-color: var(--alert-error-border);
  color: var(--alert-error-text);
}

.banner-warning {
  background: var(--alert-warning-bg);
  border-color: var(--alert-warning-border);
  color: var(--alert-warning-text);
}

.banner-info {
  background: var(--alert-info-bg);
  border-color: var(--alert-info-border);
  color: var(--alert-info-text);
}

/* Toast alerts */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, 92vw);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  background: #ffffff;
  color: #1f2937;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: auto;
}

.toast-container .toast {
  display: flex !important;
}

.toast--show {
  opacity: 1;
  transform: translateY(0);
}

.toast--hide {
  opacity: 0;
  transform: translateY(6px);
}

.toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex: 0 0 28px;
}

.toast-message {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
}

.toast-close {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  padding: 2px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 120ms ease;
}

.toast-close:hover {
  opacity: 1;
}

.toast--success {
  background: var(--alert-success-bg);
  border-color: var(--alert-success-border);
  color: var(--alert-success-text);
}

.toast--success .toast-icon {
  background: var(--alert-success-text);
}

.toast--info {
  background: var(--alert-info-bg);
  border-color: var(--alert-info-border);
  color: var(--alert-info-text);
}

.toast--info .toast-icon {
  background: var(--alert-info-text);
}

.toast--warning {
  background: var(--alert-warning-bg);
  border-color: var(--alert-warning-border);
  color: var(--alert-warning-text);
}

.toast--warning .toast-icon {
  background: var(--alert-warning-text);
}

.toast--error {
  background: var(--alert-error-bg);
  border-color: var(--alert-error-border);
  color: var(--alert-error-text);
}

.toast--error .toast-icon {
  background: var(--alert-error-text);
}

@media (max-width: 900px) {
  .toast-container {
    top: calc(var(--header-height) + 12px);
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
  }
}

/* Modal */
.modal-overlay,
.modal_v3-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  padding: 20px;
  transition: opacity 160ms ease;
  z-index: 1200;
}

.modal-overlay.hidden,
.modal_v3-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-container,
.modal_v3-container {
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  width: min(460px, 100%);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(0) scale(1);
  transition: transform 160ms ease;
  overflow: hidden;
}

.modal-overlay.hidden .modal-container,
.modal_v3-overlay.hidden .modal_v3-container {
  transform: translateY(8px) scale(0.98);
}

.modal-header,
.modal-footer,
.modal_v3-header,
.modal_v3-footer {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header,
.modal_v3-header {
  background: #ffffff;
  color: var(--text-primary);
  justify-content: space-between;
  border-bottom: none;
}

.modal-header h3,
.modal_v3-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.25;
  color: inherit;
}

.modal-body,
.modal_v3-body {
  padding: 0 22px 20px;
  overflow: auto;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}

.modal-body > :first-child,
.modal_v3-body > :first-child {
  margin-top: 0;
}

.modal-body > :last-child,
.modal_v3-body > :last-child {
  margin-bottom: 0;
}

.modal-footer,
.modal_v3-footer {
  padding: 8px 10px 8px 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  justify-content: flex-end;
  gap: 8px;
  background: #ffffff;
}

.modal-close-btn,
.modal_v3-close-btn {
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 4px;
  margin: -2px -2px -2px 0;
  line-height: 1;
  border-radius: 4px;
  opacity: 0.72;
  transition: background 120ms ease, color 120ms ease, opacity 120ms ease;
}

.modal-close-btn:hover,
.modal_v3-close-btn:hover {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-secondary);
  opacity: 0.92;
}

body.modal-open {
  overflow: hidden;
}

/* --------------------------------------------------------------------------------------
-------------------------------- Buttons ------------------------------------------------
-------------------------------------------------------------------------------------- */
.modal-action {
  border: 1px solid transparent;
  border-radius: 8px;
  min-width: 92px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.modal-action:active {
  transform: translateY(1px);
}

.modal-action--secondary {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  box-shadow: none;
}

.modal-action--primary {
  background: var(--color-accent-strong);
  color: var(--text-on-primary);
  box-shadow: 0 8px 18px rgba(43, 95, 92, 0.18);
}

.modal-action--secondary:hover,
.modal-action--secondary:focus {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}

.modal-action--primary:hover,
.modal-action--primary:focus {
  background: var(--color-accent-hover);
}

.modal-action--danger {
  background: var(--button-danger-bg);
  border-color: var(--button-danger-border);
  color: var(--button-danger-text);
  box-shadow: 0 8px 18px rgba(185, 28, 28, 0.14);
}

.modal-action--danger:hover,
.modal-action--danger:focus {
  background: var(--button-danger-bg-hover);
  border-color: var(--button-danger-border-hover);
  color: var(--button-danger-text-hover);
}

/* --------------------------------------------------------------------------------------
-------------------------------- V3 Tooltip --------------------------------------------
-------------------------------------------------------------------------------------- */
.tooltip_anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tooltip_anchor > .tooltip {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

#app-tooltip.tooltip {
  position: fixed;
  left: 0;
  top: 0;
  max-width: min(240px, calc(100vw - 16px));
  padding: 5px 8px;
  border-radius: 8px;
  background: #2f333a;
  color: var(--text-on-dark);
  font-size: 0.72rem;
  font-weight: var(--font-weight-medium);
  line-height: 1.2;
  white-space: nowrap;
  box-shadow:
    0 8px 20px rgba(15, 23, 42, 0.14),
    0 2px 6px rgba(15, 23, 42, 0.10);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
  z-index: 2000;
}

#app-tooltip.tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (hover: none) {
  #app-tooltip.tooltip {
    display: none;
  }
}

@media (max-width: 640px) {
  .modal-container,
  .modal_v3-container {
    width: min(100%, 100%);
  }

  .modal-header,
  .modal-footer,
  .modal_v3-header,
  .modal_v3-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .modal-body,
  .modal_v3-body {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* Standard Servira button */
.btn-servira_v2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #14525c 0%, #1c6a77 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(20, 82, 92, 0.22);
  transition: filter 120ms ease, opacity 120ms ease;
}

.btn-servira_v2__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 16px;
  line-height: 1;
}

.btn-servira_v2:hover {
  filter: brightness(1.05);
}

.btn-servira_v2:active {
  filter: brightness(0.98);
}

.btn-servira_v2:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: none;
}

.btn-servira_v2--sm {
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 8px;
  gap: 8px;
}

.btn-servira_v2--danger {
  background: linear-gradient(135deg, #8f1b1b 0%, #b91c1c 100%);
  box-shadow: 0 10px 25px rgba(185, 28, 28, 0.2);
}

.btn-servira_v2,
a.btn-servira_v2,
a.btn-servira_v2:link,
a.btn-servira_v2:visited,
a.btn-servira_v2:hover,
a.btn-servira_v2:focus {
  text-decoration: none;
}

/* --------------------------------------------------------------------------------------
-------------------------------- Custom date selector -----------------------------------
-------------------------------------------------------------------------------------- */

.custom_date_selector {
  position: relative;
  width: 100%;
}

.custom_date_selector__trigger {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d8e1ea;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  color: #0f172a;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 120ms ease;
}

.custom_date_selector__trigger:hover {
  border-color: #b9c8d6;
}

.custom_date_selector__trigger:focus-visible {
  outline: none;
  border-color: #1c6a77;
  box-shadow: 0 0 0 4px rgba(28, 106, 119, 0.14);
}

.custom_date_selector.is-open .custom_date_selector__trigger {
  border-color: #1c6a77;
  box-shadow: 0 0 0 4px rgba(28, 106, 119, 0.12);
}

.custom_date_selector__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom_date_selector__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(20, 82, 92, 0.08);
  color: #14525c;
  flex: 0 0 24px;
}

.custom_date_selector__panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 50;
  width: min(320px, 100%);
  padding: 14px;
  border: 1px solid #d8e1ea;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.custom_date_selector__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.custom_date_selector__month {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  text-transform: capitalize;
}

.custom_date_selector__nav {
  width: 34px;
  height: 34px;
  border: 1px solid #d8e1ea;
  border-radius: 10px;
  background: #ffffff;
  color: #14525c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  transition: border-color 120ms ease, background 120ms ease, opacity 120ms ease;
}

.custom_date_selector__nav:hover:not(:disabled) {
  border-color: #1c6a77;
  background: #f0f7f8;
}

.custom_date_selector__nav:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.custom_date_selector__weekdays,
.custom_date_selector__days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.custom_date_selector__weekdays {
  margin-bottom: 8px;
}

.custom_date_selector__weekdays span {
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.custom_date_selector__day {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease, transform 120ms ease;
}

.custom_date_selector__day:hover:not(:disabled):not(.custom_date_selector__day--empty) {
  border-color: #9dc4cb;
  background: #eff7f8;
  color: #14525c;
}

.custom_date_selector__day:focus-visible {
  outline: none;
  border-color: #1c6a77;
  box-shadow: 0 0 0 3px rgba(28, 106, 119, 0.14);
}

.custom_date_selector__day.is-selected {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1c6a77 100%);
  color: var(--text-on-primary);
  border-color: transparent;
  box-shadow: 0 10px 18px rgba(20, 82, 92, 0.2);
}

.custom_date_selector__day:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.custom_date_selector__day--empty {
  background: transparent;
  cursor: default;
}

@media (max-width: 640px) {
  .custom_date_selector__panel {
    width: 100%;
    min-width: 0;
  }

  .custom_date_selector__trigger {
    min-height: 42px;
    padding: 8px 12px;
  }
}

/* --------------------------------------------------------------------------------------
-------------------------------- Status pills ------------------------------------------------
-------------------------------------------------------------------------------------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: var(--font-weight-semibold);
  font-size: 0.84rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex: 0 0 8px;
}

.status-pill--active {
  color: #166534;
}

.status-pill--active::before {
  background: #16a34a;
}

.status-pill--inactive {
  color: #475569;
}

.status-pill--inactive::before {
  background: #64748b;
}

.status-pill--archived {
  color: #92400e;
}

.status-pill--archived::before {
  background: #d97706;
}

.status-pill--info {
  color: #1d4ed8;
}

.status-pill--info::before {
  background: #2563eb;
}

.status-pill--deleted {
  color: #b91c1c;
}

.status-pill--deleted::before {
  background: #dc2626;
}

/* --------------------------------------------------------------------------------------
-------------------------------- Content ------------------------------------------------ 
-------------------------------------------------------------------------------------- */

.content-page {
  padding: 12px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content-page__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}


/* --------------------------------------------------------------------------------------
-------------------------------- Top search ---------------------------------------------
-------------------------------------------------------------------------------------- */

.top_panel .top-left {
  gap: 10px;
  flex-wrap: wrap;
}

.top_panel .top-left .top-search-block {
  display: inline-flex;
  align-items: center;
  background: #f9fafb;
  border: 1px solid #d0d0d0;
  border-radius: 10px;
  padding-right: 1px;
}

.top_panel .top-left .top-search-icon {
  width: 30px;
  height: 30px;
  padding: 5px;
  color: #6b7280;
}

.top_panel .top-left .top-search-input {
  border: none;
  background: transparent;
  border-left: 1px solid #d0d0d0;
  border-radius: 0 10px 10px 0;
  padding: 6px 8px;
  min-width: 260px;
  height: auto;
}

.top_panel .top-left .top-search-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(28, 106, 119, 0.15);
  border-color: #1c6a77;
}

/* --------------------------------------------------------------------------------------
-------------------------------- Tables ------------------------------------------------
-------------------------------------------------------------------------------------- */

.table_card {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.servira_table_v2 {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
  min-width: 640px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.servira_table_v2 th,
.servira_table_v2 td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #edf1f5;
  vertical-align: middle;
  color: #0f172a;
  width: auto;
}

.servira_table_v2 th:first-child,
.servira_table_v2 td:first-child {
  width: 1%;
  white-space: nowrap;
}

.servira_table_v2 thead th {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  font-weight: 700;
  color: #1f2937;
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid #e5e7eb;
}

.servira_table_v2 tbody tr:hover {
  background: rgba(28, 106, 119, 0.16);
}

.servira_table_v2 tbody tr:nth-child(even):hover {
  background: rgba(28, 106, 119, 0.2);
}

.servira_table_v2 tbody tr:nth-child(even) {
  background: #f8fafc;
}

.servira_table_v2 tbody tr.order-preorder-row {
  background: rgba(239, 68, 68, 0.12);
}

.servira_table_v2 tbody tr.order-preorder-row:hover {
  background: rgba(239, 68, 68, 0.18);
}

.servira_table_v2 .text-ellipsis {
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.servira_table_v2 th:last-child,
.servira_table_v2 td:last-child {
  white-space: nowrap;
  text-align: right;
}

.servira_table_v2 .action-buttons {
  display: inline-flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
  white-space: nowrap;
  justify-content: flex-end;
  margin-left: auto;
}

.servira_table_v2 .empty-row td {
  background: #f9fafb;
  border-radius: 0 0 12px 12px;
}

@media (max-width: 900px) {
  .servira_table_v2 {
    min-width: 0;
  }

  .servira_table_v2 thead {
    display: none;
  }

  .servira_table_v2 tbody tr {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    margin-bottom: 10px;
  }

  .servira_table_v2 tbody tr:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  }

  .servira_table_v2 td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border: none;
    padding: 6px 4px;
    gap: 8px;
    font-weight: 600;
  }

  .returns-page .servira_table_v2,
  .return-detail-page .servira_table_v2 {
    border: none;
    box-shadow: none;
  }

  .servira_table_v2 td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #6b7280;
    min-width: 120px;
    text-align: left;
  }

  .servira_table_v2 .text-ellipsis {
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}

/* --------------------------------------------------------------------------------------
-------------------------------- users_v2.html -------------------------------------------
-------------------------------------------------------------------------------------- */

.user-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 16px;
  margin-top: 12px;
}

.user-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: #0f172a;
  position: relative;
}

.label-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-form-grid input,
.user-form-grid select {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  background: #f9fafb;
  color: #111827;
}

.user-form-grid input:focus,
.user-form-grid select:focus {
  outline: 2px solid #1c6a77;
  border-color: #1c6a77;
  background: #ffffff;
}

.password-input {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input input {
  width: 100%;
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1c6a77;
  cursor: pointer;
  border-radius: 6px;
}

.password-toggle:focus-visible {
  outline: 2px solid #1c6a77;
  outline-offset: 2px;
}

.password-toggle svg {
  width: 22px;
  height: 22px;
}

.password-toggle .icon-eye {
  display: none;
}

.password-toggle .icon-eye-closed {
  display: block;
}

.password-toggle.is-visible .icon-eye {
  display: block;
}

.password-toggle.is-visible .icon-eye-closed {
  display: none;
}

.user-form-error {
  display: none;
  margin-top: 10px;
  color: #b91c1c;
  font-weight: 600;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 12px;
}

.user-form-error:not(:empty) {
  display: block;
}

.modal-body .user-add-form_v3,
.modal_v3-body .user-add-form_v3 {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-body .user-modal-section,
.modal_v3-body .user-modal-section {
  padding: 16px 18px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fafcfc 100%);
}

.modal-body .user-modal-section__header,
.modal_v3-body .user-modal-section__header,
.modal-body .user-restaurants__header,
.modal_v3-body .user-restaurants__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.modal-body .user-modal-section__title,
.modal_v3-body .user-modal-section__title,
.modal-body .user-restaurants__title,
.modal_v3-body .user-restaurants__title {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.98rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.25;
}

.modal-body .user-modal-section__text,
.modal_v3-body .user-modal-section__text {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.modal-body .user-form-grid,
.modal_v3-body .user-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px 16px;
}

.modal-body .user-modal-field,
.modal_v3-body .user-modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: #0f172a;
}

.modal-body .user-form-grid input,
.modal-body .user-form-grid select,
.modal_v3-body .user-form-grid input,
.modal_v3-body .user-form-grid select {
  border: 1px solid #d9e2e8;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 0.95rem;
  background: #f8fafb;
  color: #111827;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.modal-body .user-form-grid input:focus,
.modal-body .user-form-grid select:focus,
.modal_v3-body .user-form-grid input:focus,
.modal_v3-body .user-form-grid select:focus {
  outline: none;
  border-color: #1c6a77;
  box-shadow: 0 0 0 3px rgba(28, 106, 119, 0.12);
  background: #ffffff;
}

.modal-body .user-restaurant-picker,
.modal_v3-body .user-restaurant-picker {
  height: 338px;
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
}

.modal-body .user-restaurant-picker::-webkit-scrollbar,
.modal_v3-body .user-restaurant-picker::-webkit-scrollbar {
  width: 6px;
}

.modal-body .user-restaurant-picker::-webkit-scrollbar-thumb,
.modal_v3-body .user-restaurant-picker::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 999px;
}

.modal-body .user-restaurant-picker__item,
.modal_v3-body .user-restaurant-picker__item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  padding: 10px 12px;
  text-align: left;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-snug);
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.modal-body .user-restaurant-picker__item:hover,
.modal-body .user-restaurant-picker__item:focus,
.modal_v3-body .user-restaurant-picker__item:hover,
.modal_v3-body .user-restaurant-picker__item:focus {
  background: var(--color-accent-softer);
  border-color: rgba(63, 143, 139, 0.18);
  color: var(--color-accent-strong);
}

.modal-body .user-restaurant-picker__item.is-selected,
.modal_v3-body .user-restaurant-picker__item.is-selected {
  background: var(--color-accent-soft);
  border-color: rgba(63, 143, 139, 0.24);
  color: var(--color-accent-strong);
  font-weight: var(--font-weight-semibold);
}

.modal-body .user-restaurant-picker__empty,
.modal_v3-body .user-restaurant-picker__empty {
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.modal-body .restaurant-adder,
.modal_v3-body .restaurant-adder {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.modal-body .restaurant-adder__input,
.modal_v3-body .restaurant-adder__input {
  position: relative;
  min-width: 260px;
}

.modal-body #restaurantSearchInput,
.modal_v3-body #restaurantSearchInput {
  width: 100%;
  border: 1px solid #d9e2e8;
  border-radius: 12px;
  padding: 11px 13px;
  background: #f8fafb;
}

.modal-body #restaurantSuggestions,
.modal_v3-body #restaurantSuggestions {
  border-radius: 12px;
}

.modal-body .restaurant-list.list-group,
.modal_v3-body .restaurant-list.list-group {
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
}

.input-invalid {
  border-color: #fca5a5;
  background-color: #fef2f2;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.15);
}

.form-control.input-invalid,
.form-select.input-invalid,
.form-control.input-invalid:focus,
.form-select.input-invalid:focus {
  border-color: #fca5a5 !important;
  background-color: #fef2f2;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.15) !important;
}

.input-warning {
  border-color: rgba(185, 137, 28, 0.38);
  background-color: #fff9e8;
  box-shadow: 0 0 0 2px rgba(185, 137, 28, 0.10);
}

.form-control.input-warning,
.form-select.input-warning,
.form-control.input-warning:focus,
.form-select.input-warning:focus {
  border-color: rgba(185, 137, 28, 0.38) !important;
  background-color: #fff9e8;
  box-shadow: 0 0 0 2px rgba(185, 137, 28, 0.10) !important;
}

.form-control:disabled,
.form-control[readonly] {
  background-color: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.servira_table_v2 tbody tr.table-active {
  background-color: rgba(28, 106, 119, 0.12);
}

.servira_table_v2 tbody tr.table-active:hover {
  background-color: rgba(28, 106, 119, 0.16);
}

.servira_table_v2 tbody tr.table-active td {
  background-color: transparent;
}

.password-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #14525c 0%, #1c6a77 100%);
  color: #ffffff;
  cursor: help;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.password-hint svg {
  width: 16px;
  height: 16px;
}

.user-restaurants {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
}

.user-restaurants__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.user-restaurants__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.restaurant-adder {
  display: flex;
  align-items: center;
  gap: 8px;
}

.restaurant-adder__input {
  position: relative;
  min-width: 240px;
}

#restaurantSearchInput {
  width: 100%;
}

#restaurantSuggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  display: none;
}

#restaurantSuggestions.show {
  display: block;
}

.restaurant-list.list-group {
  margin-top: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}



/* --------------------------------------------------------------------------------------
-------------------------------- Design system -----------------------------------------
-------------------------------------------------------------------------------------- */

/* -------------------------------- Shared type & UI ---------------------------------*/

.eyebrow {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #667085;
  padding-left: 10px;
}

.page-title {
  margin: 2px 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  padding-left: 10px;
}

.header-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #1f2937;
  font-size: 0.95rem;
  font-weight: 600;
}

.meta-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.12);
}

/* -------------------------------- Header helpers -----------------------------------*/

.card_header .content-page__header,
.content-header-card .content-page__header {
  gap: 10px 16px;
}

.card_header .eyebrow,
.card_header .page-title,
.content-header-card .eyebrow,
.content-header-card .page-title {
  padding-left: 0;
}

/* -------------------------------- Cards: surfaces ----------------------------------*/

.card_white {
  background: linear-gradient(180deg, #ffffff 0%, #fcfdfd 100%);
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-sm);
}

.card_gradient {
  padding: 18px 20px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(63, 143, 139, 0.05) 100%);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.card_header {
  padding: 18px 20px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(63, 143, 139, 0.06) 100%);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.card_dashboard {
  display: flex;
  padding: 16px 16px 10px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  width: 100%;
  min-height: 250px;
  min-width: 0;
}

/* ------------------------------- Cards: content helpers -----------------------------*/

.card_content {
  padding: 18px 20px;
}

.card_title {
  margin: 0 0 16px;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  color: #111827;
}

.card_text_block {
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.6;
}

.card_text_block p {
  margin: 0 0 8px;
}

.card_text_block p:last-child {
  margin-bottom: 0;
}

/* ------------------------------------ Inputs ---------------------------------------*/

.field_label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.2;
}

.input_field {
  appearance: none;
  box-sizing: border-box;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-height: 40px;
  font-size: 0.96rem;
  line-height: 1.2;
  background: var(--bg-surface-soft);
  background-clip: padding-box;
  color: var(--input-text);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.input_field::placeholder {
  color: var(--input-placeholder);
}

.input_field:focus {
  outline: 2px solid rgba(63, 143, 139, 0.14);
  border-color: var(--input-border-focus);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(63, 143, 139, 0.10);
}

.input_xs {
  width: 80px;
}

.input_s {
  width: 100px;
}

.input_m {
  width: 150px;
}

.input_l {
  width: 250px;
}

.input_xl {
  width: 400px;
}

.input_no_spin::-webkit-outer-spin-button,
.input_no_spin::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input_no_spin[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ----------------------------------- Dropdowns -------------------------------------*/

.dropdown_v3 {
  position: relative;
  width: fit-content;
  min-width: 0;
}

.dropdown_v3 summary {
  list-style: none;
}

.dropdown_v3 summary::-webkit-details-marker {
  display: none;
}

.dropdown_v3__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.dropdown_v3__trigger-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown_v3__trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--text-muted);
  transition: transform 140ms ease;
}

.dropdown_v3[open] .dropdown_v3__trigger-icon {
  transform: rotate(180deg);
}

.dropdown_v3 .dropdown-menu,
.dropdown_v3__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 40;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  margin-top: 0;
  padding: 6px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transform-origin: top center;
  pointer-events: none;
  transition: opacity 160ms ease, transform 180ms ease;
}

.dropdown_v3[open] .dropdown-menu,
.dropdown_v3[open] .dropdown_v3__menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown_v3 .dropdown-menu.show,
.dropdown_v3 .dropdown_v3__menu.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown_v3 .dropdown-item,
.dropdown_v3__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.dropdown_v3 .dropdown-item:hover,
.dropdown_v3 .dropdown-item:focus,
.dropdown_v3__item:hover,
.dropdown_v3__item:focus {
  background: var(--color-accent-softer);
  color: var(--text-primary);
}

.dropdown_v3 .dropdown-item > *,
.dropdown_v3__item > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon_action_menu {
  position: relative;
  width: auto;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.icon_action_menu .dropdown_v3__menu {
  position: fixed;
  top: var(--icon-action-menu-top, 0);
  left: var(--icon-action-menu-left, 0);
  width: auto;
  min-width: 164px;
  max-width: 200px;
  padding: 4px;
  border-color: rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  background: #ffffff;
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.10),
    0 2px 8px rgba(15, 23, 42, 0.06);
  z-index: 80;
}

.icon_action_menu__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  list-style: none;
  line-height: 0;
  cursor: pointer;
}

.icon_action_menu__trigger::-webkit-details-marker {
  display: none;
}

.icon_action_menu[open] {
  z-index: 81;
}

.icon_action_menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: var(--font-weight-medium);
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.icon_action_menu__item:hover,
.icon_action_menu__item:focus {
  background: rgba(148, 163, 184, 0.10);
  text-decoration: none;
}

.icon_action_menu__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.icon_action_menu__icon svg {
  width: 16px;
  height: 16px;
}

.icon_action_menu__item--print,
.icon_action_menu__item--print .icon_action_menu__icon {
  color: #4f8aa0;
}

.icon_action_menu__item--details,
.icon_action_menu__item--details .icon_action_menu__icon {
  color: #5f7ea6;
}

.icon_action_menu__item--delete,
.icon_action_menu__item--delete .icon_action_menu__icon {
  color: #b36a4a;
}

.icon_action_menu__item--delete:hover,
.icon_action_menu__item--delete:focus {
  background: rgba(179, 106, 74, 0.10);
  color: #a25739;
}

.icon_action_menu__item[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ------------------------------------ Tables ---------------------------------------*/

.table {
  --table-row-height: 42px;
  --table-row-border: rgba(207, 218, 207, 0.6);
  --table-row-stripe: rgba(31, 42, 36, 0.018);
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.4;
}

.table thead th {
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.03em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table thead th.sortable {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: color 120ms ease;
}

.table thead th.sortable:hover,
.table thead th.sortable:focus-within {
  color: var(--text-primary);
}

.table .sort-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.9rem;
  margin-left: 6px;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: var(--font-weight-medium);
  line-height: 1;
  opacity: 0.55;
  transition: color 120ms ease, opacity 120ms ease, transform 120ms ease;
}

.table thead th.sortable:hover .sort-icon,
.table thead th.sortable:focus-within .sort-icon {
  color: var(--text-secondary);
  opacity: 0.8;
}

.table thead th.sortable.is-sorted {
  color: var(--text-primary);
}

.table thead th.sortable.is-sorted .sort-icon {
  color: var(--color-accent-strong);
  opacity: 1;
}

.table tbody td {
  padding: 1px 0;
  height: var(--table-row-height);
  border-bottom: none;
  vertical-align: middle;
  overflow: hidden;
}

.table tbody tr:nth-child(even) td {
  background: var(--table-row-stripe);
}


.table th,
.table td {
  min-width: 0;
}

.table th + th,
.table td + td {
  padding-left: 16px;
}

.table_text_primary {
  color: var(--text-primary);
  font-weight: var(--font-weight-medium);
}

.table_text_meta {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.table_action {
  width: 100%;
  justify-content: flex-end;
  padding-right: 14px;
  transition: color 120ms ease;
}

.table_action[disabled] {
  color: var(--text-soft);
  cursor: not-allowed;
}

/* ------------------------------- Dashboard: layout ----------------------------------*/

.dashboard_cards_grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* ----------------------------- Dashboard: stat cards -------------------------------*/

.dashboard-card {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  justify-items: stretch;
  gap: 12px;
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
}

.dashboard-card__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  width: 100%;
  grid-row: 1;
}

.dashboard-card__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dashboard-card__action {
  width: 100%;
  grid-row: 3;
  align-self: end;
}

.dashboard-card__count {
  width: 108px;
  height: 108px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(63, 143, 139, 0.9) 0%, rgba(43, 95, 92, 0.95) 100%);
  color: #1f2937;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 108px;
  grid-row: 2;
  align-self: center;
  justify-self: center;
  position: relative;
  isolation: isolate;
}

.dashboard-card__count::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #ffffff;
  z-index: -1;
}

.card_dashboard .button {
  width: 100%;
}

/* -------------------------------- Segmented controls -------------------------------*/

.segmented-control {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  min-width: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.segmented-control__option {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  box-sizing: border-box;
  min-width: 0;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--button-secondary-border);
  background: var(--button-secondary-bg);
  color: var(--button-secondary-text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.segmented-control__option:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  border-right: none;
}

.segmented-control__option:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.segmented-control__option:hover,
.segmented-control__option:focus {
  background: var(--button-secondary-bg-hover);
  border-color: var(--button-secondary-border-hover);
  color: var(--button-secondary-text);
  text-decoration: none;
}

.segmented-control__option.is-active {
  background: var(--button-primary-bg);
  border-color: var(--button-primary-bg);
  color: var(--button-primary-text);
}

/* ---------------------------------- Changelog --------------------------------------*/

.changelog {
  --changelog-entry-gap: 60px;
  display: flex;
  flex-direction: column;
  gap: var(--changelog-entry-gap);
}

.changelog__entry {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.changelog__entry + .changelog__entry {
  position: relative;
}

.changelog__entry + .changelog__entry::before {
  content: "";
  position: absolute;
  top: calc(var(--changelog-entry-gap) / -2);
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(148, 163, 184, 0.22);
}

.changelog__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.changelog__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.changelog__version {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.changelog__date {
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.2;
}

.changelog__section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.changelog__section + .changelog__section {
  padding-top: 12px;
}

.changelog__section-title {
  margin: 0;
  color: rgba(31, 41, 55, 0.78);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.changelog__list {
  margin: 0;
  padding-left: 18px;
  color: #334155;
  font-size: 0.94rem;
  line-height: 1.55;
}

.changelog__list li + li {
  margin-top: 3px;
}

/* ----------------------------------- Buttons ---------------------------------------*/

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  min-width: 100px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.button_primary {
  background: var(--button-primary-bg);
  border: none;
  color: var(--button-primary-text);
  transform: none;
}

.button_primary:hover,
.button_primary:focus {
  background: var(--button-primary-bg-hover);
  color: var(--button-primary-text);
  transform: none;
}

.button_primary:active {
  background: var(--button-primary-bg-active);
  color: var(--button-primary-text);
  transform: none;
}

.button_secondary {
  background: var(--button-secondary-bg);
  border-color: var(--button-secondary-border);
  color: var(--button-secondary-text);
}

.button_secondary:hover,
.button_secondary:focus {
  background: var(--button-secondary-bg-hover);
  border-color: var(--button-secondary-border-hover);
  color: var(--button-secondary-text);
}

.button_danger {
  background: var(--button-danger-bg);
  border-color: var(--button-danger-border);
  color: var(--button-danger-text);
}

.button_danger:hover,
.button_danger:focus {
  background: var(--button-danger-bg-hover);
  border-color: var(--button-danger-border-hover);
  color: var(--button-danger-text-hover);
}

.button_text {
  min-height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--button-text-color);
}

.button_text:hover,
.button_text:focus {
  background: transparent;
  color: var(--button-text-color-hover);
}

.button_icon {
  min-width: 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border-color: transparent;
  color: var(--color-accent-strong);
}

.button_icon:hover,
.button_icon:focus {
  background: transparent;
  border-color: transparent;
  color: var(--color-accent-hover);
  box-shadow: none;
}

.button_icon svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.button_icon[disabled] {
  background: transparent;
  border-color: transparent;
  color: var(--text-soft);
  cursor: not-allowed;
}

.button,
a.button,
a.button:link,
a.button:visited,
a.button:hover,
a.button:focus {
  text-decoration: none;
}

/* -------------------------- Legacy compatibility bridge -----------------------------*/

.content-header-card {
  padding: 18px 20px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(63, 143, 139, 0.05) 100%);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

/* --------------------------------- Responsive --------------------------------------*/

.custom_date_selector--static {
  width: min(var(--icecream-selector-width), 100%);
}

.custom_date_selector--static .custom_date_selector__panel {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  min-height: var(--icecream-selector-box-min-height);
  box-sizing: border-box;
  border-radius: 8px;
}

.custom_date_selector--static .custom_date_selector__trigger {
  display: none;
}

@media (max-width: 900px) {
  .content-page__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .card_dashboard {
    min-height: 220px;
    padding: 14px 14px 10px;
  }

  .dashboard-card {
    justify-items: stretch;
    gap: 10px;
  }

  .dashboard-card__title {
    font-size: 0.88rem;
    line-height: 1.15;
  }

  .dashboard-card__count {
    width: 88px;
    height: 88px;
    font-size: 1.8rem;
    flex: 0 0 88px;
  }

  .dashboard-card__count::before {
    inset: 9px;
  }

  .content-page {
    padding-left: 5px;
    padding-right: 5px;
  }
}

/* ----------------------------- Responsive desktop+ ----------------------------------*/

@media (min-width: 901px) {
  .dashboard_cards_grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 200px));
    justify-content: start;
  }
}
