:root {
  --crm-bg: #f4f7fb;
  --crm-panel: #ffffff;
  --crm-border: #d7e2f0;
  --crm-ink: #1d2a39;
  --crm-muted: #607086;
  --crm-brand: #0f4c81;
  --crm-brand-2: #1a6fb3;
  --crm-brand-soft: #e7f1fb;
}

body {
  background: linear-gradient(180deg, #e7eff9 0%, var(--crm-bg) 280px);
  color: var(--crm-ink);
  font-size: 0.96rem;
  min-height: 100vh;
}

.auth-shell {
  min-height: 100vh;
  background: radial-gradient(circle at top right, rgba(15, 76, 129, 0.15), transparent 40%),
    radial-gradient(circle at 20% 20%, rgba(26, 111, 179, 0.18), transparent 40%),
    var(--crm-bg);
}

.auth-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-content {
  width: min(460px, 100%);
}

.login-card {
  background: #fff;
  border-radius: 1.2rem;
  box-shadow: 0 25px 65px rgba(10, 30, 60, 0.18);
  padding: 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.login-card__header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.login-card__logo {
  width: 48px;
  height: 48px;
  border-radius: 0.65rem;
  background: #0f4c81;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
}

.login-card__header h2 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
}

.login-card__header p {
  margin: 0;
  color: #5e6c84;
}

.login-card__form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.login-card__form label {
  font-weight: 600;
  font-size: 0.9rem;
}

.login-card__form input {
  border-radius: 0.65rem;
  border: 1px solid rgba(15, 76, 129, 0.3);
  padding: 0.85rem;
  font-size: 0.95rem;
}

.login-card__submit {
  border-radius: 0.75rem;
  padding: 0.9rem;
  font-weight: 600;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.login-card__submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(15, 76, 129, 0.35);
}

.login-card__footer a {
  color: #0f4c81;
  font-weight: 600;
  text-decoration: none;
}

.login-card__footer a:hover {
  text-decoration: underline;
}

.login-card__info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #5e6c84;
  text-align: center;
}

.crm-header {
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.crm-context-nav {
  background: #ffffff;
  border-top: 1px solid #d8e1ef;
  border-bottom: 1px solid #d8e1ef;
  box-shadow: 0 4px 14px rgba(16, 37, 67, 0.05);
}

.crm-brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
  color: var(--crm-ink);
}

.crm-topnav {
  gap: 0.35rem;
}

.crm-topnav .nav-link {
  color: #334155;
  border-radius: 0.6rem;
  font-weight: 600;
  padding: 0.55rem 0.95rem;
  white-space: nowrap;
}

.crm-topnav .nav-link.active,
.crm-topnav .nav-link:hover {
  background: var(--crm-brand-soft);
  color: var(--crm-brand);
}

.crm-page-head h3 {
  font-weight: 700;
}

.card,
.card-kpi {
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(10, 30, 60, 0.05);
}

.card .card-body {
  padding: 1.4rem;
}

.dashboard-hero {
  padding: 1.4rem 1.6rem;
  border-radius: 14px;
  border: 1px solid #bcd0e8;
  background: linear-gradient(120deg, rgba(15, 76, 129, 0.12), rgba(26, 111, 179, 0.06) 55%, rgba(255, 255, 255, 0.9));
}

.dashboard-hero h2 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
}

.dashboard-hero p {
  margin: 0.3rem 0 0;
  color: #4f5f76;
}

.dashboard-grid {
  display: grid;
  gap: 1rem;
}

.dashboard-grid--kpis {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.dashboard-grid--main {
  grid-template-columns: 1.1fr 0.9fr;
}

.card-kpi {
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  padding: 0.9rem 1rem;
}

.card-kpi__label {
  color: #5c6d84;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.card-kpi__value {
  margin-top: 0.4rem;
  color: #12263d;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
}

.dashboard-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dashboard-muted {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
}

.sales-funnel {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.sales-funnel__row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 2fr auto;
  gap: 0.75rem;
  align-items: center;
}

.sales-funnel__meta {
  display: flex;
  flex-direction: column;
}

.sales-funnel__stage {
  font-weight: 700;
  color: #233247;
}

.sales-funnel__amount {
  font-size: 0.86rem;
  color: #64748b;
}

.sales-funnel__track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e5edf8;
  overflow: hidden;
}

.sales-funnel__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f4c81, #1a6fb3);
  min-width: 6px;
}

.sales-funnel__percent {
  font-size: 0.82rem;
  font-weight: 700;
  color: #4f5f76;
}

.status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #d3e0f2;
  border-radius: 999px;
  padding: 0.38rem 0.72rem;
  background: #f8fbff;
  font-size: 0.88rem;
}

.status-chip strong {
  color: #0f4c81;
}

.dashboard-alerts {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dashboard-alerts__item {
  display: flex;
  justify-content: space-between;
  border: 1px solid #d8e4f4;
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  background: #fbfdff;
}

.dashboard-alerts__item span {
  color: #475569;
}

.dashboard-alerts__item strong {
  color: #0f4c81;
}

.password-layout {
  border-radius: 1rem;
  box-shadow: 0 14px 36px rgba(10, 30, 60, 0.11);
  border: 1px solid rgba(15, 76, 129, 0.16);
}

.password-layout__grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(240px, 0.9fr);
  gap: 1.5rem;
}

.password-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.password-form__actions {
  display: flex;
  gap: 0.6rem;
  padding-top: 0.4rem;
}

.password-rules {
  border-left: 1px solid #e0e8f4;
  padding-left: 1.2rem;
}

.password-rules h6 {
  margin: 0 0 0.4rem 0;
  font-weight: 700;
}

.password-rules p {
  color: #64748b;
  font-size: 0.86rem;
}

.password-rules__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.password-rule {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #516174;
  font-size: 0.92rem;
  font-weight: 600;
}

.password-rule i {
  color: #8ca1bb;
}

.password-rule.is-ok {
  color: #1f7a45;
}

.password-rule.is-ok i {
  color: #1f7a45;
}

.table thead th {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--crm-muted);
  background: #f8fbff;
}

.table td,
.table th {
  vertical-align: middle;
}

label,
.form-label {
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.45rem;
}

.form-control,
.form-select,
textarea,
.input-group-text {
  border-color: #c6d4e7;
  min-height: 44px;
  border-radius: 0.5rem;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
  border-color: var(--crm-brand-2);
  box-shadow: 0 0 0 0.25rem rgba(26, 111, 179, 0.15);
}

.row.g-3 {
  row-gap: 1.4rem !important;
}

.row.g-2 {
  row-gap: 1rem !important;
}

.btn {
  border-radius: 0.5rem;
}

.alert {
  border-radius: 10px;
}

.crm-global-bar {
  padding: 0.75rem 1.5rem;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--crm-border);
  position: relative;
}

.crm-logo {
  width: 40px;
  height: 40px;
}

.crm-brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--crm-ink);
}

.crm-brand-subtitle {
  font-size: 0.7rem;
  color: var(--crm-muted);
}

.crm-global-nav {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.crm-global-link {
  font-size: 0.85rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--crm-muted);
  font-weight: 600;
  background: rgba(15, 76, 129, 0.05);
}

.crm-global-link.active {
  background: var(--crm-brand);
  color: #fff;
  box-shadow: 0 8px 16px rgba(15, 76, 129, 0.25);
}

.crm-avatar {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 2px solid rgba(15, 76, 129, 0.3);
}

.rv-currency-field .input-group-text {
  min-width: 46px;
  justify-content: center;
  font-weight: 600;
}

.crm-user-info {
  display: flex;
  flex-direction: column;
  margin-left: 0.7rem;
}

.crm-user-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.crm-user-actions .dropdown {
  margin-left: 0;
}

.crm-user-actions {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
}

.crm-user-menu__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.crm-user-menu {
  min-width: 280px;
  padding: 0.75rem;
  border-radius: 0.9rem;
  border: 1px solid #cad8ea;
  box-shadow: 0 16px 32px rgba(10, 30, 60, 0.18);
}

.crm-user-menu__header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #e2ebf5;
  margin-bottom: 0.45rem;
}

.crm-user-menu__header .crm-avatar {
  width: 40px;
  height: 40px;
}

.crm-user-menu__links .dropdown-item {
  border-radius: 0.55rem;
  font-weight: 600;
}

.crm-user-menu__links .dropdown-item:hover {
  background: #edf4fd;
}

.crm-user-menu__links form {
  margin: 0;
}

.crm-menu-list {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}

.crm-menu-item {
  position: relative;
}

.crm-menu-link,
.crm-menu-toggle {
  color: #1f2d3d;
  font-weight: 600;
  text-decoration: none;
  padding: 0.35rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.crm-menu-link:hover,
.crm-menu-toggle:hover {
  color: #0e4b88;
}

.crm-menu-item.is-active > .crm-menu-link,
.crm-menu-item.is-active > .crm-menu-toggle,
.crm-menu-dropdown-link.is-active {
  color: #0e4b88;
}

.crm-menu-item.is-active > .crm-menu-link::after,
.crm-menu-item.is-active > .crm-menu-toggle::after {
  content: "";
  display: block;
  height: 3px;
  width: 100%;
  background: #0e4b88;
  border-radius: 10px;
  margin-top: 4px;
}

.crm-menu-has-dropdown .crm-menu-dropdown {
  position: absolute;
  top: 120%;
  left: 0;
  min-width: 200px;
  padding: 0.5rem 0;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(12, 40, 80, 0.15);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 20;
}

.crm-menu-has-dropdown:hover .crm-menu-dropdown,
.crm-menu-has-dropdown.is-active .crm-menu-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.crm-menu-dropdown-link {
  display: block;
  padding: 0.55rem 1rem;
  color: #1f2d3d;
  text-decoration: none;
  font-weight: 500;
}

.crm-menu-dropdown-link:hover {
  background: rgba(14, 75, 136, 0.08);
  color: #0e4b88;
}

.table-responsive,
.card {
  overflow: hidden;
}

.crm-table-card {
  overflow: visible;
}

.crm-row-actions .dropdown-menu {
  min-width: 170px;
  z-index: 1060;
}

.crm-action-btn {
  width: 34px;
  height: 30px;
  border-radius: 999px;
  padding: 0;
  border-color: #b8cae2;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  color: #355579;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(15, 47, 84, 0.12);
  transition: all 0.15s ease;
}

.crm-action-btn .bi-caret-down-fill {
  font-size: 0.62rem;
  opacity: 0.95;
}

.crm-action-btn:hover,
.crm-action-btn:focus {
  border-color: #8fb1da;
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  color: #1f4675;
  box-shadow: 0 4px 12px rgba(14, 75, 136, 0.18);
}

.crm-action-menu {
  border-radius: 0.6rem;
  border: 1px solid #c7d6eb;
  box-shadow: 0 8px 24px rgba(10, 30, 60, 0.16);
  padding: 0.3rem;
}

.crm-action-menu .dropdown-item {
  border-radius: 0.45rem;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.5rem 0.6rem;
}

.crm-action-menu .dropdown-item:hover {
  background: #dce9fb;
  color: #14365f;
}

.crm-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.crm-table-toolbar__meta {
  color: #576a80;
  font-size: 0.9rem;
}

.crm-table-toolbar__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.crm-table-toolbar__search {
  margin: 0;
}

.crm-compact-search {
  width: 240px;
  height: 34px;
  border: 1px solid #b8cae2;
  border-radius: 0.6rem;
  background: #fff;
  display: inline-flex;
  align-items: center;
  padding: 0 0.5rem;
  gap: 0.4rem;
}

.crm-compact-search .bi-search {
  color: #5f7390;
}

.crm-compact-search__input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0;
  line-height: 1.2;
  font-size: 0.92rem;
}

.crm-compact-search:focus-within {
  border-color: #8fb1da;
  box-shadow: 0 0 0 2px rgba(47, 95, 175, 0.12);
}

.crm-compact-search__clear {
  color: #2f5faf;
  display: inline-flex;
  align-items: center;
}

.crm-compact-search__clear:hover {
  color: #1f4675;
}

.crm-toolbar-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #b8cae2;
  background: #fff;
  color: #2f5581;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.crm-toolbar-icon-btn:hover,
.crm-toolbar-icon-btn:focus {
  border-color: #8fb1da;
  background: #eef5ff;
  color: #1f4675;
}

.leads-filter-panel {
  width: min(440px, 92vw) !important;
}

.leads-filter-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.leads-filter-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding-top: 0.4rem;
}

.field-validation-error,
.validation-summary-errors {
  color: #b91c1c;
  font-size: 0.9rem;
  font-weight: 600;
}

.input-validation-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 0.25rem rgba(239, 68, 68, 0.12) !important;
}

@media (max-width: 992px) {
  .crm-user-actions {
    right: 0.6rem;
  }

  .dashboard-grid--main {
    grid-template-columns: 1fr;
  }

  .sales-funnel__row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .sales-funnel__percent {
    justify-self: start;
  }

  .password-form__actions {
    flex-direction: column;
  }

  .password-layout__grid {
    grid-template-columns: 1fr;
  }

  .password-rules {
    border-left: 0;
    border-top: 1px solid #e0e8f4;
    padding-left: 0;
    padding-top: 1rem;
  }

  .crm-topnav {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  main.container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}
.crm-bottom-nav {
  width: 100%;
  padding: 0.8rem 2rem;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(10, 30, 60, 0.08);
  border-top: 1px solid rgba(15, 76, 129, 0.12);
  position: sticky;
  bottom: 0;
  left: 0;
  z-index: 1020;
}

.crm-bottom-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
}

.crm-bottom-nav__link {
  color: #1f2d3d;
  font-weight: 600;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  transition: background 120ms ease, border 120ms ease;
}

.crm-bottom-nav__link:hover {
  background: rgba(15, 76, 129, 0.08);
  border-color: rgba(15, 76, 129, 0.25);
}

.crm-bottom-nav__link.is-active {
  background: #0f4c81;
  border-color: #0f4c81;
  color: #fff;
}

.rv-header {
  border: 1px solid #c8d7ec;
  background: linear-gradient(180deg, #ffffff, #f6faff);
}

.rv-header__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.rv-header-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem 1.2rem;
  margin-top: 0.35rem;
}

.rv-header-meta__item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.rv-header-meta__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5d6f85;
  font-weight: 700;
}

.rv-header-meta__value {
  font-size: 0.95rem;
  color: #1c2f45;
  font-weight: 600;
}

.rv-header-meta__link {
  color: #1d7fe6;
}

.rv-action-bar .btn {
  min-width: 110px;
}

.rv-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.rv-section-card {
  border: 1px solid #d4e0f1;
}

.rv-section-card__header {
  font-weight: 700;
  color: #17324d;
  margin-bottom: 0.8rem;
}

.rv-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1rem;
}

.rv-field {
  border-top: 1px solid #edf2fa;
  padding-top: 0.55rem;
}

.rv-field__label {
  font-size: 0.78rem;
  color: #5d6f85;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rv-field__value {
  margin-top: 0.2rem;
  color: #1c2f45;
  font-weight: 500;
  word-break: break-word;
}

.rv-related-list__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.rv-related-list__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rv-related-list__toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.rv-related-list__tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.rv-related-list__tools .crm-compact-search {
  min-width: 240px;
}

.rv-table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #53677f;
}

.rv-modal {
  border: 1px solid #c9d8ec;
  border-radius: 14px;
}

.rv-lookup-results {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  border: 1px solid #cfdced;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 37, 67, 0.14);
  overflow: hidden;
  max-height: 240px;
  overflow-y: auto;
}

.rv-lookup-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf3fc;
  background: #fff;
  text-align: left;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.rv-lookup-item:hover {
  background: #f4f8ff;
}

.rv-lookup-item small {
  color: #5c7089;
}

.rv-lookup-field {
  position: relative;
  z-index: 50;
}

.rv-lookup-field .rv-lookup-results {
  width: 100%;
  margin-top: 0.5rem;
}

.rv-lookup-field .form-control {
  padding-right: 2.5rem;
}

.rv-required-asterisk {
  color: #d1242f;
  margin-right: 0.2rem;
  font-weight: 700;
}

.rv-field-error {
  color: #d1242f;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.rv-input-invalid {
  border-color: #d1242f;
  box-shadow: 0 0 0 0.2rem rgba(209, 36, 47, 0.15);
  background-color: #fde9ed;
  padding-left: 2.2rem;
  background-repeat: no-repeat;
  background-position: 0.7rem center;
  background-size: 1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='8' fill='%23fff5f7' stroke='%23d1242f' stroke-width='2'/%3E%3Cpath d='M6 10h8' stroke='%23d1242f' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.rv-lookup-field::after {
  content: "";
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none;
}

.rv-edit-section .row {
  margin-top: 0.35rem;
}

.rv-edit-section .row + .row {
  margin-top: 0.85rem;
}

@media (max-width: 768px) {
  .rv-header__top {
    flex-direction: column;
  }

  .rv-field-grid {
    grid-template-columns: 1fr;
  }

  .rv-header-meta {
    grid-template-columns: 1fr 1fr;
  }
}

.rv-edit-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rv-edit-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 1.5rem;
}

.rv-edit-card {
  border: 1px solid #dfe7f5;
  border-radius: 10px;
}

.rv-edit-tasks-panel {
  align-self: start;
  border: 1px solid #dfe7f5;
  border-radius: 10px;
}

.rv-edit-tasks-panel .card-body {
  padding: 1rem;
}

.rv-edit-related-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.rv-edit-related-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.rv-edit-section {
  border: 1px solid #dfe7f5;
  border-radius: 10px;
  overflow: visible;
}

.rv-edit-section__title {
  font-weight: 700;
  color: #0f4c81;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.rv-edit-related-list {
  display: grid;
  gap: 0.75rem;
}

.rv-edit-related-item {
  border: 1px solid #e2ebf7;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(16, 37, 67, 0.08);
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.rv-edit-related-item:hover {
  border-color: #bcd1ee;
  box-shadow: 0 10px 18px rgba(16, 37, 67, 0.12);
  transform: translateY(-1px);
}

.rv-edit-related-item:focus-visible {
  outline: 2px solid rgba(29, 127, 230, 0.45);
  outline-offset: 2px;
}

.rv-edit-related-line {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.rv-edit-related-status {
  width: 8px;
  min-height: 52px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1d7fe6, #0f4c81);
}

.rv-edit-related-body {
  flex: 1;
  min-width: 0;
}

.rv-edit-related-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.rv-edit-related-title {
  font-weight: 600;
  color: #1c2f45;
  margin-bottom: 0;
}

.rv-edit-related-date {
  color: #4b5f78;
  font-size: 0.8rem;
  white-space: nowrap;
}

.rv-edit-related-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: #5d6f85;
  font-size: 0.85rem;
}

.rv-edit-related-chip {
  background: #edf3ff;
  color: #123a6b;
  border: 1px solid #cfdced;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-weight: 600;
}

.rv-edit-related-empty {
  padding: 0.35rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rv-edit-related-link {
  width: 100%;
  text-align: center;
  margin-top: 0.6rem;
}

.rv-calendar-modal {
  border-radius: 16px;
}

.rv-calendar-modal .modal-body {
  display: flex;
  flex-direction: column;
  min-height: 70vh;
}
.rv-calendar-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.rv-calendar-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rv-calendar-title {
  font-weight: 700;
  color: #1c2f45;
  margin-left: 0.5rem;
  text-transform: capitalize;
}

.rv-calendar-view {
  display: flex;
  gap: 0.5rem;
}

.rv-calendar-body {
  flex: 1;
  min-height: 60vh;
}

.rv-calendar-grid {
  display: grid;
  gap: 0.6rem;
}

.rv-calendar-grid--month {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.rv-calendar-grid--week {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  height: 100%;
  min-height: 60vh;
}

.rv-calendar-dayhead {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5d6f85;
  font-weight: 700;
}

.rv-calendar-cell {
  border: 1px solid #e1ebf6;
  border-radius: 12px;
  padding: 0.5rem;
  min-height: 120px;
  background: #ffffff;
  cursor: pointer;
}

.rv-calendar-cell.is-muted {
  background: #f6f8fc;
  color: #9aa7b8;
}

.rv-calendar-cell--week {
  height: 100%;
  min-height: 100%;
}

.rv-calendar-cell--day {
  min-height: 360px;
}

.rv-calendar-date {
  font-weight: 700;
  color: #1c2f45;
  margin-bottom: 0.25rem;
}

.rv-calendar-weekday {
  font-weight: 700;
  color: #1c2f45;
  margin-bottom: 0.4rem;
}

.rv-calendar-cell--week {
  background: #f9fbff;
  border: 1px solid #dbe7f6;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.rv-calendar-weekday {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: flex-start;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed #d6e1f2;
}

.rv-calendar-weekday__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7f97;
}

.rv-calendar-weekday__date {
  font-size: 1.1rem;
  font-weight: 700;
  color: #123a6b;
  background: #e8f1ff;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
}

.rv-calendar-cell--week .rv-calendar-items {
  margin-top: 0.45rem;
}

.rv-calendar-items {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rv-calendar-item {
  border: 1px solid #cfe0f5;
  border-radius: 10px;
  padding: 0.35rem 0.5rem;
  background: #f3f8ff;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.rv-calendar-item__title {
  font-weight: 600;
  color: #163d72;
  font-size: 0.9rem;
}

.rv-calendar-item__meta {
  font-size: 0.75rem;
  color: #5b6f86;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rv-task-link {
  font-weight: 600;
  text-decoration: none;
}

.rv-task-link:hover {
  text-decoration: underline;
}

.rv-icon-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.rv-calendar-empty {
  color: #5d6f85;
  font-size: 0.9rem;
}

.rv-calendar-day-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}

.rv-calendar-time-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 0.75rem;
  align-items: flex-start;
  border: 1px solid #e1ebf6;
  border-radius: 10px;
  padding: 0.45rem 0.5rem;
  background: #ffffff;
  cursor: pointer;
}

.rv-calendar-time-label {
  font-weight: 600;
  color: #4b5f78;
  font-size: 0.85rem;
}

.rv-calendar-time-slot {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

@media (max-width: 992px) {
  .rv-edit-wrapper {
    grid-template-columns: 1fr;
  }
  .rv-edit-actions-floating {
    width: calc(100% - 2rem);
  }
}

.rv-edit-actions-floating {
  position: fixed;
  bottom: 0.75rem;
  margin-top: 0;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 76, 129, 0.18);
  border-radius: 10px;
  box-shadow: 0 12px 22px rgba(16, 37, 67, 0.16);
  z-index: 1060;
}

.rv-edit-actions-floating.is-hidden {
  display: none;
}

.rv-edit-actions-floating {
  --rv-edit-bar-left: 0px;
  --rv-edit-bar-width: 100%;
  left: var(--rv-edit-bar-left);
  width: var(--rv-edit-bar-width);
}

.modal-footer {
  justify-content: center;
  gap: 0.75rem;
}

.rv-edit-form {
  padding-bottom: 1rem;
}

.rv-edit-section .card-body {
  overflow: visible;
}
