:root {
  /* Luxury neutral palette - sophisticated & modern */
  --bg: #f8f9fa;
  --bg-card: #ffffff;
  --bg-hover: #f1f3f4;
  --bg-secondary: #f1f3f4;
  --surface: #ffffff;
  --accent: #2563eb;
  --accent-dim: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --primary: #2563eb;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --error: #dc2626;
  --success: #059669;
  --warning: #d97706;
  --btn-on-accent: #fff;
  /* Chat luxury theme - refined */
  --chat-bg: #fafbfc;
  --chat-sidebar: #f3f4f6;
  --chat-sidebar-header: linear-gradient(165deg, #1e3a5f 0%, #0f172a 100%);
  --chat-accent: #3b82f6;
  --chat-accent-soft: rgba(59, 130, 246, 0.1);
  --chat-text: #1f2937;
  --chat-text-muted: #6b7280;
  --chat-border: rgba(59, 130, 246, 0.15);
  --chat-shadow: 0 1px 3px rgba(0,0,0,0.06);
  --chat-shadow-soft: 0 4px 12px rgba(0,0,0,0.08);
  /* Tasks - elegant accents */
  --task-accent: #1e40af;
  --task-accent-hover: #1e3a8a;
  --task-gold: #b45309;
  --task-gold-soft: rgba(180, 83, 9, 0.12);
  --task-overdue: #dc2626;
  --task-today: #ea580c;
  /* Settings - premium feel */
  --settings-card: #ffffff;
  --settings-border: #e5e7eb;
  --settings-accent: #3b82f6;
}

/* ???? ???? ???? ?????? ???? (~14px ????? 16px) ? ?? ??rem ?????? ???? */
html {
  font-size: 87.5%;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Heebo', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

/* Login */
#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg) 0%, #d4ebe6 100%);
}

.login-card {
  background: var(--bg-card);
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.login-public-home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.login-public-home-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(13, 148, 136, 0.06);
}

.logo {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.logo-dot {
  color: var(--accent);
}

/* Flux.il official brand ? do not alter colors or structure */
:root {
  --flux-brand-blue: #4a9fe8;
  --flux-brand-black: #000000;
}

.flux-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  direction: ltr;
  unicode-bidi: isolate;
  text-decoration: none;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--flux-brand-black);
}

.flux-brand-text {
  font-size: 1em;
  color: var(--flux-brand-black);
  font-weight: 700;
}

.flux-brand-tld {
  color: var(--flux-brand-blue);
  font-weight: 700;
}

.flux-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.72em;
  height: 1.72em;
  border-radius: 0.34em;
  background: var(--flux-brand-blue);
  color: #ffffff;
  font-size: 0.76em;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(74, 159, 232, 0.32);
}

.flux-brand--lg {
  font-size: 1.55rem;
}

.flux-brand--sm {
  font-size: 0.95rem;
}

.flux-brand--xl {
  font-size: 2.15rem;
}

/* On dark backgrounds ? logo colors only, no white pad */
.flux-brand--on-dark .flux-brand-text {
  color: #f8fafc;
}

.flux-brand--on-dark .flux-brand-tld {
  color: var(--flux-brand-blue);
}

.tagline {
  color: var(--text-muted);
  margin: 0.5rem 0 2rem;
  font-size: 0.95rem;
}

#login-form input {
  width: 100%;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}
#login-form input:focus {
  outline: none;
  border-color: var(--accent);
}

#login-form button {
  width: 100%;
  padding: 0.9rem;
  margin-top: 0.5rem;
  background: var(--accent);
  color: var(--btn-on-accent);
  border: none;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
#login-form button:hover {
  background: var(--accent-dim);
}

.error-msg {
  color: var(--error);
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Dashboard */
#dashboard-screen {
  height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 1rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 100;
  gap: 0.5rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.header-history-btns {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin-inline-start: 0.15rem;
}
.header-history-btn {
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-history-btn:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--accent);
  border-color: var(--accent-soft);
}
.header-history-btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.header-center-cluster {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  direction: rtl;
}
.header-search-block {
  position: relative;
  flex: 0 1 20rem;
  max-width: 26rem;
  min-width: 8rem;
}
.global-search-input {
  width: 100%;
  padding: 0.38rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 0.82rem;
  background: var(--bg);
}
.global-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.global-search-dropdown {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  max-height: min(70vh, 420px);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--chat-shadow-soft);
  z-index: 250;
}
.global-search-dropdown.hidden {
  display: none !important;
}
.global-search-section {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
}
.global-search-section:last-child {
  border-bottom: none;
}
.global-search-section-title {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  padding: 0.2rem 0.65rem;
}
.global-search-row {
  display: block;
  width: 100%;
  text-align: right;
  padding: 0.42rem 0.65rem;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--text);
}
.global-search-row:hover {
  background: var(--bg-hover);
}
.global-search-row small {
  display: block;
  color: var(--text-muted);
  font-size: 0.74rem;
  margin-top: 0.12rem;
}

.header-recent-wrap {
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(38vw, 480px);
  border: none;
  box-shadow: none;
  background: transparent;
  outline: none;
}
.header-recent-strip {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  overflow-y: visible;
  padding: 0.25rem 0 0.35rem;
  padding-inline-start: 0.1rem;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  min-height: 3.65rem;
}
.header-recent-strip::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.header-recent-strip:focus,
.header-recent-strip:focus-visible {
  outline: none;
}

@keyframes header-recent-card-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.94);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.header-recent-card {
  position: relative;
  flex: 0 0 auto;
  width: 7.85rem;
  min-width: 7.85rem;
  min-height: 3.35rem;
  padding: 0.5rem 0.55rem;
  margin: 0;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-align: right;
  font: inherit;
  color: var(--text);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 248, 250, 0.96) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 2px 6px rgba(15, 35, 40, 0.07),
    0 12px 26px rgba(15, 35, 40, 0.09);
  border: none;
  outline: none;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.32s ease,
    filter 0.25s ease;
  animation: header-recent-card-enter 0.52s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(var(--recent-i, 0) * 0.055s);
}
.header-recent-card:not(:first-child) {
  margin-inline-start: -2.55rem;
}
.header-recent-card:hover {
  transform: translateY(-5px) scale(1.04);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 4px 12px rgba(0, 120, 95, 0.12),
    0 18px 40px rgba(15, 35, 40, 0.16);
  z-index: 80 !important;
  filter: saturate(1.05);
}
.header-recent-card:active {
  transform: translateY(-2px) scale(1.01);
  transition-duration: 0.12s;
}
.header-recent-card:focus {
  outline: none;
}
.header-recent-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  z-index: 85 !important;
}

.header-recent-card-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  font-size: 0.74rem;
  line-height: 1.42;
  font-weight: 500;
  text-align: right;
}
.header-recent-card-type {
  font-weight: 700;
  font-size: 0.66rem;
  color: var(--accent, #0d9488);
  letter-spacing: 0.02em;
}
.header-recent-card-sep {
  margin: 0 0.12rem;
  color: var(--text-muted);
  font-weight: 400;
  opacity: 0.75;
}
.header-recent-card-label {
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  .header-recent-card {
    animation: none;
  }
  .header-recent-card:hover {
    transform: none;
  }
}

@media (max-width: 720px) {
  .header-recent-card {
    width: 6.6rem;
    min-width: 6.6rem;
    min-height: 3.05rem;
    padding: 0.42rem 0.45rem;
  }
  .header-recent-card:not(:first-child) {
    margin-inline-start: -2.05rem;
  }
  .header-recent-card-text {
    font-size: 0.68rem;
    line-height: 1.38;
  }
}

.header-recent-empty {
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 0.35rem 0.35rem;
  white-space: nowrap;
}

.header .logo-area .logo {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-agency-logo {
  height: 28px;
  width: auto;
  max-width: 86px;
  object-fit: contain;
  border-radius: 5px;
  cursor: pointer;
  vertical-align: middle;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.header-agency-logo:hover {
  opacity: 0.88;
  transform: scale(1.03);
}

/* ????? ???? ?????? ????? ??? */
.agency-logo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.agency-logo-lightbox.hidden {
  display: none !important;
}
.agency-logo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(15, 23, 42, 0.82);
  cursor: pointer;
}
.agency-logo-lightbox-content {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 960px);
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.agency-logo-lightbox-content .agency-logo-lightbox-close {
  pointer-events: auto;
}
.agency-logo-lightbox-img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  background: #fff;
  padding: 0.5rem;
  pointer-events: none;
}
.agency-logo-lightbox-close {
  position: absolute;
  top: -0.35rem;
  inset-inline-end: -0.35rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 2;
}
.agency-logo-lightbox-close:hover {
  background: var(--bg-hover);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.notifications-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.whatsapp-pending-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  min-height: 22px;
  padding: 0 0.35rem 0 0.15rem;
  border-radius: 999px;
  background: #128c7e;
  color: #fff;
  font-weight: 600;
  font-size: 0.72rem;
  cursor: pointer;
  vertical-align: middle;
}
.whatsapp-pending-wrap:focus-visible {
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: 2px;
}
.whatsapp-pending-icon {
  flex-shrink: 0;
  display: block;
  opacity: 0.98;
}
.whatsapp-pending-count {
  min-width: 1em;
  padding: 0 0.15rem 0 0;
  line-height: 1.2;
  text-align: center;
}
.whatsapp-bot-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}
.whatsapp-bot-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  min-width: 120px;
}
.whatsapp-bot-stat strong {
  display: block;
  font-size: 1.25rem;
  color: var(--accent);
}
.whatsapp-bot-card {
  margin-bottom: 1rem;
}
.wa-bot-inbox-cta {
  border-inline-end: 4px solid #128c7e;
}
.wa-textarea {
  width: 100%;
  margin: 0.35rem 0 0.75rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  resize: vertical;
}
.wa-textarea.wa-json {
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
}
/* ?? ????? ???? ?????? (????? ????? ????????) ?? */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
#whatsapp-page.page-content {
  padding-inline: 0.35rem;
}
.wa-page-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 0.25rem;
  padding-inline: 0.15rem;
}
.wa-page-heading h1 {
  margin: 0;
  flex: 1 1 auto;
}
.wa-page-hint {
  flex: 1 1 220px;
  margin: 0;
}
.wa-heading-settings-btn {
  align-self: center;
}
.wa-shell {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) minmax(200px, 232px);
  gap: 0 0.75rem;
  min-height: min(76vh, 780px);
  max-height: calc(100vh - 200px);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  margin: 1rem 0.85rem 1.1rem;
}
@media (max-width: 1100px) {
  .wa-shell {
    grid-template-columns: 1fr;
    gap: 0.5rem 0;
    max-height: none;
    min-height: auto;
  }
  .wa-sidebar {
    max-height: 42vh;
    border-inline-end: none;
    border-bottom: 1px solid var(--border);
  }
  .wa-crm-column {
    border-inline-start: none;
    border-top: 1px solid var(--border);
    max-height: none;
  }
  .wa-chat-panel {
    min-height: 45vh;
  }
}
.wa-sidebar {
  display: flex;
  flex-direction: column;
  border-inline-end: 1px solid rgba(0, 0, 0, 0.06);
  background: #d1d7db;
  min-height: 0;
}
.wa-sidebar-toolbar-wrap {
  flex-shrink: 0;
  padding: 0.65rem 0.65rem 0.5rem;
  position: relative;
  z-index: 4;
}
.wa-sidebar-toolbar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.wa-inbox-toolbar-card {
  background: #fff;
  border-radius: 12px;
  padding: 0.55rem 0.6rem 0.65rem;
  box-shadow: 0 1px 3px rgba(11, 20, 26, 0.12);
  border: 1px solid rgba(11, 20, 26, 0.08);
}
.wa-inbox-toolbar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.wa-inbox-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111b21;
  letter-spacing: -0.02em;
}
.wa-inbox-icon-actions {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.wa-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #54656f;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.wa-icon-btn:hover {
  background: rgba(11, 20, 26, 0.06);
  color: #111b21;
}
.wa-icon-btn:focus-visible {
  outline: 2px solid #00a884;
  outline-offset: 2px;
}
.wa-icon-svg {
  flex-shrink: 0;
}
.wa-archive-toggle-btn[aria-expanded='true'] {
  background: rgba(11, 20, 26, 0.08);
  color: #111b21;
}
.wa-archive-toggle-btn.wa-archive-toggle-on {
  background: rgba(0, 168, 132, 0.14);
  color: #017561;
}
.wa-sidebar.wa-sidebar-archive-active .wa-inbox-toolbar-card {
  box-shadow: 0 0 0 2px rgba(0, 168, 132, 0.35);
}
.wa-inbox-search-wrap {
  position: relative;
  margin-bottom: 0.5rem;
}
.wa-inbox-search-input {
  width: 100%;
  margin: 0;
  padding: 0.48rem 0.55rem;
  padding-inline-start: 2rem;
  padding-inline-end: 2.15rem;
  font-size: 0.88rem;
  border-radius: 10px;
  border: 1px solid #e9edef;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%238696a0' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='5'/%3E%3Cpath d='M12 12l3.5 3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 17px 17px;
  background-position: left 0.42rem center;
  color: #111b21;
  box-sizing: border-box;
}
.wa-inbox-search-input::placeholder {
  color: #8696a0;
  font-size: 0.82rem;
}
.wa-inbox-search-input:focus {
  outline: none;
  border-color: #00a884;
  box-shadow: 0 0 0 2px rgba(0, 168, 132, 0.18);
}
.wa-inbox-search-clear {
  position: absolute;
  inset-inline-start: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(11, 20, 26, 0.06);
  color: #54656f;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wa-inbox-search-clear:hover {
  background: rgba(11, 20, 26, 0.12);
  color: #111b21;
}
.wa-inbox-filter-select {
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.55rem;
  font-size: 0.88rem;
  border-radius: 8px;
  border: 1px solid #e9edef;
  background: #f8f9fa;
  color: #111b21;
  cursor: pointer;
}
.wa-inbox-filter-select:focus {
  outline: none;
  border-color: #00a884;
  box-shadow: 0 0 0 2px rgba(0, 168, 132, 0.2);
}
.wa-inbox-filter-select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.wa-archive-panel {
  position: absolute;
  inset-inline: 0.65rem;
  top: calc(100% + 4px);
  z-index: 20;
  animation: wa-archive-pop 0.18s ease-out;
}
@keyframes wa-archive-pop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.wa-archive-panel.hidden {
  display: none !important;
  animation: none;
}
.wa-inbox-archive-block {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(11, 20, 26, 0.1);
  box-shadow: 0 8px 28px rgba(11, 20, 26, 0.18);
}
.wa-archive-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #667781;
  margin-bottom: 0.25rem;
}
.wa-archive-hint {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #54656f;
}
.wa-archive-presets {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}
.wa-chip-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid #e9edef;
  background: #f8f9fa;
  color: #111b21;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  box-sizing: border-box;
  text-align: center;
}
.wa-chip-btn:hover {
  background: #e8f7f3;
  border-color: #00a884;
}
.wa-chip-btn.active,
.wa-chip-btn[aria-pressed='true'] {
  background: #e8f7f3;
  border-color: #00a884;
  color: #008f6f;
}
.wa-archive-range-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.wa-archive-date-input {
  flex: 1 1 108px;
  min-width: 0;
  padding: 0.4rem 0.45rem;
  font-size: 0.82rem;
  border-radius: 8px;
  border: 1px solid #e9edef;
  background: #fff;
}
.wa-archive-apply-full {
  flex: 1 1 100%;
  margin-top: 0.15rem;
}
.wa-archive-dash {
  font-size: 0.78rem;
  color: #667781;
}
.wa-archive-clear {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 0.5rem;
  padding: 0;
}
.wa-chat-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 0.35rem 0.55rem 0.65rem;
  background: #d1d7db;
}
.wa-chat-list-loading {
  margin: 1rem;
}
.wa-chat-list .wa-inbox-empty-msg,
.wa-chat-list .wa-chat-list-loading,
.wa-chat-list > .error-msg {
  margin: 0.5rem 0.15rem 0.35rem;
  padding: 1rem 0.85rem;
  text-align: center;
  border-radius: 12px;
  background: #fff;
  border: 1px dashed rgba(11, 20, 26, 0.12);
  color: #54656f;
  font-size: 0.88rem;
  line-height: 1.45;
}
.wa-chat-list > .error-msg {
  border-style: solid;
  border-color: rgba(220, 53, 69, 0.35);
  color: #842029;
}
.wa-chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #e4ddd5;
  position: relative;
}
.wa-chat-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f2f5;
  color: var(--text-muted);
  padding: 2rem;
}
.wa-chat-placeholder-inner {
  text-align: center;
  max-width: 300px;
}
.wa-chat-placeholder-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.75rem;
  opacity: 0.45;
}
.wa-chat-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.wa-chat-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: #075e54;
  color: #fff;
}
.wa-chat-header-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.wa-chat-header-titles {
  min-width: 0;
  flex: 1;
}
.wa-title-as-btn {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: underline;
  text-align: start;
  padding: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-title-as-btn:hover {
  opacity: 0.92;
}
.wa-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.wa-chat-header-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-chat-header-meta {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-chat-header-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.wa-chat-header-tools .btn-sm {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
}
.wa-closed-banner {
  flex-shrink: 0;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  line-height: 1.4;
  background: linear-gradient(90deg, #fff8e6 0%, #fff3cc 100%);
  color: #5c4a00;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-align: center;
}
.wa-external-app-link {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
  white-space: nowrap;
}
.wa-external-app-link:hover {
  color: #fff;
}
.wa-external-app-link.hidden {
  display: none;
}
.wa-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem 0.5rem;
  background-color: #e5ddd5;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(0, 0, 0, 0.02) 0,
    rgba(0, 0, 0, 0.02) 2px,
    transparent 2px,
    transparent 10px
  );
  min-height: 200px;
}
.wa-msg-row {
  display: flex;
  margin-bottom: 0.35rem;
  width: 100%;
}
.wa-msg-row-in {
  justify-content: flex-start;
}
.wa-msg-row-out {
  justify-content: flex-end;
}
.wa-msg-row-system {
  justify-content: center;
}
.wa-system-banner {
  max-width: 92%;
  margin: 0.25rem 0 0.5rem;
  padding: 0.55rem 0.85rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 168, 132, 0.38);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  text-align: center;
}
.wa-system-banner-text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #1e2628;
}
.wa-system-banner-time {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: #667781;
}
.wa-transfer-open-btn {
  width: 100%;
  margin-top: 0.35rem;
}
.wa-transfer-hint {
  margin-top: 0.25rem;
  margin-bottom: 0;
}

/* ????? ????? ? ???? ?? ??? ?? ?????? (?? ???? ???? ??????) */
.wa-transfer-float {
  position: fixed;
  inset: 0;
  z-index: 10070;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4.5rem 1rem 2rem;
  box-sizing: border-box;
}
.wa-transfer-float-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 28, 32, 0.42);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
  cursor: pointer;
}
.wa-transfer-float-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 1.35rem 1.35rem 1.15rem;
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 251, 248, 0.97) 100%);
  border: 1px solid rgba(0, 168, 132, 0.22);
  box-shadow:
    0 4px 6px rgba(0, 80, 60, 0.04),
    0 22px 50px rgba(0, 40, 35, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.75) inset;
  animation: wa-transfer-float-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes wa-transfer-float-in {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.wa-transfer-float-accent {
  position: absolute;
  top: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 3px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(90deg, #00a884 0%, #25d366 45%, #128c7e 100%);
  opacity: 0.92;
}
.wa-transfer-float-x {
  position: absolute;
  top: 0.65rem;
  inset-inline-start: 0.65rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.wa-transfer-float-x:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text);
}
.wa-transfer-float-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background: linear-gradient(145deg, #e8f8f1 0%, #d4f0e6 100%);
  color: #128c7e;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.65rem;
  box-shadow: 0 2px 8px rgba(0, 140, 110, 0.12);
}
.wa-transfer-float-title {
  margin: 0 0 0.85rem;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  letter-spacing: -0.02em;
}
.wa-transfer-float-context {
  margin-bottom: 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: rgba(0, 120, 95, 0.06);
  border: 1px solid rgba(0, 168, 132, 0.12);
}
.wa-transfer-float-dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.wa-transfer-float-dl-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.5rem 0.75rem;
  align-items: baseline;
  font-size: 0.86rem;
}
.wa-transfer-float-dl-row dt {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
}
.wa-transfer-float-dl-row dd {
  margin: 0;
  color: var(--text);
  font-weight: 500;
  word-break: break-word;
}
.wa-transfer-float-mono {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.wa-transfer-float-lead {
  margin: 0 0 1rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-muted);
  text-align: center;
}
.wa-transfer-float-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.wa-transfer-float-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(0, 168, 132, 0.28);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  box-shadow: 0 1px 2px rgba(0, 60, 45, 0.05);
}
.wa-transfer-float-select:focus {
  outline: none;
  border-color: #00a884;
  box-shadow: 0 0 0 3px rgba(0, 168, 132, 0.18);
}
.wa-transfer-float-actions {
  display: flex;
  flex-direction: row-reverse;
  gap: 0.6rem;
  margin-top: 0.15rem;
}
.wa-transfer-float-btn {
  flex: 1;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s;
}
.wa-transfer-float-btn:active {
  transform: scale(0.98);
}
.wa-transfer-float-btn-ghost {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.wa-transfer-float-btn-ghost:hover {
  background: rgba(0, 0, 0, 0.07);
  color: var(--text);
}
.wa-transfer-float-btn-primary {
  background: linear-gradient(165deg, #00a884 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 140, 110, 0.35);
}
.wa-transfer-float-btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0, 140, 110, 0.42);
  filter: brightness(1.03);
}
.wa-link-client-card {
  max-width: 460px;
}
.wa-link-client-lead {
  text-align: center;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.wa-link-client-label {
  display: block;
  margin: 0.5rem 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.wa-link-client-results {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  margin-bottom: 0.65rem;
}
.wa-link-client-result-row {
  display: block;
  width: 100%;
  text-align: right;
  padding: 0.45rem 0.65rem;
  border: none;
  border-bottom: 1px solid var(--border);
  background: #fff;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--text);
}
.wa-link-client-result-row:last-child {
  border-bottom: none;
}
.wa-link-client-result-row:hover,
.wa-link-client-result-row.wa-link-active {
  background: var(--accent-soft, rgba(37, 99, 235, 0.08));
}
.wa-link-client-result-row small {
  opacity: 0.75;
  font-weight: 400;
}
.wa-link-client-card .wa-accent-btn {
  background: #374151;
  color: #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.2);
}
.wa-link-client-card .wa-accent-btn:hover {
  background: #1f2937;
  filter: none;
}
.wa-crm-field--client {
  min-height: auto;
}
.wa-crm-client-hint {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
}
@media (max-width: 480px) {
  .wa-transfer-float {
    padding: 3.5rem 0.65rem 1rem;
    align-items: stretch;
  }
  .wa-transfer-float-card {
    max-width: none;
    border-radius: 18px;
  }
  .wa-transfer-float-dl-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
  .wa-transfer-float-dl-row dt {
    font-size: 0.78rem;
  }
}

.wa-bubble {
  max-width: min(78%, 420px);
  border-radius: 8px;
  padding: 0.35rem 0.55rem 0.25rem;
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
}
.wa-bubble-in {
  background: #fff;
  border-radius: 0 8px 8px 8px;
}
.wa-bubble-out {
  background: #dcf8c6;
  border-radius: 8px 0 8px 8px;
}
.wa-bubble-text {
  font-size: 0.9rem;
  line-height: 1.35;
  word-break: break-word;
  white-space: pre-wrap;
  color: #111b21;
}
.wa-bubble-attachments {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.wa-att-link {
  font-size: 0.82rem;
  color: #054d7a;
  text-decoration: underline;
  word-break: break-all;
}
.wa-compose-input-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.45rem;
  width: 100%;
}
.wa-compose-attach-icons {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  flex-shrink: 0;
  padding: 0.15rem 0;
}
.wa-compose-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid #c8d0d4;
  border-radius: 8px;
  background: #fff;
  color: #3b4a54;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.wa-compose-icon-btn:hover {
  background: #eef3f6;
  border-color: #475569;
  color: #334155;
}
.wa-compose-icon-btn:focus-visible {
  outline: 2px solid #64748b;
  outline-offset: 2px;
}
.wa-compose-icon-svg {
  display: block;
}
.wa-compose-icon-btn-client {
  color: #546e7a;
}
#whatsapp-page .wa-accent-btn {
  background: #374151;
  color: #fff;
  border: none;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}
#whatsapp-page .wa-accent-btn:hover {
  background: #1f2937;
  color: #fff;
}
#whatsapp-page .wa-compose-send.wa-accent-btn {
  min-width: 2.75rem;
  min-height: 2.75rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.65rem;
}
#whatsapp-page .wa-crm-save-btn.wa-accent-btn {
  padding: 0.55rem 1rem;
  border-radius: 10px;
}
.wa-bubble-meta {
  text-align: end;
  margin-top: 0.15rem;
  line-height: 1;
}
.wa-bubble-time {
  font-size: 0.68rem;
  color: #667781;
}
.wa-msg-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: #667781;
  font-size: 0.9rem;
}
.wa-header-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
  align-items: center;
}
.wa-header-links-empty {
  font-size: 0.72rem;
  opacity: 0.88;
  font-weight: 400;
  line-height: 1.3;
}
.wa-header-chip {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
}
.wa-header-chip:hover {
  background: rgba(255, 255, 255, 0.24);
}
.wa-compose-bar {
  flex-shrink: 0;
  background: #f0f2f5;
  border-top: 1px solid #d1d7db;
  padding: 0.5rem 0.65rem 0.45rem;
}
.wa-quick-reply-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}
.wa-qr-chip {
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #d1d7db;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  color: #075e54;
}
.wa-qr-chip:hover {
  background: #e7fdf3;
}
.wa-compose-input {
  flex: 1;
  min-width: 0;
  min-height: 2.75rem;
  max-height: 8rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid #d1d7db;
  border-radius: 8px;
  font-family: inherit;
  resize: vertical;
  align-self: stretch;
}
.wa-compose-send {
  flex-shrink: 0;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wa-compose-footnote {
  margin: 0.35rem 0 0;
  font-size: 0.7rem;
  color: #667781;
}
.wa-crm-column {
  display: flex;
  flex-direction: column;
  border-inline-start: 1px solid rgba(0, 0, 0, 0.06);
  background: #e8ecef;
  min-height: 0;
  overflow-y: auto;
}
.wa-crm-column-empty {
  padding: 1.5rem 1rem;
  color: #667781;
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.5;
}
.wa-crm-column-form {
  margin: 0.45rem;
  padding: 0.65rem 0.7rem 0.75rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(11, 20, 26, 0.08);
  box-shadow: 0 1px 3px rgba(11, 20, 26, 0.08);
}
.wa-crm-fields {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.wa-crm-field {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.28rem;
  min-height: 4.6rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(11, 20, 26, 0.1);
  border-radius: 10px;
  background: #f8fafb;
  box-sizing: border-box;
}
.wa-crm-field--notes {
  min-height: 7.5rem;
}
.wa-crm-field label {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.wa-crm-field .search-input,
.wa-crm-field select.search-input {
  width: 100%;
  margin: 0;
}
.wa-crm-notes-ta {
  margin: 0;
  flex: 1;
  min-height: 4rem;
  resize: vertical;
}
.wa-crm-save-btn {
  width: 100%;
  margin-top: 0.55rem;
}
.wa-crm-column-form .wa-transfer-open-btn {
  margin-top: 0.35rem;
}
.wa-crm-column-title {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
}
.wa-return-bubble {
  position: fixed;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

/* ???? ????? ? ????? ?????? (WebRTC / AMI / ???) */
.pbx-incoming-float {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  top: auto;
  z-index: 2510;
  width: min(440px, calc(100vw - 1.25rem));
  filter: drop-shadow(0 -4px 28px rgba(0, 0, 0, 0.35));
}
.pbx-incoming-float.hidden {
  display: none;
}
.pbx-incoming-float-card {
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(165deg, #1e293b 0%, #0f172a 55%, #020617 100%);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
}
.pbx-incoming-float-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1rem 0.65rem;
}
.pbx-incoming-float-avatar {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 700;
  color: #ecfdf5;
  background: radial-gradient(circle at 30% 25%, #34d399 0%, #059669 45%, #047857 100%);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.45);
}
.pbx-incoming-float-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: right;
}
.pbx-incoming-float-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(226, 232, 240, 0.72);
}
.pbx-incoming-float-from {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.03em;
  color: #f8fafc;
  line-height: 1.25;
  word-break: break-all;
}
.pbx-incoming-float-sub {
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.88);
}
.pbx-incoming-float-sub.hidden {
  display: none;
}
.pbx-incoming-float-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
  justify-content: space-between;
  padding: 0.65rem 0.75rem 0.85rem;
  border-top: 1px solid rgba(51, 65, 85, 0.85);
  background: rgba(15, 23, 42, 0.55);
}
.pbx-incoming-float-btn {
  flex: 1;
  min-height: 2.65rem;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.pbx-incoming-float-btn:active {
  transform: scale(0.97);
}
.pbx-incoming-float-btn-glyph {
  font-size: 0.95rem;
  opacity: 0.95;
}
.pbx-incoming-float-btn--decline {
  background: rgba(127, 29, 29, 0.55);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.35);
}
.pbx-incoming-float-btn--decline:hover {
  filter: brightness(1.08);
}
.pbx-incoming-float-btn--pickup {
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
  color: #f0fdf4;
  border: 1px solid rgba(74, 222, 128, 0.45);
  box-shadow: 0 2px 10px rgba(21, 128, 61, 0.45);
}
.pbx-incoming-float-btn--pickup:hover {
  filter: brightness(1.06);
}
.pbx-incoming-float-btn--ghost {
  flex: 0 0 auto;
  min-width: 4.5rem;
  background: rgba(51, 65, 85, 0.65);
  color: #e2e8f0;
  border: 1px solid rgba(100, 116, 139, 0.5);
}
.pbx-incoming-float-btn--ghost:hover {
  background: rgba(71, 85, 105, 0.75);
}
.pbx-incoming-float-forward,
.pbx-webrtc-incoming-forward {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0 0.85rem 0.55rem;
}
.pbx-incoming-float-forward-input {
  background: rgba(15, 23, 42, 0.65) !important;
  border-color: rgba(71, 85, 105, 0.85) !important;
  color: #f1f5f9 !important;
}
.pbx-incoming-float-forward-submit {
  border: none;
  border-radius: 10px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(51, 65, 85, 0.9);
  color: #e2e8f0;
}
.pbx-incoming-float-forward-submit:hover {
  background: rgba(71, 85, 105, 0.95);
}
.pbx-forward-label {
  font-size: 0.8rem;
  color: rgba(203, 213, 225, 0.85);
}

/* ???? ??? ?????? ? ???? ????? */
.pbx-demo-connected-bar {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2509;
  width: min(440px, calc(100vw - 1.25rem));
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 14px;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid rgba(52, 211, 153, 0.35);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  user-select: none;
}
.pbx-demo-connected-bar.hidden {
  display: none;
}
.pbx-demo-connected-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
  animation: pbx-demo-pulse 1.4s ease-out infinite;
  flex-shrink: 0;
}
@keyframes pbx-demo-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(52, 211, 153, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
  }
}
.pbx-demo-connected-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  text-align: right;
}
.pbx-demo-connected-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(148, 163, 184, 0.95);
}
.pbx-demo-connected-num {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  word-break: break-all;
}
.pbx-demo-connected-timer {
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  font-weight: 700;
  color: #a7f3d0;
  flex-shrink: 0;
}
.pbx-demo-connected-action {
  flex-shrink: 0;
  border-radius: 10px;
  padding: 0.4rem 0.65rem;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  background: rgba(51, 65, 85, 0.8);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  position: relative;
  z-index: 1;
}
.pbx-demo-connected-action:hover {
  filter: brightness(1.08);
}
.pbx-demo-connected-action.is-muted {
  background: rgba(245, 158, 11, 0.22);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.55);
}
.pbx-demo-connected-hangup {
  flex-shrink: 0;
  border: none;
  border-radius: 10px;
  padding: 0.4rem 0.75rem;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  background: rgba(127, 29, 29, 0.65);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.35);
  position: relative;
  z-index: 1;
}
.pbx-demo-connected-bar.pbx-dock-suppressed,
.pbx-demo-outgoing-bar.pbx-dock-suppressed {
  display: none !important;
}
.pbx-recording-video {
  width: min(100%, 22rem);
  max-height: 12rem;
  border-radius: 8px;
  background: #0f172a;
}
.pbx-demo-connected-hangup:hover {
  filter: brightness(1.08);
}
.pbx-demo-outgoing-bar {
  border-color: rgba(96, 165, 250, 0.45);
}
.pbx-demo-outgoing-bar .pbx-demo-connected-pulse {
  background: #60a5fa;
  box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.55);
  animation: pbx-demo-pulse-out 1.4s ease-out infinite;
}
@keyframes pbx-demo-pulse-out {
  0% {
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.55);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(96, 165, 250, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0);
  }
}
.pbx-absent-callee-float {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.pbx-absent-callee-float.hidden {
  display: none;
}
.pbx-absent-callee-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}
.pbx-absent-callee-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(90vh, 520px);
  padding: 1.1rem 1.15rem;
  padding-top: calc(1.1rem + 3px);
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% -10%, rgba(99, 102, 241, 0.22) 0%, transparent 52%),
    radial-gradient(100% 80% at -5% 110%, rgba(14, 165, 233, 0.14) 0%, transparent 48%),
    linear-gradient(168deg, rgba(51, 65, 85, 0.55) 0%, rgba(30, 41, 59, 0.98) 38%, rgba(15, 23, 42, 1) 72%, rgba(49, 46, 129, 0.22) 100%);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.045) inset,
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
  display: flex;
  flex-direction: column;
}
.pbx-absent-callee-card::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    rgba(129, 140, 248, 0.9) 0%,
    rgba(56, 189, 248, 0.85) 45%,
    rgba(52, 211, 153, 0.55) 100%
  );
  pointer-events: none;
}
.pbx-absent-callee-line1 {
  margin: 0 0 0.5rem;
  padding: 0 0.25rem;
  text-align: center;
  font-size: 0.98rem;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.4;
  flex: 0 0 auto;
}
.pbx-absent-callee-line2 {
  margin: 0 0 0.85rem;
  padding: 0 0.25rem;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.94);
  line-height: 1.45;
  flex: 1 1 auto;
  min-height: 0;
}
.pbx-absent-callee-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: stretch;
  width: 100%;
  margin-top: auto;
  flex-shrink: 0;
}
.pbx-absent-callee-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.2rem;
  padding: 0.3rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  box-sizing: border-box;
  cursor: pointer;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(51, 65, 85, 0.96);
  color: #f1f5f9;
  box-shadow: none;
}
.pbx-absent-callee-btn:hover {
  background: rgba(71, 85, 105, 0.98);
  border-color: rgba(148, 163, 184, 0.5);
  color: #fff;
}
.pbx-absent-callee-btn:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.65);
  outline-offset: 2px;
}
@media (max-width: 520px) {
  .pbx-absent-callee-actions {
    flex-direction: column;
    flex-wrap: nowrap;
  }
  .pbx-absent-callee-btn {
    flex: 0 0 auto;
    width: 100%;
    min-height: 2.2rem;
  }
}
.pbx-forward-ext-input {
  max-width: 7rem;
  min-width: 5rem;
}
.pbx-ringtone-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.pbx-ringtone-select {
  max-width: 14rem;
}
.pbx-ringtone-custom-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-top: 0.35rem;
}
.pbx-quick-dial-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.5rem;
  margin: 0.5rem 0 0.75rem;
}
.pbx-quick-dial-list {
  display: grid;
  gap: 0.45rem;
}
.pbx-quick-dial-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-hover);
}
.pbx-quick-dial-row span {
  display: grid;
  gap: 0.15rem;
}
.pbx-quick-dial-row small {
  color: var(--text-muted);
}
@media (max-width: 640px) {
  .pbx-quick-dial-form {
    grid-template-columns: 1fr;
  }
}
.pbx-ringtone-file-hint {
  margin: 0;
  font-size: 0.75rem;
  flex: 1 1 100%;
}
.pbx-advanced-routing-textarea {
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  width: 100%;
  margin-top: 0.35rem;
}
.pbx-advanced-routing-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.pbx-presence-preview-wrap {
  margin-top: 1rem;
}
.pbx-presence-preview-wrap.hidden {
  display: none;
}
.wa-compose-settings-box {
  max-width: none;
}

/* ???? ?????? ????? ? ???, ??????, ????? ????? */
#wa-compose-settings-modal.modal {
  position: fixed;
  inset: 0;
  z-index: 10060;
  max-width: none;
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: clamp(1rem, 3.5vw, 2.25rem);
  border: none;
  border-radius: 0;
  background: rgba(22, 36, 38, 0.48);
  box-sizing: border-box;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
}
#wa-compose-settings-modal.modal:not(.hidden) {
  display: flex !important;
}
#wa-compose-settings-modal .save-email-modal-content.wa-compose-settings-box {
  width: min(92vw, 760px);
  max-width: none;
  max-height: min(86vh, 700px);
  overflow-y: auto;
  margin: auto;
  flex-shrink: 0;
}
#wa-compose-settings-modal .save-email-modal-title::before {
  content: '??';
}
#wa-compose-settings-modal.modal .form-hint {
  margin-bottom: 0.85rem;
}
#wa-compose-settings-modal.modal textarea.wa-textarea {
  margin-bottom: 0.65rem;
}
.wa-modal-sep {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}
.wa-modal-h4 {
  margin: 0.5rem 0;
  font-size: 1rem;
}
.wa-qr-manage-list {
  margin: 0.5rem 0;
  font-size: 0.88rem;
}
.wa-qr-manage-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}
.wa-qr-add-row {
  margin-top: 0.5rem;
}
.wa-chat-list .whatsapp-inbox-row {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  padding: 0.7rem 0.75rem;
  cursor: pointer;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 0.35rem;
  border: 1px solid rgba(11, 20, 26, 0.06);
  box-shadow: 0 1px 2px rgba(11, 20, 26, 0.06);
  flex-wrap: nowrap;
  justify-content: flex-start;
  transition: box-shadow 0.15s ease, transform 0.12s ease, border-color 0.15s;
}
.wa-chat-list .whatsapp-inbox-row:hover {
  box-shadow: 0 3px 10px rgba(11, 20, 26, 0.1);
  border-color: rgba(0, 168, 132, 0.25);
}
.wa-chat-list .whatsapp-inbox-row.wa-row-active {
  background: #e8ffef;
  border-color: rgba(0, 168, 132, 0.45);
  box-shadow: 0 0 0 2px rgba(0, 168, 132, 0.2);
}
.wa-list-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(145deg, #25d366 0%, #128c7e 55%, #075e54 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 1.05rem;
  box-shadow: 0 2px 6px rgba(7, 94, 84, 0.25);
}
.wa-list-body {
  flex: 1;
  min-width: 0;
}
.wa-list-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.wa-list-title-line {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
}
.wa-list-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: #111b21;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-list-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  margin-inline-start: 0.35rem;
  vertical-align: middle;
}
.wa-list-badge-closed {
  background: rgba(100, 100, 100, 0.12);
  color: #3d4f57;
}
.wa-list-snippet {
  font-size: 0.8rem;
  color: #667781;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.2rem;
}
.wa-list-side {
  flex-shrink: 0;
  align-self: flex-start;
  max-width: 76px;
}
.wa-list-assignee {
  font-size: 0.72rem;
  color: #8696a0;
  display: block;
  text-align: end;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wa-hours-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1rem; font-size: 0.9rem; }
.wa-hours-table th, .wa-hours-table td { border: 1px solid var(--border); padding: 0.35rem 0.5rem; }
.wa-menu-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
  padding: 0.5rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafbfc;
}
.wa-menu-row-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.wa-menu-row-extra {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.wa-m-extra {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 0.82rem;
  resize: vertical;
}
.wa-m-secondary {
  max-width: 100%;
}
.wa-multi { min-height: 120px; }
.wa-weekday-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.35rem 0 0.75rem; }
.wa-weekday-chips label { font-size: 0.85rem; }
.wa-handler-rules-table { width: 100%; font-size: 0.88rem; border-collapse: collapse; margin-bottom: 1rem; }
.wa-handler-rules-table th, .wa-handler-rules-table td { border: 1px solid var(--border); padding: 0.35rem; vertical-align: top; }
.wa-lookup-pre { background: var(--bg); padding: 0.75rem; border-radius: 6px; font-size: 0.8rem; overflow: auto; max-height: 200px; }
.wa-meta-checklist { margin: 0.5rem 0 0 1.25rem; line-height: 1.5; }
.wa-advanced-json { margin-top: 0.75rem; }
.whatsapp-msgs-title { margin: 1rem 0 0.35rem; font-size: 1rem; }
.bell-btn {
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1.3rem;
}
.bell-btn .nav-badge {
  position: absolute;
  top: -2px;
  left: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 0.7rem;
}
.notifications-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--chat-shadow-soft);
  min-width: 280px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
}
.notifications-dropdown .notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.notifications-dropdown .notif-item .notif-content,
.notifications-dropdown .notif-item .notif-meta { flex: 1; min-width: 0; }
.notifications-dropdown .notif-mark-read-btn {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  opacity: 0.7;
}
.notifications-dropdown .notif-mark-read-btn:hover {
  opacity: 1;
  background: var(--chat-accent-soft);
}
.notifications-dropdown .notif-item:last-child {
  border-bottom: none;
}
.notifications-dropdown .notif-item.unread {
  background: var(--chat-accent-soft);
  cursor: pointer;
}
.notifications-dropdown .notif-item.read {
  background: var(--bg-hover);
  opacity: 0.6;
  cursor: default;
}
.notif-reminder-actions { display: inline-flex; gap: 0.35rem; margin-right: 0.5rem; }
.notif-reminder-close, .notif-reminder-nag {
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card);
  cursor: pointer;
}
.notif-reminder-close:hover { background: var(--bg-hover); }
.notif-reminder-nag:hover { background: var(--accent-soft); }

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-public-home-btn {
  padding: 0.5rem 0.85rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.header-public-home-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(13, 148, 136, 0.06);
}

#logout-btn {
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  z-index: 1;
}
#logout-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.main {
  flex: 1;
  min-height: 0;
  display: flex;
}

.sidebar {
  width: 13.25rem;
  min-width: 13.25rem;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  padding: 0.5rem 0;
  overflow-y: auto;
}

.nav-item {
  display: block;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
}
.nav-item:hover, .nav-item.active {
  color: var(--accent);
  background: var(--bg-hover);
}
.nav-badge {
  display: inline-block;
  min-width: 1.2em;
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 10px;
  background: #c53030;
  color: white;
  margin-right: 0.4rem;
}
.attendance-status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  margin-inline-end: 0.4rem;
  vertical-align: middle;
}
.attendance-status-dot.hidden {
  display: none;
}

@keyframes notif-blink {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}
.notif-blink {
  display: inline-block;
  animation: notif-blink 0.5s ease 3;
}

.notif-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-hover);
}
.notif-filter-select {
  flex: 1;
  min-width: 100px;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  font-size: 0.9rem;
}
.notif-mark-all-btn {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  font-size: 0.85rem;
  cursor: pointer;
}
.notif-mark-all-btn:hover { background: var(--chat-accent-soft); }
.notif-list { max-height: 320px; overflow-y: auto; }

.content {
  flex: 1;
  min-height: 0;
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}
.page-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}
.chat-page .content {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}
.page-content.chat-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.content h1 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-weight: 600;
}
.page-placeholder {
  color: var(--text-muted);
  padding: 2rem 0;
}

/* Chat layout ? refined, elegant */
.chat-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.conversations-sidebar {
  width: 17rem;
  min-width: 17rem;
  flex-shrink: 0;
  min-height: 0;
  background: var(--chat-sidebar);
  display: flex;
  flex-direction: column;
  box-shadow: -2px 0 12px rgba(0,0,0,0.03);
}
.sidebar-toolbar {
  flex-shrink: 0;
  padding: 0.75rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--chat-sidebar-header);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-search {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 6px;
  background: rgba(255,255,255,0.12);
  color: white;
  font-size: 0.88rem;
  font-weight: 400;
}
.sidebar-search::placeholder { color: rgba(255,255,255,0.6); }
.sidebar-search:focus {
  outline: none;
  background: rgba(255,255,255,0.18);
}
.chat-layout .btn-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.2);
  color: white;
  font-size: 1.2rem;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.chat-layout .btn-icon:hover {
  background: rgba(255,255,255,0.3);
}
.conversations-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.35rem 0;
}
.conversations-list .no-items {
  padding: 2rem 1.5rem;
  color: var(--chat-text-muted);
  font-size: 0.9rem;
  font-weight: 400;
}
.conversation-row {
  padding: 0.85rem 1.2rem;
  margin: 0 0.5rem 0.15rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.conversation-row:hover {
  background: rgba(90, 154, 142, 0.08);
}
.conversation-row.unread {
  background: rgba(197, 48, 48, 0.08);
  border-right: 3px solid #c53030;
  font-weight: 600;
}
.conversation-row.active {
  background: rgba(90, 154, 142, 0.25);
  color: var(--chat-text);
  border-right: 3px solid var(--chat-accent);
  box-shadow: var(--chat-shadow);
}
.conversation-row.active .conv-meta { color: var(--chat-text-muted); }
.conversation-row .conv-subject {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
  letter-spacing: 0.01em;
}
.conversations-sidebar .conversation-row { color: var(--chat-text); }
.conversation-row .conv-meta {
  font-size: 0.78rem;
  color: var(--chat-text-muted);
  font-weight: 400;
}
.chat-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--chat-bg);
}
.chat-header {
  flex-shrink: 0;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--chat-border);
  background: white;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.chat-header-main {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.chat-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.chat-subject-display {
  font-size: 1rem;
  font-weight: 500;
  color: var(--chat-text);
  letter-spacing: 0.01em;
}
.chat-sub-subject-display {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--chat-text-muted);
}
.chat-sub-subject-display:not(:empty)::before {
  content: ' ? ';
  color: var(--chat-border);
  margin-left: 0.25rem;
}
.chat-subject-edit-wrap {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.chat-subject-edit, .chat-sub-subject-edit {
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--chat-border);
  border-radius: 6px;
  font-size: 0.9rem;
  background: var(--chat-bg);
  color: var(--chat-text);
  min-width: 120px;
}
.chat-subject-edit { flex: 1; min-width: 140px; }
.chat-subject-edit:focus, .chat-sub-subject-edit:focus {
  outline: none;
  border-color: var(--chat-accent);
}
.chat-header-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.chat-empty-state {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--chat-text-muted);
  font-size: 0.9rem;
  font-weight: 400;
  padding: 2rem;
  margin: 0;
}
.chat-participants-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.participants-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.participant-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.7rem;
  background: var(--chat-accent-soft);
  color: var(--chat-accent);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
}
.participant-chip .chip-remove {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.1rem;
  opacity: 0.85;
}
.participant-chip .chip-remove:hover { opacity: 1; }
.participant-add-select {
  padding: 0.35rem 0.65rem;
  border: 1px dashed var(--chat-border);
  border-radius: 8px;
  background: transparent;
  font-size: 0.88rem;
  color: var(--chat-text-muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.participant-add-select:hover, .participant-add-select:focus {
  outline: none;
  border-color: var(--chat-accent);
  color: var(--chat-accent);
}
.chat-context-bar, .chat-actions-bar {
  margin-top: 0.75rem;
  font-size: 0.83rem;
  color: var(--chat-text-muted);
}
.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: var(--chat-bg);
}
.chat-messages:has(.msg) .chat-empty-state { display: none; }
.msg {
  max-width: 72%;
  padding: 0.7rem 1.1rem;
  border-radius: 14px;
  font-size: 0.93rem;
  line-height: 1.45;
  box-shadow: var(--chat-shadow);
}
.msg-mine {
  align-self: flex-end;
  background: linear-gradient(145deg, #5a9a8e 0%, #4a867a 100%);
  color: white;
  border-bottom-left-radius: 6px;
}
.msg-other {
  align-self: flex-start;
  background: white;
  border: 1px solid var(--chat-border);
  border-bottom-right-radius: 6px;
}
.msg-system {
  align-self: center;
  background: rgba(90, 154, 142, 0.08);
  color: var(--chat-text-muted);
  font-size: 0.83rem;
  font-weight: 400;
  max-width: 85%;
  border: none;
  box-shadow: none;
}
.msg-system .msg-sender { display: none; }
.msg-sender {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  opacity: 0.9;
  letter-spacing: 0.02em;
}
.msg-other .msg-sender { color: var(--chat-accent); }
.msg-time {
  display: block;
  font-size: 0.68rem;
  margin-top: 0.3rem;
  opacity: 0.75;
  letter-spacing: 0.01em;
}
.msg-read { margin-right: 0.35rem; }
.chat-input-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--chat-border);
  background: white;
  box-shadow: 0 -1px 8px rgba(0,0,0,0.03);
}
.chat-input-bar input {
  flex: 1;
  padding: 0.8rem 1.15rem;
  border: 1px solid var(--chat-border);
  border-radius: 24px;
  font: inherit;
  font-size: 0.95rem;
  background: var(--chat-bg);
  color: var(--chat-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.chat-input-bar input:focus {
  outline: none;
  border-color: var(--chat-accent);
  box-shadow: 0 0 0 2px var(--chat-accent-soft);
}
.chat-input-bar input::placeholder {
  color: var(--chat-text-muted);
}
.btn-send {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(145deg, #5a9a8e 0%, #4a867a 100%);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(90, 154, 142, 0.3);
}
.btn-send:hover {
  transform: scale(1.03);
  box-shadow: 0 3px 10px rgba(90, 154, 142, 0.35);
}
.btn-send:disabled {
  background: var(--chat-border);
  box-shadow: none;
  cursor: not-allowed;
}
.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.83rem;
  border-radius: 8px;
  border: 1px solid var(--chat-border);
  background: var(--chat-bg);
  color: var(--chat-text);
  cursor: pointer;
  margin-left: 0.5rem;
  transition: all 0.2s ease;
  font-weight: 500;
}
.btn-sm:hover {
  background: var(--chat-accent-soft);
  border-color: var(--chat-accent);
  color: var(--chat-accent);
}
.conv-ended-txt {
  font-size: 0.78rem;
  color: var(--chat-text-muted);
}

.btn-primary {
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: var(--btn-on-accent);
  border: none;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 1.5rem;
  transition: background 0.2s;
}
.btn-primary:hover {
  background: var(--accent-dim);
}

.btn-secondary {
  padding: 0.6rem 1.2rem;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border, rgba(0,0,0,0.15));
  border-radius: 8px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn-secondary:hover {
  background: #f8fafc;
  border-color: var(--accent, #6366f1);
}

#users-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 220px);
}

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.user-row:last-child {
  border-bottom: none;
}
.user-row:hover {
  background: var(--bg-hover);
}

.user-info-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.user-info-cell strong {
  font-size: 1rem;
}
.user-info-cell span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.role-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}
.role-manager { background: rgba(0,168,138,0.2); color: var(--accent); }
.role-clerk { background: rgba(139,148,158,0.2); color: var(--text-muted); }

.user-actions {
  display: flex;
  gap: 0.5rem;
}
.user-actions button {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  transition: all 0.2s;
}
.user-actions button:hover {
  color: var(--text);
  border-color: var(--text-muted);
}
.user-actions button.delete:hover {
  border-color: var(--error);
  color: var(--error);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 46, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-stack-top { z-index: 13000; }

.modal {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  max-width: 400px;
}

.modal h2 {
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.modal input, .modal select {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.modal-actions button {
  flex: 1;
  padding: 0.75rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.modal-actions button[type="button"] {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.modal-actions button[type="submit"] {
  background: var(--accent);
  color: var(--btn-on-accent);
  border: none;
}
.modal-actions button:hover {
  opacity: 0.9;
}

/* Policy modal ? wide form */
.policy-modal-wide.modal {
  max-width: 520px;
}

/* ???? ????? ? ????? ??? ?????? ?????? ??????? */
.signature-req-modal-inner.modal {
  max-width: min(1120px, 96vw);
  width: 100%;
}
.sig-modal-layout {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.sig-modal-row-docs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1rem;
  align-items: end;
}
@media (max-width: 720px) {
  .sig-modal-row-docs {
    grid-template-columns: 1fr;
  }
}
.signature-req-modal-inner .sig-modal-cell {
  margin-bottom: 0;
}
.signature-req-modal-inner .sig-modal-cell > label:first-child {
  margin-bottom: 0.2rem;
  font-size: 0.82rem;
}
.signature-req-modal-inner .sig-modal-input-compact,
.signature-req-modal-inner .sig-modal-select-mode {
  width: 100%;
  box-sizing: border-box;
  padding: 0.22rem 0.42rem !important;
  min-height: 1.62rem;
  font-size: 0.85rem !important;
}
.signature-req-modal-inner .sig-modal-mode-row label {
  font-size: 0.82rem;
  margin-bottom: 0.2rem;
}
.signature-req-modal-inner .sig-modal-mode-row .sig-modal-select-mode {
  max-width: min(520px, 100%);
}
.sig-modal-signers-block > label:first-of-type {
  font-size: 0.82rem;
  margin-bottom: 0.25rem;
}
.sig-modal-signers-fieldset {
  border: none;
  margin: 0;
  padding: 0;
  min-inline-size: 0;
}
.sig-modal-participate-intro {
  margin: -0.05rem 0 0.42rem !important;
  font-size: 0.74rem !important;
  max-width: 54rem;
  line-height: 1.42;
}
.sig-modal-signers-solo-hint {
  margin: 0.05rem 0 0.25rem;
  font-size: 0.78rem;
}
#sig-modal-signers.sig-modal-signers-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
/* ????? ??????: ????? ??????? + ??? + ???? ??? ???? */
.sig-signer-row {
  display: grid;
  grid-template-columns:
    2.35rem
    2.5rem
    minmax(6.75rem, 8.75rem)
    minmax(0, 1.12fr)
    minmax(0, 1.12fr)
    minmax(0, 1.12fr)
    max-content
    minmax(6.85rem, 9.25rem)
    minmax(0, 5.5rem);
  gap: 0.35rem 0.4rem;
  align-items: center;
  padding: 0.26rem 0.38rem;
  border: 1px solid var(--border, #ddd);
  border-radius: 6px;
  font-size: 0.78rem;
}
.sig-signer-row .sig-s-part-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sig-s-participates {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.76rem;
  height: 1.76rem;
  padding: 0;
  border: 2px solid var(--border, #cdd3db);
  border-radius: 7px;
  background: var(--bg-card, #fff);
  cursor: pointer;
  box-sizing: border-box;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}
.sig-s-participates:hover {
  border-color: var(--accent, #2563eb);
}
.sig-s-participates.sig-s-participates--yes {
  border-color: var(--accent, #2563eb);
  background: linear-gradient(165deg, rgba(37, 99, 235, 0.2), rgba(37, 99, 235, 0.07));
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.sig-s-participates-mark {
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 3px;
  background: var(--accent, #2563eb);
  transform: scale(0);
  opacity: 0;
  transition:
    transform 0.12s ease,
    opacity 0.12s ease;
}
.sig-s-participates--yes .sig-s-participates-mark {
  transform: scale(1);
  opacity: 1;
}
.sig-signer-row--excluded {
  opacity: 0.66;
}
.sig-signer-row--excluded .sig-ch {
  cursor: default;
}
.sig-signer-row--solo-locked .sig-ch {
  pointer-events: none;
  opacity: 0.5 !important;
}
.sig-signer-row > * {
  min-width: 0;
}
.sig-signer-row .sig-ch-row {
  min-width: min-content;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.35rem;
  align-items: center;
  justify-content: flex-start;
}
.sig-signer-row .sig-s-order {
  width: 100%;
  max-width: 3.25rem;
  text-align: center;
  font-weight: 600;
}
.sig-signer-row .sig-s-compact {
  font-size: 0.78rem !important;
  padding: 0.28rem 0.35rem !important;
  min-height: 1.85rem;
}
.sig-signer-row .sig-ch {
  cursor: pointer;
  user-select: none;
  opacity: 0.45;
  font-size: 0.74rem;
  white-space: nowrap;
  padding: 0.1rem 0.15rem;
  border-radius: 4px;
}
.sig-signer-row .sig-ch-on {
  opacity: 1;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.signature-req-modal-inner.modal.modal-scroll {
  padding-bottom: 0.75rem;
}
.signature-req-modal-inner .form-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  background: var(--bg);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.06);
}
.signature-req-modal-inner .signature-req-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}
.signature-req-modal-inner .signature-req-modal-actions .btn-elegant {
  display: inline-flex;
  margin-bottom: 0 !important;
  flex: 1 1 10rem;
  min-width: 0;
  justify-content: center;
  align-items: center;
}

/* ????? ????? ????? ? ????? 3 ????? ????????? + ?????? ?????? ?????? */
.sig-resend-modal-inner.modal {
  max-width: min(480px, 94vw);
  width: 100%;
  padding-top: 1rem;
}
.sig-resend-intro {
  margin-bottom: 0.55rem !important;
  font-size: 0.78rem !important;
}
.sig-resend-signer-sheet {
  padding: 0.55rem 0.62rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
}
.sig-resend-row {
  margin-bottom: 0.48rem;
}
.sig-resend-row:last-child {
  margin-bottom: 0;
}
.sig-resend-row--contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.62rem;
  align-items: end;
}
.sig-resend-duo-cell {
  min-width: 0;
}
.sig-resend-micro-lbl {
  display: block;
  font-weight: 600;
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.sig-resend-lbl-inline {
  margin-bottom: 0;
}
.sig-resend-compact-input.search-input,
.sig-resend-compact-select.search-input {
  width: 100%;
  font-size: 0.82rem !important;
  padding: 0.3rem 0.42rem !important;
  min-height: 1.92rem;
}
.sig-resend-row--channels,
.sig-resend-row--security {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.42rem 0.55rem;
}
.sig-resend-row--channels .sig-resend-lbl-inline,
.sig-resend-row--security .sig-resend-lbl-inline {
  flex: 0 0 auto;
  min-width: 5.85rem;
  text-align: right;
}
.sig-resend-channel-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem;
  flex: 0 1 auto;
  width: fit-content;
  max-width: 100%;
  justify-content: flex-start;
}
.sig-resend-ch-btn {
  flex: 0 0 auto;
  min-height: 1.85rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.26rem 0.62rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-hover);
  color: var(--text-muted);
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
.sig-resend-ch-btn:hover {
  border-color: var(--text-muted);
  color: var(--text);
}
.sig-resend-ch-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.sig-resend-ch-btn--on {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dim);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.15);
}
.sig-resend-row--security .sig-resend-compact-select {
  flex: 1;
  min-width: 0;
  max-width: 100%;
}
.sig-resend-row-pw {
  margin-top: 0.08rem;
  padding-top: 0.42rem;
  border-top: 1px dashed var(--border);
}
.sig-resend-pw-single.search-input {
  width: 100%;
}
/* ????? ?? ?????? ????? ? ?????? ??? ????? ?????? (RTL) */
.page-header.signature-requests-page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.signature-requests-head-text {
  flex: 0 1 auto;
  min-width: min(100%, 14rem);
}
.signature-requests-head-text h1 {
  margin: 0 0 0.35rem;
}
.signature-requests-head-text .page-subtitle {
  margin: 0;
}
.signature-requests-head-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  flex: 1 1 14rem;
  justify-content: flex-end;
  min-width: 0;
}
.signature-requests-head-search {
  flex: 1 1 12rem;
  min-width: min(100%, 11rem);
  max-width: min(32rem, 100%);
}
#signature-requests-page .signature-requests-head-search .signature-req-search-input.input-elegant {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 2.35rem;
  padding-block: 0.45rem;
  font-size: 0.88rem;
}
.signature-requests-head-actions {
  display: inline-flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
/* ??????? ?????? ?????? (??? ?????? / ???????): btn-elegant + ???? ???? */
#signature-requests-page .signature-requests-head-actions > .btn-elegant.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  min-height: 2.35rem;
  box-sizing: border-box;
  font-size: 0.88rem;
  font-weight: 500;
}
#signature-requests-page .signature-requests-head-actions > .btn-primary.btn-elegant {
  margin-bottom: 0;
}
#signature-requests-page .signature-requests-head-actions .sig-req-page-refresh-btn.btn-elegant.btn-sm {
  padding: 0.4rem;
  width: 2.35rem;
  min-width: 2.35rem;
  flex-shrink: 0;
}

.signature-req-list-block {
  margin-top: 0.15rem;
}
.sig-req-search-empty-hint {
  margin-top: 0.65rem;
  font-size: 0.88rem;
}
.signature-req-list-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 0.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: none;
}
.signature-req-table {
  /* ?? ???? ???? (?????? ????) ? ??? ????? ???? ???? */
  --sig-req-row-h: 1.92rem;
  table-layout: fixed;
  width: 100%;
  min-width: 54rem;
  border-collapse: collapse;
  border-style: hidden;
}
.signature-req-table tbody tr {
  height: var(--sig-req-row-h);
}
.signature-req-table tbody td {
  box-sizing: border-box;
  height: var(--sig-req-row-h);
  max-height: var(--sig-req-row-h);
  overflow: hidden;
  font-size: 0.72rem;
  line-height: 1.28;
  padding-inline: 0.42rem;
  padding-block: 0.18rem;
}
.signature-req-table th,
.signature-req-table td {
  vertical-align: middle;
  padding: 0.09rem 0.42rem;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  word-break: break-word;
}
.signature-req-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: auto;
  max-height: none;
  overflow: visible;
  background: linear-gradient(180deg, #f8fafc 0%, var(--bg-hover) 100%);
  color: var(--text);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.015em;
  border-bottom-width: 2px;
  border-bottom-color: color-mix(in srgb, var(--border) 85%, transparent);
  white-space: nowrap;
  padding: 0.3rem 0.45rem;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}
.signature-req-table tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.88);
}
.signature-req-table tbody tr:hover td {
  background: color-mix(in srgb, var(--bg-hover) 92%, transparent);
}
.signature-req-table td.sig-req-col-title,
.signature-req-table td.sig-req-col-client {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.signature-req-table td.sig-req-col-context .sig-req-context-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.signature-req-table .sig-req-col-num {
  width: 2.75rem;
  min-width: 2.75rem;
  max-width: 3.25rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.signature-req-table .sig-req-col-title {
  width: 20%;
}
.signature-req-table .sig-req-col-client {
  width: 12%;
}
.signature-req-table .sig-req-col-context {
  width: 14%;
}
.signature-req-table .sig-req-col-signers-merge {
  width: 36%;
}
.signature-req-table .sig-req-col-actions {
  width: 14%;
  white-space: nowrap;
}

.signature-req-table td.sig-req-col-signers-merge,
.signature-req-table td.sig-req-col-actions {
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
}

/* ????? ????: ????/????? + ????? ?????? ?????? */
.sig-req-signers-td-shell {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: 0.22rem;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.signature-req-table .sig-req-signers-td-shell > .form-hint {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.65rem;
  line-height: 1.28;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.signature-req-table .sig-req-signers-td-shell > .sig-req-req-banner {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 0.28rem 0 0;
  margin-inline-end: 0.12rem;
  border: none;
  border-inline-end: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
  font-size: 0.63rem;
  font-weight: 700;
  white-space: nowrap;
}
.signature-req-table .sig-req-signers-td-shell > .sig-req-signers-cell-inner {
  flex: 1;
  min-width: 0;
}
.sig-req-signers-cell-inner {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.24rem;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}

/* ?'?? ???? ? ????? ?????? ???????? (????? ???, ???? ???? ????) */
.signature-req-table .sig-req-signer-line {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.12rem 0.26rem;
  max-width: 14rem;
  padding: 0.02rem 0.36rem;
  margin: 0;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  font-size: 0.68rem;
  line-height: 1.26;
}
.signature-req-table .sig-req-signer-line .sig-req-signer-role-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 7.75rem;
}
.signature-req-table .sig-req-signer-line .sig-req-signer-st {
  flex-shrink: 0;
  white-space: nowrap;
}
.sig-req-signer-role-name {
  font-weight: 600;
  color: var(--text);
}
.signature-req-table .sig-req-icon-btn.sig-link-open-detail {
  margin-inline-start: 0.1rem;
  flex-shrink: 0;
}
.signature-req-table .sig-req-icon-btn {
  width: 1.22rem;
  height: 1.22rem;
  border-radius: 5px;
}
.signature-req-table .sig-req-icon-btn svg {
  width: 11px;
  height: 11px;
}
.sig-req-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  vertical-align: middle;
  box-sizing: border-box;
}
.sig-req-icon-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--accent-dim, var(--accent));
}
.sig-req-icon-btn svg {
  display: block;
  flex-shrink: 0;
}

.sig-req-actions-cell-inner {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: 0.24rem;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.signature-req-table .sig-req-actions-cell-inner .sig-req-act-line {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.2rem;
}
.sig-req-signer-sep {
  margin: 0 0.12rem;
  color: var(--text-muted);
  font-weight: 400;
  flex-shrink: 0;
}
.sig-req-signer-st {
  font-weight: 600;
}
.sig-req-signer-line.is-signed .sig-req-signer-st {
  color: var(--success);
}
.sig-req-signer-line.is-pending .sig-req-signer-st {
  color: var(--warning);
}
.sig-req-signer-line.is-declined .sig-req-signer-st {
  color: var(--danger, #dc2626);
}
.sig-req-signer-line.is-skipped .sig-req-signer-st {
  color: var(--text-muted, #94a3b8);
}
.sig-req-context-cell {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}
.sig-req-context-text {
  flex: 1;
  min-width: 0;
  font-size: 0.72rem;
  line-height: 1.28;
}
.sig-req-context-cell .sig-req-icon-btn {
  flex-shrink: 0;
  margin-top: 0;
  width: 1.22rem;
  height: 1.22rem;
}

.signature-req-table td.sig-req-col-signers-merge::-webkit-scrollbar,
.signature-req-table td.sig-req-col-actions::-webkit-scrollbar,
.sig-req-signers-cell-inner::-webkit-scrollbar,
.sig-req-actions-cell-inner::-webkit-scrollbar {
  height: 4px;
}
.signature-req-table td.sig-req-col-signers-merge::-webkit-scrollbar-thumb,
.signature-req-table td.sig-req-col-actions::-webkit-scrollbar-thumb,
.sig-req-signers-cell-inner::-webkit-scrollbar-thumb,
.sig-req-actions-cell-inner::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--border) 78%, transparent);
  border-radius: 4px;
}

.signature-req-table .sig-req-col-actions .btn-sm {
  display: inline-block;
  margin: 0;
  vertical-align: middle;
}
.sig-req-req-banner {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
  padding-bottom: 0.42rem;
  border-bottom: 1px solid var(--border);
}
.sig-req-req-banner--muted {
  color: var(--text-muted);
}
.sig-req-req-banner--declined {
  color: var(--danger, #dc2626);
  white-space: normal;
  line-height: 1.3;
}

.sig-timeline-modal-inner {
  max-width: min(34rem, 94vw);
  width: 100%;
}
.sig-timeline-body {
  max-height: 60vh;
  overflow-y: auto;
  margin: 0.4rem 0 0.2rem;
}
.sig-timeline-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0.25rem 0.25rem 0;
}
.sig-timeline-item {
  position: relative;
  display: flex;
  gap: 0.6rem;
  padding: 0 0 0.85rem;
}
.sig-timeline-item::before {
  content: '';
  position: absolute;
  right: 5px;
  top: 14px;
  bottom: -2px;
  width: 2px;
  background: var(--border, #2d3a4d);
}
.sig-timeline-item:last-child::before { display: none; }
.sig-timeline-dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 3px;
  background: var(--accent, #2563eb);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #2563eb) 22%, transparent);
  z-index: 1;
}
.sig-timeline-item--danger .sig-timeline-dot { background: var(--danger, #dc2626); box-shadow: 0 0 0 3px rgba(220,38,38,0.22); }
.sig-timeline-item--ok .sig-timeline-dot { background: var(--success, #16a34a); box-shadow: 0 0 0 3px rgba(22,163,74,0.22); }
.sig-timeline-content {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.sig-timeline-label { font-weight: 600; font-size: 0.9rem; }
.sig-timeline-when { font-size: 0.74rem; opacity: 0.7; }
.sig-timeline-who { font-size: 0.8rem; opacity: 0.9; }
.sig-timeline-zone { font-size: 0.78rem; opacity: 0.82; }
.sig-timeline-reason {
  font-size: 0.8rem;
  color: var(--danger, #dc2626);
  white-space: normal;
  word-break: break-word;
}

.sig-context-modal-inner.modal {
  max-width: min(17.5rem, 90vw);
  padding: 0.85rem 1rem 1rem;
}
.sig-context-modal-heading {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  font-weight: 600;
}
.sig-context-auto-line {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
  word-break: break-word;
}
.sig-context-modal-ta {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 0.85rem;
  min-height: 2.5rem;
  resize: vertical;
}
.sig-context-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.3rem;
  margin-top: 0.55rem;
}
.sig-req-act-line {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
}
@media (max-width: 900px) {
  .sig-signer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
  }
  .sig-signer-row .sig-s-part-wrap {
    flex: 0 0 auto;
  }
  .sig-signer-row .sig-s-order {
    flex: 0 0 3rem;
    max-width: 3.25rem;
    text-align: center;
  }
  .sig-signer-row .sig-s-role {
    flex: 1 1 40%;
    min-width: 6rem;
  }
  .sig-signer-row .sig-s-name {
    flex: 1 1 100%;
  }
  .sig-signer-row .sig-s-phone,
  .sig-signer-row .sig-s-email {
    flex: 1 1 45%;
    min-width: 8rem;
  }
  .sig-signer-row .sig-ch-row {
    flex: 1 1 100%;
  }
  .sig-signer-row .sig-s-identity {
    flex: 1 1 55%;
    min-width: 10rem;
  }
  .sig-signer-row .sig-s-pw {
    flex: 1 1 40%;
    min-width: 6rem;
  }
}
.policy-form-block .form-row {
  margin-bottom: 0.75rem;
}
.policy-form-block .form-row label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.policy-form-block .form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.policy-form-block .form-row-group {
  margin-bottom: 0.75rem;
}
.policy-form-block .checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
/* Styled dropdown ? not the ugly default */
.input-select-wrap {
  position: relative;
  width: 100%;
}
.input-select {
  width: 100%;
  padding: 0.65rem 2rem 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.75rem center;
}
.input-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input-select-styled .input-select {
  padding: 0.75rem 2rem 0.75rem 1rem;
  border-radius: 10px;
  border-color: var(--border);
}

.insurance-years-hint {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.policy-couple-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-right: 0.5rem;
}

.policy-detail-row {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.policy-detail-row strong {
  display: inline-block;
  min-width: 8rem;
  color: var(--text-muted);
}
.policy-smoker-note {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.policy-detail-btn {
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  margin-left: auto;
}
.policy-type-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Policy modal ? ????? ??????? ? ??? ? ?????? ?????? */
.policy-modal-select.modal {
  max-width: 720px;
}
.policy-select-step .policy-select-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}
.policy-select-cell {
  flex: 1;
  min-width: 140px;
}
.policy-select-cell label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.policy-types-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  flex: 1 1 100%;
}
.policy-type-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  cursor: pointer;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}
.policy-type-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.coverage-section {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--bg-hover);
  border-radius: 10px;
}
.coverage-section h4 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
}
.coverage-row-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
.coverage-total-row {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 1rem;
}
.policy-subtype-wrap {
  flex: 1 1 100%;
  margin-top: 0.5rem;
}
.policy-subtype-wrap .policy-types-cards { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.link-back {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  padding: 0;
}
.link-back:hover { text-decoration: underline; }
.policy-profile-info-bar .policy-copy-item {
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
}
.policy-profile-info-bar .policy-copy-item:hover {
  background: var(--bg-hover);
}
.policy-profile-info-bar .policy-edit-btn {
  margin-right: auto;
}

/* ?????? ?????? */
#policy-profile-page {
  padding: 0 1rem 1rem;
}
.policy-profile-header {
  margin-bottom: 0.5rem;
}
.policy-profile-header .btn-back {
  margin-bottom: 0.2rem;
  font-size: 0.82rem;
}
.policy-profile-kind-heading {
  margin: 0 0 0.45rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-muted, #555);
  background: var(--bg-muted, rgba(0, 0, 0, 0.04));
  border-radius: 8px;
  border: 1px solid var(--border);
}
.policy-profile-info-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
  padding: 0.45rem 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.35;
}
.policy-profile-main-col {
  flex: 1;
  min-width: min(100%, 12rem);
}
.policy-profile-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.75rem;
  margin-top: 0.2rem;
  font-size: 0.78rem;
}
.policy-profile-meta-row > span {
  color: var(--text-muted);
}
.policy-profile-holders {
  font-size: 0.76rem;
  line-height: 1.35;
}
.policy-crm-assignee-inline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.45rem;
  max-width: 100%;
}
.policy-crm-assignee-inline .policy-crm-assignee-select {
  min-width: 7.5rem;
  max-width: 12rem;
  font-size: 0.75rem;
  padding: 0.15rem 0.32rem;
  min-height: 1.75rem;
}
.policy-crm-assignee-hint {
  display: inline;
  margin: 0 !important;
  font-size: 0.7rem !important;
  line-height: 1.25;
  white-space: normal;
}
.policy-profile-info-bar .policy-edit-btn {
  margin-inline-start: auto;
  flex-shrink: 0;
  align-self: flex-start;
  padding: 0.28rem 0.65rem;
  font-size: 0.78rem;
}
.client-crm-assignee-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.client-crm-assignee-select {
  max-width: 18rem;
  min-width: 11rem;
}
.client-crm-assignee-hint {
  margin: 0;
}
.policy-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.policy-tab {
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.policy-tab:hover { color: var(--text); }
.policy-tab.active {
  color: var(--accent);
  font-weight: 500;
  border-bottom-color: var(--accent);
}
#policy-tab-content {
  min-height: 200px;
}

/*
 * ??? ??????: ?? ????? ?? ?? #policy-profile-page (?? ????? ?????? + ????? ?????? ???? ???).
 * ?????? ????? ???? #policy-tab-content; ???? ?????? / ?????? ?????? ????? ?? ?? ??? ?????? ?? ??????.
 */
#policy-profile-page.page-content {
  overflow: hidden;
}
#policy-profile-page.page-content #policy-tab-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
#policy-profile-page.page-content #policy-tab-content:has(.policy-documents-tab) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#policy-profile-page.page-content #policy-tab-content:has(.policy-documents-tab) > .policy-documents-tab {
  flex: 1 1 auto;
  min-height: 0;
}
#policy-profile-page.page-content #policy-tab-content:has(.policy-act-edited-panel) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#policy-profile-page.page-content #policy-tab-content:has(.policy-act-edited-panel) > .policy-actions-tab--v2 {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#policy-profile-page.page-content #policy-tab-content:has(.policy-act-edited-panel) > .policy-actions-tab--v2 > .policy-act-subtabs-section {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#policy-profile-page.page-content #policy-tab-content:has(.policy-act-edited-panel) .policy-act-subtabs {
  flex-shrink: 0;
}
#policy-profile-page.page-content #policy-tab-content:has(.policy-act-edited-panel) #policy-act-single-mount {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.management-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1rem 0.85rem;
  direction: rtl;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.management-subtab {
  padding: 0.45rem 0.85rem;
  min-height: 2.15rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.12s, border-color 0.12s;
}
.management-subtab:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.management-subtab.active {
  background: rgba(13, 148, 136, 0.12);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.policy-doc-linkages-mgmt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1rem;
}
.pdl-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  background: var(--bg-card);
}
.pdl-row-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.65rem;
}
.pdl-row-toolbar .pdl-label {
  flex: 1;
  min-width: 180px;
}
.pdl-scope-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
}
.pdl-scope-title,
.pdl-actions-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.pdl-scope-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}
.pdl-types-box {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: var(--bg-secondary);
  margin-bottom: 0.65rem;
  max-height: 200px;
  overflow-y: auto;
}
.pdl-type-cat {
  margin-bottom: 0.45rem;
}
.pdl-type-cat-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.pdl-type-opt {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-inline-end: 0.65rem;
  margin-bottom: 0.2rem;
  font-size: 0.84rem;
  cursor: pointer;
}
.pdl-actions-block {
  margin-top: 0.35rem;
}
.pdl-actions-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.45rem 0;
}
.pdl-action-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.pdl-action-line .pdl-act-label {
  flex: 1;
  min-width: 140px;
}
.pdl-action-line .pdl-act-kind {
  flex: 1.15;
  min-width: min(100%, 220px);
  font-size: 0.86rem;
}
.pdl-act-url-wrap {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.pdl-act-url-wrap .pdl-act-url {
  flex: 2;
  min-width: 180px;
}
.pdl-act-tab {
  font-size: 0.82rem;
  white-space: nowrap;
}
.policy-docs-ctx-row--extra {
  border-inline-start: 3px solid rgba(13, 148, 136, 0.45);
}
/* ????? ??????: ????? ?????? ????? (???? LTR), ???? RTL */
.policy-docs-shell {
  direction: ltr;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
}
/* ??? ????? ?????? + ?????? ??????: ???? ????? ??? ?????? ?????? ?? ???? ?? ????? ??????? */
.policy-documents-tab.policy-docs-shell,
.policy-act-edited-shell.policy-docs-shell {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, calc(100vh - 96px));
}
.policy-documents-tab .policy-docs-body,
.policy-act-edited-shell .policy-docs-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.policy-docs-shell-header {
  direction: rtl;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, rgba(13, 148, 136, 0.07), transparent);
  flex-shrink: 0;
}
.policy-docs-shell-header h3 { margin: 0 0 0.35rem; }
.policy-docs-body {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 520px;
}
.policy-docs-list-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.4rem 0.45rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  direction: rtl;
  flex-shrink: 0;
}
.policy-docs-master-select-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  font-size: 0.87rem;
  color: var(--text);
  margin: 0;
  user-select: none;
  justify-self: start;
}
.policy-docs-master-select-label input {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.policy-docs-toolbar-center {
  justify-self: center;
}
.policy-docs-add-files-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(13, 148, 136, 0.35);
  background: linear-gradient(145deg, rgba(13, 148, 136, 0.14), rgba(13, 148, 136, 0.06));
  color: var(--accent);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s, border-color 0.15s, background 0.15s;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.12);
}
.policy-docs-add-files-btn:hover {
  border-color: var(--accent);
  background: linear-gradient(145deg, rgba(13, 148, 136, 0.22), rgba(13, 148, 136, 0.1));
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.18);
  transform: translateY(-1px);
}
.policy-docs-add-files-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.policy-docs-add-files-icon {
  display: block;
}
.policy-docs-toolbar-menu-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  min-width: 0;
}
.policy-docs-actions-anchor {
  position: relative;
  flex-shrink: 0;
}
.policy-docs-actions-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.policy-docs-actions-trigger:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--accent);
}
.policy-docs-actions-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.policy-docs-ctx-menu {
  width: min(92vw, 280px);
  max-width: 280px;
  padding: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
  direction: rtl;
}
.policy-docs-ctx-menu.hidden {
  display: none !important;
}
.policy-docs-ctx-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.policy-docs-ctx-heading {
  padding: 0.42rem 0.65rem 0.12rem;
  margin-top: 0.08rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #64748b);
  user-select: none;
  pointer-events: none;
}
.policy-docs-ctx-section--actions {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-bottom: 0.2rem;
}
.policy-docs-ctx-sep {
  margin: 0.2rem 0;
  border: none;
  border-top: 1px solid var(--border);
}
.policy-docs-ctx-row {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.48rem 0.65rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.87rem;
  text-align: right;
  line-height: 1.35;
  cursor: pointer;
  transition: background 0.1s;
}
.policy-docs-ctx-row:hover:not(:disabled) {
  background: rgba(13, 148, 136, 0.09);
}
.policy-docs-ctx-row:active:not(:disabled) {
  background: rgba(13, 148, 136, 0.14);
}
.policy-docs-ctx-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}
.policy-docs-ctx-row.is-active {
  background: rgba(13, 148, 136, 0.11);
  font-weight: 500;
}
.policy-docs-ctx-row--danger:hover:not(:disabled) {
  background: rgba(185, 28, 28, 0.07);
  color: #b91c1c;
}
.policy-docs-ctx-row:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.policy-docs-ctx-panel {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.policy-docs-ctx-panel.hidden {
  display: none !important;
}
.policy-docs-ctx-input {
  width: 100%;
  font-size: 0.82rem;
}
.policy-docs-ctx-fullbtn {
  width: 100%;
  justify-content: center;
}
.policy-docs-file-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.policy-docs-main {
  direction: rtl;
  display: grid;
  grid-template-columns: minmax(340px, 1.58fr) minmax(180px, 0.62fr);
  align-items: stretch;
  align-content: start;
  min-width: 0;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: hidden;
}
.policy-documents-tab .policy-docs-main,
.policy-act-edited-shell .policy-docs-main {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
}
@media (max-width: 960px) {
  .policy-docs-main {
    grid-template-columns: 1fr;
    min-height: auto;
    max-height: none;
  }
}
.policy-docs-list-section {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  align-self: stretch;
  overflow: hidden;
  border-bottom: none;
  border-inline-end: 1px solid var(--border);
}
#policy-docs-list-wrap,
#policy-act-edited-list-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 960px) {
  .policy-docs-list-section {
    border-inline-end: none;
    border-bottom: 1px solid var(--border);
    max-height: min(52vh, 420px);
  }
}
.policy-docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}
.policy-docs-table th,
.policy-docs-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.55rem;
  text-align: right;
  vertical-align: middle;
}
.policy-docs-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}
.policy-docs-table tr.policy-doc-table-row { cursor: pointer; }
.policy-docs-table tr.policy-doc-table-row:hover { background: rgba(13, 148, 136, 0.05); }
.policy-docs-table tr.policy-doc-table-row.is-selected { background: rgba(13, 148, 136, 0.14); }
.policy-docs-table .policy-doc-name-cell { font-weight: 500; max-width: 200px; word-break: break-word; }
.policy-docs-table-scroll {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.policy-doc-linkage-cell {
  vertical-align: middle;
  min-width: 7.25rem;
  max-width: 11rem;
}
.policy-doc-linkage-select {
  width: 100%;
  max-width: 10.5rem;
  font-size: 0.8rem;
  padding: 0.28rem 0.35rem;
  box-sizing: border-box;
}
.policy-doc-notes-cell {
  min-width: 8rem;
  max-width: 13rem;
  vertical-align: top;
}
.policy-doc-notes {
  width: 100%;
  min-height: 2.35rem;
  max-height: 4.6rem;
  resize: vertical;
  font-size: 0.81rem;
  line-height: 1.35;
  box-sizing: border-box;
}
.policy-doc-th-linkage { width: 1%; white-space: nowrap; }
.policy-doc-th-notes { min-width: 7.5rem; }
.policy-docs-preview-section {
  flex: 1;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
@media (max-width: 960px) {
  .policy-docs-preview-section {
    position: relative;
    max-height: none;
    overflow-y: visible;
  }
}
.policy-docs-preview-caption {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.policy-docs-preview {
  flex: 1;
  min-height: 160px;
  background: var(--bg-secondary);
  overflow: auto;
}
.policy-docs-preview .policy-pdf-canvas-scroll {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}
.policy-docs-preview iframe.policy-doc-preview-frame--html {
  width: 100%;
  max-width: 100%;
  min-height: 260px;
  height: min(120vh, 2200px);
  border: none;
  display: block;
  background: #fff;
}
.policy-docs-preview iframe.policy-doc-preview-frame--pdf {
  width: 100%;
  max-width: 100%;
  height: min(92vh, 1600px);
  border: none;
  display: block;
  background: #fff;
}
.policy-docs-preview img.policy-doc-preview-img,
.policy-docs-preview video.policy-doc-preview-video {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: #fff;
}
@media (max-width: 960px) {
  .policy-docs-preview iframe.policy-doc-preview-frame--pdf {
    height: min(85vh, 1400px);
  }
}

.policy-doc-preview-host {
  position: relative;
  width: 100%;
  min-height: min(85vh, 1200px);
}
.policy-doc-preview-host iframe.policy-doc-preview-frame--pdf {
  width: 100%;
  height: min(92vh, 1600px);
  border: none;
  display: block;
  background: #fff;
}
.policy-doc-field-overlay-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.policy-doc-field-overlay-layer--interactive {
  pointer-events: auto;
}
.policy-doc-overlay-field {
  position: absolute;
  box-sizing: border-box;
  border: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--border));
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 1px 4px;
  overflow: hidden;
}
.policy-doc-overlay-field-inner {
  font-size: clamp(7.5px, 0.88vw, 11px);
  line-height: 1.12;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: hidden;
  max-height: 100%;
  direction: rtl;
  color: var(--text);
  font-weight: 600;
}
.policy-doc-overlay-field-inner--editing {
  outline: 2px solid color-mix(in srgb, var(--accent) 65%, var(--border));
  outline-offset: 1px;
  white-space: normal;
  overflow: visible;
  max-height: none;
  background: color-mix(in srgb, #fff 88%, var(--accent));
  border-radius: 3px;
  cursor: text;
}
.policy-doc-overlay-field--sidebar-focus {
  border-style: solid;
  border-width: 2px;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  z-index: 3;
}
.policy-doc-overlay-checkbox {
  position: absolute;
  box-sizing: border-box;
  border: 2px dashed rgba(34, 139, 87, 0.88);
  background: rgba(34, 197, 124, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 4px;
  z-index: 2;
}
.policy-doc-overlay-checkbox--checked {
  background: rgba(34, 197, 124, 0.22);
  border-style: solid;
}
.policy-doc-overlay-checkbox-mark {
  font-size: clamp(12px, 2.2vmin, 22px);
  line-height: 1;
  font-weight: 800;
  color: color-mix(in srgb, #0d4d2f 92%, var(--text));
}
.policy-doc-overlay-checkbox.policy-doc-overlay-checkbox--interactive {
  cursor: pointer;
}
.policy-doc-field-overlay-layer--interactive .policy-doc-overlay-checkbox:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.policy-doc-overlay-checkbox--gated {
  opacity: 0.45;
  border-color: rgba(120, 120, 130, 0.55);
  background: repeating-linear-gradient(-45deg, rgba(140, 140, 160, 0.12), rgba(140, 140, 160, 0.12) 6px, transparent 6px, transparent 12px);
  cursor: not-allowed;
  pointer-events: none;
}
.policy-doc-overlay-field--gated {
  opacity: 0.52;
  cursor: not-allowed;
}
.policy-doc-overlay-field--gated .policy-doc-overlay-field-inner {
  pointer-events: none;
}
.policy-wf-fill-field-row--gate-disabled .policy-wf-fill-label {
  opacity: 0.55;
}
.binder-of-trig-modal {
  max-width: min(640px, 96vw);
}
.binder-of-trig-row {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  padding: 0.6rem;
  margin-bottom: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  align-items: flex-end;
}
.binder-of-trig-row .binder-of-inline-field {
  flex: 1 1 200px;
  margin-bottom: 0;
}
/** ???? ????? ?????? ???? (?? ???? ?????? ?????) */
.policy-doc-overlay-signature {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  overflow: hidden;
  pointer-events: none;
  border: 2px solid rgba(99, 102, 241, 0.85);
  background: rgba(99, 102, 241, 0.12);
  border-radius: 4px;
  z-index: 2;
}
.policy-doc-overlay-signature--unassigned {
  border-color: rgba(110, 110, 110, 0.95);
  background: rgba(128, 128, 128, 0.28);
}
.policy-doc-overlay-signature-inner {
  font-size: clamp(7px, 0.82vw, 10px);
  line-height: 1.1;
  text-align: center;
  direction: rtl;
  font-weight: 700;
  color: var(--text, #111);
  word-break: break-word;
  max-height: 100%;
  overflow: hidden;
}
.policy-doc-field-overlay-layer--interactive .policy-doc-overlay-signature {
  pointer-events: none;
}
/** ?????? ????? ????? ? ???? ????? ???? ?????? ?????? ????? ???? */
.policy-doc-overlay-signature.policy-doc-overlay-signature--interactive,
.policy-doc-field-overlay-layer--interactive .policy-doc-overlay-signature.policy-doc-overlay-signature--interactive {
  pointer-events: auto;
  cursor: pointer;
}
.policy-wf-fill-field-row--sidebar-active {
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 38%, var(--border));
  padding: 0.35rem 0.5rem;
  margin-inline: -0.35rem;
}
.policy-wf-fill-pick-btn {
  margin-top: 0.35rem;
  padding: 0.32rem 0.6rem;
  font-size: 0.82rem;
  border-radius: 8px;
  width: 100%;
}
.policy-wf-fill-field-row--flash {
  animation: policy-wf-field-flash 0.65s ease-out;
}
@keyframes policy-wf-field-flash {
  from {
    background: color-mix(in srgb, var(--accent) 20%, transparent);
  }
  to {
    background: transparent;
  }
}
.policy-wf-kbd {
  display: inline-block;
  font-size: 0.72em;
  font-family: inherit;
  font-weight: 600;
  padding: 0.06em 0.35em;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  vertical-align: baseline;
}
.policy-actions-tab--v2 .policy-act-section--workflow-split {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.policy-act-section h4 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.policy-act-binder-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.5rem;
}
.policy-act-binder-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin: 0.35rem 0 0.65rem;
}
.policy-act-binder-master {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  cursor: pointer;
  user-select: none;
}
.policy-act-binder-card {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
}
.policy-act-binder-cb-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  padding-top: 0.15rem;
  cursor: pointer;
}
.policy-act-binder-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.policy-act-binder-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.policy-act-tasks-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.policy-act-tasks-head--toolbar-only {
  justify-content: flex-end;
}
.policy-act-tasks-heading {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.policy-actions-new-task-icon {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-secondary);
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, box-shadow 0.15s;
}
.policy-actions-new-task-icon:hover {
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-secondary));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.policy-act-panel-tasks .policy-act-tasks-section {
  margin-top: 0;
}

.wf-checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}
.policy-actions-tab .label-like {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.binder-overlay-modal-inner .binder-overlay-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.65rem;
}
.binder-overlay-stage {
  position: relative;
  width: 100%;
  height: min(70vh, 900px);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #444;
}
.binder-overlay-modal--fullscreen {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}
/* ??? policy-wf-fill-shell: ????? ??? ???? position:fixed ? ???? ?????? ???? ?-body ?????? ?????? ????? ??? ????? */
.modal-overlay.binder-overlay-modal--fullscreen {
  position: fixed !important;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: 100vh;
  overflow: hidden;
  box-sizing: border-box;
  isolation: isolate;
}
.binder-overlay-modal-inner--fullscreen {
  width: 100%;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background: var(--bg);
}
.binder-overlay-toolbar--fullscreen {
  flex-shrink: 0;
}
.binder-overlay-editor-layout {
  overflow: hidden;
}
.binder-overlay-toolbar--editor-top {
  padding: 0.55rem 1rem 0.65rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-card) 0%, color-mix(in srgb, var(--bg-secondary) 42%, var(--bg-card)) 100%);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--border) 65%, transparent);
}
.binder-overlay-editor-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}
.binder-overlay-editor-hint-col {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.binder-overlay-editor-top-hint {
  margin: 0;
  max-width: min(100%, 52rem);
  line-height: 1.45;
  font-size: 0.86rem;
}
.binder-of-draw-mode-segment {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.2rem;
  padding: 0.28rem;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  width: fit-content;
  max-width: 100%;
}
.binder-of-draw-mode-segment .binder-of-mode-label {
  margin: 0;
  flex: 0 0 auto;
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  box-sizing: border-box;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}
.binder-of-draw-mode-segment .binder-of-mode-label:has(input:checked) {
  background: var(--bg-card);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.binder-of-draw-mode-segment .binder-of-mode-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.binder-of-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-shrink: 0;
}
.binder-of-toolbar-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.38rem;
  padding: 0.32rem 0.45rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.binder-of-toolbar-group--save {
  gap: 0.42rem;
  padding-inline: 0.5rem;
}
.binder-of-toolbar-divider {
  width: 1px;
  align-self: stretch;
  min-height: 1.65rem;
  margin-inline: 0.1rem;
  background: color-mix(in srgb, var(--border) 88%, transparent);
}
.binder-of-draw-actions--row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex-shrink: 0;
}
.binder-overlay-editor-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 1rem;
  padding: 0.65rem 1rem 1rem;
  box-sizing: border-box;
  overflow: hidden;
}
.binder-overlay-editor-body--three-pane {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 3fr) minmax(268px, 1.08fr);
  gap: 0.85rem;
  align-items: stretch;
}
.binder-overlay-editor-body--three-pane.binder-overlay-editor-body {
  display: grid;
}
.binder-overlay-regions-panel {
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 0.75rem 0.85rem;
  background: var(--bg-card);
  box-sizing: border-box;
}
.binder-overlay-regions-panel .binder-overlay-regions-heading {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  font-weight: 700;
  flex-shrink: 0;
}
.binder-overlay-regions-subhint {
  margin: 0 0 0.45rem !important;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.binder-overlay-editor-body--three-pane .binder-overlay-regions-panel .binder-of-list {
  flex: 1 1 auto;
  min-height: min(540px, 62vh);
  max-height: min(72vh, 720px);
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  padding-inline-start: 0;
  list-style: none;
}
.binder-of-list--boxed {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.binder-of-list-item {
  margin: 0;
  padding: 0.48rem 0.55rem 0.52rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-secondary);
  font-size: 0.83rem;
  line-height: 1.42;
  cursor: pointer;
  text-align: start;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.binder-of-list-item:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  background: color-mix(in srgb, var(--bg-secondary) 88%, var(--accent));
}
.binder-of-list-item--selected {
  border-color: color-mix(in srgb, #f59e0b 55%, var(--border));
  box-shadow: 0 0 0 2px color-mix(in srgb, #f59e0b 38%, transparent);
  background: color-mix(in srgb, var(--bg-secondary) 78%, #f59e0b);
}
.binder-of-list-item-meta {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.binder-of-list-empty {
  margin: 0;
  list-style: none;
}
.binder-of-checkbox-editor {
  margin-top: 0.5rem;
  padding: 0.45rem 0.55rem;
  border: 1px dashed color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-secondary) 96%, transparent);
}
.binder-of-checkbox-intro {
  margin: 0 0 0.35rem !important;
}
.binder-of-cb-variant-label {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0.25rem 0;
  font-size: 0.86rem;
  line-height: 1.35;
  cursor: pointer;
}
.binder-of-cb-grouped-panel {
  margin-top: 0.55rem;
}
.binder-of-cq-toolbar {
  margin-bottom: 0.65rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.binder-of-cq-toolbar-title {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
}
.binder-of-cq-toolbar-hint {
  margin: 0 0 0.45rem !important;
}
.binder-of-cq-list-ui {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
  max-height: min(22vh, 180px);
  overflow-y: auto;
}
.binder-of-cq-mini-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 0.86rem;
  padding: 0.25rem 0.35rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-secondary) 88%, transparent);
}
.binder-of-cq-mini-title {
  flex: 1 1 auto;
  min-width: 0;
}
.binder-of-cq-mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}
.binder-of-cq-section {
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  border-radius: 12px;
  padding: 0.45rem 0.5rem 0.55rem;
  background: color-mix(in srgb, var(--bg-card) 96%, var(--bg-secondary));
  margin-bottom: 0.55rem;
}
.binder-of-cq-section:last-child {
  margin-bottom: 0;
}
.binder-of-cq-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
}
.binder-of-cq-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.binder-of-cq-section-desc {
  margin: 0 0 0.4rem !important;
  font-size: 0.8rem;
}
.binder-of-cq-section-groups {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.binder-of-cb-groups-ui {
  margin-top: 0.55rem;
  max-height: min(48vh, 420px);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.binder-of-cb-group-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  background: var(--bg-secondary);
}
.binder-of-cb-group-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}
.binder-of-cb-group-important {
  margin: 0;
  font-size: 0.82rem;
  color: #b45309;
  white-space: nowrap;
}
.sig-policy-signed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.binder-of-cb-opt-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.55rem;
  align-items: center;
  padding: 0.3rem 0;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.binder-of-cb-opt-row:first-of-type {
  border-top: none;
}
.binder-of-cb-opt-row--active {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: 8px;
  padding-inline: 0.35rem;
}
.binder-of-cb-opt-row--region-selected {
  box-shadow: inset 3px 0 0 color-mix(in srgb, #2563eb 88%, var(--text-muted));
  border-radius: 8px;
  padding-inline: 0.35rem;
  background: color-mix(in srgb, #2563eb 12%, transparent);
}
.binder-of-cb-opt-row--active.binder-of-cb-opt-row--region-selected {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  box-shadow:
    inset 3px 0 0 color-mix(in srgb, #2563eb 88%, var(--text-muted)),
    0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent);
}
.binder-of-cb-opt-label {
  font-size: 0.86rem;
  font-weight: 600;
}
.binder-of-cb-place-st {
  grid-column: 1 / -1;
  font-size: 0.78rem !important;
}

.binder-overlay-editor-body--three-pane .binder-overlay-fields-panel {
  flex: unset;
  max-width: none;
  width: auto;
}

.binder-of-inline-modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 16, 0.45);
  backdrop-filter: blur(2px);
  padding: 1rem;
  box-sizing: border-box;
}

.binder-of-inline-modal-inner {
  width: min(100%, 480px);
  max-height: min(90vh, 640px);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem 1.05rem;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2);
}
.binder-of-inline-modal-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}
.binder-of-inline-field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-bottom: 0.65rem;
}
.binder-of-inline-lab {
  font-size: 0.82rem;
  font-weight: 600;
}
.binder-of-inline-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-top: 0.6rem;
}
.binder-of-rect--text {
  border-color: rgba(255, 193, 7, 0.95);
  background: rgba(255, 235, 59, 0.12);
  pointer-events: auto;
  cursor: pointer;
}
.binder-of-rect-checkbox-lbl {
  position: absolute;
  left: 3px;
  bottom: 2px;
  right: auto;
  max-width: 92%;
  font-size: clamp(9px, 2.2vmin, 11px);
  line-height: 1.08;
  font-weight: 700;
  color: color-mix(in srgb, #0f3d29 92%, var(--text));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.binder-of-rect-checkbox-preview {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(16px, 3.8vmin, 28px);
  font-weight: 800;
  color: color-mix(in srgb, #125a3a 90%, var(--text));
  opacity: 0.92;
  pointer-events: none;
}
.binder-of-rect.binder-of-rect--checkbox {
  position: relative;
}

.binder-overlay-fields-panel {
  flex: 0 0 clamp(280px, 34vw, 400px);
  max-width: min(400px, 100%);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 0.75rem 0.85rem;
  background: var(--bg-card);
  box-sizing: border-box;
}
.binder-overlay-editor-pdf-section {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  align-items: stretch;
  padding: 0.25rem 0;
  background: color-mix(in srgb, var(--bg-secondary) 92%, var(--border));
}
.binder-overlay-editor-pdf-section .binder-of-pdf-host {
  flex: 1 1 auto;
  width: 100%;
  align-self: stretch;
  min-height: min(420px, 50vh);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.binder-of-thumbs {
  flex: 0 0 auto;
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.4rem 0.5rem;
  margin-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  scrollbar-width: thin;
}
.binder-of-thumbs.hidden {
  display: none;
}
.binder-of-thumb {
  position: relative;
  flex: 0 0 auto;
  padding: 0.2rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  line-height: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.binder-of-thumb:hover {
  border-color: var(--accent, #2563eb);
}
.binder-of-thumb--active {
  border-color: var(--accent, #2563eb);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}
.binder-of-thumb-canvas {
  display: block;
  border-radius: 3px;
}
.binder-of-thumb-num {
  position: absolute;
  bottom: 3px;
  inset-inline-start: 3px;
  font-size: 0.62rem;
  line-height: 1;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  padding: 1px 4px;
}
.binder-of-thumb-badge {
  position: absolute;
  top: 3px;
  inset-inline-end: 3px;
  min-width: 1.05rem;
  height: 1.05rem;
  font-size: 0.62rem;
  line-height: 1.05rem;
  text-align: center;
  font-weight: 700;
  color: #fff;
  background: #f97316;
  border-radius: 999px;
  padding: 0 3px;
  box-sizing: border-box;
}
.binder-of-thumb-badge.hidden {
  display: none;
}
.binder-of-thumb-wrap {
  position: relative;
  flex: 0 0 auto;
  line-height: 0;
}
.binder-of-thumb-menu {
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1;
  font-weight: 700;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s ease, background 0.12s ease;
  z-index: 3;
}
.binder-of-thumb-wrap:hover .binder-of-thumb-menu,
.binder-of-thumb-menu:focus-visible {
  opacity: 1;
}
.binder-of-thumb-menu:hover {
  background: #fff;
  border-color: var(--accent, #2563eb);
}
.binder-of-page-tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}
.binder-of-page-tools.hidden {
  display: none;
}
.binder-of-page-tools-title {
  font-weight: 700;
  font-size: 0.82rem;
}
.binder-of-page-tools-hint {
  font-size: 0.72rem;
  color: var(--text-secondary, #6b7280);
}
.binder-of-pageop-menu {
  display: flex;
  flex-direction: column;
  min-width: 190px;
  padding: 0.3rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}
.binder-of-pageop-item {
  text-align: start;
  padding: 0.45rem 0.55rem;
  font-size: 0.82rem;
  border: 0;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-primary, #111827);
}
.binder-of-pageop-item:hover:not(:disabled) {
  background: var(--bg-secondary, #f3f4f6);
}
.binder-of-pageop-item.is-danger {
  color: #dc2626;
}
.binder-of-pageop-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.binder-of-anno-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.binder-of-anno-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
}
.binder-of-anno-tools {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
}
.binder-of-anno-tools.hidden {
  display: none;
}
.binder-of-anno-type {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
}
#binder-of-anno-color {
  width: 30px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: none;
  cursor: pointer;
}
.binder-of-anno {
  position: absolute;
  box-sizing: border-box;
  z-index: 5;
}
.binder-anno-active .binder-of-draw {
  cursor: crosshair;
}
.binder-of-anno--highlight {
  border: 1px solid transparent;
  border-radius: 2px;
}
.binder-of-anno--note {
  border: 1.5px solid #ffd400;
  border-radius: 4px;
  overflow: hidden;
}
.binder-of-anno-note-txt {
  display: block;
  padding: 2px 4px;
  font-size: 0.7rem;
  line-height: 1.2;
  color: #1a1a1a;
  word-break: break-word;
}
.binder-of-anno--selected {
  outline: 2px dashed #2563eb;
  outline-offset: 1px;
}
.binder-of-anno--pen {
  border: none;
}
.policy-doc-overlay-anno {
  position: absolute;
  box-sizing: border-box;
  pointer-events: none;
}
.policy-doc-overlay-anno--highlight {
  border: 1px solid transparent;
  border-radius: 2px;
}
.policy-doc-overlay-anno--note {
  border: 1.5px solid #ffd400;
  border-radius: 4px;
  overflow: hidden;
}
.policy-doc-overlay-anno-note-txt {
  display: block;
  padding: 2px 4px;
  font-size: 0.7rem;
  line-height: 1.2;
  color: #1a1a1a;
  word-break: break-word;
}
.policy-doc-overlay-anno--pen {
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
/* ???? ?????: ????? ????? PDF ???? ????? ? ?? ???? ?-.policy-wf-fill-pdf-host */
.binder-overlay-editor-pdf-section .policy-pdf-canvas-scroll--editor {
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  min-height: min(520px, 58vh);
  max-height: none;
  overflow: auto;
}.binder-overlay-fields-heading {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  font-weight: 700;
  text-align: start;
  flex-shrink: 0;
}
.binder-of-field-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1 1 auto;
  min-height: 120px;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-secondary);
  box-sizing: border-box;
}
.binder-of-field-option {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  cursor: pointer;
  padding: 0.32rem 0.4rem;
  border-radius: 8px;
  line-height: 1.35;
  font-size: 0.9rem;
}
.binder-of-field-option:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.binder-of-field-option input {
  margin-top: 0.18rem;
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .binder-overlay-editor-body--three-pane.binder-overlay-editor-body,
  .binder-overlay-editor-body {
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto;
    align-items: stretch;
    min-height: 0;
  }
  .binder-overlay-editor-pdf-section {
    flex: 1 1 auto;
    min-height: min(48vh, 420px);
    order: 1;
    max-width: none;
  }
  .binder-overlay-fields-panel {
    flex: 0 0 auto;
    max-width: none;
    width: 100%;
    max-height: min(44vh, 400px);
    order: 2;
  }
  .binder-overlay-regions-panel {
    flex: 1 1 auto;
    max-height: min(46vh, 480px);
    min-height: min(220px, 28vh);
    order: 3;
  }
  .binder-overlay-editor-body--three-pane .binder-overlay-regions-panel .binder-of-list {
    min-height: 120px;
    max-height: min(40vh, 360px);
  }
}
.binder-overlay-stage--fullscreen {
  flex: 1;
  min-height: 0;
  height: auto;
}

.policy-wf-pdf-fill-inner {
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  box-sizing: border-box;
}
.policy-wf-pdf-fill-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
}
.policy-wf-pdf-fill-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  justify-content: flex-end;
  flex: 1;
  min-width: min(100%, 320px);
}
.policy-wf-fill-add-wrap {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}
.policy-wf-fill-add-doc-btn {
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0.35rem 0.55rem;
  min-width: 2.35rem;
}
.policy-wf-fill-add-doc-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 5px);
  z-index: 80;
  min-width: 230px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.35rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.policy-wf-fill-add-doc-menu.hidden {
  display: none;
}
.policy-wf-fill-add-doc-item {
  border: none;
  background: transparent;
  text-align: right;
  cursor: pointer;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text);
}
.policy-wf-fill-add-doc-item:hover {
  background: var(--bg-secondary, rgba(0, 0, 0, 0.06));
}
.policy-wf-fill-head-act.policy-wf-fill-footer-btn {
  flex: 0 1 auto;
  min-width: 0;
  min-height: auto;
  padding: 0.38rem 0.55rem;
  font-size: 0.74rem;
}
.policy-wf-doc-protection-modes {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  margin-top: 0.38rem;
}
.policy-wf-doc-protection-mode-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  cursor: pointer;
}
.policy-wf-pdf-fill-title {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}
.policy-wf-pdf-fill-body {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: row;
}
.policy-wf-pdf-fill-pages-nav {
  flex: 0 0 min(156px, 19vw);
  min-width: 0;
  overflow: auto;
  background: var(--bg-card);
  border-inline-end: 1px solid var(--border);
  padding: 0.5rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.policy-wf-fill-chain-nav.hidden {
  display: none;
}
.policy-wf-fill-chain-nav-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted, var(--text));
  margin: 0;
}
.policy-wf-fill-chain-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.policy-wf-fill-pages-nav-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}
.policy-wf-fill-merge-reorder-toggle.is-active {
  border-color: var(--accent, #2563eb);
  box-shadow: 0 0 0 1px var(--accent, #2563eb);
  background: var(--bg-card);
}
.policy-wf-filename-prompt-dialog .policy-wf-filename-prompt-input {
  width: 100%;
  margin-top: 0.35rem;
  box-sizing: border-box;
}
.policy-wf-filename-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.policy-wf-doc-protection-block {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border, rgba(0, 0, 0, 0.12));
}
.policy-wf-doc-protection-label {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.82rem;
}
.policy-wf-doc-protection-block .input-elegant {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.2rem;
}
.agency-employers-toolbar {
  margin-top: 0.65rem;
  margin-bottom: 0.5rem;
}
.agency-employers-search-input {
  width: 100%;
  max-width: 36rem;
  box-sizing: border-box;
}
#agency-employers-panel .agency-employers-table-wrap {
  margin-top: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card, #fff);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.agency-employers-table-wrap {
  overflow-x: auto;
}
.agency-employers-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  font-size: 0.87rem;
}
.agency-employers-table thead th {
  background: var(--bg-secondary);
  font-weight: 600;
  text-align: right;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 var(--border);
}
.agency-employers-table tbody td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  text-align: right;
  word-break: break-word;
}
.agency-employers-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.015);
}
.agency-employers-table tbody tr:hover {
  background: rgba(13, 148, 136, 0.06);
}
.agency-employers-actions-col,
.agency-employers-actions-cell {
  white-space: nowrap;
}
.agency-employers-linked-col,
.agency-employers-count-cell {
  text-align: center;
  white-space: nowrap;
}
.agency-employers-clients-btn-cell {
  white-space: nowrap;
}
.agency-employer-client-open-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--accent, #2563eb);
  cursor: pointer;
  text-decoration: underline;
  text-align: right;
}
.agency-employer-client-open-btn:hover {
  opacity: 0.85;
}
/* ??? ????? ???? ???? ? ????? ???? ????? ?????? */
.employer-assign-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 960px) {
  .employer-assign-shell {
    grid-template-columns: 1fr;
  }
}
.employer-assign-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}
.employer-assign-search {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.5rem;
}
.client-employer-tab .agency-employers-table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card, #fff);
}
.employer-pick-scroll {
  max-height: min(320px, 42vh);
  overflow: auto;
  border-radius: 8px;
}
.employer-pick-scroll .agency-employers-table {
  min-width: 720px;
}
.employer-pick-row {
  cursor: pointer;
}
.employer-pick-row:hover {
  background: rgba(13, 148, 136, 0.07);
}
.employer-pick-row.is-selected {
  background: rgba(13, 148, 136, 0.15);
  outline: 2px solid rgba(13, 148, 136, 0.35);
  outline-offset: -2px;
}
.employer-pick-empty-cell {
  text-align: center;
  color: var(--text-muted, #64748b);
  padding: 1rem !important;
}
.employer-modal-clients-table {
  min-width: 320px;
}
.employer-assign-side .employer-side-title {
  margin-top: 0;
}
.employer-assign-side label {
  display: block;
}
.employer-side-seq label {
  width: 100%;
}
.employer-side-seq input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.25rem;
}
.employer-side-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.75rem;
}
.employer-side-actions .btn-primary,
.employer-side-actions .btn-secondary {
  width: 100%;
}
.client-employer-tab .settings-card + .settings-card {
  margin-top: 1rem;
}
.client-employer-picker-modal-inner {
  max-width: min(96vw, 920px);
  width: 100%;
}
.client-employer-picker-search {
  width: 100%;
  box-sizing: border-box;
  margin: 0.5rem 0 0.65rem;
}
.client-employer-tab-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}
.client-employer-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}
.client-employer-assigned-wrap .agency-employers-table {
  min-width: 800px;
}
.client-employer-status-col,
.client-employer-seq-col {
  text-align: center;
  white-space: nowrap;
}
.client-employer-status-cell {
  font-size: 0.82rem;
}
.client-employer-menu-col {
  width: 2.75rem;
  text-align: center;
}
.client-employer-seq-input {
  width: 4.25rem;
  min-width: 0;
  box-sizing: border-box;
}
.client-employer-actions-wrap {
  position: relative;
  vertical-align: middle;
  overflow: visible;
}
.client-employer-row-menu {
  min-width: 13rem;
  max-height: min(280px, 55vh);
  overflow-y: auto;
}
.policy-wf-fill-chain-nav-btns {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.policy-wf-fill-chain-file-btn {
  display: block;
  width: 100%;
  text-align: right;
  font-size: 0.78rem;
  padding: 0.35rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: inherit;
  cursor: pointer;
  line-height: 1.25;
}
.policy-wf-fill-chain-file-btn:hover {
  border-color: var(--accent, #2563eb);
}
.policy-wf-fill-chain-file-btn.is-active {
  border-color: var(--accent, #2563eb);
  box-shadow: 0 0 0 1px var(--accent, #2563eb);
  background: var(--bg-card);
}
.policy-wf-fill-pages-nav-heading {
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-muted, var(--text));
}
.policy-wf-fill-merge-drag-hint {
  margin: 0.35rem 0 0.45rem;
  font-size: 0.72rem;
}
.policy-wf-fill-pages-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.policy-wf-merge-plan-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  text-align: right;
  font-size: 0.78rem;
  padding: 0.35rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: inherit;
  cursor: pointer;
  line-height: 1.25;
  user-select: none;
}
.policy-wf-merge-plan-row--reorder {
  cursor: grab;
}
.policy-wf-merge-plan-row--reorder:active {
  cursor: grabbing;
}
.policy-wf-merge-plan-row:hover {
  border-color: var(--accent, #2563eb);
}
.policy-wf-merge-drag-hint {
  flex-shrink: 0;
  opacity: 0.55;
  font-size: 0.85rem;
}
.policy-wf-merge-plan-label {
  flex: 1;
  min-width: 0;
}
.policy-wf-fill-chain-file-btn[draggable='true'] {
  cursor: grab;
}
.policy-wf-fill-chain-file-btn[draggable='true']:active {
  cursor: grabbing;
}
.policy-wf-fill-page-nav-btn {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 0.78rem;
  padding: 0.35rem 0.25rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: inherit;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.policy-wf-fill-page-nav-btn:hover {
  border-color: var(--accent, #2563eb);
}
.policy-pdf-canvas-scroll--multipage {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.policy-wf-pdf-fill-preview {
  flex: 1.25;
  min-width: 0;
  overflow: hidden;
  background: var(--bg-secondary);
  padding: 0.75rem;
  border-inline-end: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 0;
}
.policy-wf-fill-zoom-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}
.policy-wf-zoom-slider-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  min-width: 12rem;
}
.policy-wf-zoom-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted, var(--text));
  flex: 1;
}
.policy-wf-zoom-label input[type='range'] {
  flex: 1;
  min-width: 4rem;
}
.policy-wf-fill-sig-role-popover {
  z-index: 50;
}

.policy-wf-zoom-pct {
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  min-width: 2.5rem;
}
.policy-wf-fill-pdf-host {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.policy-wf-fill-pdf-host .policy-pdf-canvas-scroll {
  max-height: none;
  overflow: visible;
}
.policy-wf-pdf-fill-sidebar {
  flex: 0 0 min(360px, 40vw);
  padding: 1rem;
  overflow: auto;
  background: var(--bg-card);
}
.policy-wf-fill-sidebar-title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
}
.policy-wf-fill-sidebar-tools {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}
.policy-wf-fill-search {
  width: 100%;
  box-sizing: border-box;
}
.policy-wf-fill-undo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.policy-wf-fill-undo-row .policy-wf-toast-btn {
  flex: 1 1 auto;
  justify-content: center;
}
.policy-wf-fill-progress {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
}
.policy-wf-fill-progress.hidden {
  display: none;
}
.policy-wf-fill-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}
.policy-wf-fill-progress-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}
.policy-wf-fill-progress--done .policy-wf-fill-progress-label {
  color: #15803d;
}
.policy-wf-fill-progress-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.policy-wf-fill-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #f97316);
  transition: width 0.25s ease;
}
.policy-wf-fill-progress--done .policy-wf-fill-progress-fill {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}
.policy-wf-fill-next-imp.hidden {
  display: none;
}
.policy-wf-fill-preview-toggle[aria-pressed='true'] {
  background: var(--accent, #2563eb);
  color: #fff;
  border-color: var(--accent, #2563eb);
}
.policy-wf-fill-preview-mode .policy-wf-pdf-fill-sidebar {
  display: none;
}
.policy-wf-fill-preview-mode .policy-wf-pdf-fill-preview {
  flex: 1 1 auto;
}
.policy-wf-fill-draft-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid #f4c84a;
  border-radius: 8px;
  background: #fff7e6;
  color: #7a5b00;
}
.policy-wf-fill-draft-banner.hidden {
  display: none;
}
.policy-wf-fill-draft-banner-txt {
  font-size: 0.78rem;
  font-weight: 600;
}
.policy-wf-fill-draft-banner-actions {
  display: flex;
  gap: 0.3rem;
}
.policy-wf-fill-autosave-status {
  align-self: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin-inline-end: 0.3rem;
}
.policy-wf-fill-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 1.65rem;
  max-height: min(20vh, 8rem);
  resize: vertical;
  line-height: 1.3;
  padding: 0.28rem 0.42rem;
}
.policy-wf-fill-field-row--chain-inactive {
  opacity: 0.42;
}
.policy-wf-merge-doc-block-handle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.35rem;
  margin: 0.15rem 0 0.25rem;
  font-size: 0.78rem;
  border-radius: 6px;
  border: 1px dashed var(--border, rgba(0, 0, 0, 0.2));
  background: var(--bg-secondary, rgba(0, 0, 0, 0.04));
  cursor: grab;
}
.policy-wf-merge-doc-block-handle:active {
  cursor: grabbing;
}
.policy-wf-merge-doc-block-handle-label {
  flex: 1;
  min-width: 0;
}
.policy-wf-fill-field-row--hidden {
  display: none !important;
}
.policy-wf-fill-field-row {
  margin-bottom: 0.38rem;
}
.policy-wf-fill-label {
  display: block;
  font-weight: 600;
  font-size: 0.84rem;
  margin-bottom: 0.22rem;
  color: var(--text);
}
.policy-wf-pdf-fill-footer {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
  align-items: stretch;
}
.policy-wf-fill-footer-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.15rem;
  font-weight: 600;
  font-size: 0.76rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem 0.4rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  line-height: 1.15;
  box-sizing: border-box;
}
.policy-wf-fill-footer-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.policy-wf-fill-footer-btn--sig .policy-wf-etrog-badge {
  flex-shrink: 0;
}
.policy-wf-fill-footer-btn-txt {
  text-align: center;
}

.policy-wf-toast-btn {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: 0.42rem 0.75rem;
  font-size: 0.82rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.policy-wf-toast-btn:hover:not(:disabled) {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.22);
}
.policy-wf-toast-btn--muted {
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
}
.policy-wf-toast-btn--compact {
  padding: 0.32rem 0.65rem;
  font-size: 0.78rem;
}
.policy-wf-toast-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.policy-wf-etrog-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  height: 1.65rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  background: #22c55e;
  color: #052e16;
  letter-spacing: -0.02em;
}

.policy-wf-deviation-backdrop {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}
.policy-wf-deviation-dialog {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  max-width: 26rem;
  width: 100%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
}
.policy-wf-deviation-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.policy-wf-deviation-msg {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: var(--text-muted, var(--text));
  line-height: 1.45;
}
.policy-wf-deviation-keys {
  margin: 0 0 1rem;
  padding-inline-start: 1.1rem;
  font-size: 0.86rem;
}
.policy-wf-deviation-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.policy-wf-important-backdrop {
  position: absolute;
  inset: 0;
  z-index: 52;
  background: rgba(127, 29, 29, 0.35);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}
.policy-wf-important-dialog {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 1.15rem 1.25rem 1.25rem;
  max-width: 28rem;
  width: 100%;
  box-shadow: 0 18px 52px rgba(185, 28, 28, 0.22);
  border: 2px solid color-mix(in srgb, #ef4444 65%, var(--border));
}
.policy-wf-important-title {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
  color: #b91c1c;
}
.policy-wf-important-msg {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  color: var(--text-muted, var(--text));
  line-height: 1.45;
}
.policy-wf-important-list {
  margin: 0 0 1rem;
  padding-inline-start: 1.15rem;
  font-size: 0.86rem;
  max-height: min(38vh, 240px);
  overflow-y: auto;
}
.policy-wf-important-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.policy-wf-fill-field-row--important-miss .policy-wf-fill-label {
  color: #b91c1c;
}
.policy-wf-fill-field-row--important-miss .policy-wf-fill-inp,
.policy-wf-fill-field-row--important-miss textarea.policy-wf-fill-textarea {
  outline: 2px solid #ef4444;
  outline-offset: 1px;
  border-color: color-mix(in srgb, #ef4444 55%, var(--border));
}
.policy-doc-overlay-field--important-miss {
  outline: 3px solid rgba(239, 68, 68, 0.95);
  outline-offset: 1px;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.2);
}
.policy-doc-overlay-checkbox--important-miss {
  outline: 3px solid rgba(239, 68, 68, 0.95);
  outline-offset: 1px;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.2);
}
.binder-of-important-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-inline-start: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.binder-of-important-label input {
  margin: 0;
  flex-shrink: 0;
}

/* ????? ??? ??? ??? ???? ?????? ????? */
.binder-of-ftype-cfg {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-inline-start: 0.4rem;
  vertical-align: middle;
}
.binder-of-ftype-cfg select,
.binder-of-ftype-cfg input {
  font-size: 0.78rem;
  padding: 0.22rem 0.42rem;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  max-width: 170px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}
.binder-of-ftype-cfg select {
  cursor: pointer;
  appearance: auto;
  color-scheme: light;
}
.binder-of-ftype-cfg select option {
  background: #fff;
  color: #1e293b;
}
.binder-overlay-regions-panel .binder-of-list-item select,
.binder-overlay-regions-panel .binder-of-list-item input[type='text'] {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}
.binder-of-list-item .binder-of-ftype-cfg {
  display: flex;
  margin-top: 0.35rem;
  margin-inline-start: 0;
  width: 100%;
}
.binder-of-ftype-cfg input.binder-region-flabel,
.binder-of-ftype-cfg input.binder-region-foptions {
  min-width: 110px;
}
.policy-wf-fill-date,
.policy-wf-fill-number {
  font-variant-numeric: tabular-nums;
}

.policy-wf-close-choice-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.65rem;
}
/*
 * ????? PDF ??????: ???? position:fixed ? ?? ?????? ??? position:relative ?? ??????,
 * ?? ???? ?? .modal-overlay ??????? ???? ?????? body ("????? ?????").
 */
.policy-wf-fill-shell.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10100;
  isolation: isolate;
}

/* ????? ?????? ? ????? ??????? (???? ?? ?????) */
.policy-wf-fill-questionnaires-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.32rem 0.45rem;
  min-height: 2.35rem;
  min-width: 2.35rem;
}
.policy-wf-fill-questionnaires-btn.hidden {
  display: none !important;
}
.policy-wf-fill-questionnaires-ico {
  display: block;
}

/* ????? ???? ????? (???????) ? ?????? ????? ?????? ????? (???? slate, ?? ????-????) */
.policy-wf-cq-hub-overlay {
  position: absolute;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(5px);
}
.policy-wf-cq-hub-overlay.hidden {
  display: none !important;
}
.policy-wf-cq-hub-panel {
  width: min(94vw, 720px);
  max-height: min(88vh, 680px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(165deg, #52647a 0%, #3d5266 38%, #2c3f4f 100%);
  border: 1px solid rgba(203, 213, 225, 0.28);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 18px 44px rgba(15, 23, 42, 0.32);
  color: #f1f5f9;
}
.policy-wf-cq-hub-panel--pick .policy-wf-cq-hub-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}
.policy-wf-cq-hub-accent {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #5eead4 0%, #14b8a6 52%, #0d9488 100%);
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.38);
}
.policy-wf-cq-hub-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: rgba(241, 245, 249, 0.82);
}
.policy-wf-cq-hub-heading {
  margin: 0.15rem 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}
.policy-wf-cq-pick-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  overflow-y: auto;
  flex: 1;
  min-height: 120px;
}
.policy-wf-cq-pick-list li + li {
  margin-top: 0.35rem;
}
.policy-wf-cq-pick-item {
  width: 100%;
  text-align: right;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.22);
  background: rgba(15, 23, 42, 0.22);
  color: #f8fafc;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.policy-wf-cq-pick-item:hover {
  border-color: rgba(94, 234, 212, 0.45);
  background: rgba(15, 23, 42, 0.32);
  filter: brightness(1.03);
}

.policy-wf-cq-hub-panel--sheet .policy-wf-cq-hub-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}
.policy-wf-cq-hub-back {
  flex-shrink: 0;
  border: 1px solid rgba(226, 232, 240, 0.25);
  background: rgba(15, 23, 42, 0.25);
  color: #f1f5f9;
  border-radius: 10px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  cursor: pointer;
}
.policy-wf-cq-hub-back:hover {
  background: rgba(15, 23, 42, 0.38);
}
.policy-wf-cq-hub-title {
  margin: 0;
  flex: 1;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}
.policy-wf-cq-hub-desc {
  margin: 0;
  padding: 0.5rem 1rem 0.35rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(241, 245, 249, 0.92);
}

.policy-wf-cq-sheet-scroll {
  overflow: auto;
  flex: 1;
  padding: 0.5rem 0.85rem 0.75rem;
  min-height: 160px;
}
.policy-wf-cq-fill-table {
  --policy-wf-cq-row-h: 2.42rem;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.policy-wf-cq-fill-table thead th {
  text-align: right;
  padding: 0.4rem 0.5rem;
  font-weight: 700;
  font-size: 0.74rem;
  color: rgba(241, 245, 249, 0.9);
  background: rgba(15, 23, 42, 0.25);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}
.policy-wf-cq-fill-table tbody td {
  padding: 0.38rem 0.45rem;
  vertical-align: middle;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  line-height: 1.35;
  min-height: var(--policy-wf-cq-row-h);
}
.policy-wf-cq-fill-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.06);
}
.policy-wf-cq-col-q {
  width: 40%;
}
.policy-wf-cq-q {
  color: #f8fafc;
  font-weight: 500;
}
.policy-wf-cq-opts {
  text-align: left;
}
.policy-wf-cq-opt-pill {
  display: inline-block;
  margin: 0.12rem;
  padding: 0.3rem 0.62rem;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.25);
  background: rgba(15, 23, 42, 0.28);
  color: #f1f5f9;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.12s ease;
}
.policy-wf-cq-opt-pill:hover {
  filter: brightness(1.08);
  border-color: rgba(203, 213, 225, 0.4);
}
.policy-wf-cq-opt-pill--selected {
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
  border-color: rgba(74, 222, 128, 0.5);
  color: #f0fdf4;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(21, 128, 61, 0.4);
}

.policy-wf-cq-hub-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.2);
}
.policy-wf-cq-hub-actions--solo {
  justify-content: flex-end;
}
.policy-wf-cq-hub-done.policy-wf-cq-hub-btn-primary,
.policy-wf-cq-hub-btn-primary {
  min-width: 8rem;
  border: none;
  border-radius: 12px;
  padding: 0.55rem 1.35rem;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
  color: #f0fdf4;
  border: 1px solid rgba(74, 222, 128, 0.45);
  box-shadow: 0 2px 12px rgba(21, 128, 61, 0.38);
}
.policy-wf-cq-hub-done:hover {
  filter: brightness(1.05);
}
.policy-wf-cq-hub-close.ghost {
  border: 1px solid rgba(226, 232, 240, 0.28);
  background: rgba(15, 23, 42, 0.22);
  color: #f1f5f9;
  border-radius: 12px;
  padding: 0.45rem 1rem;
  font-weight: 600;
  cursor: pointer;
}
.policy-wf-cq-hub-close.ghost:hover {
  background: rgba(15, 23, 42, 0.35);
}

.policy-act-subtabs-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 0;
}
.policy-actions-tab--v2 .policy-act-subtabs-section.policy-act-section {
  margin-top: 0;
}
.policy-act-single-mount {
  min-height: 180px;
}
.policy-act-single-mount:has(.policy-act-edited-panel) {
  display: flex;
  flex-direction: column;
  min-height: min(400px, 70vh);
  max-height: min(92vh, calc(100vh - 160px));
}
.policy-act-single-mount:has(.policy-act-edited-panel) .policy-act-edited-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.policy-act-single-mount:has(.policy-act-edited-panel) .policy-act-edited-shell {
  flex: 1 1 auto;
  min-height: 0;
}
.policy-act-subtabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0;
  flex-wrap: wrap;
  align-items: center;
  max-width: 100%;
}
.policy-act-subtab {
  flex: 0 0 auto;
  min-height: 2.15rem;
  padding: 0.45rem 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
}
.policy-act-subtab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}
.policy-act-subpanel-heading {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}
.policy-act-history-heading {
  margin-top: 1.35rem;
}

.policy-act-run-binder-pick {
  margin-bottom: 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-secondary);
}
.policy-act-run-binder-label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}
.policy-act-run-binder-hint {
  margin: 0.45rem 0 0;
}
.policy-act-auto-doc-hint {
  margin: 0 0 0.75rem;
}
.policy-act-run-warn {
  margin-bottom: 0.65rem;
}
.policy-act-wf-banner {
  margin: 0 0 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
}
.policy-act-binder-warn {
  color: var(--error, #b91c1c);
}
.policy-act-shared-binder-select {
  width: 100%;
  max-width: 28rem;
}
.policy-wf-template-name-cell {
  vertical-align: top;
}
.policy-wf-template-run-link {
  display: inline-block;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-align: start;
}
.policy-wf-template-run-link:hover:not(:disabled) {
  color: color-mix(in srgb, var(--accent) 88%, #000);
}
.policy-wf-template-run-link:disabled {
  opacity: 0.55;
  cursor: wait;
}
.policy-wf-template-hands {
  margin-top: 0.25rem;
  line-height: 1.35;
}

.compose-to-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}
.compose-to-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.compose-to-chips--visible {
  margin-bottom: 0.1rem;
}
.compose-to-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text);
  max-width: 100%;
}
.compose-to-chip--readonly {
  cursor: default;
}

.policy-wf-email-preset-rows {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.35rem 0;
}
.policy-wf-email-preset-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

.binder-of-rect {
  border: 2px solid color-mix(in srgb, var(--accent) 72%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.binder-overlay-toolbar--draw {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.65rem;
  align-items: center;
}
.binder-of-draw-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}
.binder-of-field-label {
  font-weight: 600;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.binder-of-field-select {
  min-width: 12rem;
}
.binder-of-draw-hint {
  margin: 0;
  max-width: 28rem;
}
.binder-of-draw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.binder-of-toolbar-btn {
  min-width: 6.5rem;
  min-height: 2.15rem;
  font-size: 0.88rem;
  border-radius: 9px;
}
.binder-of-toolbar-btn--compact {
  min-width: 4.6rem;
  padding-inline: 0.55rem;
}
.binder-of-toolbar-btn--save {
  min-width: 5.75rem;
  font-weight: 700;
}
.binder-of-toolbar-btn--fill {
  min-width: 6.75rem;
  border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
  color: color-mix(in srgb, var(--accent) 88%, var(--text));
}
.binder-of-toolbar-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
#binder-of-undo,
#binder-of-redo {
  min-width: 4.6rem;
}
.binder-of-snap-toggle {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .policy-wf-pdf-fill-body {
    flex-direction: column;
  }
  .policy-wf-pdf-fill-sidebar {
    flex: none;
    max-height: 42vh;
    border-inline-end: none;
    border-top: 1px solid var(--border);
  }
  .policy-wf-pdf-fill-head-actions {
    justify-content: flex-start;
  }
  .policy-wf-fill-head-act.policy-wf-fill-footer-btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: calc(50% - 0.25rem);
  }
  .policy-wf-email-preset-row {
    grid-template-columns: 1fr;
  }
}
.policy-wf-binder-company-row {
  margin-bottom: 0.75rem;
}
.policy-wf-binder-company-row select {
  min-width: 14rem;
}
.policy-wf-binder-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: min(100%, 280px);
}
.policy-wf-binder-field-label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
}
.policy-wf-binder-field-hint {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
}
.policy-wf-binder-company-select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.policy-wf-binder-upload--styled {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px dashed color-mix(in srgb, var(--border) 85%, var(--accent));
  background: color-mix(in srgb, var(--bg-card) 94%, var(--bg-secondary));
}
.policy-wf-binder-upload-heading {
  font-weight: 600;
  font-size: 0.9rem;
}
.policy-wf-binder-upload-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
}
.policy-wf-binder-file-pick {
  cursor: pointer;
  flex-shrink: 0;
}
.policy-wf-binder-file-name {
  flex: 1 1 140px;
  min-width: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.35;
  word-break: break-word;
}
.policy-act-templates-table-wrap {
  overflow-x: auto;
  margin-top: 0.5rem;
}
.binder-of-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  pointer-events: none;
}
.binder-of-draw {
  position: absolute;
  inset: 0;
  cursor: crosshair;
  z-index: 2;
}
.binder-of-rect {
  position: absolute;
  border: 2px solid rgba(255, 193, 7, 0.95);
  background: rgba(255, 235, 59, 0.12);
  pointer-events: none;
  box-sizing: border-box;
}
.binder-of-rect--signature {
  pointer-events: auto;
  border-color: rgba(99, 102, 241, 0.95);
  background: rgba(99, 102, 241, 0.14);
  cursor: pointer;
}
.binder-of-rect--signature.binder-of-rect--unassigned {
  background: rgba(128, 128, 128, 0.38);
  border-color: rgba(110, 110, 110, 0.9);
}
.binder-of-rect--checkbox {
  pointer-events: auto;
  border-color: rgba(34, 139, 87, 0.95);
  background: rgba(46, 204, 113, 0.16);
  cursor: pointer;
}
.binder-of-rect--selected {
  z-index: 6;
  outline: 3px solid rgba(251, 191, 36, 0.95);
  outline-offset: 1px;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.22);
}
.binder-of-rect--primary {
  z-index: 7;
  outline-color: rgba(59, 130, 246, 0.98);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.26);
}

/* ????? ????? ??? + ???? ??? ?????? */
.binder-of-drag-preview {
  position: absolute;
  box-sizing: border-box;
  border: 2px dashed rgba(59, 130, 246, 0.95);
  background: rgba(59, 130, 246, 0.12);
  pointer-events: none;
  z-index: 8;
}
.binder-of-guide {
  position: absolute;
  pointer-events: none;
  z-index: 9;
  background: rgba(236, 72, 153, 0.92);
}
.binder-of-guide--v {
  top: 0;
  bottom: 0;
  width: 1px;
}
.binder-of-guide--h {
  left: 0;
  right: 0;
  height: 1px;
}
.binder-of-snap-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  user-select: none;
  cursor: pointer;
}

/* ???? ????? ?????? ?????? */
.binder-of-align-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin: 0 0 0.5rem;
  padding: 0.35rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
}
.binder-of-align-bar.hidden {
  display: none;
}
.binder-of-align-bar-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-inline-end: 0.2rem;
}
.binder-of-align-bar button {
  min-width: 30px;
  padding: 0.2rem 0.4rem;
  font-size: 0.95rem;
  line-height: 1;
}
.binder-of-copy-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.5rem;
  padding: 0.35rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
}
.binder-of-copy-bar.hidden {
  display: none;
}
.binder-of-copy-bar-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
}
.binder-of-copy-target {
  padding: 0.2rem 0.35rem;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}
.binder-of-tpl-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 1rem;
}
.binder-of-tpl-panel {
  width: min(440px, 96vw);
  max-height: 80vh;
  overflow-y: auto;
  background: var(--bg, #fff);
  color: var(--text, #111);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
}
.binder-of-tpl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.binder-of-tpl-head h4 {
  margin: 0;
  font-size: 1.05rem;
}
.binder-of-tpl-x {
  border: none;
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}
.binder-of-tpl-list {
  margin-top: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.binder-of-tpl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
}
.binder-of-tpl-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.binder-of-tpl-name {
  font-weight: 600;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.binder-of-tpl-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.binder-of-tpl-actions {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
}
.binder-of-tpl-del {
  color: #b42318;
}
.binder-of-sig-pencil {
  position: absolute;
  top: 2px;
  inset-inline-end: 2px;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  z-index: 3;
}
.binder-of-mode-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-inline-end: 0;
  cursor: pointer;
  user-select: none;
}
.pdf-overlay-editor-anchor {
  position: relative;
}
.binder-of-sig-popover {
  position: absolute;
  z-index: 30;
  background: var(--card-bg, #fff);
  color: var(--text-primary, #111);
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  min-width: 220px;
  max-width: min(320px, 94vw);
}
.binder-of-sig-popover-title {
  font-weight: 600;
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
}
.binder-of-sig-popover-sub {
  display: block;
  font-weight: 400;
  font-size: 0.74rem;
  opacity: 0.72;
  margin-top: 0.15rem;
}
.binder-of-sig-menu-item--on::before {
  content: '? ';
  color: var(--success, #16a34a);
  font-weight: 700;
}
.binder-of-sig-role-checks {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
  max-height: 220px;
  overflow: auto;
}
.binder-of-sig-role-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
}
.binder-of-sig-popover--menu {
  max-width: min(22rem, calc(100vw - 1.5rem));
  padding: 0.5rem 0.55rem;
}
.binder-of-sig-role-menu {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-height: min(60vh, 22rem);
  overflow-y: auto;
}
.binder-of-sig-menu-item {
  display: block;
  width: 100%;
  text-align: right;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  color: inherit;
  box-sizing: border-box;
  line-height: 1.35;
}
.binder-of-sig-menu-item:hover {
  background: rgba(15, 23, 42, 0.06);
}
.binder-of-sig-menu-item--on {
  border-color: var(--border, #cdd3db);
  background: rgba(99, 102, 241, 0.12);
  font-weight: 600;
}
.binder-of-sig-menu-item--none {
  color: var(--text-muted, #64748b);
  font-size: 0.82rem;
}
.binder-of-list-sig-hit {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  color: var(--accent, #4f46e5);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.binder-of-list-sig-hit:hover {
  opacity: 0.9;
}
.binder-of-list-sig-pencil {
  margin-inline-start: 0.25rem;
  vertical-align: middle;
}

.policy-wf-type-overlay .policy-wf-tpl-list table {
  width: 100%;
}

/* ?????? ?????? ??? ??? ?????? ? ???? ????? ?? ?????? */
.policy-wf-type-overlay--actions {
  padding: 1rem;
  align-items: center;
  justify-content: center;
  z-index: 120;
}
.policy-wf-type-modal.policy-wf-type-modal--actions.modal {
  max-width: min(1140px, calc(100vw - 2rem));
  width: min(1140px, calc(100vw - 2rem));
  max-height: min(920px, calc(100vh - 2rem));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem;
  box-sizing: border-box;
}
.policy-wf-type-modal-head {
  flex-shrink: 0;
}
.policy-wf-type-modal-head h3 {
  margin: 0 0 0.35rem;
}
.policy-wf-type-modal-head .form-hint {
  margin: 0;
}
.policy-wf-type-modal-body {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 1.15fr);
  gap: 1.25rem;
  min-height: 0;
  flex: 1;
  margin-top: 0.65rem;
}
.policy-wf-type-modal-col {
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.policy-wf-type-modal-subtitle {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
}
.policy-wf-type-modal-col--list .policy-wf-tpl-list {
  flex: 1;
  min-height: 10rem;
  max-height: min(62vh, 560px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  background: var(--bg-secondary);
}
.policy-wf-type-modal-col--list .policy-wf-tpl-list .premium-evolution-table {
  font-size: 0.92rem;
}
.policy-wf-type-modal-col--form {
  overflow-y: auto;
  max-height: min(74vh, 640px);
  padding-inline-start: 0.35rem;
}
.policy-wf-type-modal-actions {
  margin-top: 1rem;
  flex-wrap: wrap;
}
.policy-wf-tpl-presets-section--in-modal .policy-wf-type-modal-subtitle:first-child {
  margin-top: 0;
}
@media (max-width: 840px) {
  .policy-wf-type-modal-body {
    grid-template-columns: 1fr;
  }
  .policy-wf-type-modal-col--list .policy-wf-tpl-list {
    max-height: 260px;
  }
  .policy-wf-type-modal-col--form {
    max-height: none;
    overflow-y: visible;
  }
}

/* ???? ??? ??? ?????? ? ???? ??? ???, ??? ??????? */
.policy-wf-binder-overlay {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
  z-index: 120;
}
.policy-wf-binder-modal.policy-wf-binder-modal--fullscreen.modal {
  max-width: none;
  width: 100%;
  height: 100vh;
  max-height: none;
  margin: 0;
  border-radius: 0;
  padding: 1rem 1.35rem 1.35rem;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}
.policy-wf-binder-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-shrink: 0;
  margin-bottom: 0.65rem;
}
.policy-wf-binder-head-text h3 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}
.policy-wf-binder-close-btn {
  flex-shrink: 0;
}
.policy-wf-binder-toolbar-panel {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 0.85rem;
}
.policy-wf-binder-toolbar-panel .policy-wf-binder-company-row {
  margin-bottom: 0;
  flex: 1 1 240px;
}
.policy-wf-binder-toolbar-panel .policy-wf-binder-upload {
  margin-bottom: 0;
}
.policy-wf-binder-list--main {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}
.policy-wf-binder-thumb-link {
  display: block;
  text-decoration: none;
  color: inherit;
  margin: 0 0 0.65rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.policy-wf-binder-thumb-link:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}
.policy-wf-binder-thumb-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 38%, transparent);
}
.policy-wf-binder-thumb-link--static {
  cursor: default;
  pointer-events: none;
}
.policy-wf-binder-thumb-host {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
  background: linear-gradient(145deg, var(--bg-secondary) 0%, var(--bg) 100%);
}
.policy-wf-binder-thumb-skel {
  font-size: 0.82rem;
  color: var(--text-muted);
  animation: policy-wf-binder-thumb-pulse 1.1s ease-in-out infinite;
}
@keyframes policy-wf-binder-thumb-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}
.policy-wf-binder-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  vertical-align: middle;
  background: #eceff1;
}
.policy-wf-binder-thumb-canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto !important;
  height: auto !important;
}
.policy-wf-binder-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 5rem;
}
.policy-wf-binder-thumb-fallback-label {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px dashed var(--border);
  background: color-mix(in srgb, var(--bg-card) 88%, transparent);
}
.policy-wf-binder-thumb-fallback--pdf .policy-wf-binder-thumb-fallback-label {
  color: #b71c1c;
  border-color: rgba(183, 28, 28, 0.35);
  background: rgba(183, 28, 28, 0.06);
}
.policy-wf-binder-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  align-content: start;
}
.policy-wf-binder-card {
  padding: 1.05rem 1.15rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 14rem;
}
.policy-wf-binder-card strong {
  font-size: 1.02rem;
  line-height: 1.4;
  word-break: break-word;
}
.policy-wf-binder-card .policy-wf-binder-card-actions {
  margin-top: auto;
  padding-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.policy-wf-binder-upload {
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.management-inline-back {
  margin: 0 1rem 0.75rem;
  padding: 0;
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
}
.management-inline-back:hover {
  text-decoration: underline;
}

.email-templates-settings-card .settings-card-body > .form-hint { margin-bottom: 1rem; }
.email-template-block { margin-bottom: 1.35rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.email-template-block:last-child { border-bottom: none; }
.et-placeholders { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 0.65rem; line-height: 1.5; }
.et-placeholders code { font-size: 0.78rem; padding: 0.1rem 0.25rem; background: var(--bg-secondary); border-radius: 4px; }
.policy-premium-tab .premium-ai-status-ok {
  margin-top: 0.35rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(46, 125, 50, 0.35);
  background: rgba(46, 125, 50, 0.06);
}
.policy-premium-tab .premium-ai-status-warn {
  margin-top: 0.35rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(198, 40, 40, 0.35);
  background: rgba(198, 40, 40, 0.06);
}
.policy-premium-tab .policy-premium-local-banner {
  margin-top: 0.35rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(25, 118, 210, 0.35);
  background: rgba(25, 118, 210, 0.06);
}
.policy-premium-multi-schedules:not(.hidden) {
  margin-top: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px dashed var(--border);
  background: var(--bg-secondary);
}
.policy-premium-main-title { margin-bottom: 0.35rem; }
.premium-inner-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0.5rem 0 1rem;
  padding: 0.25rem;
  border-radius: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  width: fit-content;
  max-width: 100%;
}
.premium-inner-tab {
  flex: 0 0 auto;
  min-height: 2.15rem;
  border: none;
  background: transparent;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
}
.premium-inner-tab:hover { color: var(--text); background: var(--bg-card); }
.premium-inner-tab.active {
  background: var(--bg-card);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.premium-premium-section.hidden { display: none !important; }
.premium-section-title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.premium-section-title--first { margin-top: 0; }
.premium-overview-banner {
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.premium-overview-cards { display: grid; gap: 0.75rem; }
.premium-overview-cards--single { grid-template-columns: 1fr; max-width: 420px; }
.premium-overview-cards--multi { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.premium-overview-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
}
.premium-overview-card-head {
  font-weight: 600;
  margin-bottom: 0.45rem;
  font-size: 1rem;
}
.premium-overview-card-prem { margin-bottom: 0.35rem; }
.premium-overview-split {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.35rem;
  font-size: 0.88rem;
}
.policy-card-proposal-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(156, 39, 176, 0.12);
  color: #7b1fa2;
  margin-bottom: 0.25rem;
}
.policy-binder-tab h3 { margin-bottom: 0.35rem; }
.policy-binder-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.policy-binder-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}
.policy-binder-card-main { min-width: 0; }
.policy-binder-name { display: block; word-break: break-word; }
.policy-actions-toolbar { margin: 0.65rem 0 1rem; }
.premium-evolution-table-wrap { overflow-x: auto; margin: 1rem 0; }
.premium-evolution-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.premium-evolution-table th,
.premium-evolution-table td { border: 1px solid var(--border); padding: 0.35rem 0.4rem; text-align: right; }
.premium-evolution-table th { background: var(--bg-secondary); font-weight: 600; }
.policy-cov-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}
.policy-cov-groups {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.policy-cov-group-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}
.policy-cov-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}
.policy-cov-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.policy-cov-table th,
.policy-cov-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  text-align: right;
  vertical-align: middle;
}
.policy-cov-table thead th {
  background: var(--bg-secondary);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.policy-cov-table tbody tr:last-child td {
  border-bottom: none;
}
.policy-cov-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}
.policy-cov-table .pci-th-check,
.policy-cov-table .pci-check-cell {
  width: 4.5rem;
  text-align: center;
}
.policy-cov-table .pci-th-label,
.policy-cov-table .pci-label-cell {
  min-width: 12rem;
  line-height: 1.35;
}
.policy-cov-table .pci-th-num,
.policy-cov-table .pci-val-cell input[type='number'] {
  min-width: 6.5rem;
}
.policy-cov-table .pci-th-notes,
.policy-cov-table .pci-val-cell .pci-notes {
  min-width: 8rem;
}
.policy-cov-item-row--inactive .pci-label-cell {
  opacity: 0.55;
}
.policy-cov-item-row--inactive .pci-val-cell input {
  opacity: 0.65;
}
.pci-check-label {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.pci-val-cell--na {
  text-align: center;
  color: var(--text-muted, #888);
}
.policy-cov-sub-hint {
  margin-bottom: 0.75rem;
}

.ps-type-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}
.ps-type-row-name {
  flex: 1 1 8rem;
  min-width: 8rem;
}
.ps-type-row-life-chk {
  margin: 0;
  max-width: 22rem;
  flex: 1 1 14rem;
}
.ps-type-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.ps-type-row-actions .btn-sm {
  margin: 0;
}

.policy-type-cov-overlay .policy-type-cov-modal.modal {
  width: min(98vw, 1180px);
  max-width: min(98vw, 1180px);
  max-height: min(90vh, 820px);
  min-height: 360px;
  padding: 0.85rem 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.policy-type-cov-modal input,
.policy-type-cov-modal select {
  margin-bottom: 0;
  padding: 0.28rem 0.4rem;
  font-size: 0.78rem;
  border-radius: 6px;
  line-height: 1.25;
}
.policy-type-cov-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  flex-shrink: 0;
}
.policy-type-cov-head-text { flex: 1 1 16rem; min-width: 0; }
.policy-type-cov-head-text h3 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.policy-type-cov-head-text .form-hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
}
.policy-type-cov-head-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  flex-shrink: 0;
}
.policy-type-cov-scope-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  align-items: flex-end;
  flex: 1 1 18rem;
  min-width: 0;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 4%, var(--surface));
}
.ptcov-scope-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1 1 9rem;
  min-width: min(100%, 8.5rem);
  margin: 0;
}
.ptcov-scope-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}
.ptcov-scope-select {
  width: 100%;
  min-height: 2rem;
  font-size: 0.82rem !important;
  padding: 0.35rem 0.5rem !important;
}
.ptcov-pick-scope {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem 1rem;
}
.ptcov-saved-body {
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding: 0.15rem 0;
}
.ptcov-saved-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.ptcov-saved-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.88rem;
}
.ptcov-saved-summary::-webkit-details-marker { display: none; }
details[open] > .ptcov-saved-summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
}
.ptcov-saved-co { font-weight: 600; }
.ptcov-saved-sep { color: var(--text-muted); font-size: 0.8rem; }
.ptcov-saved-br { flex: 1; min-width: 0; }
.ptcov-saved-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
}
.ptcov-saved-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  flex-shrink: 0;
  margin-inline-start: auto;
}
.ptcov-saved-actions .btn-sm {
  font-size: 0.72rem;
  padding: 0.18rem 0.45rem;
}
.ptcov-saved-summary .ptcov-saved-count {
  margin-inline-start: 0;
}
.ptcov-saved-detail {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 0.65rem 0.75rem;
  background: var(--bg-secondary);
}
.ptcov-saved-group { margin-bottom: 0.65rem; }
.ptcov-saved-group h4 { margin: 0 0 0.35rem; font-size: 0.85rem; }
.ptcov-saved-items {
  margin: 0;
  padding: 0 1rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
}
.ptcov-saved-items code {
  font-size: 0.78rem;
  background: var(--surface);
  padding: 0.05rem 0.25rem;
  border-radius: 4px;
}
.ptcov-saved-empty { padding: 2rem 1rem; text-align: center; }
.ptcov-saved-modal { max-height: min(88vh, 720px); }
.policy-type-cov-subtabs {
  flex-shrink: 0;
  margin-bottom: 0.65rem;
}
.policy-type-cov-editor {
  overflow: auto;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  align-content: start;
}
.ptcov-empty-hint {
  grid-column: 1 / -1;
  margin: 0;
}
.ptcov-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.5rem;
  background: var(--bg-secondary);
}
.ptcov-group-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  margin-bottom: 0.35rem;
}
.ptcov-group-label {
  flex: 1;
  min-width: 6rem;
  font-size: 0.8rem;
  padding: 0.3rem 0.45rem;
}
.ptcov-table-wrap { overflow-x: auto; }
.policy-type-cov-modal .ptcov-table {
  font-size: 0.75rem;
  table-layout: fixed;
  width: 100%;
  min-width: 52rem;
}
.policy-type-cov-modal .ptcov-table th,
.policy-type-cov-modal .ptcov-table td {
  padding: 0.22rem 0.28rem;
}
.policy-type-cov-modal .ptcov-table th:nth-child(1),
.policy-type-cov-modal .ptcov-table td:nth-child(1) { width: 14%; }
.policy-type-cov-modal .ptcov-table th:nth-child(2),
.policy-type-cov-modal .ptcov-table td:nth-child(2) { width: 22%; }
.policy-type-cov-modal .ptcov-table th:nth-child(3),
.policy-type-cov-modal .ptcov-table td:nth-child(3),
.policy-type-cov-modal .ptcov-table th:nth-child(4),
.policy-type-cov-modal .ptcov-table td:nth-child(4),
.policy-type-cov-modal .ptcov-table th:nth-child(5),
.policy-type-cov-modal .ptcov-table td:nth-child(5) { width: 14%; }
.policy-type-cov-modal .ptcov-table th:nth-child(6),
.policy-type-cov-modal .ptcov-table td:nth-child(6) { width: 6%; }
.policy-type-cov-modal .ptcov-table input.input-elegant,
.policy-type-cov-modal .ptcov-table select.input-elegant {
  width: 100%;
  min-width: 0;
  font-size: 0.75rem;
  padding: 0.2rem 0.28rem;
}
.policy-type-cov-modal .ptcov-table .btn-sm {
  font-size: 0.68rem;
  padding: 0.15rem 0.35rem;
}

.policy-type-detail-tab { max-width: 920px; }
.policy-vehicle-detail-tab { max-width: 1100px; }
.policy-type-detail-tab .form-row { margin-bottom: 0.65rem; }
.pvd-driver-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.65rem;
  background: var(--bg-secondary);
}
.pvd-driver-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.pvd-driver-sub {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  margin: 0.45rem 0 0;
}
.pvd-driver-sub legend {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0 0.25rem;
}
.pvd-panel.hidden { display: none; }

.pvd-vehicle-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 1rem 1.25rem;
  align-items: start;
}
.pvd-vehicle-visual {
  position: sticky;
  top: 0.75rem;
  text-align: center;
}
.pvd-car-figure {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  perspective: 900px;
  transform-style: preserve-3d;
}
.pvd-car-figure.is-empty {
  cursor: default;
  background: linear-gradient(145deg, rgba(20, 40, 60, 0.06), rgba(20, 40, 60, 0.02));
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.pvd-car-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  transform-origin: center center;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}
.pvd-car-placeholder {
  color: var(--text-muted, #6b7280);
  font-size: 0.85rem;
  line-height: 1.35;
  padding: 1rem;
}
.pvd-car-credit {
  margin: 0.4rem 0 0;
  font-size: 0.68rem;
  line-height: 1.3;
  opacity: 0.75;
  max-height: 3.2em;
  overflow: hidden;
}
.pvd-car-figure.is-spinning .pvd-car-img {
  animation: pvd-car-orbit 1.05s cubic-bezier(0.22, 0.9, 0.28, 1) both;
}
.pvd-car-figure.pvd-car-nudge .pvd-car-img {
  transform: scale(1.03);
  transition: transform 0.2s ease;
}
@keyframes pvd-car-orbit {
  0% {
    transform: rotateY(0deg) scale(1) translateY(0);
  }
  35% {
    transform: rotateY(140deg) scale(1.06) translateY(-6px);
  }
  70% {
    transform: rotateY(280deg) scale(1.02) translateY(2px);
  }
  100% {
    transform: rotateY(360deg) scale(1) translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pvd-car-figure.is-spinning .pvd-car-img {
    animation: none;
  }
}
@media (max-width: 760px) {
  .pvd-vehicle-layout {
    grid-template-columns: 1fr;
  }
  .pvd-vehicle-visual {
    order: -1;
    position: static;
    max-width: 320px;
    margin-inline: auto;
  }
}

.policy-veh-pkg-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin: 0.5rem 0 0.75rem;
}
.policy-veh-pkg-extra-numbers { margin-bottom: 0.5rem; }
.policy-cov-pkg-meta {
  margin: 0.35rem 0 0.5rem;
  padding: 0.45rem 0.55rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.policy-cov-pkg-meta-row { margin: 0; }

.premium-evolution-table input.input-elegant {
  width: 100%;
  min-width: 3rem;
  font-size: 0.85rem;
  padding: 0.25rem 0.35rem;
}
.premium-pdf-preview-dialog.modal-wide { max-width: 920px; }
.premium-pdf-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.75rem;
  max-height: 62vh;
  overflow: auto;
  margin: 1rem 0;
  padding: 0.25rem;
}
.premium-pdf-preview-cell {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-card);
}
.premium-pdf-preview-label {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.45rem;
  cursor: pointer;
  margin: 0;
  font-size: 0.82rem;
}
.premium-pdf-preview-thumb-wrap {
  position: relative;
  display: block;
  width: 100%;
  line-height: 0;
  border-radius: 6px;
  overflow: hidden;
}
.premium-pdf-preview-thumb-wrap img {
  width: 100%;
  height: auto;
  display: block;
}
.premium-pdf-table-overlay {
  position: absolute;
  left: 0;
  top: 0;
  box-sizing: border-box;
  border: 2px solid rgba(0, 168, 204, 0.95);
  background: rgba(64, 206, 227, 0.28);
  pointer-events: none;
  border-radius: 4px;
}
.premium-pdf-preview-pnum { text-align: center; font-weight: 600; color: var(--text-muted); }
.activity-filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
  align-items: center;
}
.activity-item-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.activity-item-row .activity-wf-meta {
  flex-basis: 100%;
  margin-top: -0.15rem;
}
.policy-notes-thread {
  max-height: 400px;
  overflow-y: auto;
  margin: 1rem 0;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
}
.policy-note-bubble {
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: var(--bg-secondary);
}
.policy-note-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.25rem; }

.policy-notes-tab {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
.policy-notes-header {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.85rem;
}
.policy-notes-header h3 { margin: 0; font-size: 1.15rem; }
.policy-notes-header .form-hint { margin: 0; }
.policy-notes-compose {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.policy-notes-compose-input {
  width: 100%;
  min-height: 5.5rem;
  resize: vertical;
  box-sizing: border-box;
}
.policy-notes-compose-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}
.policy-notes-compose-bar .btn-elegant {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  padding: 0.28rem 0.65rem;
  min-height: 1.85rem;
  line-height: 1.2;
}
.policy-notes-compose-bar .btn-elegant svg {
  width: 13px;
  height: 13px;
}
.policy-notes-compose-spacer { flex: 1; min-width: 0.5rem; }
.policy-note-compose-chip {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-secondary, rgba(0,0,0,0.04));
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}
.policy-notes-table-wrap {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-card);
  box-sizing: border-box;
}
.policy-notes-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.9rem;
  table-layout: fixed;
}
.policy-notes-table th,
.policy-notes-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border);
  text-align: right;
  vertical-align: middle;
  box-sizing: border-box;
}
.policy-notes-table tbody tr:last-child td {
  border-bottom: none;
}
.policy-notes-table thead th {
  background: var(--bg-secondary, rgba(0,0,0,0.03));
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  position: sticky;
  top: 0;
  z-index: 1;
}
.policy-note-col-audit { width: 11.5rem; }
.policy-note-col-files {
  width: 4.2rem;
  text-align: center;
}
.policy-note-col-actions { width: 5.5rem; }
.policy-notes-table thead th.policy-note-col-files,
.policy-notes-table thead th.policy-note-col-actions,
.policy-note-files-cell,
.policy-note-actions-cell {
  border-inline-start: 1px solid var(--border);
}
.policy-note-row { cursor: default; transition: background 0.12s ease; }
.policy-note-row:hover { background: rgba(0, 0, 0, 0.02); }
.policy-note-audit-cell {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
  vertical-align: top !important;
}
.policy-note-audit-created {
  font-weight: 600;
  color: var(--text);
  font-size: 0.82rem;
}
.policy-note-audit-time { margin-top: 0.1rem; }
.policy-note-audit-updated { margin-top: 0.3rem; opacity: 0.9; }
.policy-note-body-cell { vertical-align: top !important; }
.policy-note-body-text {
  white-space: pre-wrap;
  line-height: 1.5;
  word-break: break-word;
}
.policy-note-inline-edit {
  width: 100%;
  box-sizing: border-box;
  min-height: 4.5rem;
}
.policy-note-files-cell {
  text-align: center;
}
.policy-note-files-icon-btn,
.policy-note-icon-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  border-radius: 10px;
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.policy-note-files-icon-btn:hover,
.policy-note-icon-btn:hover {
  background: var(--bg-secondary, rgba(0,0,0,0.05));
  color: var(--text);
  border-color: var(--border);
}
.policy-note-files-badge {
  position: absolute;
  top: -2px;
  inset-inline-end: -2px;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--accent, #0f766e);
  color: #fff;
  font-size: 0.65rem;
  line-height: 1rem;
  font-weight: 700;
}
.policy-note-files-badge.is-empty { display: none; }
/* ?? ????? display:flex ?? td ? ?? ???? ?????? ???? */
.policy-note-actions-cell {
  padding-inline: 0.45rem;
}
.policy-note-actions-inner {
  display: inline-flex;
  gap: 0.15rem;
  justify-content: flex-start;
  align-items: center;
  vertical-align: middle;
}
.policy-notes-empty { margin: 0.75rem 0; text-align: center; }

.policy-note-attach-modal-inner {
  width: min(520px, calc(100vw - 2rem));
  max-height: min(82vh, 640px);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.policy-note-attach-body {
  flex: 1;
  min-height: 140px;
  max-height: 42vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: var(--bg-secondary, rgba(0,0,0,0.02));
}
.policy-note-attach-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.policy-note-attach-opt {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
}
.policy-note-attach-opt:hover { background: rgba(0,0,0,0.03); }
.policy-note-attach-opt span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}
.policy-note-attach-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}
.policy-note-attach-upload-label { cursor: pointer; margin: 0; display: inline-flex; }

.policy-note-files-pop {
  position: fixed;
  z-index: 12000;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  padding: 0.7rem 0.8rem;
  max-height: 260px;
  overflow: auto;
}
.policy-note-files-pop-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}
.policy-note-files-pop-list {
  list-style: none;
  margin: 0 0 0.55rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.policy-note-files-pop-item {
  appearance: none;
  width: 100%;
  text-align: right;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0.4rem 0.45rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
}
.policy-note-files-pop-item:hover { background: var(--bg-secondary, rgba(0,0,0,0.05)); }

@media (max-width: 720px) {
  .policy-note-col-audit { width: 8.5rem; }
  .policy-notes-table { table-layout: auto; }
}
#policy-comm-list .policy-comm-row {
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 0;
  cursor: default;
}
#policy-comm-list .policy-comm-row.is-open { background: rgba(13, 148, 136, 0.06); }
#policy-comm-list .policy-mail-row[data-comm-type="email"],
#policy-comm-list .policy-mail-row[data-comm-type="shared_email"] { cursor: pointer; }
#policy-comm-list .policy-comm-pbx-line {
  align-items: flex-start;
}
#policy-comm-list .policy-comm-pbx-doc {
  flex: 1;
  min-width: 0;
}
.activity-item-row--pbx-call {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.activity-item-row--pbx-call .pbx-history-row-line {
  width: 100%;
}
.activity-pbx-doc {
  flex: 1;
  min-width: 0;
}
.activity-item-row--pbx-call .activity-pbx-doc .activity-type,
.activity-item-row--pbx-call .activity-pbx-doc .activity-title {
  margin-inline-end: 0.35rem;
}
.activity-item .activity-body--pbx {
  flex: 1;
  min-width: 0;
}
.activity-item .activity-body--pbx .pbx-history-row-line {
  width: 100%;
  align-items: flex-start;
}
/* ???? ??????? ? ??????? ????? ?????? */
.policies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
  width: 100%;
}
.policies-grid-empty { grid-column: 1 / -1; }
.policy-card {
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--bg-card);
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  min-height: 160px;
}
.policy-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.policy-card-elementary {
  border-color: #0d9488;
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.06) 0%, var(--bg-card) 40%);
}
.policy-card-private {
  border-color: #7c3aed;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.06) 0%, var(--bg-card) 40%);
}
.policy-card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.policy-card-client {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.policy-card-type {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.policy-card-company {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.policy-card-number {
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 0.25rem;
}
.policy-card-partners {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.policy-card-lien-icon {
  margin-right: 0.25rem;
  opacity: 0.9;
}
.link-button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  font: inherit;
  padding: 0;
}
.link-button:hover { color: var(--accent-dim); }
.policy-profile-holders .policy-holder-row { margin-bottom: 0.12rem; }
.policy-profile-holders .policy-holder-row:last-child { margin-bottom: 0; }
.policies-tab-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.policies-tab-header h3 { margin: 0; }
.policies-tab-toolbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  direction: ltr;
  width: 100%;
}
.policies-tab-toolbar .policies-tab-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  direction: rtl;
}
.policies-tab-add-btn {
  flex-shrink: 0;
  margin-inline-start: auto;
  padding: 0.45rem 0.95rem;
  font-size: 0.88rem;
}
.policies-tab-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 1rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 12px;
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.policies-cat-filters {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-inline-start: auto;
  width: fit-content;
  max-width: 100%;
}
.policies-cat-filter-btn {
  appearance: none;
  flex: 0 0 auto;
  min-height: 2rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: var(--text-muted, #64748b);
  padding: 0.35rem 0.85rem;
  border-radius: 9px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}
.policies-cat-filter-btn:hover {
  border-color: rgba(13, 148, 136, 0.35);
  color: var(--accent, #0d9488);
  background: rgba(13, 148, 136, 0.06);
}
.policies-cat-filter-btn.active {
  border-color: rgba(13, 148, 136, 0.4);
  background: rgba(13, 148, 136, 0.12);
  color: var(--accent, #0d9488);
  font-weight: 600;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.1);
}
.btn-add-policy-fixed {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
  color: var(--btn-on-accent);
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
.btn-add-policy-fixed:hover {
  filter: brightness(1.08);
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.4);
}
.holder-name-hint { font-weight: normal; color: var(--text-muted); font-size: 0.9rem; }
.policy-holder-block { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.policy-holder-block:first-of-type { border-top: none; padding-top: 0; margin-top: 0.5rem; }
.holder-occupation-section { margin-top: 0.75rem; }
.holder-smoker-row { margin-top: 0.5rem; }
/* ??? ?????? ? ????? ????? */
.policy-lien-tab {
  max-width: 36rem;
  padding: 1rem 0;
}
.policy-lien-tab h3 {
  margin-bottom: 1rem;
  font-size: 1.15rem;
  color: var(--text);
}
.policy-lien-tab .lien-detail-row {
  padding: 0.6rem 0.85rem;
  margin-bottom: 0.5rem;
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
}
.policy-lien-tab .lien-copy-section {
  margin-top: 1.25rem;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.04) 0%, var(--bg-card) 100%);
  border-radius: 12px;
  border: 1px solid var(--border);
}
.policy-lien-tab .lien-copy-section h4 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  color: var(--text);
}
.policy-lien-tab .form-row input {
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
}
.policy-lien-tab #lien-save-copy-btn {
  margin-top: 0.75rem;
}
.policy-lien-tab .no-items {
  color: var(--text-muted);
  font-style: italic;
  padding: 1rem 0;
}
.lien-detail-row { margin-bottom: 0.5rem; }
.lien-copy-section { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.lien-copy-section h4 { margin-bottom: 0.5rem; font-size: 0.95rem; }
.policy-card-actions {
  display: flex;
  gap: 0.25rem;
  padding: 0.35rem 0.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-hover);
}
.policy-card-btn {
  padding: 0.25rem 0.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  border-radius: 6px;
}
.policy-card-btn:hover { background: var(--border); }
.policy-open-folder {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.policy-open-folder:hover { color: var(--accent); }
.activity-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.activity-item .activity-type { color: var(--text-muted); margin-left: 0.5rem; }
.activity-item .activity-date { color: var(--text-muted); font-size: 0.9rem; }

.team-intro {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

#team-contacts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.contact-name {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.contact-role {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.contact-line {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}
.contact-line a {
  color: var(--accent);
  text-decoration: none;
}
.contact-line a:hover {
  text-decoration: underline;
}

.no-contacts {
  color: var(--text-muted);
  padding: 2rem;
}

.user-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.2rem;
}

.badges {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.hidden-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  background: rgba(197, 48, 48, 0.15);
  color: var(--error);
}

.modal-wide {
  max-width: 420px;
}
.modal-email-like {
  max-width: 540px;
}

.recipient-combo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  min-height: 42px;
}
.recipient-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.recipient-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  background: var(--primary);
  color: white;
  border-radius: 6px;
  font-size: 0.85rem;
}
.recipient-chip .chip-remove {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.15rem;
  opacity: 0.9;
}
.recipient-chip .chip-remove:hover { opacity: 1; }
.recipient-select {
  flex: 1;
  min-width: 140px;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  outline: none;
}

.form-row {
  display: flex;
  gap: 0.75rem;
}
.form-row input {
  flex: 1;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}
.checkbox-label input {
  width: auto;
  margin: 0;
}

/* Page navigation */
.page-content.hidden {
  display: none !important;
}

/* Clients */
#clients-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 220px);
}

.client-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.client-row:last-child {
  border-bottom: none;
}
.client-row {
  cursor: pointer;
}
.client-row:hover {
  background: var(--bg-hover);
}
.client-row .user-actions button {
  cursor: pointer;
}

.clients-toolbar {
  margin-bottom: 1.25rem;
}
.clients-toolbar-main {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.clients-search-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex: 1;
  min-width: 280px;
  max-width: 520px;
}
.clients-search-input {
  flex: 1;
  min-width: 120px;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  color: var(--text);
}
.clients-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}
.clients-select {
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  min-width: 110px;
}
.clients-status-select { min-width: 115px; }
.clients-search-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.clients-search-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}
.clients-toolbar-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}
.clients-export-import {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.clients-export-group {
  display: flex;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.clients-format-select {
  padding: 0.5rem 0.75rem;
  border: none;
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  min-width: 75px;
}
.clients-export-btn {
  padding: 0.5rem 1rem;
  border-right: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.clients-action-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.clients-action-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}
.clients-template-btn { text-decoration: none; }
.clients-import-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.clients-import-input { display: none; }
.clients-import-update {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}
.clients-add-btn {
  padding: 0.55rem 1.15rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.clients-add-btn:hover {
  background: var(--accent-hover, #4338ca);
}
.client-tags-inline {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-left: 0.5rem;
}
.client-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
}
.client-tag-badge.tag-vip {
  background: rgba(180, 83, 9, 0.15);
  color: #b45309;
}
.client-tag-badge.tag-unwanted {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}
.client-tag-badge.tag-custom {
  background: var(--accent-soft);
  color: var(--accent);
}
.client-tag-badge.tag-active {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}
.client-tag-badge.tag-inactive {
  background: rgba(100, 116, 139, 0.15);
  color: #64748b;
}
.client-tag-remove {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0.15rem;
  font-size: 1rem;
  line-height: 1;
  color: inherit;
  opacity: 0.7;
}
.client-tag-remove:hover {
  opacity: 1;
}
.client-profile-tags-cell .client-profile-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.client-profile-tags .client-tag-add {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 0.9rem;
}
.client-tags-add-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.client-tags-add-row input {
  flex: 1;
  max-width: 200px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}
.client-tags-list {
  list-style: none;
  margin-top: 1rem;
}
.client-tags-list .client-tag-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.client-tags-list .client-tag-item:last-child {
  border-bottom: none;
}
.client-tags-list .client-tag-name {
  flex: 1;
}
.tag-system-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-hover);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* Activity timeline */
.activity-timeline-tab h3 {
  margin-bottom: 1rem;
}
.activity-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}
.activity-date-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.activity-date-label input[type="date"] {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}
.activity-policy-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  min-width: 160px;
}
.activity-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.activity-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  align-items: flex-start;
}
.activity-item:hover {
  background: var(--bg-hover);
}
.activity-item .activity-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}
.activity-item .activity-body {
  flex: 1;
  min-width: 0;
}
.activity-item .activity-body strong {
  display: block;
  margin-bottom: 0.2rem;
}
.activity-item .activity-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.activity-item.no-activity {
  cursor: default;
}
.clients-search-form button {
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.clients-search-form button:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}
.search-input {
  flex: 1;
  max-width: 400px;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

/* Client profile */
.client-profile-header {
  margin-bottom: 0.65rem;
}

/* ???? ??????: ????? | ????? (?? + ???) | ???? ? ???? ????, ?????? ????? ??? ???????? */
.client-profile-toolbar-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  flex-wrap: nowrap;
  margin-bottom: 0.35rem;
  direction: ltr;
}

.client-profile-toolbar-row .btn-back {
  margin: 0;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.client-profile-toolbar-row .client-profile-edit-toggle {
  flex-shrink: 0;
}

.client-profile-toolbar-start {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.client-profile-delete-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

.client-profile-edit-toggle.client-profile-edit-icon-only {
  min-width: 2.35rem;
  padding: 0.4rem 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.client-profile-edit-pencil-icon {
  display: block;
}

.client-payments-tab-shell {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 100%;
}

/* ????? ????? ? ?????? ????? ???? */
.client-monthly-pay-hero {
  text-align: center;
  width: 100%;
  padding: 1.25rem 1rem 1rem;
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.12));
  background: var(--surface-elevated, rgba(255, 255, 255, 0.72));
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.client-monthly-pay-hero-title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted, #475569);
}

.client-monthly-pay-hero-sub {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
}

.client-monthly-pay-hero-total {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary, #0f172a);
  font-variant-numeric: tabular-nums;
}

.client-monthly-pay-hero-asof {
  margin: 0.6rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
}

/* ????? ????? */
.client-payments-detail-card {
  border-radius: 12px;
  border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.12));
  background: var(--card-bg, #fff);
  padding: 1rem 1.1rem 1.15rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.client-payments-section-title {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 600;
}

.client-monthly-pay-table-wrap {
  overflow-x: auto;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
}

.client-monthly-pay-detail-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}

.client-monthly-pay-detail-table thead th {
  text-align: start;
  padding: 0.65rem 0.75rem;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--text-muted, #475569);
  background: var(--table-head-bg, rgba(241, 245, 249, 0.95));
  border-bottom: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.1));
}

.client-monthly-pay-detail-table tbody td {
  padding: 0.7rem 0.75rem;
  vertical-align: top;
  border-bottom: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.07));
}

.client-monthly-pay-detail-table tbody tr:last-child td {
  border-bottom: none;
}

.client-monthly-pay-detail-table tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.65);
}

.client-monthly-pay-detail-table tbody tr:hover td {
  background: rgba(13, 148, 136, 0.06);
}

.client-monthly-pay-cell-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 600;
}

.client-monthly-pay-cell-policy {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.client-monthly-pay-cell-details {
  max-width: 14rem;
  word-break: break-word;
}

.client-monthly-pay-empty {
  text-align: center;
  padding: 1.5rem 1rem !important;
  color: var(--text-muted, #64748b);
  border-bottom: none !important;
}

/* ?????? ????? ????? (+ ????? ??????) */
.client-pm-toolbar-strip {
  align-self: flex-start;
}

.client-pm-toolbar-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.45rem;
  direction: ltr;
}

.client-pm-add-btn,
.client-pm-saved-list-btn {
  padding: 0.4rem 0.55rem;
  line-height: 0;
}

.client-pm-add-btn svg,
.client-pm-saved-list-btn svg {
  display: block;
}

.client-pm-saved-title {
  margin-top: 0;
}

.client-pm-saved-hint {
  margin: 0 0 0.85rem;
}

#client-pm-saved-list-modal .client-pm-modal-title-row + .client-pm-saved-hint {
  margin-top: -0.35rem;
}

.client-pm-saved-list-inner.modal-wide {
  max-width: min(92vw, 720px);
}

.client-pm-saved-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
}

.client-pm-saved-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
}

.client-pm-saved-table thead th {
  text-align: start;
  padding: 0.55rem 0.65rem;
  font-weight: 600;
  font-size: 0.76rem;
  color: var(--text-muted, #475569);
  background: rgba(241, 245, 249, 0.95);
  border-bottom: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.1));
}

.client-pm-saved-table tbody td {
  padding: 0.6rem 0.65rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.06));
}

.client-pm-saved-table tbody tr:last-child td {
  border-bottom: none;
}

.client-pm-saved-actions-col {
  width: 1%;
  white-space: nowrap;
}

.client-pm-saved-actions {
  white-space: nowrap;
}

.client-pm-saved-actions .btn-sm + .btn-sm {
  margin-inline-start: 0.35rem;
}

.client-pm-modal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.client-pm-modal-title-row h3 {
  margin: 0;
}

.client-pm-radio {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.client-docs-combined-tab .client-docs-dual-preview-wrap {
  align-items: stretch;
}

.client-docs-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}
.client-docs-toolbar-header {
  padding: 0.65rem 1rem;
}
.client-docs-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
}
.client-docs-toolbar-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.client-docs-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
}
.client-docs-toolbar-sep {
  width: 1px;
  height: 1.5rem;
  background: var(--border);
  margin-inline: 0.15rem;
}
.client-docs-toolbar-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
}
.policy-docs-toolbar-start {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  justify-self: start;
}
.policy-docs-sig-toolbar-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.policy-docs-preview-caption {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.client-profile-toolbar-row .client-profile-top-banner {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
}

#client-profile-title-centered {
  width: 100%;
  min-width: 0;
  text-align: center;
}

.client-profile-banner-heading {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.35;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem 0.75rem;
  direction: rtl;
}

.client-profile-banner-name,
.client-profile-banner-id {
  font-size: inherit;
  font-weight: inherit;
}

.client-profile-banner-sep {
  opacity: 0.45;
  font-weight: 400;
}

.client-profile-banner-sub {
  margin: 0 0 0.35rem;
  text-align: center;
}

#client-profile-info {
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 52%, #f1f5f9 100%);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  padding: 1.15rem 1.2rem 1.2rem;
  max-height: min(38vh, 520px);
  overflow-y: auto;
  margin-bottom: 0.35rem;
  position: relative;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 28px rgba(15, 23, 42, 0.06);
}

#client-profile-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, var(--accent) 0%, #14b8a6 55%, rgba(13, 148, 136, 0.28) 100%);
  pointer-events: none;
}

#client-profile-info:has(.profile-grid--editing) {
  border-color: rgba(13, 148, 136, 0.22);
  box-shadow:
    0 0 0 1px rgba(13, 148, 136, 0.08),
    0 12px 32px rgba(13, 148, 136, 0.1);
}

#client-profile-info .profile-grid--client-summary {
  gap: 0.55rem 0.8rem;
}

#client-profile-info .profile-cell {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 10px;
  padding: 0.52rem 0.68rem 0.58rem;
  min-width: 0;
  overflow: visible;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#client-profile-info .profile-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.045em;
  color: #64748b;
  line-height: 1.25;
}

#client-profile-info .profile-cell:hover {
  border-color: rgba(13, 148, 136, 0.2);
  box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.05);
}

#client-profile-info .profile-cell > span:not(.profile-label):not(.client-profile-tags):not(.client-assignee-inline-row):not(.profile-phone-sep):not(.profile-phone-inline-group) {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
}

#client-profile-info button.profile-copy-field,
#client-profile-info .profile-field-value,
#client-profile-info button.profile-field-action {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text);
  text-align: right;
  overflow-wrap: anywhere;
}

#client-profile-info button.profile-copy-field {
  cursor: copy;
}

#client-profile-info button.profile-field-action {
  cursor: pointer;
  color: var(--accent);
}

#client-profile-info button.profile-copy-field:hover,
#client-profile-info button.profile-field-action:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
  border: none;
  background: none;
  box-shadow: none;
}

#client-profile-info .client-profile-birth-age-inline {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
}

#client-profile-info .client-profile-birth-age-inline .profile-inline-input {
  flex: 1 1 auto;
  min-width: 0;
}

#client-profile-info .client-profile-age-readonly {
  flex: 0 0 auto;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

#client-profile-info .client-profile-address-inline {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.8fr) minmax(0, 0.75fr) minmax(0, 0.75fr);
  gap: 0.5rem;
  width: 100%;
}

#client-profile-info .client-profile-address-part {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
  overflow: visible;
}

#client-profile-info .client-profile-address-part .combo-field {
  overflow: visible;
}

#client-profile-info .client-profile-address-part-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #94a3b8;
  line-height: 1.2;
}

#client-profile-info .client-profile-address-inline--editing .client-profile-address-part .profile-inline-input,
#client-profile-info .client-profile-address-inline--editing .client-profile-address-part .combo-field .combo-search {
  width: 100%;
  min-width: 0;
}

@media (max-width: 720px) {
  #client-profile-info .client-profile-address-inline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#client-profile-info .client-profile-picker-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 1.85rem;
}

#client-profile-info .client-profile-picker-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

#client-profile-info .client-profile-picker-trigger {
  flex: 0 0 auto;
  margin-inline-start: auto;
}

#client-profile-info .client-assignee-name-text {
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.45;
}

#client-profile-info .client-assignee-open-btn {
  min-width: 2rem;
  min-height: 2rem;
  padding: 0;
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: 8px;
  background: #fff;
}

#client-profile-info .client-assignee-open-btn:hover {
  border-color: var(--accent);
  background: rgba(13, 148, 136, 0.08);
}

#client-profile-info .client-profile-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

#client-profile-info .client-profile-tags-empty {
  font-size: 0.94rem;
  color: var(--text-muted);
}

#client-profile-info .client-profile-tags .client-tag-badge {
  border-radius: 8px;
  padding: 0.22rem 0.62rem;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid transparent;
}

#client-profile-info .client-profile-tag-add.client-profile-picker-trigger {
  width: 2rem;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.2rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1;
  background: #fff;
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

#client-profile-info .client-profile-tag-add.client-profile-picker-trigger:hover,
#client-profile-info .client-profile-tag-add.client-profile-picker-trigger:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(13, 148, 136, 0.06);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

#client-profile-info .profile-grid--editing .profile-cell {
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

#client-profile-info .profile-grid--editing .profile-inline-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.52rem 0.72rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 9px;
  font-size: 0.94rem;
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

#client-profile-info .profile-grid--editing .profile-inline-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.14);
}

#client-profile-info .profile-grid--editing #profile-edit-age-display.client-profile-age-readonly {
  display: inline;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

#client-profile-info .profile-edit-phone-email-block {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

#client-profile-info .profile-edit-phone-email-block .phone-email-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  padding: 0.38rem 0.45rem;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 9px;
  background: #f8fafc;
}

#client-profile-info .profile-edit-phone-email-block .phone-email-row input {
  margin: 0;
  padding: 0.45rem 0.62rem;
  border: 1px solid rgba(15, 23, 42, 0.11);
  border-radius: 8px;
  font: inherit;
  font-size: 0.9rem;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#client-profile-info .profile-edit-phone-email-block .phone-email-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

#client-profile-info .profile-edit-phone-email-block .value {
  flex: 1;
  min-width: 8rem;
}

#client-profile-info .profile-edit-phone-email-block .label {
  flex: 0 1 8rem;
  min-width: 5rem;
}

#client-profile-info .profile-edit-phone-email-block .remove-inline-phone,
#client-profile-info .profile-edit-phone-email-block .remove-inline-email {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #fff;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

#client-profile-info .profile-edit-phone-email-block .remove-inline-phone:hover,
#client-profile-info .profile-edit-phone-email-block .remove-inline-email:hover {
  border-color: rgba(220, 38, 38, 0.35);
  color: #dc2626;
  background: rgba(220, 38, 38, 0.06);
}

#client-profile-info .profile-inline-add-btn {
  margin-top: 0.4rem;
  padding: 0.38rem 0.75rem;
  border-radius: 9px;
  font-weight: 500;
  border: 1px solid rgba(13, 148, 136, 0.22);
  background: rgba(13, 148, 136, 0.05);
  color: var(--accent);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

#client-profile-info .profile-inline-add-btn:hover {
  border-color: var(--accent);
  background: rgba(13, 148, 136, 0.1);
  transform: translateY(-1px);
}

#client-profile-info .combo-field .combo-search {
  width: 100%;
}

.profile-grid--editing .profile-inline-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.client-profile-header .client-tabs {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.profile-grid--client-summary {
  gap: 0.65rem 1.25rem;
}

.profile-edit-phone-email-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.profile-edit-phone-email-block .phone-email-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.profile-edit-phone-email-block .value {
  flex: 1;
  min-width: 8rem;
}

.profile-edit-phone-email-block .label {
  flex: 0 1 8rem;
  min-width: 5rem;
}

.profile-inline-add-btn {
  margin-top: 0.35rem;
}

.client-assignee-inline-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.client-assignee-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding: 0.15rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-hover);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.client-assignee-open-btn:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
}

.client-assignee-open-btn-inner {
  font-size: 1.35rem;
  font-weight: 700;
  opacity: 0.85;
}

/**
 * ??????? ?????? ??? ????? (?? ?????? ?? ??????)
 */
.overlay-dropdown {
  position: fixed;
  z-index: 12000;
  min-width: 13rem;
  max-height: min(70vh, 420px);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  padding: 0.35rem 0;
  direction: rtl;
}

.overlay-dropdown-item {
  display: block;
  width: 100%;
  text-align: right;
  padding: 0.5rem 0.9rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}

.overlay-dropdown-item:hover {
  background: var(--bg-hover);
}

.client-contacts-tab .client-contacts-table-wrap {
  overflow-x: auto;
  margin: 0.5rem 0 0;
}

.client-contacts-tab-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.client-contacts-tab-head h3 {
  margin: 0;
}

.client-contacts-tab-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-inline-start: auto;
}

.client-contact-modal-row .contact-modal-phone,
.client-contact-modal-row .contact-modal-email {
  flex: 1 1 10rem;
  min-width: 8rem;
}

.client-contacts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.client-contacts-table th,
.client-contacts-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  text-align: right;
}

.client-contacts-table th {
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.client-contacts-table .input-elegant {
  width: 100%;
  min-width: 6rem;
  box-sizing: border-box;
}

.contact-entry-checkbox-cell label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  cursor: pointer;
}

.client-contacts-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.client-life-tab-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.client-life-tab-head h3 {
  margin: 0;
}

.client-life-tab .client-life-readonly-grid,
.client-life-tab .client-life-edit-grid {
  margin-bottom: 0.5rem;
}

.client-mail-heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.client-mail-heading-row h3 {
  margin: 0;
}

.client-mail-wa-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-hover);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.client-mail-wa-shortcut:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem 2rem;
  width: 100%;
}

#clients-page #client-profile-page {
  max-width: min(1180px, 100%);
  margin-inline: auto;
  width: 100%;
}

.profile-main {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.profile-main h2 {
  margin: 0;
  font-size: 1.4rem;
}

.profile-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.profile-cell-wide {
  grid-column: span 2;
}

.profile-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.profile-link {
  color: var(--accent);
  text-decoration: none;
}

.profile-link:hover {
  text-decoration: underline;
}

.profile-phone-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.profile-phone-btn:hover {
  color: var(--accent-hover, var(--accent));
}
.profile-phone-sep {
  user-select: none;
  color: var(--text-muted);
}

.profile-phone-inline-group {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  vertical-align: baseline;
}

button.profile-phone-open-menu {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: inherit;
}

button.profile-phone-open-menu:hover {
  color: var(--accent-hover, var(--accent));
}

button.profile-copy-field {
  display: inline;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: inherit;
  color: inherit;
  cursor: copy;
  text-align: inherit;
  vertical-align: baseline;
  overflow-wrap: anywhere;
}

button.profile-copy-field:hover {
  opacity: 0.9;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.client-profile-banner-heading button.profile-copy-field {
  font-size: inherit;
  font-weight: inherit;
  color: var(--accent);
  cursor: copy;
  text-decoration: underline;
  text-underline-offset: 2px;
}

button.profile-copy-field--email {
  color: var(--accent);
  cursor: copy;
  text-decoration: underline;
  text-underline-offset: 2px;
}

button.profile-copy-field--email:hover {
  color: var(--accent-hover, var(--accent));
}

button.profile-email-open-menu {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

button.profile-email-open-menu:hover {
  color: var(--accent-hover, var(--accent));
}

.client-tag-badge .client-tag-name-btn {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.client-phone-ctx-menu {
  position: fixed;
  z-index: 12100;
  min-width: 11.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  padding: 0.3rem 0;
  direction: rtl;
}
.client-phone-ctx-menu.hidden {
  display: none;
}
.client-phone-ctx-item {
  display: block;
  width: 100%;
  text-align: right;
  padding: 0.5rem 0.9rem;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text);
}
.client-phone-ctx-item:hover:not(:disabled) {
  background: var(--bg-hover, rgba(0, 0, 0, 0.06));
}
.client-phone-ctx-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.client-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}
.client-tab {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
}
.client-tab:hover, .client-tab.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0,168,138,0.1);
}
.activity-timeline-tab h3 { margin: 0 0 1rem; }
.activity-filters { margin-bottom: 1rem; }
.activity-filters select { padding: 0.5rem 1rem; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); font: inherit; }
.activity-timeline { display: flex; flex-direction: column; gap: 0.5rem; }
.activity-item { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-card); cursor: pointer; transition: background 0.15s; }
.activity-item:hover { background: var(--bg-hover); }
.activity-icon { font-size: 1.25rem; flex-shrink: 0; }
.activity-body { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.activity-title { font-weight: 500; }
.activity-meta { font-size: 0.85rem; color: var(--text-muted); }
.activity-policy-badge { font-size: 0.8rem; background: var(--bg-hover); padding: 0.15rem 0.4rem; border-radius: 4px; margin-right: 0.25rem; }
#client-tab-content {
  min-height: 200px;
  max-height: calc(100vh - 260px);
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  overflow-y: auto;
  overflow-x: hidden;
}
#client-tab-content .loading { color: var(--text-muted); margin: 1rem 0; }

.client-beneficiaries-tab {
  max-width: 100%;
}
.client-beneficiaries-title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  color: var(--text);
}
.client-beneficiaries-disposition {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-secondary);
}
.ben-disposition-label {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--text);
}
.ben-disposition-label input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}
.client-beneficiaries-alt-msg {
  margin-bottom: 1rem;
}
.client-beneficiaries-hint {
  margin: 0 0 0.65rem;
  line-height: 1.45;
}
.client-beneficiaries-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 0.5rem;
}
.client-beneficiaries-table-wrap {
  overflow-x: auto;
  margin-bottom: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.client-beneficiaries-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.client-beneficiaries-table th,
.client-beneficiaries-table td {
  padding: 0.35rem 0.45rem;
  white-space: nowrap;
  vertical-align: middle;
}
.client-beneficiaries-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}
.client-beneficiaries-table .ben-cell-child {
  min-width: 9rem;
  max-width: 14rem;
  white-space: normal;
}
.client-beneficiaries-table .ben-child-hint {
  display: block;
  max-width: 12rem;
  line-height: 1.3;
}
.client-beneficiaries-table .ben-inp-house {
  max-width: 4rem;
}
.client-beneficiaries-table .ben-inp-pct {
  max-width: 5rem;
}
.client-beneficiaries-table .input-elegant {
  font-size: 0.8rem;
  padding: 0.28rem 0.35rem;
}
.client-beneficiaries-save-row {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.family-tab { max-width: 560px; }
.family-section { margin-bottom: 1.5rem; }
.family-section h3 { font-size: 0.95rem; color: var(--text); margin-bottom: 0.75rem; }
.family-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}
.family-member-link {
  color: var(--accent);
  text-decoration: none;
  flex: 1;
}
.family-member-link:hover { text-decoration: underline; }
.family-meta { display: block; font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem; }
.family-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.5rem;
}
.family-remove-btn:hover { color: var(--error); }
.family-add-partner, .family-members-list { margin-bottom: 0.75rem; }
.add-partner-btn, .add-family-btn { margin-top: 0.5rem; }

.policies-tab { max-width: none; width: 100%; }
.policies-tab h3 { font-size: 0.95rem; color: var(--text); margin-bottom: 0.75rem; }
.policies-list { margin-bottom: 0.75rem; }
.policy-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}
.policy-block { margin-bottom: 0.75rem; }
.policy-number { font-weight: 500; flex: 1; }
.policy-date { font-size: 0.85rem; color: var(--text-muted); }
.policy-conv-btn, .policy-toggle-convs {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 0 0.4rem;
  font-size: 1rem;
}
.policy-conv-btn:hover, .policy-toggle-convs:hover { opacity: 0.8; }
.policy-convs-list {
  margin-top: 0.5rem;
  margin-right: 2rem;
  padding: 0.5rem 1rem;
  background: var(--bg-soft);
  border-radius: 6px;
  border-right: 3px solid var(--primary);
}
.policy-convs-list.hidden { display: none; }
.policy-conv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  cursor: pointer;
  border-radius: 4px;
}
.policy-conv-row:hover { background: rgba(0,0,0,0.04); }
.policy-conv-row .conv-subj { flex: 1; }
.policy-conv-row .conv-meta { font-size: 0.8rem; color: var(--text-muted); }
.policy-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.5rem;
}
.policy-remove-btn:hover { color: var(--error); }
.policies-tab .no-items { color: var(--text-muted); margin: 1rem 0; }

/* Client modal */
.modal-scroll {
  max-height: 90vh;
  overflow-y: auto;
}
.modal-scroll .form-section:has(.combo-field) {
  overflow: visible;
}

.modal-wide.client-modal {
  max-width: 520px;
}

.form-row-inline {
  align-items: center;
}
.form-row-inline select {
  flex: 0 0 140px;
}
.form-row-inline input {
  flex: 1;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.form-section {
  margin: 1.5rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.form-section h3 {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.input-with-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.input-with-label label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.age-display {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 500;
  padding: 0.5rem 0;
}

.phone-email-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}
.phone-email-row input {
  margin-bottom: 0;
}
.phone-email-row input.value {
  flex: 1;
}
.phone-email-row input.label {
  flex: 0 0 100px;
}
.phone-email-row button.remove {
  flex: 0 0 auto;
  padding: 0.4rem 0.6rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}
.phone-email-row button.remove:hover {
  color: var(--error);
  border-color: var(--error);
}

.btn-add-item {
  padding: 0.4rem 0.8rem;
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}
.btn-add-item:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Attendance */
.attendance-layout {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
.attendance-side {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 140px;
}
.attendance-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
}

/* Work Timer */
.work-timer-container {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 16px;
  padding: 0.85rem 1.1rem;
  color: white;
  width: 100%;
  max-width: none;
  margin-bottom: 0.25rem;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.22);
}
.work-timer-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.work-timer-main-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.work-timer-left-col {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex: 0 0 auto;
  flex-wrap: wrap;
}
.timer-icon {
  font-size: 1.2rem;
}
.timer-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}
.work-timer-display {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 0;
  direction: ltr;
  unicode-bidi: isolate;
}
.timer-digit {
  font-size: 1.7rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 8px;
  min-width: 44px;
  text-align: center;
}
.timer-sep {
  font-size: 1.35rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  animation: blink 1s infinite;
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.3; }
}
.work-timer-progress {
  width: min(100%, 980px);
  margin: 0.55rem auto 0;
  padding: 0 0.25rem;
}
.progress-track {
  position: relative;
  height: 22px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 50%, #fbbf24 75%, #ef4444 100%);
  border-radius: 999px;
  transition: width 1s ease;
}
.progress-percent {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}
.work-timer-progress-labels {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  direction: ltr;
  unicode-bidi: isolate;
  width: 100%;
}
.work-timer-status {
  text-align: center;
  font-size: 0.85rem;
  color: #34d399;
  font-weight: 500;
}
.work-timer-status.overtime {
  color: #fbbf24;
}

.work-timer-day-wrap {
  display: none;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0 1rem 0 0;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}
.work-timer-day-title {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.5rem;
  text-align: center;
  font-weight: 600;
}
.work-timer-day-table-scroll {
  max-height: 260px;
  overflow: auto;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
}
.work-timer-day-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.work-timer-day-table th,
.work-timer-day-table td {
  padding: 0.4rem 0.5rem;
  text-align: right;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.work-timer-day-table th {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  position: sticky;
  top: 0;
  background: rgba(15, 23, 42, 0.95);
  z-index: 1;
}
.work-timer-day-table tbody tr:last-child td {
  border-bottom: none;
}
.work-timer-day-table tfoot td {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: none;
  color: #34d399;
  font-weight: 600;
}
.work-timer-day-table .work-timer-empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
}

@media (max-width: 720px) {
  .work-timer-main-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .work-timer-left-col {
    align-items: center;
  }
  .work-timer-day-wrap {
    border-right: none;
    padding: 1rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    max-width: 100%;
  }
}

.attendance-clock-btns {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: center;
}
.attendance-feedback {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.95rem;
}
.attendance-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 245px);
  border-radius: 12px;
  background: var(--bg-card);
  box-shadow: var(--chat-shadow);
}
.attendance-scope-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.attendance-scope-wrap label { font-size: 0.9rem; color: var(--text-muted); }
.attendance-scope-wrap select { padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: 8px; font: inherit; }

.attendance-range-picker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.attendance-range-picker label {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.attendance-range-picker input[type="date"] {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  font: inherit;
}
.attendance-format-picker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.attendance-format-picker label { font-size: 0.9rem; color: var(--text-muted); }
.attendance-format-picker select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}
.attendance-hours-chart {
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: var(--chat-shadow);
  max-height: 400px;
  overflow-y: auto;
}
.attendance-hours-chart.hidden { display: none; }
.hours-chart-bars { display: flex; flex-direction: column; gap: 0.75rem; }
.hours-chart-bar {
  display: grid;
  grid-template-columns: 120px 1fr 80px;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
}
.chart-label { color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-bar-track {
  height: 24px;
  background: var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.chart-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 6px;
  min-width: 4px;
  transition: width 0.3s ease;
}
.chart-value { font-weight: 600; text-align: left; }
.btn-attendance {
  padding: 0.72rem 2rem;
  border: none;
  border-radius: 12px;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 140px;
}
.btn-attendance.btn-in {
  background: var(--accent);
  color: var(--btn-on-accent);
}
.btn-attendance.btn-in:hover {
  background: var(--accent-dim);
}
.btn-attendance.btn-out {
  background: #6b7c9a;
  color: #fff;
}
.btn-attendance.btn-out:hover {
  background: #5a6b89;
}
.btn-attendance:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #9ca3af !important;
}
.btn-attendance.btn-out:disabled {
  background: #9ca3af !important;
}
.attendance-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--chat-shadow);
}
.attendance-table th,
.attendance-table td {
  padding: 0.5rem 0.75rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  white-space: nowrap;
}
.attendance-table th {
  background: var(--chat-sidebar-header);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}
.attendance-table tbody tr:hover {
  background: var(--chat-accent-soft);
}
.attendance-entry-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.attendance-entry-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.22);
  color: var(--text);
  font-size: 0.82rem;
  direction: ltr;
  unicode-bidi: isolate;
}
.attendance-entry-chip--open {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #047857;
}
.attendance-entry-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Presence indicator */
.presence-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  margin-left: 0.5rem;
  vertical-align: middle;
  animation: presence-pulse 2s infinite;
}
@keyframes presence-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.presence-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  background: rgba(34, 197, 94, 0.2);
  color: #16a34a;
  border-radius: 6px;
  margin-right: 0.25rem;
}
.user-row.present .user-info-cell,
.contact-card.present .contact-name {
  position: relative;
}
.contact-card.clickable {
  cursor: pointer;
}
.contact-card.clickable:hover {
  background: var(--chat-accent-soft);
}

/* File modal tabs */
.file-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.file-tab {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
  color: var(--text-muted);
}
.file-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.file-tab.active {
  background: var(--accent);
  color: var(--btn-on-accent);
  border-color: var(--accent);
}
.file-section.hidden {
  display: none !important;
}

/* Employee profile */
.employee-profile-header {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.employee-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.employee-tab {
  padding: 0.6rem 1rem;
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.employee-tab:hover {
  color: var(--accent);
}
.employee-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.schedule-table {
  width: 100%;
  border-collapse: collapse;
}
.schedule-table th,
.schedule-table td {
  padding: 0.6rem 1rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
.employee-conv-row {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.employee-conv-row:hover {
  background: var(--chat-accent-soft);
}
.schedule-table input[type="time"] {
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}
.employment-terms-form {
  max-width: 480px;
}
.employment-terms-form .input-with-label {
  margin-bottom: 1rem;
}
.employment-terms-form .input-with-label input[type="number"],
.employment-terms-form .input-with-label textarea {
  width: 100%;
  max-width: 200px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}
.employment-terms-form .input-with-label textarea {
  max-width: 280px;
  min-height: 80px;
  resize: vertical;
}
.employment-terms-view p {
  margin-bottom: 1rem;
}
.employment-terms-form #employment-save-btn,
.schedule-view #schedule-save-btn {
  margin-top: 0.5rem;
}
.emp-terms-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.emp-terms-row .input-with-label input {
  width: 100px;
}
.bonuses-section {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}
.bonuses-section h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
.bonuses-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.bonuses-list {
  margin-bottom: 0.75rem;
}
.bonus-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.bonus-row:last-of-type {
  border-bottom: none;
}
.bonus-text {
  flex: 1;
  min-width: 0;
  font-size: 0.95rem;
}
.bonus-amount {
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.add-bonus-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.bonus-input-condition {
  width: 180px;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}
.bonus-input-amount {
  width: 90px;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}
.salary-summary {
  max-width: 420px;
}
.salary-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
.salary-table td, .salary-table th {
  padding: 0.5rem;
  text-align: right;
  border: 1px solid var(--border);
}
.salary-table th {
  background: var(--chat-sidebar-header);
  color: #fff;
}
.salary-edit {
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.salary-edit input {
  max-width: 120px;
}

/* Tardiness Report */
.tardiness-report {
  margin: 1.5rem 0;
  padding: 1rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 12px;
  border: 1px solid #f59e0b;
}
.tardiness-report h4 {
  margin: 0 0 0.75rem 0;
  color: #92400e;
  font-size: 1rem;
}
.tardiness-report.tardiness-none {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-color: #10b981;
}
.tardiness-report.tardiness-none h4 {
  color: #065f46;
}
.no-tardiness {
  color: #065f46;
  font-weight: 500;
  margin: 0;
}
.tardiness-summary {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}
.tardiness-count {
  color: #dc2626;
  font-weight: 600;
}
.tardiness-total {
  color: #92400e;
}
.tardiness-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.85rem;
}
.tardiness-table th,
.tardiness-table td {
  padding: 0.5rem 0.75rem;
  text-align: right;
  border-bottom: 1px solid #fcd34d;
}
.tardiness-table thead th {
  background: #f59e0b;
  color: white;
  font-weight: 500;
}
.tardiness-table tbody tr:last-child td {
  border-bottom: none;
}
.tardiness-table tbody tr:hover {
  background: #fef9c3;
}
.tardiness-minutes {
  color: #dc2626;
  font-weight: 500;
}

.notif-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.manager-edit-mark {
  color: var(--accent);
  font-weight: bold;
  margin-right: 2px;
}
.emp-attendance-add {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.emp-attendance-add h4 {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}
.modal-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Tasks */
.tasks-page-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: -0.5rem 0 1rem 0;
}
.tasks-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  align-items: flex-end;
  justify-content: space-between;
}
.tasks-toolbar-search { flex: 1; min-width: 220px; max-width: 420px; }
.tasks-search-input { width: 100%; }
.tasks-filters-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.tasks-filter-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}
.tasks-filter-select, .tasks-filter-date {
  min-width: 120px;
}
.tasks-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.tasks-view-toggle {
  display: inline-flex;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0.25rem 0;
}
.tasks-view-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.tasks-view-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.15rem;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tasks-view-btn:hover { background: var(--bg-hover); }
.tasks-view-btn.active {
  background: var(--task-accent);
  color: #fff;
  border-color: var(--task-accent);
  font-weight: 600;
}
.tasks-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.35rem;
  overflow-x: auto;
  max-width: 100%;
}
.tasks-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.15rem;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tasks-tab:hover { background: var(--bg-hover); }
.tasks-tab.active {
  background: var(--task-accent);
  color: #fff;
  border-color: var(--task-accent);
  font-weight: 600;
}
.tasks-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--task-accent);
  border-color: var(--task-accent);
}
.tasks-add-btn:hover { background: var(--task-accent-hover); border-color: var(--task-accent-hover); }
.tasks-count-wrap {
  margin-bottom: 1rem;
}
.tasks-count {
  font-size: 0.95rem;
  color: var(--text-muted);
}
.tasks-count strong { color: var(--text); }
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 260px);
}
.task-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.task-row:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.task-row.task-today { border: 2px solid #ea580c; background: rgba(234, 88, 12, 0.06); }
.task-row.task-overdue { border: 2px solid #dc2626; background: rgba(220, 38, 38, 0.06); }
.task-row.task-done { opacity: 0.85; }
.task-row.task-continuation::before { content: '???? '; color: var(--text-muted); font-size: 0.85em; }
.task-row.task-corrected { border-top: 1px dashed var(--accent); }
.task-main { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.5rem; }
.task-subject { font-weight: 500; font-size: 1.05rem; }
.task-status-badge { font-size: 0.8rem; padding: 0.2rem 0.6rem; border-radius: 999px; }
.task-status-badge.status-pending { background: var(--task-gold-soft); color: var(--task-gold); }
.task-status-badge.status-in_progress { background: rgba(13, 148, 136, 0.12); color: var(--task-today); }
.task-status-badge.status-done { background: rgba(26, 95, 90, 0.12); color: var(--task-accent); }
.task-meta { font-size: 0.9rem; color: var(--text-muted); }
.task-continuation-parent {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.task-continuation-parent-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.task-continuation-parent-content {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.task-continuation-parent-row {
  margin-bottom: 0.25rem;
}
.task-continuation-parent-row:last-child { margin-bottom: 0; }
.task-modal-inner.task-modal-content {
  max-width: min(90vw, 680px);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.task-form-horizontal .task-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}
.task-form-horizontal .form-row { margin-bottom: 0; }
.task-form-horizontal .form-row.form-row-inline { grid-column: span 1; }
.task-form-horizontal .form-row:first-child { grid-column: 1 / -1; }
.task-form-horizontal .task-assignees-row { grid-column: 1 / -1; }
.task-form-horizontal .form-row label { display: block; margin-bottom: 0.25rem; font-weight: 500; }
.task-assignees-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.task-assignees-chips-wrap .participant-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.task-add-assignee-select { max-width: 220px; padding: 0.4rem 0.6rem; font: inherit; border: 1px solid var(--border); border-radius: 8px; }
.task-status-btns { display: flex; gap: 0.5rem; margin: 1rem 0; flex-wrap: wrap; }
.task-status-btns .task-status-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.task-detail-row { margin-bottom: 0.5rem; }
.task-link-client, .task-link-policy,
.task-list-link-client, .task-list-link-policy {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}
.task-link-client:hover, .task-link-policy:hover,
.task-list-link-client:hover, .task-list-link-policy:hover {
  text-decoration: underline;
}

/* ================= MANAGEMENT PAGE ================= */
.management-header {
  margin-bottom: 2rem;
}
.management-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.management-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.manager-dashboard-wrap {
  margin-bottom: 2rem;
}
.manager-dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.manager-dashboard-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}
.manager-dashboard-summary {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.manager-dash-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.manager-dash-num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}
.manager-dash-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.manager-dashboard-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 900px) {
  .manager-dashboard-tables { grid-template-columns: 1fr; }
}
.manager-dash-section h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.manager-dash-list {
  font-size: 0.9rem;
}
.manager-dash-row {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.manager-dash-row:last-child { border-bottom: none; }
.dash-name { font-weight: 500; }
.dash-present { color: var(--accent); font-size: 0.85em; }
.dash-absent { color: var(--text-muted); font-size: 0.85em; }
.dash-role { font-size: 0.85em; color: var(--text-muted); }
.dash-emails, .dash-tasks { font-size: 0.9em; }

.report-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}
.report-filters select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}
.report-table-wrap {
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.report-table th, .report-table td {
  padding: 0.5rem 0.75rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
.report-table th { font-weight: 600; color: var(--text); background: var(--bg-hover); }
.report-table tbody tr:hover { background: rgba(0,0,0,0.02); }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.5rem;
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.settings-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.settings-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, rgba(37, 99, 235, 0.03), transparent);
}
.settings-card-icon {
  font-size: 2rem;
  line-height: 1;
}
.settings-card-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.settings-card-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.settings-card-body {
  padding: 1rem 1.5rem;
}

.setting-option {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.setting-option:last-child {
  border-bottom: none;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #d1d5db;
  transition: 0.3s;
  border-radius: 26px;
}
.toggle-slider::before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}
.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.setting-label {
  flex: 1;
  min-width: 0;
}
.setting-title {
  display: block;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.setting-desc {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.setting-input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  margin-right: auto;
}
.setting-input-group input[type="number"] {
  width: 80px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  text-align: center;
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.setting-input-group input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input-suffix {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.settings-card-footer {
  padding: 1rem 1.5rem;
  background: rgba(0,0,0,0.02);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

/* Manager-only nav item styling */
.nav-item-manager {
  position: relative;
}
.nav-item-manager::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transition: opacity 0.2s;
}
.nav-item-manager:hover::before,
.nav-item-manager.active::before {
  opacity: 1;
}

/* Toast notification */
.toast-message {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  z-index: 10000;
}
.toast-message.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ?????? ?????/????? ??????? (?? alert/confirm ?? ??????) */
.app-notice-modal-inner.modal.modal-elegant {
  max-width: min(26rem, 92vw);
  padding: 1.35rem 1.5rem;
}
.app-notice-modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}
.app-notice-modal-body {
  margin: 0.75rem 0 0;
  line-height: 1.45;
  white-space: pre-line;
  color: var(--text);
}
.app-notice-modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.65rem;
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.app-notice-modal-actions .btn-elegant {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  min-height: 2.35rem;
  box-sizing: border-box;
  font-size: 0.9rem;
  font-weight: 500;
}
/* ????? ?? ????? ???? ? ????? ???? */
.app-notice-modal-actions--single {
  justify-content: flex-end;
}
.app-notice-modal-actions--single .btn-elegant {
  flex: 0 0 auto;
  min-width: 7rem;
  padding-inline: 1.15rem;
}
/* ????? ? ??? ??????? ????? ???? ????? ????? (??? modal-actions-elegant) */
.app-notice-modal-actions--confirm {
  justify-content: stretch;
  gap: 0.75rem;
}
.app-notice-modal-actions--confirm .btn-elegant {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

/* Companies list in settings */
.companies-list {
  max-height: 500px;
  overflow-y: auto;
  overflow-x: hidden;
}
.companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  padding: 0.5rem;
}
.company-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
}
.company-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.company-card-logo {
  position: relative;
  width: 64px;
  height: 64px;
  margin-bottom: 0.75rem;
}
.company-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.company-card-logo .no-logo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-radius: 8px;
  font-size: 2rem;
  color: var(--text-muted);
}
.company-card-logo .btn-logo-upload {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}
.company-card:hover .btn-logo-upload {
  opacity: 1;
}
.company-card-body {
  flex: 1;
  margin-bottom: 0.75rem;
}
.company-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.company-card-url {
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
}
.company-card-actions {
  display: flex;
  gap: 0.5rem;
}
.company-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.company-item:last-child { border-bottom: none; }
.company-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.company-name {
  font-weight: 500;
  color: var(--text);
}
.company-url {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
}
.company-url:hover { text-decoration: underline; }
.company-actions {
  display: flex;
  gap: 0.5rem;
}
.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}
.btn-icon-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.btn-icon-sm:hover { background: var(--bg-hover); }
.btn-icon-sm.btn-danger:hover { background: rgba(220, 38, 38, 0.1); color: var(--error); }
.add-company-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.add-company-row input {
  flex: 1;
  min-width: 150px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}
.add-company-row input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Permissions list */
.permissions-list {
  max-height: 350px;
  overflow-y: auto;
}
.permission-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.permission-item:last-child { border-bottom: none; }
.permission-user {
  font-weight: 500;
  color: var(--text);
}
.permission-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.permission-toggle span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Page header */
.page-header {
  margin-bottom: 1.5rem;
}
.page-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Insurance credentials grid */
.credentials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}
.credential-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.credential-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.credential-card-header {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.credential-card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.credential-card-header a {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
}
.credential-card-header a:hover { text-decoration: underline; }
.credential-card-body {
  padding: 1rem 1.25rem;
}
.credential-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.credential-field:last-child { border-bottom: none; }
.credential-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.credential-value {
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.credential-value.empty {
  color: var(--text-muted);
  font-style: italic;
  font-weight: 400;
}
.btn-copy {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.btn-copy:hover { opacity: 1; }
.credential-card-footer {
  padding: 0.75rem 1.25rem;
  background: rgba(0,0,0,0.02);
  border-top: 1px solid var(--border);
}
.credential-notes {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Agency Details Page - Premium Design */
.agency-details-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}
.agency-details-tab {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--text-muted);
  border-radius: 8px;
}
.agency-details-tab:hover { color: var(--text); background: var(--bg-hover); }
.agency-details-tab.active { color: var(--accent); font-weight: 600; background: var(--accent-soft); }
.agency-details-panel { padding-top: 0; }
.agency-agent-wrap { max-width: 720px; }
.agency-agent-header h2 { margin: 0 0 .25rem; }
.agency-agent-desc { color: var(--text-muted, #64748b); font-size: .9rem; margin: 0 0 1rem; }
.agency-agent-card { background: #fff; border: 1px solid var(--border-color, #e2e8f0); border-radius: 12px; padding: 1.25rem; }
.agency-agent-card .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem 1rem; }
.agency-agent-field { display: flex; flex-direction: column; gap: .3rem; }
.agency-agent-field > span { font-size: .82rem; color: var(--text-muted, #64748b); font-weight: 600; }
.agency-agent-field input { width: 100%; }
.agency-agent-field-wide { grid-column: 1 / -1; }
.agency-agent-note { font-size: .8rem; color: var(--text-muted, #64748b); margin: .85rem 0 1rem; }
.agency-agent-status { margin-inline-start: .75rem; font-size: .85rem; color: var(--success, #16a34a); }
@media (max-width: 640px) { .agency-agent-card .form-grid { grid-template-columns: 1fr; } }
.agency-contacts-header { margin-bottom: 1rem; }
.agency-contacts-header h2 { margin-bottom: 0.35rem; }
.agency-contacts-desc { color: var(--text-muted); font-size: 0.9rem; }
.agency-contacts-tags-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
#agency-contacts-tags-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.agency-contact-tag-btn {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
}
.agency-contact-tag-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.agency-contact-tag-btn.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.agency-contact-tag-btn.tag-system { background: rgba(13, 148, 136, 0.08); border-color: rgba(13, 148, 136, 0.35); }
.agency-contact-tag-btn .tag-system-icon { font-size: 0.85em; opacity: 0.9; }
.agency-contact-tag-btn .tag-delete { margin-right: 0.25rem; opacity: 0.7; cursor: pointer; }
.agency-contact-tag-btn .tag-delete:hover { opacity: 1; color: var(--error); }
/* ???? ??? ? ????? ?????? ????? ??????? ????? */
.agency-contacts-layout { display: flex; gap: 1rem; align-items: flex-start; min-height: 200px; }
.agency-contacts-actions-col {
  flex-shrink: 0;
  width: 140px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.25rem 0;
}
.agency-contacts-actions-col .btn-sm { width: 100%; justify-content: center; white-space: normal; text-align: center; }
.agency-contacts-main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.agency-contacts-section { margin-bottom: 1rem; }
.agency-contacts-section-title { font-size: 1rem; margin-bottom: 0.5rem; color: var(--text); font-weight: 600; }
.agency-contacts-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.5rem; }
.agency-contact-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.agency-contact-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-color: rgba(13, 148, 136, 0.25); }
.agency-contact-card-body { flex: 1; min-width: 0; }
.agency-contact-card-body strong { font-size: 1rem; font-weight: 600; color: var(--text); display: block; margin-bottom: 0.15rem; }
.agency-contact-tag-hint { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.35rem; }
.agency-contact-meta { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.25rem; }
.agency-contact-meta a { color: var(--accent); text-decoration: none; }
.agency-contact-meta a:hover { text-decoration: underline; text-underline-offset: 2px; }
.agency-contact-notes { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.35rem; line-height: 1.4; }
.agency-contact-card-actions { display: flex; gap: 0.25rem; flex-shrink: 0; }
.agency-add-contact-btn { margin-top: 0; }
.agency-contacts-all-view { display: flex; flex-direction: column; gap: 0.75rem; }
.agency-contacts-search-wrap { flex-shrink: 0; }
.agency-contacts-search-wrap .input-text { width: 100%; max-width: 320px; border-radius: 10px; padding: 0.5rem 0.75rem; }
.agency-contacts-all-view .agency-contacts-list { margin-bottom: 0; }

/* ?????? ??? ? ???? ?????, ?? ????? ???? (??? ?????) */
.agency-bank-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.75rem; }
.agency-bank-tile {
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--border);
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--bg-card);
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
}
.agency-bank-tile-logo {
  flex: 1 1 auto;
  min-height: 72px;
  background: #f0f2f4 center/contain no-repeat;
  background-color: #fff;
}
.agency-bank-tile-logo--empty {
  background-image: none;
  background: linear-gradient(145deg, #e8ecef 0%, #f5f7f9 100%);
  position: relative;
}
.agency-bank-tile-logo--empty::after {
  content: '??';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  opacity: 0.45;
}
.agency-bank-tile:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.agency-bank-tile-content {
  flex: 0 0 auto;
  text-align: center;
  padding: 0.45rem 0.5rem 0.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
}
.agency-bank-tile-edit {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: rgba(255,255,255,0.92);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.agency-bank-tile-edit:hover { background: #fff; }
.agency-bank-tile-name {
  font-weight: 700;
  font-size: 0.88rem;
  display: block;
  line-height: 1.3;
  color: var(--text);
}
.agency-bank-tile-number {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-top: 0.15rem;
  display: block;
  color: var(--text-muted);
}
.agency-contact-logo-upload { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.agency-contact-logo-preview { max-width: 80px; max-height: 60px; object-fit: contain; border-radius: 8px; border: 1px solid var(--border); }
.agency-bank-detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem; }
.agency-bank-detail-header h2 { margin: 0; flex: 1; }
.agency-bank-detail-actions { display: flex; align-items: center; gap: 0.35rem; }
.agency-bank-detail-inline-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.agency-contacts-bank-actions { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.4rem; }
.agency-bank-back-wrap { order: 1; width: 100%; text-align: center; margin-bottom: 0.5rem; }
.agency-bank-detail-inline-header .btn-back-link {
  display: inline-block;
  padding: 0.4rem 1rem;
  color: var(--accent);
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.3);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s, border-color 0.2s;
}
.agency-bank-detail-inline-header .btn-back-link:hover { background: rgba(13, 148, 136, 0.12); border-color: var(--accent); text-decoration: none; }
.agency-bank-detail-inline-header .agency-bank-detail-title-inline { order: 2; flex: 1; font-size: 1.25rem; margin: 0; color: var(--text); font-weight: 600; }
.agency-bank-detail-inline-header #agency-bank-detail-edit-inline { order: 3; }
.agency-bank-detail-body-elegant {
  max-width: 960px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
  align-items: start;
}
@media (max-width: 768px) {
  .agency-bank-detail-body-elegant {
    grid-template-columns: 1fr;
  }
}
.agency-bank-detail-branches-col,
.agency-bank-detail-links-col { min-width: 0; }
.agency-bank-section { margin-bottom: 1.5rem; }
.agency-bank-section h3 { font-size: 0.95rem; margin-bottom: 0.5rem; color: var(--text); font-weight: 600; }
.agency-bank-branches-search-wrap { margin-bottom: 0.75rem; }
.agency-bank-branches-search-wrap .input-search { width: 100%; max-width: 320px; }
.agency-bank-branch-card { position: relative; }
.agency-bank-branch-actions { margin-right: 0.5rem; white-space: nowrap; }
.agency-bank-branch-actions .btn-icon-sm { padding: 0.25rem 0.4rem; font-size: 0.9rem; vertical-align: middle; }
.agency-bank-loading { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0; margin-bottom: 0.5rem; }
.agency-bank-loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(13, 148, 136, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: agency-bank-spin 0.8s linear infinite;
}
.agency-bank-loading-text { font-size: 0.9rem; color: var(--text-muted); }
@keyframes agency-bank-spin { to { transform: rotate(360deg); } }
.agency-bank-skeleton .skeleton-line {
  display: block;
  height: 14px;
  background: linear-gradient(90deg, rgba(0,0,0,0.06) 25%, rgba(0,0,0,0.12) 50%, rgba(0,0,0,0.06) 75%);
  background-size: 200% 100%;
  animation: agency-bank-skeleton-shine 1.2s ease-in-out infinite;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}
.agency-bank-skeleton .skeleton-line.short { width: 70%; }
.agency-bank-skeleton .skeleton-line:last-child { margin-bottom: 0; }
@keyframes agency-bank-skeleton-shine { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.agency-bank-card-wrap { max-width: 520px; }
.agency-bank-branch-card {
  padding: 1rem 1.25rem;
  margin-bottom: 0.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
}
.agency-bank-branch-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.agency-bank-branch-card.is-main {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.06) 0%, #fff 100%);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.1);
}
.agency-bank-link-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.agency-bank-link-row a { color: var(--accent); }
.agency-bank-link-row:last-child { border-bottom: none; }

/* ?????? ?????? ???????? */
.modal-elegant { max-width: 440px; padding: 1.5rem; border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
.modal-elegant h2 { font-size: 1.15rem; margin-bottom: 1.25rem; font-weight: 600; color: var(--text); }
.form-group-elegant { margin-bottom: 1rem; }
.form-group-elegant label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text); margin-bottom: 0.35rem; }
.input-elegant {
  width: 100%;
  max-width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-elegant:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15); }
.label-elegant { display: block; font-weight: 500; color: var(--text); margin-bottom: 0.5rem; font-size: 0.9rem; }
.policy-type-checkboxes {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  background: #fafafa;
}
.policy-type-checkboxes .policy-cat-row {
  margin-bottom: 0.35rem;
}
.policy-type-checkboxes .policy-cat-row label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  padding: 0.2rem 0;
}
.policy-type-checkboxes .policy-type-row {
  margin-right: 1.25rem;
  margin-bottom: 0.25rem;
}
.policy-type-checkboxes .policy-type-row label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 400;
  font-size: 0.9rem;
}
.modal-hint { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.agency-set-main-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0; cursor: pointer; }
.agency-set-main-row input[type="checkbox"] { width: 1.1em; height: 1.1em; accent-color: var(--accent); }
#agency-bank-set-main-list { max-height: 280px; overflow-y: auto; }
.policy-type-checkboxes input[type="checkbox"] {
  width: 1.1em;
  height: 1.1em;
  accent-color: var(--accent);
}
.form-row-elegant { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1rem; }
.modal-actions-elegant {
  display: flex;
  justify-content: stretch;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.modal-actions-elegant .btn-elegant {
  flex: 1 1 0;
  min-width: 0;
  width: 0;
  padding: 0.6rem 0.75rem;
  text-align: center;
}
.btn-elegant {
  padding: 0.55rem 1.15rem;
  border-radius: 10px;
  font-weight: 500;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.2s, background 0.2s;
}
.btn-elegant:hover { transform: translateY(-1px); }
.btn-elegant.btn-primary { box-shadow: 0 2px 6px rgba(13, 148, 136, 0.25); }
.btn-elegant.btn-primary:hover { box-shadow: 0 3px 10px rgba(13, 148, 136, 0.35); }
.btn-elegant.btn-secondary { border: 1px solid var(--border); background: #fff; color: var(--text); }
.btn-elegant.btn-secondary:hover { border-color: var(--accent); background: rgba(13, 148, 136, 0.06); color: var(--accent); }
.modal-lg { max-width: 560px; }

.agency-details-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}
.agency-info-section {
  margin-bottom: 2.5rem;
}
.agency-info-card {
  background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
  border: none;
  border-radius: 20px;
  padding: 2.5rem;
  display: flex;
  gap: 2.5rem;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 8px 32px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
}
.agency-info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, #6366f1 50%, #8b5cf6 100%);
}
.agency-logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.agency-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: 16px;
  background: white;
  padding: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.agency-logo-placeholder {
  width: 140px;
  height: 140px;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0ff 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 500;
}
.agency-info-fields {
  flex: 1;
}
.agency-name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.agency-slogan {
  color: var(--text-muted);
  font-style: italic;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
.agency-contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-size: 0.95rem;
  padding: 0.5rem 0;
}
.contact-item a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.contact-item a:hover { 
  text-decoration: underline; 
}
.contact-item .copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.4;
  font-size: 0.85rem;
  transition: opacity 0.2s;
}
.contact-item .copy-btn:hover { opacity: 1; }

.agency-info-edit {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--bg);
  border-radius: 12px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.form-grid input {
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}
.form-grid input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Company bulletins - Modern card design */
.company-bulletins-section {
  margin-bottom: 2rem;
}
.company-bulletins-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.company-bulletins-section h2::before {
  content: '??';
}
.bulletins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.bulletin-card {
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(255,255,255,0.95) 100%);
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.bulletin-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 12px 32px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}
.bulletin-card.open {
  grid-column: 1 / -1;
  transform: none;
}
.bulletin-header {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06) 0%, rgba(99, 102, 241, 0.03) 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
}
.bulletin-header:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
}
.bulletin-header-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.bulletin-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
  background: white;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.bulletin-no-logo {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8ecff 100%);
  border-radius: 10px;
  font-size: 1.5rem;
}
.bulletin-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.bulletin-header .toggle-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 50%;
  transition: all 0.2s;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.bulletin-card.open .toggle-icon {
  background: var(--accent);
  color: white;
}
.bulletin-body {
  display: none;
  padding: 1.5rem;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.bulletin-body.open {
  display: block;
}
.company-tables-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--border);
}
.company-tables-section h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.agent-numbers-section {
  margin-bottom: 1.5rem;
}
.agent-numbers-section h4 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.agent-number-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.9rem;
  margin: 0.25rem;
}
.agent-number-chip .category {
  font-size: 0.75rem;
  opacity: 0.7;
}
.agent-number-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.agent-number-row .agent-number-chip {
  flex: 0 0 auto;
}
.agent-domain-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-right: 0.25rem;
}
.agent-active-badge {
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 500;
}
.btn-agent-active {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
}
.contacts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.contacts-table th,
.contacts-table td {
  padding: 0.6rem 0.75rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
.contacts-table th {
  background: var(--bg);
  font-weight: 500;
  color: var(--text-muted);
}
.contacts-table td {
  color: var(--text);
}
.contacts-table .copy-cell {
  cursor: pointer;
  transition: background 0.2s;
}
.contacts-table .copy-cell:hover {
  background: var(--accent-soft);
}

/* Custom tables */
.custom-tables-section {
  margin-bottom: 2rem;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.section-header h2 {
  font-size: 1.25rem;
  color: var(--text);
}
.custom-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
}
.custom-table-header {
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.custom-table-header h4 {
  font-weight: 500;
}
.custom-table-body {
  padding: 1rem;
  overflow-x: auto;
}
.custom-table-wrapper {
  overflow-x: auto;
  margin-bottom: 0.5rem;
}
.custom-table {
  width: 100%;
  min-width: 400px;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.custom-table th,
.custom-table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  text-align: right;
}
.custom-table th {
  background: var(--bg);
}
.custom-table input {
  width: 100%;
  padding: 0.3rem;
  border: none;
  background: transparent;
  font: inherit;
}
.custom-table input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* Edit only elements */
.edit-only { display: none; }
.can-edit .edit-only { display: block; }
.can-edit .edit-only.btn-sm { display: inline-block; }

/* Modal subtitle */
.modal-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* Form textarea */
.modal textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  resize: vertical;
}
.modal textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* Attendance Tabs */
.attendance-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}
.attendance-tab {
  padding: 0.6rem 1.2rem;
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 8px 8px 0 0;
  transition: all 0.2s;
}
.attendance-tab:hover { background: var(--bg-hover); }
.attendance-tab.active {
  background: var(--accent);
  color: white;
}
.attendance-tab-content.hidden { display: none; }

/* Duty Calendar */
.duty-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.duty-month-picker {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
}
.duty-month-picker .btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s;
}
.duty-month-picker .btn-icon:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.duty-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.duty-calendar-header-cell {
  background: var(--bg);
  padding: 0.75rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.duty-calendar-cell {
  background: var(--bg-card);
  min-height: 100px;
  padding: 0.5rem;
  position: relative;
}
.duty-calendar-cell.other-month {
  background: var(--bg);
  opacity: 0.5;
}
.duty-calendar-cell.today {
  background: rgba(37, 99, 235, 0.05);
}
.duty-day-number {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.duty-calendar-cell.today .duty-day-number {
  color: var(--accent);
}
.duty-shift-item {
  background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
  color: white;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
  cursor: pointer;
  transition: transform 0.2s;
}
.duty-shift-item:hover {
  transform: scale(1.02);
}
.duty-shift-item.morning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.duty-shift-item.evening { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }
.duty-shift-item.night { background: linear-gradient(135deg, #1f2937 0%, #374151 100%); }
.duty-add-cell-btn {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 1rem;
  line-height: 1;
}
.duty-calendar-cell:hover .duty-add-cell-btn { opacity: 1; }

/* ===================== EMAIL APP ===================== */
/* ========================================
   EMAIL CLIENT - PREMIUM DESIGN
   ======================================== */

.email-app {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  min-height: calc(100vh - 140px);
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 20px;
  overflow: visible;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.email-app.viewing-email {
  grid-template-columns: 240px 1fr;
}

.email-app.viewing-email .email-list {
  display: none;
}

.email-sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.email-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.15) 0%, transparent 100%);
  pointer-events: none;
}

.email-sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.email-sidebar-header .email-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.email-sidebar-header h2 {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.btn-compose {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 15px rgba(99, 102, 241, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-compose::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-compose:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(99, 102, 241, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-compose:hover::before {
  opacity: 1;
}

.btn-compose span {
  position: relative;
  z-index: 1;
}

.email-folders {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
  z-index: 1;
}

.email-folder {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.email-folder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  opacity: 0;
  transition: opacity 0.25s;
  border-radius: 12px;
}

.email-folder:hover {
  color: white;
}

.email-folder:hover::before {
  opacity: 1;
}

.email-folder.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(139, 92, 246, 0.15) 100%);
  color: white;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.3);
}

.email-folder.active .folder-icon {
  transform: scale(1.1);
}

.folder-icon {
  font-size: 1.2rem;
  transition: transform 0.25s;
  position: relative;
  z-index: 1;
  width: 24px;
  text-align: center;
}

.folder-name {
  flex: 1;
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.folder-count {
  background: rgba(99, 102, 241, 0.3);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  min-width: 24px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.email-folder.active .folder-count {
  background: rgba(255, 255, 255, 0.2);
}

.email-labels-section {
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.email-labels-section h4 {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  padding: 0 0.5rem;
}

.label-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Email List Panel */
.email-list-panel {
  background: white;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
}

.email-main {
  display: flex;
  flex-direction: column;
  background: white;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
  overflow: visible;
  min-height: 0;
}

.email-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

.email-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.email-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.email-toolbar .btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
}

.email-toolbar .btn-icon:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.15);
  color: var(--accent);
}

.email-toolbar .search-input {
  flex: 1;
  min-width: 120px;
  max-width: 100%;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: white;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.email-toolbar .search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  outline: none;
}

.email-list {
  flex: 1;
  overflow-y: auto;
  background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
}

.email-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #fafbfc;
}
.email-pagination-bar.hidden {
  display: none;
}
.email-page-info {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.email-advanced-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.5rem 1rem;
  background: #f5f6f8;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.email-advanced-search label { font-size: 0.85rem; color: var(--text-muted); }
.email-advanced-search .search-input,
.email-advanced-search input[type="date"] { max-width: 140px; }

.email-item {
  display: grid;
  grid-template-columns: 40px 40px 200px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.email-app.viewing-email .email-item {
  grid-template-columns: 36px 36px 1fr auto;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
}

.email-item::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s;
}

.email-item:hover {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.04) 0%, transparent 100%);
}

.email-item:hover::before {
  opacity: 1;
}

.email-item.selected {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 0%, rgba(99, 102, 241, 0.02) 100%);
}

.email-item.selected::before {
  opacity: 1;
}

.email-item.unread {
  background: white;
}

.email-item.unread::after {
  content: '';
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}

.email-item.unread .email-sender,
.email-item.unread .email-subject {
  font-weight: 600;
  color: var(--text);
}

.email-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
}

.email-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  cursor: pointer;
  accent-color: var(--accent);
}

.email-item-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.email-app.viewing-email .email-item-avatar {
  display: flex;
}

.email-sender-col {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.email-app.viewing-email .email-sender-col {
  display: none;
}

.email-item-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.email-subject-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.email-subject-line .email-subject {
  flex-shrink: 0;
  max-width: 350px;
}

.email-preview-sep {
  color: var(--text-muted);
  opacity: 0.5;
  flex-shrink: 0;
}

.email-subject-line .email-preview {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-indicator {
  flex-shrink: 0;
  font-size: 0.9rem;
}

.email-app.viewing-email .email-subject-line {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

.email-app.viewing-email .email-preview-sep {
  display: none;
}

.email-app.viewing-email .email-subject-line .email-subject {
  max-width: 100%;
}

.email-app.viewing-email .email-subject-line .email-preview {
  font-size: 0.8rem;
}

.email-sender {
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-content {
  min-width: 0;
}

.email-subject {
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.email-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.email-star {
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.5;
}

.email-item:hover .email-star {
  opacity: 1;
}

.email-star:hover {
  transform: scale(1.2);
}

.email-star.starred {
  color: #f59e0b;
  opacity: 1;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.email-date {
  white-space: nowrap;
  font-weight: 500;
}

/* Email View Panel - Premium Design */
.email-view {
  flex: 1;
  overflow: visible;
  padding: 0;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  display: none;
  flex-direction: column;
}

.email-view:not(.hidden) {
  display: flex;
}

.email-app.viewing-email .email-view {
  display: flex;
  width: 100%;
  padding: 1.5rem 2rem;
  overflow-y: auto;
}

.email-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.btn-back {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-back:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
  color: var(--accent);
}

.email-view-actions {
  display: flex;
  gap: 0.5rem;
}

.email-view-actions .btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s;
}

.email-view-actions .btn-icon:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
  color: var(--accent);
}

.email-view-actions .btn-secondary {
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.email-view-actions .btn-secondary:hover {
  transform: translateY(-1px);
}

#email-view-content {
  padding: 0;
  flex: 1;
  overflow-x: auto;
  overflow-y: visible;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  display: flex;
  flex-direction: column;
}

/* ???? ?????? ????? ????? */
.email-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 20;
  gap: 1rem;
  flex-wrap: wrap;
}

.email-actions-right {
  flex-shrink: 0;
}

.email-actions-center {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.actions-divider {
  width: 1px;
  height: 24px;
  background: rgba(0, 0, 0, 0.15);
  margin: 0 0.25rem;
}

.quick-action-btn.back-btn {
  background: var(--text);
  color: white;
  border-color: var(--text);
}

.quick-action-btn.back-btn:hover {
  background: #1e293b;
}

.quick-action-btn.danger {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.3);
}

.quick-action-btn.danger:hover {
  background: rgba(220, 38, 38, 0.1);
  border-color: #dc2626;
}

/* ???? ???? ?? ???? ?? */
.email-content-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.5rem;
  padding: 1.5rem;
  flex: 1;
}

/* ???? ??????? ????? */
.email-main-content {
  min-width: 0;
  order: 1;
}

/* ???? ?? ????? */
.email-sidebar-info {
  order: 2;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 80px;
  height: fit-content;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.email-sidebar-info .email-linked-info {
  margin-top: 0;
}

.btn-link-client,
.btn-create-task {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  background: white;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.btn-link-client:hover,
.btn-create-task:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--accent);
}

@media (max-width: 900px) {
  .email-content-layout {
    grid-template-columns: 1fr;
  }
  
  .email-sidebar-info {
    order: -1;
    position: static;
    max-height: none;
  }
}

.email-full-subject {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.75rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.email-full-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
}

.email-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
}

.email-header-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.email-from-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}

.email-from-address {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.email-to-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.email-date-full {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.email-body {
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
  font-size: 0.95rem;
  background: white;
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  overflow-x: auto;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.email-body img {
  max-width: 100%;
  height: auto;
}

.email-body table {
  max-width: 100%;
  overflow-x: auto;
  display: block;
}

.email-attachments {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.email-attachments h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.email-attachments h4::before {
  content: '??';
}

.attachments-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.attachment-item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: white;
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--text);
  border: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 0.2s;
}

.attachment-item:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.04);
  transform: translateY(-1px);
}

.attachment-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.attachment-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.attachment-name {
  font-weight: 500;
  color: var(--text);
}

.attachment-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.email-linked-info {
  margin-top: 2rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.email-linked-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.email-linked-info h4::before {
  content: '??';
}

.email-detected-id {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: white;
  color: var(--accent);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(99, 102, 241, 0.2);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.email-client-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-right: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.email-client-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Email Quick Actions Strip */
.email-quick-actions {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  background: white;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.quick-action-btn:hover {
  background: rgba(99, 102, 241, 0.08);
}

/* Email Sort Select */
.email-sort-select {
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: white;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  min-width: 120px;
}

.email-sort-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Save email to client modal ? elegant card */
#save-email-to-client-modal .modal-content {
  border: none;
  box-shadow: 0 20px 50px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
}

.save-email-modal-content {
  width: 440px;
  max-width: 95vw;
  padding: 1.75rem 2rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  border: 1px solid rgba(0,0,0,0.06);
}

.save-email-modal-title {
  margin: 0 0 0.25rem 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary, #1a1a1a);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.save-email-modal-title::before {
  content: '??';
  font-size: 1.1rem;
}
.save-email-modal-title.assign-title::before { content: '??'; }

.save-email-modal-hint {
  margin: 0 0 1.5rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.save-email-modal-content .form-group {
  margin-bottom: 1.1rem;
}

.save-email-modal-content .form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary, #444);
}
.save-email-modal-content .form-group select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  font-size: 0.95rem;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.save-email-modal-content .form-group select:focus {
  outline: none;
  border-color: var(--accent, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.save-email-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  font-size: 0.95rem;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.save-email-select:focus {
  outline: none;
  border-color: var(--accent, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.save-email-modal-actions {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0,0,0,0.06);
  gap: 0.75rem;
  display: flex;
  justify-content: flex-end;
}
.save-email-modal-content .form-actions .btn-secondary,
.form-actions .btn-secondary {
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.15);
  color: #334155;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.save-email-modal-content .form-actions .btn-secondary:hover,
.form-actions .btn-secondary:hover {
  background: #f8fafc;
  border-color: rgba(0,0,0,0.25);
}

.email-settings-disconnect-wrap {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.btn-danger-outline {
  background: transparent;
  color: #b91c1c;
  border: 1px solid rgba(185, 28, 28, 0.4);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-danger-outline:hover {
  background: rgba(185, 28, 28, 0.06);
  border-color: #b91c1c;
}

.email-settings-per-user-hint {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* Shared mailbox (???? ???? ?????) ? distinct styling */
.nav-item-shared-mailbox {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.06) 100%);
  border-right: 3px solid var(--accent, #6366f1);
}
.nav-item-shared-mailbox:hover { background: rgba(99, 102, 241, 0.12); }
.shared-mailbox-page {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}
.shared-mailbox-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.06) 0%, transparent 100%);
}
.shared-mailbox-header h1 {
  margin: 0 0 0.25rem 0;
  font-size: 1.35rem;
  color: #1e293b;
}
.shared-mailbox-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.shared-mailbox-layout {
  display: flex;
  flex-direction: row;
  height: calc(100vh - 140px);
  min-height: 400px;
}
.shared-mailbox-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.shared-mailbox-view-panel {
  flex: 1;
  min-width: 280px;
  border-left: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.shared-mailbox-view-panel.hidden { display: none !important; }
.shared-mailbox-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  padding: 0.75rem 1.5rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.shared-mailbox-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.35rem;
  padding: 0.5rem 1.25rem;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
}
.shared-mailbox-tab:hover { color: #334155; }
.shared-mailbox-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 500;
}
.shared-mailbox-toolbar {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.shared-mailbox-toolbar .search-input {
  flex: 1;
  max-width: 400px;
}
.shared-mailbox-list {
  flex: 1;
  overflow-y: auto;
  background: #fff;
  margin: 0 1rem 1rem;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.06);
}
.shared-mailbox-item {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  cursor: pointer;
  transition: background 0.15s;
  align-items: center;
}
.shared-mailbox-item:hover { background: rgba(99, 102, 241, 0.05); }
.shared-mailbox-item.unread { font-weight: 500; }
.shared-mailbox-sender { color: #475569; font-size: 0.9rem; }
.shared-mailbox-subject { color: #1e293b; }
.shared-mailbox-date { color: var(--text-muted); font-size: 0.85rem; }
.shared-mailbox-handled-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}
.shared-mailbox-handled-badge.status-pending {
  background: #fef3c7;
  color: #92400e;
}
.shared-mailbox-handled-badge.status-in_progress {
  background: #dbeafe;
  color: #1e40af;
}
.shared-mailbox-handled-badge.status-done {
  background: #dcfce7;
  color: #166534;
}
.shared-mailbox-handled-badge.status-handled {
  background: #e5e7eb;
  color: #374151;
}
.shared-mailbox-empty,
.shared-mailbox-no-access {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}
/* Shared email view ? side panel (not modal) */
.shared-mailbox-view-panel {
  flex: 1;
  min-width: 320px;
  border-left: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.shared-mailbox-view-panel.hidden { display: none !important; }
.shared-email-panel-header {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.shared-email-panel-close {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0,0,0,0.05);
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  transition: background 0.2s, color 0.2s;
}
.shared-email-panel-close:hover {
  background: rgba(0,0,0,0.1);
  color: #1e293b;
}
.shared-email-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
}
.shared-email-panel-body .shared-mailbox-email-meta,
.shared-email-modal-body .shared-mailbox-email-meta {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.shared-email-panel-body .shared-mailbox-email-meta p,
.shared-email-modal-body .shared-mailbox-email-meta p { margin: 0.2rem 0; }
.shared-email-panel-body .shared-email-subject,
.shared-email-modal-body .shared-email-subject {
  margin: 0 0 1rem 0;
  font-size: 1.2rem;
  color: #1e293b;
}
.shared-email-panel-body .shared-mailbox-email-body,
.shared-email-modal-body .shared-mailbox-email-body {
  margin-top: 1rem;
  line-height: 1.6;
}
.shared-email-panel-actions,
.shared-email-modal-actions {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(0,0,0,0.08);
  background: linear-gradient(180deg, #fafbfc 0%, #f8fafc 100%);
}
.shared-action-btn {
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  background: #fff;
  color: var(--accent, #6366f1);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.shared-action-btn:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--accent);
}
.shared-action-btn.shared-action-save {
  border-color: rgba(34, 197, 94, 0.4);
  color: #16a34a;
}
.shared-action-btn.shared-action-save:hover {
  background: rgba(34, 197, 94, 0.08);
}
.shared-action-select {
  min-width: 140px;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  font-size: 0.9rem;
  background: #fff;
}

/* Settings landing */
.settings-landing {
  padding: 1.5rem 0;
}
.settings-landing h1 {
  margin: 0 0 0.25rem 0;
  font-size: 1.5rem;
}
.settings-landing-subtitle {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.settings-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.settings-card-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  padding: 1.25rem;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.settings-card-link:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}
.settings-card-link .settings-card-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}
.settings-card-link .settings-card-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.settings-card-link .settings-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.public-home-settings-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.public-home-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}
.public-home-editor-grid label,
.public-home-editor-full {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}
.public-home-editor-full {
  margin-top: 0.75rem;
}
.public-home-visits-summary {
  margin-top: 0.85rem;
}
.public-home-visits-total {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}
.public-home-inquiries-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.public-home-inquiry-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  padding: 0.9rem 1rem;
}
.public-home-inquiry-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--text);
}
.public-home-inquiry-head span,
.public-home-inquiry-contact {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.public-home-inquiry-subject {
  margin-top: 0.35rem;
  font-weight: 700;
}
.public-home-inquiry-card p {
  margin-top: 0.45rem;
  white-space: pre-wrap;
}
.public-home-inquiry-note {
  margin-top: 0.75rem;
  width: 100%;
}
.public-home-inquiry-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.public-home-inquiry-actions select {
  max-width: 160px;
}
.public-home-support-placeholder {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 1rem;
  background: var(--bg);
}
.public-policy-compare-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.public-policy-compare-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem;
  background: var(--bg-card);
}
.public-policy-compare-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.public-policy-compare-editor {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  background: var(--bg);
}
.public-policy-compare-cov-group {
  margin-top: 0.85rem;
}
.public-policy-compare-cov-group h5 {
  margin-bottom: 0.45rem;
}
.public-policy-compare-cov-items {
  display: grid;
  gap: 0.45rem;
}
.public-policy-compare-cov-item {
  display: grid;
  grid-template-columns: auto 1fr repeat(3, minmax(90px, 140px));
  gap: 0.45rem;
  align-items: center;
}
.public-policy-compare-publish-wrap {
  margin: 0.75rem 0;
}
.settings-back-link {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.4rem 0;
  color: var(--accent);
  font-size: 0.9rem;
  background: none;
  border: none;
  cursor: pointer;
}
.settings-back-link:hover {
  text-decoration: underline;
}

/* Compose Email Modal - Premium Design */
/* Gmail-style Compose Modal */
.compose-modal {
  width: 580px;
  max-width: 95vw;
  min-height: 450px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  position: fixed;
  bottom: 0;
  left: 80px;
  margin: 0;
  transform: none;
}

.compose-modal.maximized {
  width: 90vw;
  height: 90vh;
  max-width: 1000px;
  left: 50%;
  bottom: 50%;
  transform: translate(-50%, 50%);
  border-radius: 8px;
}

#compose-email-modal.modal {
  background: transparent;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0;
}

.compose-header {
  background: #404040;
  color: white;
  padding: 0 8px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px 8px 0 0;
  flex-shrink: 0;
}

.compose-title {
  font-size: 14px;
  font-weight: 500;
  padding-right: 8px;
}

.compose-header-actions {
  display: flex;
  align-items: center;
  gap: 0;
}

.compose-header-actions button {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: 4px;
  transition: background 0.15s;
}

.compose-header-actions button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.compose-close:hover {
  background: rgba(255, 255, 255, 0.15) !important;
}

#compose-email-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: white;
}

.compose-recipients {
  border-bottom: 1px solid #e0e0e0;
}

.compose-row {
  display: flex;
  align-items: center;
  padding: 0 16px;
  min-height: 42px;
  border-bottom: 1px solid #f0f0f0;
}

.compose-row:last-child {
  border-bottom: none;
}

.compose-label {
  width: 56px;
  font-size: 14px;
  color: #5f6368;
  flex-shrink: 0;
}

.compose-input {
  flex: 1;
  border: none;
  padding: 8px 0;
  font-size: 14px;
  background: transparent;
  color: #202124;
  outline: none;
}

.compose-input::placeholder {
  color: #80868b;
}

.compose-input-wrap {
  flex: 1;
  position: relative;
}

#compose-client-email-select {
  display: none;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  color: #202124;
  outline: none;
  cursor: pointer;
}

.compose-attachment-item--policy-doc {
  opacity: 0.95;
}

.compose-cc-toggle {
  font-size: 13px;
  color: #5f6368;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s;
}

.compose-cc-toggle:hover {
  background: #f1f3f4;
  color: #202124;
}

.email-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
  margin-top: 4px;
}

.email-suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.email-suggestion-item:hover,
.email-suggestion-item.selected {
  background: #f1f3f4;
}

.suggestion-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: white;
  flex-shrink: 0;
}

.suggestion-avatar.user {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.suggestion-avatar.client {
  background: linear-gradient(135deg, #10b981, #34d399);
}

.suggestion-info {
  flex: 1;
  min-width: 0;
}

.suggestion-name {
  font-size: 14px;
  font-weight: 500;
  color: #202124;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-email {
  font-size: 12px;
  color: #5f6368;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-type {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #e8eaed;
  color: #5f6368;
}

.suggestion-type.user {
  background: #ede9fe;
  color: #7c3aed;
}

.suggestion-type.client {
  background: #d1fae5;
  color: #059669;
}

.compose-cc-row,
.compose-bcc-row {
  background: #fafafa;
}

.compose-body-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 150px;
}

.compose-body {
  flex: 1;
  border: none;
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  font-family: inherit;
  color: #202124;
  outline: none;
  overflow-y: auto;
  min-height: 150px;
}

.compose-body:empty::before {
  content: attr(data-placeholder);
  color: #80868b;
  pointer-events: none;
}

.compose-body a {
  color: #1a73e8;
  text-decoration: underline;
}

/* Link Modal */
.link-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.link-modal {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  width: 400px;
  max-width: 90vw;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.link-modal h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: #202124;
}

.link-modal-field {
  margin-bottom: 1rem;
}

.link-modal-field label {
  display: block;
  font-size: 0.85rem;
  color: #5f6368;
  margin-bottom: 0.5rem;
}

.link-modal-field input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.link-modal-field input:focus {
  border-color: #1a73e8;
}

.link-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* Emoji Picker */
.emoji-picker {
  background: white;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  width: 320px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 10000;
  position: fixed !important;
}

.emoji-item {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}

.emoji-item:hover {
  background: #f1f3f4;
}

.compose-attachments {
  padding: 8px 16px;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
  max-height: 100px;
  overflow-y: auto;
}

#compose-attachments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compose-attachment-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: white;
  border-radius: 8px;
  border: 1px solid #dadce0;
  font-size: 13px;
  color: #3c4043;
}

.compose-attachment-item .remove-attachment {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #5f6368;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.15s;
}

.compose-attachment-item .remove-attachment:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #202124;
}

.compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.compose-footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compose-footer-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.compose-send-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #0b57d0;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.compose-send-btn:hover {
  background: #0842a0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.compose-send-btn:disabled {
  opacity: 0.85;
  cursor: wait;
}

.compose-send-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: compose-send-spin 0.6s linear infinite;
}

@keyframes compose-send-spin {
  to { transform: rotate(360deg); }
}

.send-arrow {
  font-size: 12px;
  margin-top: 1px;
}

.compose-format-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: 8px;
  padding-right: 8px;
  border-right: 1px solid #dadce0;
}

.compose-tool-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #5f6368;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s;
}

.compose-tool-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #202124;
}

.compose-tool-btn svg {
  width: 18px;
  height: 18px;
}

.compose-tool-sep {
  width: 1px;
  height: 20px;
  background: #dadce0;
  margin: 0 4px;
}

.compose-more-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #5f6368;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s;
}

.compose-more-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #202124;
}

/* Old classes - keep for backwards compatibility */
.compose-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(180deg, #fafbfc 0%, #f1f5f9 100%);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.btn-send {
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.compose-actions .btn-secondary {
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
}

/* Email Empty State - Premium */
.email-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  height: 100%;
  min-height: 400px;
}

.email-empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.6;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.email-empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.email-empty-state p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.email-empty-state.error {
  background: rgba(239, 68, 68, 0.05);
  border-radius: 16px;
  margin: 1rem;
}

.email-empty-state.error .email-empty-state-icon {
  color: #ef4444;
}

/* Email Item Enhancements */
.email-item.important {
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.06) 0%, transparent 100%);
}

.email-item.important::before {
  background: linear-gradient(180deg, #f97316 0%, #ea580c 100%);
}

.important-badge {
  margin-left: 0.35rem;
}

/* Email Labels Display */
.email-labels-display {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.email-label {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Email Priority Indicators */
.email-priority-high {
  border-right: 3px solid #ef4444;
}

.email-priority-medium {
  border-right: 3px solid #f59e0b;
}

.email-priority-low {
  border-right: 3px solid #10b981;
}

/* Email Thread View */
.email-thread {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.email-thread h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.email-thread-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.email-thread-item:hover {
  background: #f1f5f9;
}

.email-thread-item .email-avatar {
  width: 36px;
  height: 36px;
  font-size: 0.85rem;
}

.email-thread-content {
  flex: 1;
  min-width: 0;
}

.email-thread-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.email-thread-from {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}

.email-thread-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.email-thread-preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Email Animations */
.email-item {
  animation: slideIn 0.3s ease-out forwards;
  opacity: 0;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.email-item:nth-child(1) { animation-delay: 0.02s; }
.email-item:nth-child(2) { animation-delay: 0.04s; }
.email-item:nth-child(3) { animation-delay: 0.06s; }
.email-item:nth-child(4) { animation-delay: 0.08s; }
.email-item:nth-child(5) { animation-delay: 0.1s; }
.email-item:nth-child(6) { animation-delay: 0.12s; }
.email-item:nth-child(7) { animation-delay: 0.14s; }
.email-item:nth-child(8) { animation-delay: 0.16s; }
.email-item:nth-child(9) { animation-delay: 0.18s; }
.email-item:nth-child(10) { animation-delay: 0.2s; }

/* Email Loading State */
.email-loading {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.email-skeleton {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 12px;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 70%; }
.skeleton-line.long { width: 90%; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Email Notification Badge */
.folder-count:not(:empty) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
  .email-app {
    grid-template-columns: 240px 1fr;
  }
  
  .email-view {
    position: absolute;
    inset: 0;
    z-index: 100;
    background: white;
  }
}

@media (max-width: 768px) {
  .email-app {
    grid-template-columns: 1fr;
  }
  
  .email-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    transform: translateX(100%);
    transition: transform 0.3s;
    z-index: 1000;
  }
  
  .email-sidebar.open {
    transform: translateX(0);
  }
}

.quick-action-btn.primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border: none;
  color: white;
}

.quick-action-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* Email Settings */
.email-settings-header {
  margin-bottom: 2rem;
}

.email-settings-header h1 {
  margin-bottom: 0.5rem;
}

.email-settings-header p {
  color: var(--text-muted);
}

.email-settings-container {
  display: grid;
  gap: 1.5rem;
  max-width: 700px;
}

.form-divider { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.help-text {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.help-text a {
  color: var(--accent);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.status-msg {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.status-msg.success {
  background: #dcfce7;
  color: #166534;
}

.status-msg.error {
  background: #fee2e2;
  color: #dc2626;
}

/* Gmail Setup Guide */
.gmail-setup-guide {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 12px;
  border: 1px solid #bae6fd;
}

.gmail-setup-guide h4 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: #0369a1;
}

.gmail-setup-guide ol {
  margin: 0;
  padding-right: 1.25rem;
  color: #334155;
}

.gmail-setup-guide li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.gmail-setup-guide ul {
  margin: 0.5rem 0;
  padding-right: 1rem;
}

.gmail-setup-guide ul li {
  margin-bottom: 0.25rem;
}

.gmail-setup-guide a {
  color: #0284c7;
  text-decoration: none;
  font-weight: 500;
}

.gmail-setup-guide a:hover {
  text-decoration: underline;
}

.add-label-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.add-label-row input[type="text"] {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.add-label-row input[type="color"] {
  width: 40px;
  height: 36px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.label-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.label-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.label-name {
  flex: 1;
}

.email-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.email-empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Insurance coverage check */
.insurance-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}
.insurance-tab {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 8px;
}
.insurance-tab:hover { color: var(--text); background: var(--bg-hover); }
.insurance-tab.active { color: var(--accent); font-weight: 600; }
.insurance-tab-content.hidden { display: none; }
.young-driver-links-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}
.young-driver-link-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}
.young-driver-company-name {
  font-weight: 600;
}
.investment-routes-placeholder {
  padding: 0.5rem 0;
}
.investment-routes-soon-list {
  margin: 0.75rem 0 0;
  padding-inline-start: 1.2rem;
  color: var(--text-muted);
}
.investment-routes-soon-list li {
  margin-bottom: 0.35rem;
}

/* ?????? ?????? ????? */
#investment-routes-page.ir-page {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 0.5rem;
}
#investment-routes-page.ir-page > .page-header {
  flex-shrink: 0;
  margin-bottom: 0.35rem;
}
#investment-routes-page.ir-page > .page-header .page-hint {
  margin-bottom: 0;
}
.ir-filters-dock {
  position: relative;
  flex-shrink: 0;
  z-index: 20;
  margin-bottom: 0.5rem;
}
.ir-filters-dock.hidden {
  display: none !important;
}
.ir-filters-chip-bar {
  position: relative;
  flex-shrink: 0;
  z-index: 25;
  padding: 0.65rem 1rem 0;
}
.ir-filters-chip-bar.hidden {
  display: none !important;
}
.ir-filters-chip {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  font: inherit;
  text-align: right;
}
.ir-filters-chip-bar .ir-filters-panel {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 1rem;
  left: 1rem;
  max-height: min(72vh, 560px);
  overflow: auto;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14);
  z-index: 30;
}
.ir-filters-chip-bar:hover .ir-filters-panel,
.ir-filters-chip-bar:focus-within .ir-filters-panel,
.ir-filters-chip-bar.ir-filters-dock--open .ir-filters-panel {
  display: block;
}
.ir-filters-summary-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}
.ir-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-bottom: 0.65rem;
}
.ir-fund-search-results {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.25rem 0 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}
.ir-fund-search-results.hidden {
  display: none !important;
}
.ir-fund-search-empty {
  margin: 0;
}
.ir-fund-search-item {
  display: grid;
  gap: 0.15rem;
  width: 100%;
  text-align: right;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.2s, background 0.2s;
}
.ir-fund-search-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.ir-fund-search-id {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
}
.ir-fund-search-name {
  font-weight: 600;
  font-size: 0.9rem;
}
.ir-fund-search-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.ir-field {
  min-width: 200px;
  margin-bottom: 0 !important;
}
.ir-field--grow {
  flex: 1;
  min-width: 220px;
}
.ir-section-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}
.ir-company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.6rem;
  margin-top: 0.65rem;
  max-height: 220px;
  overflow-y: auto;
  padding: 0.15rem;
}
.ir-company-tile {
  display: grid;
  gap: 0.3rem;
  justify-items: center;
  padding: 0.7rem 0.5rem;
  min-height: 100px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ir-company-tile:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.12);
}
.ir-company-tile.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.ir-company-logo {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ir-company-fallback {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.ir-company-name {
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.25;
}
.ir-company-count {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.ir-results-area {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ir-results-area.settings-card {
  overflow: hidden;
}
.ir-results-area.hidden {
  display: none !important;
}
.ir-results-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem !important;
}
.ir-results-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  flex-shrink: 0;
  margin-bottom: 0.5rem;
}
.ir-results-meta {
  margin: 0;
}
.ir-results-actions {
  display: flex;
  gap: 0.5rem;
}
.ir-report-table-wrap {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.ir-report-table {
  width: max-content;
  min-width: 100%;
  font-size: 0.82rem;
}
.ir-report-table th,
.ir-report-table td {
  white-space: nowrap;
  vertical-align: middle;
}
.ir-report-table .ir-company-head {
  text-align: center;
  background: var(--bg-hover);
  border-inline-start: 2px solid color-mix(in srgb, var(--accent) 30%, var(--border));
}
.ir-report-table .ir-metric-head {
  text-align: center;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
  min-width: 4.5rem;
}
.ir-report-table .ir-metric-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
  border-inline-start: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.ir-report-table .ir-cell-empty {
  color: var(--text-muted);
  text-align: center;
}
.ir-report-table .ir-cell-best {
  background: var(--accent-soft) !important;
  font-weight: 600;
}
.ir-report-table .ir-cell-actuarial-pos {
  background: color-mix(in srgb, #16a34a 16%, #ecfdf3) !important;
  font-weight: 600;
}
.ir-report-table .ir-cell-actuarial-neg {
  background: color-mix(in srgb, #dc2626 14%, #fef2f2) !important;
  font-weight: 600;
}
.ir-report-table .ir-fund-id-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 4.5rem;
}
.ir-fund-id-tag {
  display: inline-block;
  margin: 0.1rem;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: var(--bg-hover);
  font-size: 0.74rem;
  font-weight: 600;
}
.ir-detail-link {
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
}
.ir-empty-hint {
  flex-shrink: 0;
}
.ir-fund-detail-modal-inner.modal {
  max-width: min(1080px, 96vw);
  width: 100%;
}
.ir-fund-detail-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0.75rem 0 1rem;
}
@media (max-width: 820px) {
  .ir-fund-detail-body {
    grid-template-columns: 1fr;
  }
}
.ir-detail-card.settings-card {
  margin: 0;
  overflow: visible;
}
.ir-detail-card .settings-card-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-hover);
}
.ir-detail-card .settings-card-header h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}
.ir-detail-card .settings-card-body {
  padding: 0.75rem 1rem;
}
.ir-detail-kv {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  font-size: 0.85rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.ir-detail-kv:last-child {
  border-bottom: none;
}
.ir-detail-kv dt {
  color: var(--text-muted);
  margin: 0;
}
.ir-detail-kv dd {
  margin: 0;
  font-weight: 600;
  text-align: left;
}
.ir-detail-card--wide {
  grid-column: 1 / -1;
}
.ir-fund-detail-actions {
  margin-top: 0;
  justify-content: flex-end;
}
.ir-fund-detail-disclaimer {
  grid-column: 1 / -1;
  margin: 0;
}
.input-loading {
  opacity: 0.75;
}
.add-coverage-link-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.add-coverage-link-row input { flex: 1; min-width: 120px; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: 8px; }
.coverage-links-list { margin-top: 1rem; }
.coverage-link-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}
.coverage-link-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.coverage-link-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.coverage-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 24px;
  transition: 0.3s;
}
.coverage-toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  right: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.coverage-link-toggle input:checked + .coverage-toggle-slider {
  background: var(--accent);
}
.coverage-link-toggle input:checked + .coverage-toggle-slider::before {
  transform: translateX(-20px);
}
.coverage-link-item:has(.coverage-enabled-checkbox:not(:checked)) .coverage-link-name,
.coverage-link-item:has(.coverage-enabled-checkbox:not(:checked)) .coverage-link-url {
  opacity: 0.6;
}
.coverage-link-name { font-weight: 500; flex-shrink: 0; }
.coverage-link-url { flex: 1; font-size: 0.85rem; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coverage-link-actions { display: flex; gap: 0.25rem; }

.claims-coverage-section {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--chat-shadow);
  max-width: 600px;
}
.claims-coverage-section h2 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.coverage-check-form { margin: 1rem 0; }
.coverage-check-form .form-row { margin-bottom: 1rem; }
.coverage-check-form label { display: block; margin-bottom: 0.3rem; font-size: 0.9rem; color: var(--text-muted); }
.coverage-check-form input { width: 100%; max-width: 280px; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: 8px; }
.coverage-actions { margin-top: 1rem; }
.coverage-results { margin-top: 1.5rem; }
.coverage-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.coverage-result-card {
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-align: center;
}
.coverage-result-card h4 { margin: 0 0 0.5rem; font-size: 1rem; }
.coverage-result-card.yes { background: rgba(34, 197, 94, 0.1); border-color: #22c55e; }
.coverage-result-card.yes .coverage-status { color: #22c55e; font-weight: 600; }
.coverage-result-card.no { background: rgba(239, 68, 68, 0.1); border-color: #ef4444; }
.coverage-result-card.no .coverage-status { color: #ef4444; font-weight: 600; }
.coverage-result-card.unknown { background: rgba(156, 163, 175, 0.1); }
.coverage-result-card.error .coverage-status { color: var(--text-muted); font-size: 0.85rem; }
.coverage-result-card .btn-view-site {
  display: inline-block;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  background: var(--accent);
  color: var(--btn-on-accent);
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}
.coverage-result-card .btn-view-site:hover,
.coverage-result-card .btn-view-newtab:hover { background: var(--accent-dim); }
.coverage-card-btns { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; margin-top: 0.75rem; }
.coverage-result-card .btn-view-newtab {
  display: inline-block;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  background: var(--border);
  color: var(--text);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}
.coverage-result-card .btn-view-newtab:hover { background: var(--bg-hover); }
.coverage-playwright-hint {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(234, 179, 8, 0.15);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text);
}
.coverage-playwright-hint code {
  background: rgba(0,0,0,0.08);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
}
.coverage-view-modal-box {
  position: relative;
  width: 90vw;
  max-width: 1000px;
  height: 85vh;
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.coverage-view-close {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.coverage-view-close:hover {
  background: rgba(0,0,0,0.7);
}
.coverage-view-content {
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: 2.5rem 1rem 1rem;
}
.coverage-view-img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== Claims Hub ===== */
.claims-hub {
  max-width: 1200px;
}
.claims-hub-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1.1rem 1.25rem;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.08) 0%, rgba(255,255,255,0.9) 42%, #fff 100%),
    radial-gradient(ellipse at 100% 0%, rgba(30, 58, 95, 0.06), transparent 55%);
  border: 1px solid var(--border);
}
.claims-hub-head h1 {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.claims-hub-sub {
  color: var(--text-muted);
  margin: 0.25rem 0 0;
  font-size: 0.92rem;
}
.claims-hub-head-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.claims-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.claims-stat-card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
  text-align: start;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.claims-stat-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}
.claims-stat-value {
  display: block;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}
.claims-stat-label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.claims-stat-card--accent .claims-stat-value { color: var(--accent); }
.claims-stat-card--warn .claims-stat-value { color: var(--warning); }
.claims-stat-card--danger .claims-stat-value { color: var(--error); }
.claims-stat-card--ok .claims-stat-value { color: var(--success); }
.claims-hub-tabs { margin-bottom: 1rem; }
.claims-filters {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}
.claims-board-list { min-height: 200px; }
.claims-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: #fff;
}
.claims-empty p { color: var(--text-muted); margin-bottom: 1rem; }
.claims-table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}
.claims-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.claims-table th {
  text-align: start;
  padding: 0.7rem 0.85rem;
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.claims-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.claims-row {
  cursor: pointer;
  transition: background 0.12s;
}
.claims-row:hover { background: var(--accent-soft); }
.claims-col-id { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.claims-cell-main { font-weight: 600; }
.claims-cell-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.15rem; }
.claims-cell-summary {
  max-width: 220px;
  color: var(--text-muted);
  font-size: 0.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.claims-type-pill {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dim);
  font-size: 0.78rem;
  font-weight: 600;
}
.claims-status {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #f3f4f6;
}
.claims-status--open { background: rgba(37,99,235,0.12); color: #1d4ed8; }
.claims-status--waiting_client { background: rgba(217,119,6,0.12); color: #b45309; }
.claims-status--waiting_insurer { background: rgba(107,114,128,0.15); color: #374151; }
.claims-status--in_progress { background: rgba(59,130,246,0.15); color: #1e40af; }
.claims-status--done,
.claims-status--closed { background: rgba(5,150,105,0.12); color: #047857; }
.claims-status--cancelled { background: rgba(220,38,38,0.1); color: #b91c1c; }
.claims-miss { color: var(--error); font-size: 0.75rem; font-weight: 600; }

.claims-modal { max-width: 560px; width: min(96vw, 560px); padding: 0; overflow: hidden; }
.claims-modal--wide { max-width: 980px; width: min(96vw, 980px); max-height: 92vh; display: flex; flex-direction: column; }
.claims-modal .modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.claims-modal .modal-header h2 { margin: 0; font-size: 1.15rem; }
.claims-modal .modal-close {
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.15rem 0.4rem;
  border-radius: 8px;
}
.claims-modal .modal-close:hover { background: var(--bg-hover); color: var(--text); }
.claims-modal .modal-body { padding: 1rem 1.25rem; }
.claims-modal-body { max-height: 70vh; overflow: auto; }
.claims-modal .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  padding: 0.85rem 1.25rem 1.15rem;
  border-top: 1px solid var(--border);
  background: #fafbfc;
}
.claims-modal .form-row { margin-bottom: 0.85rem; }
.claims-modal .form-row label { display: block; margin-bottom: 0.3rem; font-size: 0.85rem; color: var(--text-muted); }
.claims-modal .input-elegant { width: 100%; margin-bottom: 0; }
.claims-search-results {
  margin-top: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  max-height: 180px;
  overflow-y: auto;
}
.claims-search-results:empty { display: none; }
.claims-search-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  text-align: start;
}
.claims-search-item:hover { background: var(--accent-soft); }
.claims-search-item span { font-size: 0.78rem; color: var(--text-muted); }
.claims-search-empty { padding: 0.65rem 0.75rem; color: var(--text-muted); font-size: 0.85rem; }
.claims-picked {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  font-weight: 600;
}
.claims-detail-summary {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  max-width: 48rem;
}
.claims-detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
  align-items: center;
}
.claims-detail-toolbar select { max-width: 180px; }
.claims-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.claims-detail-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem 1rem;
}
.claims-detail-card h3 {
  margin: 0 0 0.75rem;
  font-size: 0.98rem;
}
.claims-detail-card--full { grid-column: 1 / -1; }
.claims-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.claims-card-head h3 { margin: 0; }
.claims-form-fields { display: grid; gap: 0.35rem; }
.claims-ff-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.86rem;
}
.claims-ff-row span { color: var(--text-muted); }
.claims-checklist { display: grid; gap: 0.45rem; }
.claims-check-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: #fafbfc;
}
.claims-check-item.is-required { border-color: rgba(37,99,235,0.28); }
.claims-check-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.claims-check-label { font-weight: 600; font-size: 0.88rem; }
.claims-check-status { max-width: 160px; }
.claims-checklist-add,
.claims-timeline-add {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.75rem;
}
.claims-timeline { display: grid; gap: 0.65rem; }
.claims-tl-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 0.65rem;
}
.claims-tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.35rem;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.claims-tl-title { font-weight: 600; font-size: 0.9rem; }
.claims-tl-text {
  white-space: pre-wrap;
  color: var(--text);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}
.claims-tl-meta { color: var(--text-muted); font-size: 0.75rem; margin-top: 0.2rem; }
.claims-coverage-saved { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.claims-cov-chip {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  background: #f8fafc;
}
.claims-cov-chip.yes { background: rgba(34,197,94,0.12); border-color: #22c55e; }
.claims-cov-chip.no { background: rgba(239,68,68,0.1); border-color: #ef4444; }

@media (max-width: 900px) {
  .claims-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .claims-filters { grid-template-columns: 1fr; }
  .claims-detail-grid { grid-template-columns: 1fr; }
  .claims-hub-head { flex-direction: column; }
}

/* ??? ????? ? ?????? ??? ?????? / ??????? / ?????? */
#claim-profile-page {
  padding: 0 1rem 1.25rem;
}
.claim-profile-header {
  margin-bottom: 0.65rem;
}
.claim-profile-holders {
  margin: 0.35rem 0 0.55rem;
}
.claim-holders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.55rem;
}
.claim-holder-card {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    linear-gradient(160deg, rgba(37, 99, 235, 0.05) 0%, var(--bg-card) 48%),
    var(--bg-card);
}
.claim-holder-name {
  font-weight: 650;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.claim-holder-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.claim-profile-info-bar {
  padding: 0.65rem 0.85rem;
}
.claim-header-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}
.claim-header-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.claim-header-meta strong {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.claim-header-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.55rem 0.75rem;
  align-items: end;
}
.claim-header-fields label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.claim-header-fields .input-elegant {
  width: 100%;
  font-size: 0.85rem;
  min-height: 2rem;
  padding: 0.28rem 0.5rem;
}
.claim-header-save-wrap {
  display: flex;
  align-items: flex-end;
}
.claim-tabs.policy-tabs {
  margin-top: 0.35rem;
}
.claim-tab-content {
  min-height: 220px;
}
.claim-tracking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  max-width: none;
}
.claim-tracking-grid .claims-detail-card--full {
  grid-column: 1 / -1;
}
.claim-tab-panel {
  padding: 0.85rem 0.15rem 1.25rem;
  max-width: 960px;
}
.claim-tab-panel h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}
.claim-tab-panel .claims-form-fields {
  display: grid;
  gap: 0.45rem;
}
.claim-tab-panel .claims-ff-row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(0, 0, 0, 0.015);
}
.claim-tab-panel .claims-ff-row span {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.claim-track-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1rem;
}
.claim-track-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  background: var(--bg-card);
}
.claim-track-card h4 {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  font-weight: 650;
}
.claim-demands-table,
.claim-invoices-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.claim-demands-table th,
.claim-demands-table td,
.claim-invoices-table th,
.claim-invoices-table td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--border);
  text-align: start;
}
.claim-demands-table th,
.claim-invoices-table th {
  color: var(--text-muted);
  font-weight: 550;
  font-size: 0.75rem;
}
.claim-inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.claim-accident-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.65rem;
}
.claim-accident-form .full {
  grid-column: 1 / -1;
}
.claim-accident-form label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

@media (max-width: 900px) {
  .claim-track-layout { grid-template-columns: 1fr; }
  .claim-tracking-grid { grid-template-columns: 1fr; }
  .claim-header-fields { grid-template-columns: 1fr 1fr; }
  .claim-tab-panel .claims-ff-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .claim-header-fields { grid-template-columns: 1fr; }
}

/* ???/???? ? ????? ????? ?? ????? */
.combo-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.combo-field .combo-search:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--bg-hover);
}
.combo-dropdown {
  position: absolute;
  z-index: 40;
  right: 0;
  left: 0;
  top: 100%;
  margin: 0.15rem 0 0;
  padding: 0.25rem 0;
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--chat-shadow-soft);
}
.combo-field--street .combo-dropdown,
.combo-field:has([id$="-street"]) .combo-dropdown,
[id$="-street-list"].combo-dropdown {
  min-width: 100%;
  width: max(100%, 22rem);
  max-width: min(96vw, 32rem);
  z-index: 120;
}
.combo-dropdown li {
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1.35;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}
.combo-dropdown li:hover,
.combo-dropdown li:focus {
  background: var(--accent-soft);
}
.combo-dropdown-status {
  padding: 0.45rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: default;
}
.profile-cell .combo-field {
  width: 100%;
}
.profile-cell .combo-field .combo-search {
  width: 100%;
}
.address-zip-loading {
  opacity: 0.65;
}
.pvd-levi-hint {
  margin: 0.2rem 0 0;
  color: #b45309;
  font-size: 0.78rem;
}
.policy-documents-tab .policy-lien-send-wrap {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
#policy-send-mortgagee-email-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.3);
}
.policy-mail-tab .policy-mail-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--bg-card);
  cursor: pointer;
  text-align: right;
}
.policy-mail-tab .policy-mail-row:hover {
  background: var(--bg-hover);
}
.policy-mail-tab .policy-mail-row.is-open {
  border-color: var(--accent);
}
.policy-mail-html-frame {
  width: 100%;
  min-height: 280px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 0.5rem;
  background: #fff;
}
.text-muted {
  color: var(--text-muted);
  font-size: 0.92em;
}

/* ????? / PBX */
.pbx-overview-wrap {
  margin-top: 1rem;
  max-width: 42rem;
}
.pbx-overview-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  line-height: 1.65;
}
.pbx-overview-card p {
  margin: 0.4rem 0;
}
.pbx-overview-card--compact {
  margin-bottom: 0.75rem;
}
.pbx-mgmt-section-title {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.pbx-mgmt-table-wrap {
  margin-bottom: 0.5rem;
}
.pbx-recordings-files-toolbar {
  margin-bottom: 0.5rem;
}
.pbx-rec-file-path {
  font-size: 0.85em;
  word-break: break-all;
  max-width: 24rem;
}
.pbx-rec-path-hint {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  line-height: 1.25;
  max-width: 14rem;
  word-break: break-all;
}
.pbx-empty-cell {
  text-align: center;
  color: var(--text-muted);
  padding: 1rem !important;
}
.pbx-management-summary {
  margin-bottom: 0.5rem;
}
.pbx-demo-incoming-section {
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.02);
}
.pbx-demo-incoming-section .pbx-mgmt-section-title {
  margin-top: 0;
}
.pbx-demo-badge-inline {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  vertical-align: middle;
}
.pbx-demo-incoming-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.75rem;
  margin-top: 0.5rem;
}
.pbx-demo-incoming-input {
  flex: 1 1 14rem;
  min-width: 12rem;
}
.pbx-demo-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(100, 149, 237, 0.22);
  color: var(--text);
  vertical-align: middle;
}
.pbx-live-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(52, 211, 153, 0.2);
  color: var(--text);
  vertical-align: middle;
}
.pbx-demo-incoming-status:empty {
  display: none;
}
.pbx-incoming-client-name {
  font-weight: 500;
  color: var(--text);
}
.pbx-ext-tile--ringing {
  animation: pbx-tile-ring 1.1s ease-in-out infinite;
  box-shadow: 0 0 0 2px rgba(100, 149, 237, 0.4);
}
.pbx-ext-tile--dialing {
  animation: pbx-tile-ring 1.3s ease-in-out infinite;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.4);
}
.pbx-outgoing-internal-display {
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
}
.pbx-outgoing-internal-display.hidden {
  display: none;
}
@keyframes pbx-tile-ring {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.75;
  }
}
.pbx-consent-block {
  margin-top: 1rem;
}
.pbx-inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.pbx-trunk-form .pbx-form-control {
  min-width: 8rem;
}
.pbx-trunk-form .pbx-trunk-port {
  max-width: 5rem;
}
.pbx-form-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.2rem;
}
.pbx-form-control {
  min-width: 10rem;
}
.pbx-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  font-size: 0.9rem;
}
.pbx-toggle input {
  margin: 0;
}
.pbx-actions-cell {
  white-space: nowrap;
}
.pbx-ip-phone-chip {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  margin: 0.08rem;
  border-radius: 999px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.pbx-app-pairing-box,
.pbx-app-preview-status,
.pbx-app-scan-box {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-secondary);
}
.pbx-app-pairing-head,
.pbx-app-preview-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.pbx-app-qr-wrap {
  margin-top: 0.7rem;
}
.pbx-app-qr-card {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.pbx-app-qr-svg {
  width: 240px;
  max-width: 100%;
  padding: 0.5rem;
  border-radius: 12px;
  background: #fff;
}
.pbx-app-qr-svg svg {
  display: block;
  width: 100%;
  height: auto;
}
.pbx-app-qr-meta code {
  display: block;
  max-width: 36rem;
  overflow-wrap: anywhere;
  white-space: normal;
}
.pbx-app-scan-video {
  display: block;
  width: min(100%, 420px);
  margin-top: 0.75rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #111827;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.pbx-phone-app-page .settings-card {
  max-width: 900px;
}
.phone-app-standalone-body {
  height: 100vh;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  background: #020617;
  color: #e5e7eb;
  font-family: Heebo, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.phone-app-shell {
  width: min(100%, 520px);
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
}
.phone-app-card {
  margin: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}
.phone-app-hero {
  text-align: center;
}
.phone-app-pair-screen {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.phone-app-logo {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.phone-app-logo span {
  color: #60a5fa;
}
.phone-app-subtitle,
.phone-app-hint {
  color: #cbd5e1;
}
.phone-app-state {
  display: inline-flex;
  margin-top: 0.75rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-weight: 700;
}
.phone-app-state-offline {
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
}
.phone-app-state-pending {
  background: rgba(245, 158, 11, 0.16);
  color: #fde68a;
}
.phone-app-state-online {
  background: rgba(34, 197, 94, 0.16);
  color: #bbf7d0;
}
.phone-app-state-dnd {
  background: rgba(96, 165, 250, 0.16);
  color: #bfdbfe;
}
.phone-app-primary-btn,
.phone-app-secondary-btn,
.phone-app-danger-btn {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border: 0;
  border-radius: 16px;
  font-weight: 800;
  cursor: pointer;
}
.phone-app-primary-btn {
  background: #3b82f6;
  color: #fff;
}
.phone-app-secondary-btn {
  background: rgba(148, 163, 184, 0.18);
  color: #e5e7eb;
}
.phone-app-danger-btn {
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
}
.phone-app-scan-video {
  width: 100%;
  margin-top: 0.9rem;
  border-radius: 20px;
  background: #000;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.phone-app-manual-pair,
.phone-app-dial-pad {
  margin-top: 1rem;
}
.phone-app-manual-pair input,
.phone-app-dial-pad input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.8);
  color: #e5e7eb;
}
.phone-app-switch {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  color: #e5e7eb;
}
.phone-app-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 1rem;
  box-sizing: border-box;
}
.phone-app-top {
  flex: 0 0 auto;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: max(0.75rem, env(safe-area-inset-top)) 0 0.75rem;
  background: linear-gradient(180deg, #0f172a 70%, rgba(15, 23, 42, 0));
}
.phone-app-state {
  flex: 0 0 auto;
}
/* ???? ?????: ?? ??? ????, ?? ?? ????????? */
.phone-app-tab-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(env(safe-area-inset-bottom) + 5.2rem);
}
.phone-app-logo-small {
  font-size: 1.25rem;
}
.phone-app-logo-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.phone-app-sip-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.1rem;
  padding: 0.24rem 0.48rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(100, 116, 139, 0.2);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 900;
  direction: ltr;
}
.phone-app-sip-indicator.online {
  border-color: rgba(34, 197, 94, 0.48);
  background: rgba(22, 163, 74, 0.2);
  color: #bbf7d0;
}
.phone-app-sip-indicator.pending {
  border-color: rgba(250, 204, 21, 0.42);
  background: rgba(234, 179, 8, 0.16);
  color: #fef08a;
}
.phone-app-sip-indicator.offline {
  border-color: rgba(248, 113, 113, 0.36);
  background: rgba(185, 28, 28, 0.16);
  color: #fecaca;
}
.phone-app-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.phone-app-settings-btn,
.phone-app-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  font-size: 1.25rem;
}
.phone-app-icon-btn {
  background: rgba(37, 99, 235, 0.2);
  color: #dbeafe;
}
.phone-app-audio-route-popover {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: max(4.8rem, calc(env(safe-area-inset-top) + 4rem)) 1rem 1rem;
  background: rgba(2, 6, 23, 0.44);
  backdrop-filter: blur(10px);
}
.phone-app-audio-route-card {
  width: min(100%, 22rem);
  border: 1px solid rgba(96, 165, 250, 0.26);
  border-radius: 24px;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 24px 65px rgba(2, 6, 23, 0.42);
}
.phone-app-audio-route-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  color: #e5e7eb;
}
.phone-app-audio-route-head button {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: #e5e7eb;
  font-size: 1.35rem;
}
.phone-app-audio-route-options {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}
.phone-app-audio-route-options button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.18rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.45);
  color: #e5e7eb;
  text-align: right;
}
.phone-app-audio-route-options button.active {
  border-color: rgba(96, 165, 250, 0.7);
  background: rgba(37, 99, 235, 0.24);
}
.phone-app-audio-route-options button:disabled {
  opacity: 0.5;
}
.phone-app-audio-route-options span {
  font-weight: 900;
}
.phone-app-audio-route-options small {
  color: #94a3b8;
}
.phone-app-active-call-page {
  margin: 0.65rem 0;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 14%, rgba(37, 99, 235, 0.42), transparent 32%),
    linear-gradient(180deg, #0f172a 0%, #020617 100%);
  border: 1px solid rgba(96, 165, 250, 0.22);
}
.phone-app-active-call-inner {
  width: 100%;
  min-height: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem 1rem;
  text-align: center;
}
.phone-app-active-call-inner h1 {
  margin: 0.55rem 0 0.2rem;
  font-size: clamp(2rem, 8vw, 3.4rem);
  color: #fff;
}
.phone-app-active-call-inner strong {
  color: #bfdbfe;
  font-size: 1.35rem;
}
.phone-app-active-back {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  right: 1rem;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  background: rgba(148, 163, 184, 0.16);
  color: #e5e7eb;
  font-weight: 800;
}
.phone-app-call-timer {
  margin-top: 0.8rem;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  direction: ltr;
}
.phone-app-media-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: #020617;
}
.phone-app-tab-panel[data-app-panel="dialer"] {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: manipulation;
}
.phone-app-media-page {
  padding-top: 0.75rem;
  min-height: 0;
}
.phone-app-media-page .phone-app-media-panel:not(.is-floating-request) {
  position: relative;
  inset: auto;
  z-index: 1;
  width: 100%;
  height: calc(100dvh - 10.5rem);
  min-height: 28rem;
  max-height: none;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(2, 6, 23, 0.36);
}
.phone-app-media-page .phone-app-media-panel:not(.is-floating-request) .phone-app-remote-video {
  height: 100%;
  max-height: 100%;
}
.phone-app-media-panel.is-minimized {
  inset: auto 0.75rem max(5.4rem, env(safe-area-inset-bottom)) auto;
  width: min(12rem, calc(100vw - 1.5rem));
  min-height: 7.5rem;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 18px;
}
.phone-app-media-panel.is-floating-request {
  inset: auto 0.75rem max(5.4rem, env(safe-area-inset-bottom)) 0.75rem;
  width: min(24rem, calc(100vw - 1.5rem));
  height: auto;
  min-height: 0;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 22px;
  box-shadow: 0 22px 60px rgba(2, 6, 23, 0.42);
}
.phone-app-media-panel.is-floating-request::before {
  content: "?????";
  position: absolute;
  top: -0.7rem;
  right: 1rem;
  z-index: 3;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
}
.phone-app-media-panel.is-floating-request.is-screen-request::before {
  content: "???";
}
.phone-app-media-panel.is-floating-request .phone-app-remote-video,
.phone-app-media-panel.is-floating-request .phone-app-local-video,
.phone-app-media-panel.is-floating-request .phone-app-media-controls,
.phone-app-media-panel.is-floating-request .phone-app-media-status {
  display: none !important;
}
.phone-app-remote-video {
  display: block;
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  background: #020617;
  object-fit: contain;
}
.phone-app-media-panel.is-minimized .phone-app-remote-video {
  height: 7.5rem;
}
.phone-app-local-video {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  width: 7rem;
  height: 5rem;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 14px;
  background: #020617;
  object-fit: cover;
}
.phone-app-media-controls {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top));
  left: 0.75rem;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.phone-app-media-controls button {
  min-width: 6.2rem;
  min-height: 2.25rem;
  border: 0;
  border-radius: 14px;
  padding: 0.5rem 0.75rem;
  background: rgba(37, 99, 235, 0.86);
  color: #dbeafe;
  font-weight: 800;
}
.phone-app-media-controls button.hidden {
  display: none !important;
}
.phone-app-media-status {
  position: absolute;
  right: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: 1rem;
  padding: 0.85rem;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
}
.phone-app-media-request {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 50% 22%, rgba(37, 99, 235, 0.42), transparent 34%),
    rgba(2, 6, 23, 0.94);
  text-align: center;
}
.phone-app-media-panel.is-floating-request .phone-app-media-request {
  position: static;
  padding: 1.05rem 1rem 0.95rem;
  background:
    radial-gradient(circle at 50% 16%, rgba(37, 99, 235, 0.3), transparent 42%),
    rgba(15, 23, 42, 0.96);
}
.phone-app-media-request strong {
  font-size: clamp(1.55rem, 7vw, 2.8rem);
  color: #fff;
}
.phone-app-media-panel.is-floating-request .phone-app-media-request strong {
  font-size: 1.25rem;
}
.phone-app-media-request .phone-app-hint {
  max-width: 22rem;
  color: #cbd5e1;
}
.phone-app-media-panel.is-floating-request .phone-app-media-request .phone-app-hint {
  margin: 0.2rem auto 0;
  font-size: 0.92rem;
}
.phone-app-media-request-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  width: min(100%, 24rem);
  margin-top: 1rem;
}
.phone-app-media-request-actions button {
  min-height: 3rem;
  border: 0;
  border-radius: 18px;
  padding: 0.95rem 1rem;
  background: #2563eb;
  color: #fff;
  font-weight: 900;
}
.phone-app-media-request-actions button:last-child {
  background: #dc2626;
  color: #fff;
}
.phone-app-media-controls button.is-muted,
.phone-app-media-controls button[aria-pressed="true"] {
  background: #f97316;
  color: #fff7ed;
}
.phone-app-held-call-line {
  width: 100%;
  max-width: 24rem;
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 16px;
  background: rgba(245, 158, 11, 0.14);
  color: #fde68a;
}
.phone-app-dual-call-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
  max-width: 26rem;
  margin-top: 1rem;
}
.phone-app-dual-call-actions button {
  border: 0;
  border-radius: 16px;
  padding: 0.85rem;
  background: rgba(37, 99, 235, 0.72);
  color: #fff;
  font-weight: 900;
}
.phone-app-call-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(4.2rem, 1fr));
  gap: 0.45rem;
  width: 100%;
  max-width: 28rem;
  margin-top: 1.4rem;
}
.phone-app-advanced-actions {
  margin-top: 1.25rem;
  padding: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.56);
}
.phone-app-call-tools-compact {
  max-width: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.65rem;
}
.phone-app-call-tools button,
.phone-app-history-filters button {
  border: 0;
  border-radius: 14px;
  padding: 0.62rem 0.35rem;
  background: rgba(15, 23, 42, 0.62);
  color: #dbeafe;
  font-size: 0.76rem;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.phone-app-call-tools button.active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.55), 0 8px 20px rgba(37, 99, 235, 0.35);
}
.phone-app-call-tools button.active::after {
  content: "?";
  margin-inline-start: 0.25rem;
  color: #bbf7d0;
}
.phone-app-wide-hangup {
  width: 100%;
  max-width: 28rem;
  margin-top: 0.85rem;
  border: 0;
  border-radius: 18px;
  padding: 0.95rem 1rem;
  background: #dc2626;
  color: #fff;
  font-weight: 900;
}
.phone-app-ring-settings {
  margin-top: 1rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
.phone-app-settings-panel {
  display: block;
}
.phone-app-settings-menu {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}
.phone-app-settings-menu button {
  position: relative;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  padding: 0.9rem 1rem 0.9rem 2.4rem;
  background: rgba(15, 23, 42, 0.76);
  color: #e5e7eb;
  text-align: right;
}
.phone-app-settings-menu button::after {
  content: "?";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1.35rem;
}
.phone-app-settings-menu span {
  display: block;
  font-weight: 900;
}
.phone-app-settings-menu small {
  display: block;
  margin-top: 0.25rem;
  color: #94a3b8;
}
.phone-app-settings-back {
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  background: rgba(148, 163, 184, 0.16);
  color: #e5e7eb;
  font-weight: 800;
}
.phone-app-settings-switch {
  padding: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.56);
}
.phone-app-settings-summary {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0;
}
.phone-app-settings-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
}
.phone-app-settings-summary span {
  color: #94a3b8;
}
.phone-app-settings-summary strong {
  color: #e5e7eb;
  text-align: left;
}
.phone-app-audio-route-list {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0;
}
.phone-app-audio-route-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.58);
}
.phone-app-audio-route-list span {
  min-width: 0;
  color: #e5e7eb;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.phone-app-audio-route-list strong {
  flex-shrink: 0;
  color: #93c5fd;
  font-size: 0.82rem;
}
.phone-app-setting-label {
  display: block;
  margin-bottom: 0.35rem;
  color: #cbd5e1;
  font-weight: 800;
}
.phone-app-setting-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: #111827;
  color: #e5e7eb;
}
.phone-app-setting-select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: #111827;
  color: #e5e7eb;
}
.phone-app-quick-dial-form,
.phone-app-quick-dial-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}
.phone-app-quick-dial-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.64);
}
.phone-app-quick-dial-row span {
  display: grid;
  gap: 0.2rem;
}
.phone-app-quick-dial-row small {
  color: #94a3b8;
}
.phone-app-quick-dial-row button {
  border: 0;
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  font-weight: 800;
}
.phone-app-number-display {
  width: 100%;
  box-sizing: border-box;
  margin: 1.55rem 0 0.85rem;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.32);
  background: transparent;
  color: #fff;
  font-size: 2.25rem;
  text-align: center;
  outline: none;
}
.phone-app-keypad,
.phone-app-in-call-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  direction: ltr;
}
.phone-app-tab-panel[data-app-panel="dialer"] .phone-app-keypad {
  margin-top: 0.35rem;
}
.phone-app-keypad button,
.phone-app-in-call-keypad button {
  aspect-ratio: 1 / 0.72;
  border: 0;
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.95);
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  direction: ltr;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.phone-app-dial-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.2rem;
}
.phone-app-call-btn,
.phone-app-end-btn {
  width: 4.6rem;
  height: 4.6rem;
  margin: 0 auto;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 2.1rem;
  font-weight: 900;
}
.phone-app-call-btn {
  background: #16a34a;
}
.phone-app-end-btn {
  background: #dc2626;
}
.phone-app-clear-btn {
  border: 0;
  border-radius: 18px;
  padding: 0.85rem;
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  font-weight: 800;
}
.phone-app-system-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(8px);
}
.phone-app-system-card {
  width: min(22rem, 100%);
  padding: 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  background: #0f172a;
  color: #e5e7eb;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}
.phone-app-system-card h2 {
  margin: 0 0 0.45rem;
  color: #fff;
}
.phone-app-system-card p {
  margin: 0 0 1rem;
  color: #cbd5e1;
  line-height: 1.5;
}
.phone-app-system-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.phone-app-system-actions button {
  border: 0;
  border-radius: 16px;
  padding: 0.8rem;
  background: rgba(148, 163, 184, 0.16);
  color: #e5e7eb;
  font-weight: 900;
}
.phone-app-system-actions [data-confirm="ok"] {
  background: #dc2626;
  color: #fff;
}
.pbx-video-request-actions,
.phone-app-media-request-actions,
.app-notice-modal-actions--confirm {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: stretch;
}
.pbx-video-request-actions button,
.phone-app-media-request-actions button,
.app-notice-modal-actions--confirm button {
  width: 100%;
  min-height: 2.75rem;
  border-radius: 16px;
  font-weight: 900;
}
.pbx-video-request-actions .btn-primary,
.phone-app-media-request-actions button:first-child,
.app-notice-modal-actions--confirm .btn-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.pbx-video-request-actions .btn-secondary,
.phone-app-media-request-actions button:last-child,
.app-notice-modal-actions--confirm .btn-secondary {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.28);
  color: #e5e7eb;
}
.phone-app-search {
  width: 100%;
  box-sizing: border-box;
  margin: 0.65rem 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
}
.phone-app-list {
  display: grid;
  gap: 0.65rem;
}
.phone-app-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  padding: 0.85rem;
  background: rgba(15, 23, 42, 0.72);
  color: #e5e7eb;
  text-align: right;
}
.phone-app-list-row span {
  display: grid;
  gap: 0.2rem;
}
.phone-app-list-row small {
  color: #94a3b8;
}
.phone-app-list-row.missed strong,
.phone-app-list-row-wrap.missed strong {
  color: #fecaca;
}
.phone-app-list-row-wrap {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
}
.phone-app-list-row-wrap .phone-app-list-row {
  flex: 1 1 auto;
}
.phone-app-rec-play {
  flex: 0 0 auto;
  width: 3.1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(37, 99, 235, 0.22);
  color: #93c5fd;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
}
.phone-app-rec-play.playing {
  background: #2563eb;
  color: #fff;
}
.phone-app-extension-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.phone-app-extension-card {
  position: relative;
  min-height: 8.2rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.72);
  color: #e5e7eb;
  text-align: right;
}
.phone-app-extension-card small,
.phone-app-extension-card em {
  display: block;
  margin-top: 0.2rem;
  color: #94a3b8;
  font-style: normal;
}
.phone-app-presence-dot {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: #22c55e;
}
.phone-app-extension-card.busy .phone-app-presence-dot {
  background: #f97316;
}
.phone-app-extension-card-quick {
  border-color: rgba(59, 130, 246, 0.42);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(15, 23, 42, 0.72));
}
.phone-app-extension-card-quick .phone-app-presence-dot {
  background: #60a5fa;
}
.phone-app-extension-card.offline {
  opacity: 0.52;
}
.phone-app-extension-card.offline .phone-app-presence-dot {
  background: #64748b;
}
.phone-app-history-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.65rem 0 1rem;
}
.phone-app-history-filters button.active,
.phone-app-bottom-nav button.active {
  background: #2563eb;
  color: #fff;
}
.phone-app-bottom-nav {
  position: fixed;
  right: 50%;
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  z-index: 10;
  width: min(calc(100% - 2rem), 488px);
  transform: translateX(50%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.45rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
}
.phone-app-bottom-nav.has-active-call {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.phone-app-bottom-nav.has-media {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.phone-app-bottom-nav.has-active-call.has-media {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.phone-app-bottom-nav button {
  position: relative;
  border: 0;
  border-radius: 18px;
  padding: 0.75rem 0.25rem;
  background: transparent;
  color: #cbd5e1;
  font-weight: 800;
}
.phone-app-nav-badge {
  position: absolute;
  top: 0.15rem;
  inset-inline-end: 0.35rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  line-height: 1.1rem;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.92);
}
.phone-app-nav-badge.hidden {
  display: none;
}
.phone-app-dialer-incoming {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  margin-bottom: 0.9rem;
  padding: 1rem;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(22, 163, 74, 0.28), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(34, 197, 94, 0.45);
  box-shadow: 0 12px 30px rgba(22, 163, 74, 0.25);
  animation: phone-app-incoming-pulse 1.6s ease-in-out infinite;
}
.phone-app-dialer-incoming.hidden {
  display: none;
}
@keyframes phone-app-incoming-pulse {
  0%, 100% { box-shadow: 0 12px 30px rgba(22, 163, 74, 0.2); }
  50% { box-shadow: 0 12px 40px rgba(22, 163, 74, 0.5); }
}
.phone-app-dialer-incoming-label {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 800;
  color: #bbf7d0;
}
.phone-app-dialer-incoming-name {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  text-align: center;
}
.phone-app-dialer-incoming-number {
  font-size: 0.95rem;
  color: #cbd5e1;
}
.phone-app-dialer-incoming-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  width: 100%;
  margin-top: 0.5rem;
}
.phone-app-dialer-incoming-actions button {
  border: 0;
  border-radius: 16px;
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
}
.phone-app-dialer-incoming-answer {
  background: #16a34a;
}
.phone-app-dialer-incoming-reject {
  background: #dc2626;
}
.phone-app-empty {
  margin: 2rem 0;
  color: #94a3b8;
  text-align: center;
}
.phone-app-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background: rgba(2, 6, 23, 0.72);
}
.phone-app-incoming-screen {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 18%, rgba(37, 99, 235, 0.45), transparent 34%),
    linear-gradient(180deg, #0f172a 0%, #020617 100%);
}
.phone-app-incoming-content {
  width: min(100%, 520px);
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow-y: auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(2rem, env(safe-area-inset-top)) 1.25rem max(2rem, env(safe-area-inset-bottom));
  text-align: center;
}
.phone-app-incoming-content h1 {
  margin: 0.5rem 0 0.2rem;
  font-size: clamp(2rem, 8vw, 3.2rem);
  color: #fff;
}
.phone-app-incoming-content strong {
  font-size: 1.35rem;
  color: #bfdbfe;
}
.phone-app-incoming-actions {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
}
.phone-app-incoming-answer,
.phone-app-incoming-reject {
  width: 5.2rem;
  height: 5.2rem;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 2.4rem;
  font-weight: 900;
}
.phone-app-incoming-answer {
  background: #16a34a;
}
.phone-app-incoming-reject {
  background: #dc2626;
}
.phone-app-incoming-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  width: 100%;
  margin-top: 2rem;
}
.phone-app-incoming-tools button {
  border: 0;
  border-radius: 16px;
  padding: 0.85rem 0.45rem;
  background: rgba(148, 163, 184, 0.16);
  color: #e5e7eb;
  font-weight: 800;
}
.phone-app-transfer-panel {
  width: 100%;
  max-height: 36vh;
  overflow: auto;
  margin-top: 1rem;
  padding: 0.85rem;
  box-sizing: border-box;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
}
.phone-app-settings-card {
  width: min(100%, 520px);
  max-height: 86vh;
  overflow: auto;
  padding: 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 28px 28px 18px 18px;
  background: #0f172a;
  color: #e5e7eb;
  box-shadow: 0 -20px 80px rgba(0, 0, 0, 0.45);
}
.phone-app-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.phone-app-settings-head h2 {
  margin: 0;
}
.phone-app-settings-head button {
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.16);
  color: #e5e7eb;
  font-size: 1.45rem;
}
.phone-app-sip-settings {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}
.phone-app-sip-grid {
  display: grid;
  gap: 0.55rem;
}
.phone-app-sip-grid div {
  display: grid;
  gap: 0.25rem;
  padding: 0.7rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
}
.phone-app-sip-grid span {
  color: #94a3b8;
  font-size: 0.82rem;
}
.phone-app-sip-grid code {
  overflow-wrap: anywhere;
  color: #dbeafe;
}
.pbx-consent-textarea {
  width: 100%;
  max-width: 48rem;
  margin-bottom: 0.5rem;
}
.pbx-consent-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.pbx-recording-link {
  font-weight: 500;
}
/* ??? ?????? ? ??? ?????, ?????? ????, ?????? (???? ????? ??? GET .../recording) */
.pbx-recording-audio {
  display: block;
  width: 100%;
  max-width: 17rem;
  height: 2.25rem;
  margin: 0;
}
.pbx-history-row-line .pbx-hist-rec .pbx-recording-audio {
  max-width: 12rem;
}
.pbx-hist-rec .pbx-recording-audio {
  max-width: 100%;
}
/* ??? ???? ? ????? ???? ????? (??? ?????) */
.pbx-history-row-main--static {
  display: block;
  width: 100%;
  text-align: inherit;
  cursor: default;
  border: 1px solid var(--border-subtle, #e2e6ea);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  background: var(--surface-elevated, #fff);
}
.pbx-hist-filing-doc {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-secondary, #444);
  line-height: 1.35;
}
.pbx-history-row-line .pbx-history-row-main--static {
  width: auto;
  flex: 1;
  min-width: 0;
}
/* ??? ???? ? ????? ??????: ??? ???? (???), ???? (?????), ??? ????? (??????) */
.pbx-history-row-line--employee-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 15rem) minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem 1.25rem;
  width: 100%;
  min-width: 0;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border-subtle, #e2e6ea);
  border-radius: 10px;
  background: var(--surface-elevated, #fff);
}
/* ????? 1 ?-DOM = ??RTL ???? ? ???? ???? ???? ??????? */
.pbx-emp-call-col--meta {
  min-width: 0;
  justify-self: start;
  text-align: start;
  max-width: 100%;
}
/* ????? 2 ? ????? ??? ????? ????? */
.pbx-emp-call-col--audio {
  justify-self: center;
  width: 100%;
  max-width: 15rem;
}
/* ????? 3 ?-DOM = ??RTL ???? ? ?????? ?????? ???? ??????? */
.pbx-emp-call-col--nums {
  justify-self: start;
  text-align: start;
}
.pbx-emp-call-col--nums .pbx-hist-num {
  font-size: 0.85rem;
  word-break: break-all;
  font-weight: 500;
}
.pbx-emp-call-col--audio-muted {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  min-width: 0;
  text-align: center;
}
.pbx-recording-strip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  background: var(--bg-hover, #f4f6f8);
  border: 1px solid var(--border, #e2e6ea);
  min-width: 0;
}
.pbx-recording-strip .pbx-recording-audio {
  max-width: 100%;
  width: 100%;
  height: 2.25rem;
}
.pbx-rec-download {
  align-self: center;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent, #2563eb);
  text-decoration: none;
}
.pbx-rec-download:hover {
  text-decoration: underline;
}
@media (max-width: 640px) {
  .pbx-history-row-line--employee-split {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.65rem;
  }
  .pbx-emp-call-col--meta {
    justify-self: stretch;
    text-align: start;
  }
  .pbx-emp-call-col--audio {
    justify-self: center;
    max-width: 100%;
  }
  .pbx-emp-call-col--nums {
    justify-self: stretch;
    padding-top: 0.35rem;
    border-top: 1px dashed var(--border-subtle, #e2e6ea);
  }
}
.report-table td .pbx-recording-audio {
  max-width: 14rem;
}
.activity-inline-audio {
  display: inline-block;
  vertical-align: middle;
  margin-inline-start: 0.35rem;
}
.activity-inline-audio .pbx-recording-audio,
.policy-pbx-audio .pbx-recording-audio {
  max-width: 14rem;
}
.policy-pbx-audio {
  margin-top: 0.35rem;
}
.pbx-asterisk-gen-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

/* ?????? ????? ??????? */
.pbx-dashboard-page-heading {
  margin-bottom: 1rem;
}
.pbx-dashboard-settings-grid {
  margin-top: 0.5rem;
}
.pbx-mgmt-subtabs {
  margin: 0 0 1rem;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.pbx-mgmt-panel {
  display: none;
}
.pbx-mgmt-panel.is-active {
  display: block;
}
.pbx-mgmt-panel[hidden] {
  display: none !important;
}

/* ????? + ????? ? ????? ??????? */
.pbx-guide-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.pbx-guide-details {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-hover);
  padding: 0;
  overflow: hidden;
}
.pbx-guide-details summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.65rem 0.85rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
}
.pbx-guide-details summary::-webkit-details-marker {
  display: none;
}
.pbx-guide-details summary::before {
  content: "?";
  display: inline-block;
  transition: transform 0.15s ease;
  font-size: 0.85em;
  opacity: 0.8;
}
.pbx-guide-details[open] summary::before {
  transform: rotate(-90deg);
}
.pbx-guide-inner {
  padding: 0 0.85rem 0.85rem;
  font-size: 0.95rem;
  line-height: 1.55;
}
.pbx-guide-inner ol.pbx-guide-steps {
  margin: 0.35rem 0 0;
  padding-inline-start: 1.35rem;
}
.pbx-guide-inner li {
  margin-bottom: 0.45rem;
}
.pbx-glossary-grid {
  display: grid;
  gap: 0.5rem 1rem;
  margin: 0.35rem 0 0;
}
@media (min-width: 640px) {
  .pbx-glossary-grid {
    grid-template-columns: minmax(7rem, 10rem) 1fr;
  }
}
.pbx-glossary-term {
  font-weight: 600;
  color: var(--text);
}
.pbx-glossary-def {
  margin: 0;
}
.pbx-checklist {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
}
.pbx-checklist li {
  position: relative;
  padding-inline-start: 1.5rem;
  margin-bottom: 0.4rem;
}
.pbx-checklist li::before {
  content: "?";
  position: absolute;
  inset-inline-start: 0;
  opacity: 0.65;
}

/* ???? ????? */
#phone-page.page-content {
  padding-inline: 0.35rem;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: none;
  width: 100%;
}
.pbx-phone-page {
  max-width: none;
}
.pbx-phone-page-heading {
  flex-shrink: 0;
  margin-bottom: 0.35rem;
  padding-inline: 0.15rem;
}
.pbx-phone-heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
}
.pbx-phone-heading-row h1 {
  margin: 0;
  flex: 0 0 auto;
}
.pbx-panel-hint-details {
  margin-top: 0.35rem;
  font-size: 0.88rem;
}
.pbx-panel-hint-details summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--text-muted);
}
.pbx-panel-hint-details[open] .pbx-phone-panel-hint {
  margin-top: 0.45rem;
}
.pbx-workspace-status {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  flex: 1 1 220px;
}
.pbx-ws-line .pbx-ws-ok {
  color: #16a34a;
}
.pbx-ws-line .pbx-ws-warn {
  color: #ca8a04;
}
.pbx-ws-line .pbx-ws-muted {
  opacity: 0.85;
}

.client-pbx-calls-tab .client-pbx-calls-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.pbx-webrtc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.pbx-webrtc-incoming {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--accent, #2563eb);
  background: rgba(37, 99, 235, 0.08);
}
.pbx-webrtc-incoming.hidden {
  display: none;
}
.pbx-webrtc-incoming-label {
  font-weight: 600;
}
.pbx-webrtc-incoming-from {
  font-weight: 600;
  color: var(--text, inherit);
}
.pbx-webrtc-incoming-actions {
  display: flex;
  gap: 0.4rem;
  margin-inline-start: auto;
}
.pbx-webrtc-log {
  font-size: 0.8rem;
  color: var(--text-muted, #888);
  margin: 0.25rem 0 0;
  min-height: 1.2em;
  word-break: break-all;
}

.pbx-phone-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 0;
  flex: 1;
  min-height: 0;
  max-height: calc(100vh - 148px);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  margin: 0.5rem 0.85rem 1rem;
}
.pbx-settings-icon-btn {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pbx-settings-icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--accent);
}
.pbx-settings-icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.pbx-settings-icon-svg {
  display: block;
}
@media (max-width: 1100px) {
  .pbx-phone-shell {
    grid-template-columns: 1fr;
    gap: 0;
    max-height: none;
    min-height: auto;
    overflow: visible;
  }
  .pbx-phone-panel-extensions {
    max-height: 42vh;
    border-inline-end: none;
    border-bottom: 1px solid var(--border);
  }
  .pbx-phone-panel-main {
    min-height: 48vh;
  }
}
.pbx-phone-panel {
  background: var(--bg-card);
  border: none;
  border-radius: 0;
  padding: 2.75rem 1rem 0.85rem;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pbx-phone-panel-extensions {
  border-inline-end: 1px solid var(--border);
  overflow-y: auto;
}
.pbx-phone-panel-main {
  overflow: hidden;
  align-items: stretch;
  justify-content: flex-start;
  padding: 2.25rem 1rem 1rem;
  background: transparent;
}
.pbx-phone-main-col {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  flex: 1;
}
.pbx-phone-face {
  --pbx-dial-col: 300px;
  --pbx-surface: #ffffff;
  --pbx-surface-muted: #f1f5f9;
  --pbx-ink: #334155;
  --pbx-ink-soft: #64748b;
  --pbx-line: rgba(148, 163, 184, 0.32);
  --pbx-lcd-from: #18212f;
  --pbx-lcd-to: #2a3648;
  --pbx-call: #10b981;
  --pbx-call-hover: #059669;
  --pbx-radius: 16px;
  --pbx-radius-sm: 11px;
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(168deg, #f6f8fb 0%, #eef2f7 52%, #f9fafb 100%);
  color: var(--pbx-ink);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--pbx-radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  overflow: hidden;
  padding: 1rem 1.15rem 1.1rem;
}
.pbx-phone-main-col--browse .pbx-phone-face {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}
.pbx-phone-unit {
  width: 100%;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pbx-phone-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--pbx-dial-col);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
}
.pbx-phone-main-col--browse .pbx-console-contacts-list,
.pbx-phone-main-col--browse .pbx-console-scroll-list {
  flex: 1;
  min-height: 0;
}
.pbx-phone-dial-stack.hidden {
  display: none !important;
}
.pbx-phone-dial-stack {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  flex-shrink: 0;
  padding: 0;
  padding-inline-start: 1.35rem;
  border-top: none;
  justify-content: flex-start;
  align-self: stretch;
}
@media (max-width: 900px) {
  .pbx-phone-face {
    padding: 0.85rem 0.9rem 0.95rem;
  }
  .pbx-phone-unit {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }
  .pbx-console {
    padding-inline-end: 0;
    padding-bottom: 0.9rem;
  }
  .pbx-console::after {
    display: none;
  }
  .pbx-phone-dial-stack {
    padding-inline-start: 0;
    padding-top: 0;
  }
  .pbx-phone-lcd {
    height: 6.25rem;
    min-height: 6.25rem;
    max-height: 6.25rem;
  }
}
@media (max-width: 1100px) {
  .pbx-phone-main-col {
    max-width: 100%;
  }
}
.pbx-phone-panel-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}
.pbx-phone-panel-hint {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
}
.pbx-phone-history-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}
.pbx-history-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.pbx-phone-history-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.35rem;
}
.pbx-phone-hist-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.15rem;
  font: inherit;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-hover);
  cursor: pointer;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
}
.pbx-phone-hist-tab--active {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
}
.pbx-phone-hist-tab-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1;
}
.pbx-history-manager-view-wrap {
  display: flex;
  align-items: center;
  margin-inline-start: auto;
}
.pbx-history-view-as {
  min-width: 7.5rem;
  max-width: 11rem;
}
.pbx-history-filter-tabs {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.18rem;
  padding: 0.2rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--pbx-line, var(--border));
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  align-self: flex-start;
  max-width: 100%;
  overflow-x: auto;
}
.pbx-history-filter-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 1.85rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.62rem;
  border-radius: 7px;
  border: none;
  background: transparent;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
  color: var(--pbx-ink-soft, var(--text-muted));
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.pbx-history-filter-btn:hover {
  color: var(--pbx-ink, var(--text));
}
.pbx-history-filter-btn--active {
  background: var(--pbx-surface, var(--bg-card));
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.pbx-hist-unid-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}
.pbx-ext-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 0.45rem;
  flex: 1;
  min-height: 0;
  align-content: start;
}
.pbx-ext-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.65rem 0.4rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-hover);
  cursor: pointer;
  font: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.pbx-ext-tile:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--bg-card);
}
.pbx-ext-tile--idle {
  border-color: #22c55e44;
}
.pbx-ext-tile--busy {
  border-color: #f9731644;
  background: rgba(249, 115, 22, 0.08);
}
.pbx-ext-tile--quick {
  border-color: rgba(37, 99, 235, 0.36);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(255, 255, 255, 0.86));
}
.pbx-ext-tile--unavailable {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #64748b;
  filter: grayscale(0.35);
  cursor: not-allowed;
}
.pbx-ext-tile--unavailable .pbx-ext-name,
.pbx-ext-tile--unavailable .pbx-ext-pres {
  color: #64748b;
}
.pbx-ext-tile--off {
  opacity: 0.45;
  cursor: not-allowed;
}
.pbx-ext-num {
  font-size: 1.15rem;
  font-weight: 600;
}
.pbx-ext-name {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pbx-ext-pres {
  font-size: 0.72rem;
  margin-top: 0.25rem;
  color: var(--text-muted);
}
.pbx-console {
  margin-bottom: 0;
  border: none;
  background: transparent;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-inline-end: 1.35rem;
}
.pbx-console::after {
  content: '';
  position: absolute;
  inset-inline-end: 0;
  top: 8%;
  bottom: 8%;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, var(--pbx-line) 18%, var(--pbx-line) 82%, transparent 100%);
  pointer-events: none;
}
.pbx-console-screen {
  flex: 1;
  min-height: 0;
  padding: 0 0 0.5rem;
  background: transparent;
  color: inherit;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.pbx-phone-main-col--browse .pbx-console-screen {
  padding: 0 0 0.85rem;
}
.pbx-console-screen-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0;
  border-bottom: none;
  flex-shrink: 0;
  position: relative;
  min-height: 2.1rem;
}
.pbx-console-screen-head .pbx-console-led {
  position: absolute;
  inset-inline-end: 0;
  top: 50%;
  transform: translateY(-50%);
}
.pbx-console-mode-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.22rem;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--pbx-line);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.pbx-console-mode-tab {
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.34rem 0.72rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--pbx-ink-soft);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.pbx-console-mode-tab:hover {
  color: var(--pbx-ink);
}
.pbx-console-mode-tab--active {
  background: var(--pbx-surface);
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.pbx-console-panel {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}
.pbx-console-panel--active {
  display: flex;
}
.pbx-console-panel.hidden {
  display: none !important;
}
.pbx-console-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.75);
  animation: pbx-console-led 2.4s ease-in-out infinite;
}
@keyframes pbx-console-led {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}
.pbx-console-screen-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: stretch;
  margin-bottom: 0.4rem;
}
.pbx-console-screen-row:last-child {
  margin-bottom: 0;
}
.pbx-console-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.72);
  padding-top: 0;
}
.pbx-console-screen-row--active .pbx-console-label {
  color: #bbf7d0;
}
.pbx-incoming-display,
.pbx-active-display {
  width: 100%;
  min-height: 2rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.78rem;
  line-height: 1.35;
  box-sizing: border-box;
}
.pbx-incoming-display strong,
.pbx-active-display strong {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.pbx-incoming-display .form-hint,
.pbx-active-display .form-hint {
  color: rgba(248, 250, 252, 0.75);
  font-size: 0.72rem;
}
.pbx-incoming-placeholder,
.pbx-active-placeholder {
  color: rgba(248, 250, 252, 0.65);
}
.pbx-incoming-live,
.pbx-active-live,
.pbx-outgoing-internal-live {
  color: #fff;
}
.pbx-incoming-client-name {
  color: #e8eef4;
}
.pbx-console .pbx-outgoing-internal-display {
  margin: 0 0 0.4rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(187, 247, 208, 0.35);
  color: #ecfdf5;
  font-size: 0.78rem;
}
.pbx-my-ext {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: #e8eef4;
}
.pbx-console-contacts-toolbar {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.35rem;
  flex-shrink: 0;
}
.pbx-console-contacts-search {
  flex: 1;
  min-width: 0;
  font-size: 0.8rem;
  padding: 0.35rem 0.5rem;
}
.pbx-console-contacts-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.pbx-console-contact-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.5rem;
  align-items: center;
  width: 100%;
  text-align: start;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  transition: background 0.15s, border-color 0.15s;
}
.pbx-console-contact-row:hover {
  background: var(--bg-hover);
  border-color: #cbd5e1;
}
.pbx-console-contact-name {
  font-weight: 600;
  grid-column: 1;
}
.pbx-console-contact-phone {
  font-weight: 600;
  grid-column: 2;
  direction: ltr;
}
.pbx-console-contact-label {
  grid-column: 1 / -1;
  font-size: 0.68rem;
  opacity: 0.8;
}
.pbx-console-empty,
.pbx-console-hist-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}
.pbx-console-history-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
  flex-shrink: 0;
}
.pbx-console-history-toolbar .pbx-phone-hist-tab {
  font-size: 0.68rem;
  padding: 0.25rem 0.55rem;
  border-color: var(--border);
  background: var(--bg-hover);
  color: var(--text-muted);
}
.pbx-console-history-toolbar .pbx-phone-hist-tab--active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(37, 99, 235, 0.35);
}
.pbx-console-history-view-as {
  min-width: 7.5rem;
  max-width: 11rem;
  font-size: 0.72rem;
  padding: 0.28rem 0.45rem;
}
.pbx-console-history-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.pbx-console-scroll-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.pbx-console-scroll-list .pbx-history-row-wrap,
.pbx-console-scroll-list .pbx-history-row {
  font-size: 0.72rem;
}
.pbx-console-scroll-list .pbx-history-row-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--pbx-line, var(--border));
  border-radius: 10px;
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pbx-console-scroll-list .pbx-history-row-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}
.pbx-console-scroll-list .pbx-history-row-main {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  padding: 0.42rem 0.6rem;
  text-align: inherit;
  cursor: pointer;
  font: inherit;
  display: block;
}
.pbx-console-scroll-list .pbx-history-row-main:hover {
  background: rgba(248, 250, 252, 0.65);
}
.pbx-console-scroll-list .pbx-hist-row-primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.55rem;
  min-width: 0;
}
.pbx-console-scroll-list .pbx-hist-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.4rem;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.pbx-console-scroll-list .pbx-hist-dir {
  color: var(--text);
  font-weight: 600;
}
.pbx-console-scroll-list .pbx-hist-filing-badge {
  padding: 0.08rem 0.38rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  font-size: 0.64rem;
  margin-inline-start: 0;
}
.pbx-console-scroll-list .pbx-hist-num {
  flex: 0 1 auto;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  direction: ltr;
  unicode-bidi: isolate;
}
.pbx-console-scroll-list .pbx-hist-row-extra {
  margin-top: 0.15rem;
  font-size: 0.66rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}
.pbx-console-scroll-list .pbx-hist-row-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  padding: 0.3rem 0.45rem;
  border-inline-start: 1px solid var(--pbx-line, var(--border));
  background: rgba(248, 250, 252, 0.92);
}
.pbx-console-scroll-list .pbx-hist-filing-btn {
  font: inherit;
  font-size: 0.66rem;
  font-weight: 600;
  padding: 0.28rem 0.5rem;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.pbx-console-scroll-list .pbx-hist-filing-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(59, 130, 246, 0.06);
}
.pbx-console-scroll-list .pbx-hist-rec {
  display: flex;
  align-items: center;
}
.pbx-console-scroll-list .pbx-recording-strip {
  flex-direction: row;
  align-items: center;
  gap: 0.3rem;
  padding: 0;
  border: none;
  background: transparent;
  min-width: 0;
}
.pbx-console-scroll-list .pbx-recording-strip .pbx-recording-audio {
  width: 88px;
  max-width: 88px;
  height: 24px;
  min-height: 24px;
}
.pbx-console-scroll-list .pbx-rec-download {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.15rem 0.3rem;
  border-radius: 5px;
  background: rgba(59, 130, 246, 0.08);
  text-decoration: none;
}
.pbx-console-scroll-list .pbx-rec-download:hover {
  background: rgba(59, 130, 246, 0.14);
  text-decoration: none;
}
@media (max-width: 540px) {
  .pbx-console-scroll-list .pbx-history-row-card {
    flex-wrap: wrap;
  }
  .pbx-console-scroll-list .pbx-hist-row-actions {
    width: 100%;
    border-inline-start: none;
    border-top: 1px solid var(--pbx-line, var(--border));
    justify-content: flex-end;
    padding: 0.28rem 0.45rem;
  }
}
.pbx-console-scroll-list .pbx-hist-meta,
.pbx-console-scroll-list .pbx-hist-dir,
.pbx-console-scroll-list .pbx-hist-time,
.pbx-console-scroll-list .pbx-hist-filing-badge,
.pbx-console-scroll-list .pbx-hist-client,
.pbx-console-scroll-list .pbx-hist-peer,
.pbx-console-scroll-list .pbx-hist-unid-meta {
  color: var(--text-muted);
}
.pbx-console-scroll-list .form-hint,
.pbx-console-scroll-list .loading,
.pbx-console-scroll-list .error-msg {
  color: var(--text-muted);
  font-size: 0.75rem;
}
.pbx-phone-lcd-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  flex: 0 0 auto;
  padding: 0;
}
.pbx-phone-lcd {
  width: 100%;
  height: 6.75rem;
  min-height: 6.75rem;
  max-height: 6.75rem;
  flex-shrink: 0;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: linear-gradient(152deg, var(--pbx-lcd-from) 0%, var(--pbx-lcd-to) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -12px 24px rgba(0, 0, 0, 0.12),
    0 10px 28px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}
.pbx-phone-lcd-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
  width: 100%;
  gap: 0.35rem;
  min-height: 0;
}
.pbx-phone-lcd-slot {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pbx-phone-lcd-slot--primary {
  flex: 1 1 62%;
  min-height: 0;
}
.pbx-phone-lcd-slot--secondary {
  flex: 0 0 32%;
  min-height: 0;
}
.pbx-phone-lcd-time {
  font-size: 2.85rem;
  font-weight: 200;
  letter-spacing: 0.05em;
  line-height: 1;
  color: #eef2f7;
  font-variant-numeric: tabular-nums;
}
.pbx-phone-lcd-main {
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
.pbx-phone-lcd-sub {
  font-size: 0.84rem;
  line-height: 1.3;
  color: rgba(226, 232, 240, 0.82);
  font-weight: 400;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pbx-phone-lcd--incoming {
  animation: pbx-lcd-pulse 1.2s ease-in-out infinite;
  border-color: rgba(187, 247, 208, 0.55);
}
.pbx-phone-lcd--active {
  border-color: rgba(147, 197, 253, 0.55);
}
.pbx-phone-lcd-timer {
  font-variant-numeric: tabular-nums;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(191, 219, 254, 0.95);
}
.pbx-phone-lcd--dialing {
  animation: pbx-lcd-dial-pulse 1s ease-in-out infinite;
  border-color: rgba(253, 224, 71, 0.55);
}
.pbx-phone-lcd--dialing .pbx-phone-lcd-sub {
  color: rgba(253, 224, 71, 0.95);
  font-weight: 500;
}
.pbx-phone-lcd--dialing .pbx-phone-lcd-main {
  font-size: 2rem;
  letter-spacing: 0.06em;
  line-clamp: 1;
  -webkit-line-clamp: 1;
}
@keyframes pbx-lcd-dial-pulse {
  0%,
  100% {
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.18), 0 0 0 0 rgba(253, 224, 71, 0.3);
  }
  50% {
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.18), 0 0 0 4px rgba(253, 224, 71, 0.18);
  }
}
@keyframes pbx-lcd-pulse {
  0%,
  100% {
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.18), 0 0 0 0 rgba(187, 247, 208, 0.35);
  }
  50% {
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.18), 0 0 0 4px rgba(187, 247, 208, 0.2);
  }
}
.pbx-phone-lcd-actions {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-bottom: 0.25rem;
}
.pbx-missed-calls-btn {
  font: inherit;
  font-size: 0.74rem;
  font-weight: 500;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(254, 242, 242, 0.92);
  color: #be123c;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
}
.pbx-missed-calls-btn:hover {
  background: #ffe4e6;
  transform: translateY(-1px);
}
.pbx-missed-calls-btn.hidden {
  display: none;
}
.pbx-call-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  margin-inline: auto;
  padding: 0.15rem 0 0;
  margin-top: 0;
  background: transparent;
  flex-shrink: 0;
  border: none;
}
.pbx-call-toolbar-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  width: 100%;
}
.pbx-call-toolbar-row:last-child {
  grid-template-columns: repeat(4, 1fr);
}
.pbx-call-toolbar-row .pbx-tb-btn {
  width: 100%;
  min-width: 0;
  min-height: 2.1rem;
  justify-content: center;
  text-align: center;
  border-radius: var(--pbx-radius-sm);
}
.pbx-call-toolbar.hidden {
  display: none;
}
.pbx-call-toolbar .pbx-tb-btn {
  font-size: 0.74rem;
  font-weight: 500;
  padding: 0.38rem 0.45rem;
  background: rgba(255, 255, 255, 0.78);
  border-color: var(--pbx-line);
  color: var(--pbx-ink);
  transition: background 0.16s, border-color 0.16s, transform 0.12s;
}
.pbx-call-toolbar .pbx-tb-btn:hover {
  background: #fff;
  border-color: rgba(148, 163, 184, 0.55);
  transform: translateY(-1px);
}
.pbx-video-panel {
  position: fixed;
  inset: 0.75rem;
  z-index: 1200;
  overflow: hidden;
  border: 1px solid var(--pbx-line);
  border-radius: 22px;
  background: #020617;
}
.pbx-video-panel.is-minimized {
  inset: auto 1rem 1rem auto;
  width: 18rem;
  max-width: calc(100vw - 2rem);
}
.pbx-video-panel.is-floating-request {
  inset: auto 1rem 1rem auto;
  width: min(24rem, calc(100vw - 2rem));
  height: auto;
  min-height: 0;
  z-index: 2525;
  box-shadow: 0 22px 60px rgba(2, 6, 23, 0.34);
}
.pbx-video-panel.is-floating-request::before {
  content: "?????";
  position: absolute;
  top: -0.7rem;
  right: 1rem;
  z-index: 3;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.24);
}
.pbx-video-panel.is-floating-request.is-screen-request::before {
  content: "???";
}
.pbx-video-panel.is-floating-request .pbx-remote-video,
.pbx-video-panel.is-floating-request .pbx-local-video,
.pbx-video-panel.is-floating-request .pbx-video-controls,
.pbx-video-panel.is-floating-request .pbx-video-status {
  display: none !important;
}
.pbx-remote-video {
  display: block;
  width: 100%;
  height: calc(100dvh - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  background: #020617;
  object-fit: contain;
}
.pbx-video-panel.is-minimized .pbx-remote-video {
  height: 11rem;
}
.pbx-local-video {
  position: absolute;
  left: 0.55rem;
  bottom: 0.55rem;
  width: 6.5rem;
  height: 4.8rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  background: #020617;
  object-fit: cover;
}
.pbx-video-request {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background:
    radial-gradient(circle at 50% 18%, rgba(37, 99, 235, 0.34), transparent 34%),
    rgba(2, 6, 23, 0.94);
  color: #fff;
  text-align: center;
}
.pbx-video-panel.is-floating-request .pbx-video-request {
  position: static;
  padding: 1rem 1rem 0.9rem;
  background:
    radial-gradient(circle at 50% 16%, rgba(37, 99, 235, 0.3), transparent 42%),
    rgba(15, 23, 42, 0.96);
}
.pbx-video-request strong {
  font-size: clamp(1.4rem, 4vw, 2.4rem);
}
.pbx-video-panel.is-floating-request .pbx-video-request strong {
  font-size: 1.2rem;
}
.pbx-video-request .form-hint {
  color: #cbd5e1;
}
.pbx-video-request-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  width: min(100%, 22rem);
}
.pbx-video-request-actions button {
  min-height: 2.75rem;
}
.pbx-video-request-actions .btn-primary,
.pbx-video-request-actions .btn-secondary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.pbx-video-request-actions .btn-secondary:last-child {
  background: #dc2626;
  border-color: #dc2626;
}
.pbx-video-controls {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.pbx-video-controls button {
  min-width: 6.2rem;
  min-height: 2.15rem;
  border-radius: 12px;
}
.pbx-video-controls button.is-muted,
.pbx-video-controls button[aria-pressed="true"] {
  background: #f97316;
  border-color: #f97316;
  color: #fff7ed;
}
.pbx-video-panel > .form-hint {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  margin: 0;
  padding: 0.75rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
}
.pbx-tb-btn--hangup {
  background: rgba(255, 241, 242, 0.95);
  border-color: rgba(251, 113, 133, 0.35);
  color: #be123c;
}
.pbx-tb-btn--hangup:hover {
  background: #ffe4e6;
  border-color: rgba(244, 63, 94, 0.4);
  color: #9f1239;
}
.pbx-dial-console {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 0;
  padding: 0.85rem 0.9rem 0.8rem;
  width: 100%;
  gap: 0.55rem;
  background: var(--pbx-surface);
  border-radius: var(--pbx-radius);
  border: 1px solid var(--pbx-line);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 28px rgba(15, 23, 42, 0.07);
}
.pbx-dial-console > * {
  width: 100%;
}
.pbx-dial-input-row {
  display: flex;
  flex-direction: row;
  direction: ltr;
  gap: 0.4rem;
  width: 100%;
  align-items: stretch;
}
.pbx-dial-input {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  background: var(--pbx-surface-muted);
  border: 1px solid transparent;
  border-radius: var(--pbx-radius-sm);
  color: var(--pbx-ink);
  transition: background 0.16s, border-color 0.16s, box-shadow 0.16s;
}
.pbx-dial-input:focus {
  background: #fff;
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}
.pbx-dial-backspace-btn {
  flex-shrink: 0;
  width: 2.55rem;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--pbx-radius-sm);
  border: 1px solid var(--pbx-line);
  background: var(--pbx-surface-muted);
  color: var(--pbx-ink-soft);
  cursor: pointer;
  padding: 0;
  font: inherit;
  transition: background 0.16s, color 0.16s, border-color 0.16s, transform 0.12s;
}
.pbx-dial-backspace-btn:hover {
  background: #fff;
  color: var(--pbx-ink);
  border-color: rgba(148, 163, 184, 0.55);
  transform: translateY(-1px);
}
.pbx-dial-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  align-items: stretch;
  width: 100%;
  direction: ltr;
}
.pbx-dial-call-btn,
.pbx-dial-add-btn {
  width: 100%;
  min-height: 2.55rem;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1.2;
  border-radius: var(--pbx-radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  transition: transform 0.12s, box-shadow 0.16s, background 0.16s;
}
.pbx-dial-call-btn {
  border: none;
  color: #fff;
  background: linear-gradient(180deg, #34d399 0%, var(--pbx-call) 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.32);
}
.pbx-dial-call-btn:hover {
  background: linear-gradient(180deg, #2dd4a5 0%, var(--pbx-call-hover) 100%);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.34);
  transform: translateY(-1px);
}
.pbx-dial-add-btn {
  background: var(--pbx-surface-muted);
  border: 1px solid var(--pbx-line);
  color: var(--pbx-ink);
  font-weight: 500;
}
.pbx-dial-add-btn:hover {
  background: #fff;
  border-color: rgba(148, 163, 184, 0.55);
  transform: translateY(-1px);
}
.pbx-numpad-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  padding-top: 0.15rem;
}
.pbx-numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.42rem;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  flex-shrink: 0;
}
.pbx-dial-extension-hints {
  margin-top: 0;
  margin-bottom: 0;
  max-width: 100%;
  text-align: center;
  font-size: 0.66rem;
  line-height: 1.4;
  color: var(--pbx-ink-soft);
  padding: 0 0.15rem;
}
.pbx-num-key {
  width: 100%;
  height: 2.35rem;
  min-height: 2.35rem;
  max-height: 2.35rem;
  margin-inline: 0;
  padding: 0;
  border-radius: var(--pbx-radius-sm);
  border: 1px solid var(--pbx-line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--pbx-ink);
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background 0.14s, border-color 0.14s, box-shadow 0.14s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pbx-num-key:hover {
  background: #fff;
  border-color: rgba(148, 163, 184, 0.55);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}
.pbx-num-key:active {
  background: var(--pbx-surface-muted);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}
.pbx-phone-dial-stack .pbx-webrtc-incoming {
  margin-top: 0;
  font-size: 0.78rem;
  padding: 0.45rem 0.55rem;
}
#pbx-connection-settings-modal.modal {
  position: fixed;
  inset: 0;
  z-index: 10060;
  max-width: none;
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: clamp(1rem, 3.5vw, 2.25rem);
  border: none;
  border-radius: 0;
  background: rgba(22, 36, 38, 0.48);
  box-sizing: border-box;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
}
#pbx-connection-settings-modal.modal:not(.hidden) {
  display: flex !important;
}
#pbx-connection-settings-modal .pbx-connection-settings-box {
  width: min(92vw, 640px);
  max-width: none;
  max-height: min(86vh, 680px);
  overflow-y: auto;
  margin: auto;
  flex-shrink: 0;
}
.pbx-settings-sep {
  margin: 1rem 0;
  border: none;
  border-top: 1px solid var(--border);
}
.pbx-settings-section-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}
.pbx-settings-modal-actions {
  margin-top: 1.25rem;
}
.pbx-phone-subsection {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.pbx-phone-subsection + .pbx-phone-subsection {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.pbx-phone-contacts-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.pbx-phone-contacts-search-row .pbx-phone-contacts-search {
  flex: 1;
  min-width: 0;
}
.pbx-phone-contacts-clear {
  flex-shrink: 0;
}
.pbx-phone-contacts-search {
  width: 100%;
  max-width: 100%;
  font-size: 0.9rem;
  box-sizing: border-box;
}
.pbx-ivr-json-details {
  margin-top: 0.75rem;
}
.pbx-ivr-json-details summary {
  cursor: pointer;
  font-weight: 500;
}
.pbx-ivr-json-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.35rem;
}
.pbx-ivr-json-import-label {
  display: block;
  margin-top: 0.65rem;
  margin-bottom: 0.25rem;
  font-size: 0.88rem;
  color: var(--text-muted, #666);
}
.pbx-ivr-json-import {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
}
.pbx-ivr-json-preview {
  max-height: 240px;
  overflow: auto;
  padding: 0.65rem;
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-hover);
  white-space: pre-wrap;
  word-break: break-word;
}
.pbx-ivr-sound-card {
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background:
    linear-gradient(165deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.88) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}
.pbx-ivr-sound-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.pbx-ivr-sound-card-title {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}
.pbx-ivr-sound-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.pbx-ivr-menu-pick-label {
  margin: 0;
  font-size: 0.8rem;
}
.pbx-ivr-menu-pick {
  min-width: 8rem;
  max-width: 12rem;
}
.pbx-ivr-sound-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.pbx-ivr-sound-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(7rem, 0.9fr) 4.5rem auto auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: #fff;
}
.pbx-ivr-sound-row.is-unused {
  opacity: 0.72;
  background: #f8fafc;
}
.pbx-ivr-sound-row-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.pbx-ivr-sound-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pbx-ivr-sound-badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
}
.pbx-ivr-sound-badge.is-approved {
  background: #dcfce7;
  color: #166534;
}
.pbx-ivr-sound-row select,
.pbx-ivr-sound-row input[type="number"],
.pbx-ivr-sound-row .pbx-ivr-sound-nick {
  font-size: 0.82rem;
  min-height: 2rem;
}
.pbx-ivr-sound-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: flex-end;
}
.pbx-ivr-sound-modal-box {
  max-width: 440px;
}
.pbx-ivr-sound-modal-tabs {
  display: flex;
  gap: 0.4rem;
  margin: 0.75rem 0;
}
.pbx-ivr-sound-tab.is-active {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}
.pbx-ivr-sound-preview {
  width: 100%;
  margin: 0.75rem 0 0.25rem;
}
.pbx-ivr-record-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.pbx-ivr-row-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.45rem;
  margin-top: 0.45rem;
}
.pbx-ivr-row-summary label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: #475569;
}
@media (max-width: 900px) {
  .pbx-ivr-sound-row {
    grid-template-columns: 1fr 1fr;
  }
  .pbx-ivr-sound-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}
.pbx-contact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pbx-contact-chip {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-hover);
  cursor: pointer;
  font-size: 0.88rem;
  font: inherit;
}
.pbx-contact-chip:hover:not(:disabled) {
  border-color: var(--accent);
}
.pbx-contact-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.pbx-history-list {
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pbx-history-list--scroll {
  flex: 1;
  min-height: 0;
  max-height: none;
}
.pbx-history-row-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.pbx-history-row-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}
.pbx-history-row-line {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}
.pbx-history-row-line .pbx-history-row-main,
.pbx-history-row-card .pbx-history-row-main {
  flex: 1;
  min-width: 0;
  width: auto;
}
.pbx-history-row-line .pbx-hist-rec,
.pbx-history-row-card .pbx-hist-rec {
  flex-shrink: 0;
  margin-top: 0;
  align-self: center;
}
.pbx-history-row-line--unid .pbx-hist-unid-text {
  flex: 1;
  min-width: 0;
}
.pbx-history-row-main {
  text-align: inherit;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-hover);
  padding: 0.5rem 0.65rem;
  cursor: pointer;
  font: inherit;
}
.pbx-history-row-main:hover {
  border-color: var(--accent);
}
.pbx-hist-filing-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-inline-start: 0.35rem;
}
.pbx-filing-form .form-row {
  margin-bottom: 0.65rem;
}
.pbx-filing-form .form-row:last-child {
  margin-bottom: 0;
}
.pbx-hist-crm-lbl {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}
.pbx-hist-crm-combo {
  position: relative;
}
.pbx-hist-crm-client-search,
.pbx-hist-crm-policy,
.pbx-hist-crm-claim {
  width: 100%;
  font-size: 0.72rem;
  padding: 0.28rem 0.45rem;
  min-height: 1.85rem;
}
.pbx-hist-crm-client-results {
  max-height: 11rem;
  overflow-y: auto;
  margin-top: 0.2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}
.pbx-hist-crm-client-pick,
.pbx-filing-client-pick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  width: 100%;
  text-align: inherit;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  font: inherit;
}
.pbx-hist-crm-client-pick:last-child,
.pbx-filing-client-pick:last-child {
  border-bottom: none;
}
.pbx-hist-crm-client-pick:hover,
.pbx-filing-client-pick:hover {
  background: var(--bg-hover);
}
.pbx-hist-crm-pick-name {
  font-size: 0.74rem;
  font-weight: 600;
}
.pbx-hist-crm-pick-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
  direction: ltr;
  text-align: start;
  width: 100%;
}
.pbx-hist-crm-results-hint {
  margin: 0.35rem 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.pbx-hist-crm-results-err {
  color: var(--danger, #b91c1c);
}
.pbx-filing-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}
.pbx-filing-box {
  max-width: 480px;
  padding: 1.25rem;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
}
.pbx-filing-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.policy-claim-row-highlight {
  outline: 2px solid var(--accent);
  transition: outline 0.2s;
}
tr.policy-claim-row {
  cursor: pointer;
}
tr.policy-claim-row.policy-claim-row--selected {
  background: rgba(13, 148, 136, 0.14);
}
.pbx-history-row {
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-hover);
  font-size: 0.88rem;
}
.pbx-hist-meta {
  margin-bottom: 0.25rem;
}
.pbx-hist-time {
  font-weight: 500;
}
.pbx-hist-dir {
  color: var(--text-muted);
  margin-inline-start: 0.35rem;
}
.pbx-hist-num {
  font-size: 0.85rem;
  word-break: break-all;
}
.pbx-hist-peer {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}
.pbx-hist-client-wrap {
  margin-top: 0.25rem;
  font-size: 0.85rem;
}
.pbx-hist-rec {
  margin-top: 0;
}

/* ?????? ??? ? ??? ????? + ????? ?? ?????? */
.workqueue-content {
  margin-top: 1rem;
}
.workqueue-subtabs {
  margin-top: 0.75rem;
}
.workqueue-table-wrap {
  margin-top: 0.75rem;
}
.workqueue-renewals-table th,
.workqueue-renewals-table td {
  font-size: 0.82rem;
  vertical-align: middle;
}
.workqueue-renewals-table .wq-col-flag {
  width: 4.5rem;
  text-align: center;
}
.workqueue-renewals-table .input-elegant,
.workqueue-renewals-table .input-select {
  min-width: 6.5rem;
  font-size: 0.82rem;
}
.wq-row-abandoned {
  opacity: 0.55;
  background: rgba(0, 0, 0, 0.03);
}
.wq-row-issued {
  background: rgba(46, 125, 50, 0.06);
}
.policy-card-renewal-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: #fff;
  margin-bottom: 0.25rem;
  box-shadow: 0 1px 4px rgba(245, 124, 0, 0.35);
}
.policy-card-in-renewal {
  border: 2px solid #ff9800 !important;
  box-shadow: 0 0 0 1px rgba(255, 152, 0, 0.25);
}
.policy-renewal-banner {
  margin: 0.5rem 0 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255, 152, 0, 0.18) 0%, rgba(255, 193, 7, 0.12) 100%);
  border: 1px solid rgba(255, 152, 0, 0.45);
  color: #e65100;
  font-size: 0.92rem;
}
.policy-renewal-banner .btn-link {
  margin-inline-start: 0.5rem;
  font-weight: 600;
}
.workqueue-empty {
  margin-top: 1rem;
}

/* ??? ??????? ?????? */
.policies-page-full .policies-tab {
  max-width: none;
}
.policies-agency-tab {
  max-width: none;
}
.policies-page-tabs {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}
.policies-page-toolbar {
  margin-bottom: 1rem;
}
.policies-page-toolbar .clients-toolbar-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.policies-page-filter {
  min-width: 8.5rem;
  font-size: 0.88rem;
}
.policies-page-full .policies-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.policy-card-end-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.policy-card-assignee {
  font-size: 0.78rem;
  margin-top: 0.1rem;
}
.policy-card-task-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  background: rgba(33, 150, 243, 0.14);
  color: #1565c0;
  margin-inline-start: 0.35rem;
  vertical-align: middle;
}




/* ???? ????? ???????? */
.video-room-body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #1e293b 0, #020617 54%, #000 100%);
  color: #f8fafc;
}
.video-room-shell {
  min-height: 100vh;
}
.video-room-lobby {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.video-room-card {
  width: min(28rem, 100%);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(147, 197, 253, 0.28);
  border-radius: 1.8rem;
  padding: 1.65rem;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.45);
  text-align: center;
}
.video-room-brand {
  color: #93c5fd;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.video-room-card h1,
.video-room-header h1 {
  margin: 0.3rem 0;
  color: #fff;
}
.video-room-card .form-field input {
  width: 100%;
  min-height: 3rem;
  border: 1px solid rgba(147, 197, 253, 0.38);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.7);
  color: #f8fafc;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.video-room-card .form-field input::placeholder {
  color: #94a3b8;
}
.video-room-name-field {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
  text-align: start;
}
.video-room-name-summary {
  display: grid;
  gap: 0.2rem;
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 1rem;
  background: rgba(37, 99, 235, 0.14);
  text-align: start;
}
.video-room-name-summary span {
  color: #bfdbfe;
  font-size: 0.82rem;
}
.video-room-name-summary strong {
  color: #fff;
  font-size: 1.05rem;
}
.video-room-lobby-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 1rem;
}
.video-room-lobby-actions .btn-primary,
.video-room-lobby-actions .btn-secondary,
.video-room-link-row .btn-primary,
.video-room-link-row .btn-secondary,
.pbx-video-room-link-row .btn-primary,
.pbx-video-room-link-row .btn-secondary,
.calendar-video-link-row .btn-primary,
.calendar-video-link-row .btn-secondary {
  min-height: 2.75rem;
  border-radius: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-weight: 700;
}
.video-room-link-box,
.pbx-video-room-link-card {
  display: grid;
  gap: 0.55rem;
  margin: 0.8rem 0;
  padding: 0.8rem;
  border: 1px solid rgba(96, 165, 250, 0.26);
  border-radius: 1rem;
  background: rgba(37, 99, 235, 0.1);
}
.video-room-link-row,
.pbx-video-room-link-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.video-room-link-row span,
.pbx-video-room-link-row span {
  font-weight: 700;
}
.calendar-page .settings-card {
  margin-bottom: 1rem;
}
.calendar-inner-tabs {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  align-items: stretch;
  padding: 0.35rem;
  margin: 0 0 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}
.calendar-inner-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.4rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  padding: 0.7rem 1.15rem;
  font-weight: 800;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
}
.calendar-inner-tab.active {
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}
.calendar-inner-panel.hidden {
  display: none;
}
.calendar-board-head,
.calendar-video-manager-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.calendar-month-nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.calendar-toolbar {
  display: grid;
  justify-items: end;
  gap: 0.65rem;
}
.calendar-view-tabs {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
}
.calendar-view-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  padding: 0.45rem 0.75rem;
  font-weight: 800;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
}
.calendar-view-tab.active {
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}
.calendar-create-panel {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 1rem;
  background: rgba(37, 99, 235, 0.05);
}
.calendar-create-panel.hidden {
  display: none;
}
.calendar-month-nav strong {
  min-width: 9rem;
  text-align: center;
  color: var(--text);
}
.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--border);
}
.calendar-week-view {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-day-view {
  grid-template-columns: 1fr;
}
.calendar-list-view {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  border: 0;
  background: transparent;
}
.calendar-month-head-cell {
  padding: 0.75rem;
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 800;
  text-align: center;
}
.calendar-month-cell {
  min-height: 8.75rem;
  padding: 0.65rem;
  background: #fff;
}
.calendar-month-cell.other-month {
  background: #f8fafc;
  color: var(--text-muted);
}
.calendar-month-cell.today {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.3);
}
.calendar-month-cell-date {
  font-weight: 800;
  margin-bottom: 0.45rem;
}
.calendar-month-cell-events {
  display: grid;
  gap: 0.35rem;
}
.calendar-month-event {
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 0.6rem;
  background: rgba(37, 99, 235, 0.08);
  color: var(--text);
  padding: 0.35rem 0.45rem;
  text-align: start;
  font-size: 0.78rem;
  cursor: pointer;
}
.calendar-month-event span {
  color: var(--accent);
  font-weight: 800;
  margin-inline-end: 0.25rem;
}
.calendar-month-event.is-video {
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.1);
}
.calendar-month-more {
  color: var(--text-muted);
  font-size: 0.78rem;
}
.calendar-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.calendar-video-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.calendar-video-room-output {
  margin-top: 1rem;
}
.calendar-video-room-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.03));
}
.calendar-video-link-row {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) auto auto;
  gap: 0.5rem;
  align-items: center;
}
.calendar-video-link-row span {
  font-weight: 800;
}
.calendar-video-link-row code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.5rem 0.65rem;
  border-radius: 0.65rem;
  background: #fff;
  border: 1px solid var(--border);
}
.calendar-events-list {
  display: grid;
  gap: 0.7rem;
}
.calendar-event-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem 0.75rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}
.calendar-event-card--compact {
  grid-template-columns: 1fr auto auto;
}
.calendar-delete-event {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.22);
}
.calendar-event-card div {
  display: grid;
  gap: 0.2rem;
}
.calendar-event-card small,
.calendar-event-card span {
  color: var(--text-muted);
}
.video-room-ended-card {
  text-align: center;
}
.video-room-stage {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.video-room-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(16px);
}
.video-room-header p {
  margin: 0;
  color: #cbd5e1;
}
.video-room-main {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr minmax(18rem, 22rem);
  gap: 0.8rem;
  padding: 0.8rem;
  overflow: hidden;
}
.video-room-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
  gap: 0.75rem;
  align-content: start;
  overflow: auto;
}
.video-room-tile {
  position: relative;
  overflow: hidden;
  height: clamp(14rem, 36vh, 24rem);
  min-height: 0;
  border-radius: 1.25rem;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.video-room-tile video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #020617;
}
.video-room-tile.is-local video {
  transform: scaleX(-1);
}
.video-room-tile-meta {
  position: absolute;
  inset: auto 0.65rem 0.65rem 0.65rem;
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #fff;
  font-size: 0.86rem;
}
.video-room-tile-meta span {
  color: #cbd5e1;
  font-size: 0.78rem;
}
.video-room-admin {
  min-height: 0;
  overflow: auto;
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0.9rem;
}
.video-room-admin h2 {
  margin: 0 0 0.8rem;
  font-size: 1rem;
}
.video-room-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  color: #e2e8f0;
}
.video-room-danger,
.video-room-control-danger {
  color: #fecdd3;
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.42);
}
.video-room-participants {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.9rem;
}
.video-room-participant {
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.9rem;
  background: rgba(2, 6, 23, 0.34);
}
.video-room-participant div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}
.video-room-participant button {
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
}
.video-room-controls {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem;
  background: rgba(2, 6, 23, 0.88);
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(16px);
}
.video-room-control {
  min-width: 7rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #f8fafc;
  padding: 0.7rem 0.95rem;
  font-weight: 700;
  cursor: pointer;
}
.video-room-control.is-active {
  background: #2563eb;
  border-color: #60a5fa;
}
.video-room-control:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
@media (max-width: 850px) {
  .video-room-main {
    grid-template-columns: 1fr;
    padding-bottom: 5.5rem;
    overflow: auto;
  }
  .video-room-grid {
    grid-template-columns: 1fr;
  }
  .video-room-tile {
    height: min(58vh, 28rem);
  }
  .video-room-admin {
    order: -1;
    max-height: 15rem;
  }
  .video-room-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .video-room-controls {
    flex-wrap: wrap;
  }
  .video-room-control {
    min-width: calc(50% - 0.5rem);
  }
  .video-room-lobby-actions {
    grid-template-columns: 1fr;
  }
  .calendar-board-head,
  .calendar-video-manager-head,
  .calendar-month-nav,
  .calendar-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .calendar-toolbar {
    justify-items: stretch;
  }
  .calendar-view-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-radius: 1rem;
  }
  .calendar-inner-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 1rem;
  }
  .calendar-inner-tab {
    padding-inline: 0.7rem;
  }
  .calendar-month-grid {
    grid-template-columns: 1fr;
  }
  .calendar-week-view {
    grid-template-columns: 1fr;
  }
  .calendar-month-head-cell {
    display: none;
  }
  .calendar-month-cell {
    min-height: auto;
  }
  .calendar-video-link-row {
    grid-template-columns: 1fr;
  }
}

/* ?? ???? ???? ?? */
.dc-landing h1 {
  margin: 0 0 0.25rem 0;
  font-size: 1.5rem;
}
.dc-landing-subtitle {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.dc-channels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.dc-channel-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  padding: 1.35rem 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.dc-channel-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}
.dc-channel-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.dc-channel-icon {
  font-size: 1.75rem;
  margin-bottom: 0.55rem;
  line-height: 1;
}
.dc-channel-title {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
  color: var(--text);
}
.dc-channel-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.35;
}
.dc-dropzone {
  border: 2px dashed rgba(37, 99, 235, 0.35);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(37, 99, 235, 0.04), rgba(255, 255, 255, 0.9));
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.dc-dropzone:hover,
.dc-dropzone:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.dc-dropzone--active {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.dc-dropzone-inner {
  text-align: center;
  padding: 1.5rem;
  pointer-events: none;
}
.dc-dropzone-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.75rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 700;
}
.dc-dropzone-title {
  margin: 0 0 0.35rem;
  font-weight: 600;
  font-size: 1.05rem;
}
.dc-dropzone-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.dc-dropzone-file-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.dc-dropzone-file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: #fff;
}
.dc-dropzone-file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.dc-dropzone-file-size {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.dc-dropzone-remove {
  flex-shrink: 0;
}

/* —— דאטה סנטר — workspace —— */
.dc-workspace-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: calc(100vh - 8rem);
}
.dc-workspace-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.dc-workspace-head h1 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}
.dc-workspace-head-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.dc-upload-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.dc-workspace-grid {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 1rem;
  flex: 1;
  align-items: start;
}
.dc-workspace-grid--tik,
.dc-workspace-grid--policy-copies {
  grid-template-columns: minmax(280px, 360px) 1fr;
}
.dc-panel--wide {
  grid-column: 2;
  grid-row: 1 / span 2;
}
.dc-workspace-grid--policy-copies {
  grid-template-columns: 1fr 1fr;
}
.dc-workspace-grid--policy-copies .dc-panel--wide {
  grid-column: 1 / -1;
  grid-row: auto;
}
@media (max-width: 960px) {
  .dc-workspace-grid,
  .dc-workspace-grid--tik,
  .dc-workspace-grid--policy-copies {
    grid-template-columns: 1fr;
  }
  .dc-panel--wide {
    grid-column: 1;
    grid-row: auto;
  }
}
.dc-batch-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.dc-batch-item {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
}
.dc-batch-link {
  flex: 1;
  text-align: right;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: #fff;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.dc-batch-link:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}
.dc-batch-name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dc-batch-meta {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.dc-table-wrap {
  min-height: 120px;
}
.dc-table-scroll {
  overflow: auto;
  max-height: min(60vh, 520px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
}
.dc-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.dc-data-table th,
.dc-data-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-align: right;
  white-space: nowrap;
}
.dc-data-table th {
  background: rgba(37, 99, 235, 0.06);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}
.dc-data-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.03);
}
.dc-preview-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.dc-stat {
  display: inline-flex;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}
.dc-match-hint {
  margin-bottom: 0.5rem;
}
.dc-match-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}
.dc-match-badge--ok {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}
.dc-match-badge--none {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-muted);
}
.dc-connection-card {
  padding: 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(255, 255, 255, 0.9));
  border: 1px dashed rgba(37, 99, 235, 0.25);
}
.dc-connection-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.dc-connection-badge--pending {
  background: rgba(234, 179, 8, 0.15);
  color: #a16207;
}
.dc-gemini-pill {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.dc-gemini-pill--ok {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}
.dc-gemini-pill--warn {
  background: rgba(234, 179, 8, 0.15);
  color: #a16207;
}
.dc-analyze-btn {
  margin-top: 0.75rem;
  width: 100%;
}
.dc-analysis-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.dc-analysis-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  border: 1.5px solid #94a3b8;
  border-radius: 12px;
  background: #fff;
  padding: 0.7rem 0.85rem;
}
.dc-analysis-main {
  flex: 1;
  min-width: 140px;
}
.dc-analysis-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.dc-analysis-actions .dc-analysis-action-btn,
.dc-analysis-actions .btn-elegant.btn-sm,
.dc-analysis-actions .btn-sm {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 2.25rem !important;
  height: 2.25rem !important;
  min-width: 4.75rem;
  margin: 0 !important;
  padding: 0.35rem 0.85rem !important;
  border-radius: 10px !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
  transform: none !important;
  vertical-align: middle;
}
.dc-analysis-actions .btn-primary.dc-analysis-action-btn,
.dc-analysis-actions .dc-analysis-open {
  background: var(--accent, #0d9488) !important;
  color: var(--btn-on-accent, #fff) !important;
  border: 1.5px solid transparent !important;
  box-shadow: none !important;
}
.dc-analysis-actions .btn-secondary.dc-analysis-action-btn {
  background: #fff !important;
  color: #0f172a !important;
  border: 1.5px solid #64748b !important;
  box-shadow: none !important;
}
.dc-analysis-actions .dc-analysis-delete {
  min-width: 2.25rem !important;
  width: 2.25rem !important;
  padding: 0 !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  background: #fff !important;
  border: 1.5px solid #64748b !important;
}
.dc-analysis-policy-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.dc-analysis-policy-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 20;
  min-width: 12rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.35rem;
  border: 1.5px solid #94a3b8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.dc-analysis-policy-menu button {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: right;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
  color: #0f172a;
}
.dc-analysis-policy-menu button:hover {
  background: var(--bg-muted, #f3f4f6);
}
.dc-analysis-files {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: #0f172a;
}
.dc-analysis-status {
  display: block;
  font-size: 0.78rem;
  color: #475569;
  margin-top: 0.15rem;
}
.dc-analysis-error-hint {
  max-width: 14rem;
  font-size: 0.78rem;
}
.dc-companies-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.dc-company-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
}
.dc-company-chip:has(input:checked) {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
}
.dc-policy-copies-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}
.dc-source-list {
  margin: 0;
  padding-right: 1.1rem;
  font-size: 0.88rem;
}
/* חלונית בדיקה ואישור — גודל מסך קבוע, לא דינמי לפי תוכן */
#dc-review-modal.dc-review-overlay {
  padding: 0.75rem;
  align-items: stretch;
  justify-content: stretch;
  z-index: 120;
}
.dc-review-modal-inner.modal {
  max-width: none;
  width: 100%;
  height: calc(100vh - 1.5rem);
  max-height: calc(100vh - 1.5rem);
  margin: 0;
  padding: 1rem 1.25rem 1rem;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}
.dc-review-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  margin-bottom: 0.65rem;
}
.dc-review-layout.is-resizing {
  cursor: col-resize;
  user-select: none;
}
.dc-review-layout.is-resizing iframe,
.dc-review-layout.is-resizing img {
  pointer-events: none;
}
.dc-review-layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  --dc-form-pct: 67%;
}
.dc-review-form-col {
  flex: 0 0 var(--dc-form-pct);
  width: var(--dc-form-pct);
  max-width: 78%;
  min-width: 22%;
  min-height: 0;
  height: 100%;
  overflow: auto;
  padding: 0.15rem 0.55rem 0.15rem 0.15rem;
  box-sizing: border-box;
}
.dc-review-splitter {
  flex: 0 0 10px;
  width: 10px;
  margin: 0 2px;
  align-self: stretch;
  cursor: col-resize;
  position: relative;
  touch-action: none;
  background: transparent;
  border: 0;
  padding: 0;
}
.dc-review-splitter::before {
  content: '';
  position: absolute;
  inset: 0.35rem 3px;
  border-radius: 999px;
  background: #64748b;
  opacity: 0.55;
  transition: opacity 0.15s, background 0.15s;
}
.dc-review-splitter:hover::before,
.dc-review-splitter:focus-visible::before,
.dc-review-layout.is-resizing .dc-review-splitter::before {
  opacity: 1;
  background: var(--accent, #2563eb);
}
.dc-review-preview-col {
  flex: 1 1 auto;
  min-width: 18%;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  border-inline-start: 2px solid #94a3b8;
  padding-inline-start: 0.75rem;
  overflow: hidden;
  box-sizing: border-box;
}
.dc-preview-file-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
}
.dc-preview-file-tab {
  appearance: none;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1.5px solid #94a3b8;
  border-radius: 999px;
  background: #fff;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  color: inherit;
}
.dc-preview-file-tab:hover {
  border-color: var(--accent, #2563eb);
}
.dc-preview-file-tab.active {
  background: var(--accent, #2563eb);
  border-color: var(--accent, #2563eb);
  color: #fff;
  font-weight: 600;
}
.dc-file-preview-block {
  border: 1.5px solid #94a3b8;
  border-radius: 12px;
  background: #fafafa;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
}
.dc-file-preview-head {
  padding: 0.55rem 0.75rem;
  border-bottom: 1.5px solid #94a3b8;
  background: #fff;
  font-size: 0.88rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.dc-file-frame {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}
.dc-file-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
.dc-file-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex: 1;
  min-height: 16rem;
  padding: 1.25rem;
  color: var(--text-muted);
}
.dc-summary-modal-inner {
  max-width: min(720px, 96vw);
}
.dc-summary-policy-list {
  margin: 0.35rem 0 0;
  padding-right: 1.2rem;
}
.dc-choice-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.dc-choice-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  max-width: 100%;
}
.dc-choice-btn {
  appearance: none;
  flex: 0 0 auto;
  min-height: 2.35rem;
  border: 1.5px solid #94a3b8;
  border-radius: 10px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.dc-choice-btn:hover {
  border-color: var(--accent, #2563eb);
}
.dc-choice-btn.active {
  background: var(--accent, #2563eb);
  border-color: var(--accent, #2563eb);
  color: #fff;
  font-weight: 600;
}
.dc-choice-btn:disabled {
  opacity: 0.65;
  cursor: default;
}
.dc-review-policy-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1.5px solid #94a3b8;
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg-card, #fff);
}
.dc-review-policy-tab {
  appearance: none;
  min-height: 2.35rem;
  border: 1.5px solid #64748b;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
}
.dc-review-policy-tab:hover {
  border-color: var(--accent, #0d9488);
}
.dc-review-policy-tab.active {
  background: var(--accent, #0d9488);
  border-color: var(--accent, #0d9488);
  color: #fff;
}
.dc-review-policy-shell {
  min-height: 0;
}
.dc-review-content-tabs {
  margin-top: 0.25rem;
}
.dc-review-toptabs,
.dc-review-subtabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  border-bottom: 1.5px solid #94a3b8;
  padding-bottom: 0.5rem;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-card, #fff);
}
.dc-review-toptab,
.dc-review-subtab {
  appearance: none;
  flex: 0 0 auto;
  min-height: 2.2rem;
  border: 1.5px solid #cbd5e1;
  background: #fff;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  color: inherit;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
}
.dc-review-toptab.active,
.dc-review-subtab.active {
  background: var(--bg-muted, #f3f4f6);
  border-color: #64748b;
  font-weight: 600;
}
.dc-review-panel {
  min-height: 0;
}
.dc-review-policy-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.dc-review-external-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}
.dc-review-subhead {
  margin: 1rem 0 0.5rem;
  font-size: 0.95rem;
}
.dc-doc-pol-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.dc-doc-pol-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  border: 1.5px solid #94a3b8;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}
.dc-review-section {
  margin-bottom: 1.25rem;
}
.dc-review-section h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}
.dc-review-summary {
  margin: 0;
  line-height: 1.55;
}
.dc-review-summary--hero {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.65;
  color: var(--text, #111827);
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1.5px solid #94a3b8;
}
.dc-review-summary-meta {
  margin: 0.65rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.dc-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}
.dc-review-grid label,
.dc-review-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
}
.dc-review-field--full {
  grid-column: 1 / -1;
}
.dc-review-card {
  border: 1.5px solid #94a3b8;
  border-radius: 12px;
  padding: 0.85rem;
  margin-bottom: 0.75rem;
  background: var(--bg-card, #fff);
}
.dc-review-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.dc-review-coverages {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}
.dc-review-coverages h4 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}
.dc-review-coverages ul {
  margin: 0;
  padding-right: 1.1rem;
}
.dc-review-warnings {
  margin: 0.5rem 0 0;
  padding-right: 1.2rem;
  color: #b45309;
  font-size: 0.85rem;
}
.dc-review-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-shrink: 0;
  padding-top: 0.85rem;
  border-top: 1.5px solid #94a3b8;
  width: 100%;
  box-sizing: border-box;
}
.dc-review-actions .dc-review-action-btn,
#dc-review-modal .dc-review-actions button.dc-review-action-btn {
  margin: 0 !important;
  width: 100% !important;
  flex: none !important;
  min-height: 2.85rem !important;
  height: 2.85rem !important;
  padding: 0.7rem 1rem !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.2 !important;
  transform: none !important;
  opacity: 1 !important;
}
.dc-review-actions .dc-review-action-btn:hover {
  transform: none !important;
  opacity: 1 !important;
}
#dc-review-modal .dc-review-actions button.btn-secondary.dc-review-action-btn,
#dc-review-modal .dc-review-actions button[type="button"].btn-secondary {
  border: 1.5px solid #475569 !important;
  background: #fff !important;
  color: #0f172a !important;
  box-shadow: none !important;
}
#dc-review-modal .dc-review-actions button.btn-primary.dc-review-action-btn {
  border: 1.5px solid transparent !important;
  background: var(--accent, #0d9488) !important;
  color: var(--btn-on-accent, #fff) !important;
}
.dc-review-actions .dc-review-action-btn.hidden {
  display: none !important;
}
.dc-review-actions:has(#dc-review-apply.hidden) {
  grid-template-columns: 1fr;
}

/* ניגודיות חזקה בתוך חלונית הבדיקה */
#dc-review-modal .dc-review-modal-head h2,
#dc-review-modal .dc-review-field,
#dc-review-modal .dc-review-field > span,
#dc-review-modal .dc-choice-label,
#dc-review-modal label,
#dc-review-modal .dc-review-subhead,
#dc-review-modal .dc-review-panel h3,
#dc-review-modal .dc-file-preview-head,
#dc-review-modal .dc-data-table th,
#dc-review-modal .dc-data-table td {
  color: #0f172a;
}
#dc-review-modal .form-hint,
#dc-review-modal #dc-review-modal-hint {
  color: #475569;
}
#dc-review-modal .search-input,
#dc-review-modal input.search-input,
#dc-review-modal select.search-input,
#dc-review-modal textarea.search-input,
#dc-review-modal .dc-review-grid input,
#dc-review-modal .dc-review-grid select,
#dc-review-modal .dc-review-grid textarea,
#dc-review-modal .dc-data-table input {
  border: 1.5px solid #64748b !important;
  background: #fff !important;
  color: #0f172a !important;
  opacity: 1 !important;
  margin-bottom: 0 !important;
}
#dc-review-modal .dc-data-table {
  border: 1.5px solid #94a3b8;
  border-collapse: collapse;
}
#dc-review-modal .dc-data-table th,
#dc-review-modal .dc-data-table td {
  border: 1px solid #94a3b8;
  padding: 0.45rem 0.55rem;
}
#dc-review-modal #dc-review-cancel-x {
  border: 1.5px solid #64748b !important;
  background: #fff !important;
  color: #0f172a !important;
  min-width: 2.25rem;
  min-height: 2.25rem;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0.25rem 0.55rem !important;
}

@media (max-width: 700px) {
  #dc-review-modal.dc-review-overlay {
    padding: 0;
  }
  .dc-review-modal-inner.modal {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  /* גם במובייל נשארים זה לצד זה עם גלילה אופקית קלה */
  .dc-review-layout {
    flex-direction: row;
    min-width: 640px;
  }
  #dc-review-modal .dc-review-modal-inner {
    overflow-x: auto;
  }
}
.client-policies-subtabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  max-width: 100%;
}
.client-policies-subtab {
  appearance: none;
  flex: 0 0 auto;
  min-height: 2rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: var(--text-muted, #64748b);
  padding: 0.35rem 0.85rem;
  border-radius: 9px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}
.client-policies-subtab:hover {
  border-color: rgba(13, 148, 136, 0.35);
  color: var(--accent, #0d9488);
  background: rgba(13, 148, 136, 0.06);
}
.client-policies-subtab.active {
  border-color: rgba(13, 148, 136, 0.4);
  background: rgba(13, 148, 136, 0.12);
  color: var(--accent, #0d9488);
  font-weight: 600;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.1);
}
.policy-card-badge-external {
  display: inline-block;
  margin-inline-start: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  font-size: 0.72rem;
  background: #fef3c7;
  color: #92400e;
}
@media (max-width: 800px) {
  .dc-review-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .dc-review-grid {
    grid-template-columns: 1fr;
  }
}
/* ??? ???????? / ???? ??? */
.inv-panel { display: flex; flex-direction: column; gap: 1rem; }
.inv-panel-head {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem;
}
.inv-panel-head h3 { margin: 0; font-size: 1.15rem; }
.inv-table-wrap {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: auto;
  background: var(--bg-card, #fff);
}
.inv-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.inv-table th, .inv-table td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border);
  text-align: right;
  vertical-align: middle;
}
.inv-table thead th {
  background: var(--bg-secondary, rgba(0,0,0,0.03));
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}
.inv-table tbody tr:last-child td { border-bottom: none; }
.inv-mono { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.inv-row-actions { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; }
.inv-badge {
  display: inline-flex; align-items: center;
  font-size: 0.72rem; font-weight: 600;
  padding: 0.15rem 0.5rem; border-radius: 999px;
  border: 1px solid var(--border);
}
.inv-badge--ok { background: rgba(15,118,110,0.1); color: #0f766e; border-color: rgba(15,118,110,0.25); }
.inv-badge--cancelled { background: rgba(185,28,28,0.08); color: #b91c1c; border-color: rgba(185,28,28,0.2); }
.inv-badge--pending { background: rgba(161,98,7,0.1); color: #a16207; border-color: rgba(161,98,7,0.25); }
.inv-empty { padding: 1.5rem; text-align: center; }
.inv-issue-modal-inner {
  width: min(1080px, calc(100vw - 2rem));
  max-width: 1080px !important;
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1);
}
.inv-issue-modal-inner .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.07) 0%, rgba(13, 148, 136, 0.02) 100%);
}
.inv-issue-modal-inner .modal-header h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent, #0d9488);
}
.inv-issue-modal-inner .modal-close {
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  width: 2rem;
  height: 2rem;
  line-height: 1;
}
.inv-issue-modal-inner .modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(13, 148, 136, 0.06);
}
.inv-issue-modal-inner .modal-footer {
  margin: 0;
  padding: 0.85rem 1.25rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg-card, #fff);
  box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.04);
}
.inv-issue-modal-inner .app-notice-modal-actions--confirm .btn-elegant {
  min-height: 2.5rem;
  font-weight: 600;
  border-radius: 10px;
}
.inv-issue-modal-inner .app-notice-modal-actions--confirm .btn-primary.btn-elegant {
  background: var(--accent, #0d9488) !important;
  border: 1px solid var(--accent, #0d9488) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.28);
}
.inv-issue-modal-inner .app-notice-modal-actions--confirm .btn-primary.btn-elegant:hover {
  background: var(--accent-dim, #0f766e) !important;
  border-color: var(--accent-dim, #0f766e) !important;
}
.inv-issue-modal-inner .app-notice-modal-actions--confirm .btn-secondary.btn-elegant {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
.inv-issue-modal-inner .app-notice-modal-actions--confirm .btn-secondary.btn-elegant:hover {
  border-color: var(--accent, #0d9488) !important;
  color: var(--accent, #0d9488) !important;
  background: rgba(13, 148, 136, 0.06) !important;
}
.inv-issue-body { overflow: auto; display: flex; flex-direction: column; gap: 0; flex: 1; min-height: 0; padding: 1rem 1.25rem; }
.inv-issue-grid {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 1.25rem 1.5rem;
  align-items: start;
  min-height: 0;
}
.inv-issue-side {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.03) 0%, transparent 100%);
  border-radius: 12px;
  padding: 0.75rem 0 0.75rem 1rem;
}
.inv-issue-side .form-row > label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.inv-issue-main {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  min-height: 0;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
}
.inv-issue-main .inv-lines-head h3 {
  color: var(--accent, #0d9488);
  font-weight: 600;
}
.inv-pay-block { margin-bottom: 0; }
.inv-pay-segment {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 0.5rem;
  margin-top: 0.35rem;
  width: fit-content;
  max-width: 100%;
}
.inv-pay-option {
  position: relative;
  margin: 0;
  cursor: pointer;
}
.inv-pay-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.inv-pay-option-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 3.25rem;
  min-width: 8.5rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-secondary, #f8fafc);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  text-align: center;
  box-sizing: border-box;
}
.inv-pay-option-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}
.inv-pay-option-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-height: 1.05em;
}
.inv-pay-option:has(input:checked) .inv-pay-option-inner {
  border-color: var(--accent, #0d9488);
  background: rgba(13, 148, 136, 0.08);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}
.inv-pay-option:has(input:checked) .inv-pay-option-title {
  color: var(--accent, #0d9488);
}
.inv-pay-hint {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
}
.inv-card-select { margin-top: 0.5rem; }
.inv-pay-row { display: none; }
.inv-issue-main .inv-lines {
  max-height: min(36vh, 280px);
  overflow-y: auto;
  padding-left: 2px;
}
.inv-product-picker-modal {
  width: min(720px, calc(100vw - 2rem));
  max-width: 720px;
}
.inv-product-picker-modal .modal-header h2 { color: var(--accent, #0d9488); }
.inv-product-picker-modal .app-notice-modal-actions .btn-secondary {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
.inv-product-picker-body { padding: 0.25rem 0; }
.inv-product-picker-table-wrap { max-height: min(50vh, 360px); overflow: auto; }
.inv-product-picker-table th:last-child,
.inv-product-picker-table td:last-child { width: 5rem; text-align: center; }
.inv-product-picker-table td:nth-child(2),
.inv-product-picker-table td:nth-child(3) { white-space: nowrap; direction: ltr; text-align: left; }
.inv-lines-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.inv-lines-head h3 { margin: 0; font-size: 1rem; }
.inv-lines-tools { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.inv-lines { display: flex; flex-direction: column; gap: 0.4rem; }
.inv-line-row { display: grid; grid-template-columns: 1fr 5rem 7rem 2.25rem; gap: 0.5rem; align-items: center; }
.inv-preview {
  border: 1px solid rgba(13, 148, 136, 0.22);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.05) 0%, rgba(13, 148, 136, 0.02) 100%);
}
.inv-preview-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  align-items: center;
  font-size: 0.92rem;
}
.inv-preview-total { color: var(--accent, #0d9488); font-size: 1.08rem; font-weight: 700; }
.inv-lines-tools .btn-elegant.btn-sm {
  border-radius: 9px;
  font-size: 0.82rem;
  padding: 0.35rem 0.65rem;
}
.inv-collections-page { display: flex; flex-direction: column; gap: 1rem; padding-bottom: 2rem; }
.inv-collections-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 0.75rem;
}
.inv-collections-head h1 { margin: 0; font-size: 1.5rem; }
.inv-collections-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.inv-filters {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
}
.inv-filters .input-elegant { max-width: 12rem; }
.inv-filters input[type="search"] { max-width: 16rem; flex: 1; }
.inv-locks-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: var(--bg-card, #fff);
}
.inv-locks-card h3 { margin: 0 0 0.6rem; font-size: 1rem; }
.inv-locks-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.6rem; }
.inv-locks-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.inv-locks-list li { display: flex; justify-content: space-between; gap: 0.75rem; align-items: center; }
.inv-settings-seq-title { margin: 1rem 0 0.5rem; font-size: 1rem; }
.inv-settings-seq-grid { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1rem; }
.inv-seq-row {
  display: grid;
  grid-template-columns: 9rem 1fr 5.5rem;
  gap: 0.4rem;
  align-items: center;
}
.inv-seq-label { font-size: 0.85rem; color: var(--text-muted); }
.inv-collections-subtabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.75rem;
}
.inv-collections-subtab {
  flex: 0 0 auto;
  min-height: 2rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
  color: var(--text);
}
.inv-collections-subtab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 600;
}
.inv-books-mgmt { display: flex; flex-direction: column; gap: 1.25rem; padding: 0 1rem 2rem; }
.inv-books-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.inv-books-kind-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}
.inv-books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.75rem; margin-top: 0.75rem; }
.inv-book-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  background: var(--bg);
}
.inv-book-card--active { border-color: var(--primary); box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 25%, transparent); }
.inv-book-card-head { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin-bottom: 0.5rem; }
.inv-book-meta { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.6rem; }
.inv-book-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.agency-agent-signature-block { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.agency-agent-field-label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.agency-agent-signature-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.agency-agent-signature-preview {
  min-width: 160px; min-height: 72px; border: 1px dashed var(--border); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; padding: 0.5rem; background: var(--bg);
}
.agency-agent-signature-preview img { max-height: 64px; max-width: 200px; object-fit: contain; }
.agency-agent-signature-placeholder { font-size: 0.85rem; color: var(--text-muted); }
.agency-agent-signature-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.inv-products-panel { display: flex; flex-direction: column; gap: 0.75rem; }
.inv-products-list { display: flex; flex-direction: column; gap: 0.5rem; max-height: 320px; overflow: auto; }
.inv-product-row {
  display: grid; grid-template-columns: 1fr 72px 100px auto; gap: 0.5rem; align-items: center;
  padding: 0.5rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
}
.inv-product-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.25rem; }
.inv-product-chip {
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  color: var(--text);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.inv-product-chip:hover { background: color-mix(in srgb, var(--primary) 16%, var(--surface)); border-color: var(--primary); }
@media (max-width: 900px) {
  .inv-issue-grid { grid-template-columns: 1fr; }
  .inv-issue-side {
    padding-left: 0;
    border-left: none;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
  }
  .inv-pay-segment { grid-template-columns: auto auto; }
}
@media (max-width: 720px) {
  .inv-line-row { grid-template-columns: 1fr 1fr; }
  .inv-seq-row { grid-template-columns: 1fr; }
  .inv-product-row { grid-template-columns: 1fr; }
}

/* ???? ????? ?????? ? ????? */
.eib-mgmt-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: none;
  padding-bottom: 2rem;
}
.eib-page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem 1rem;
  margin: 0 0 0.25rem;
}
.eib-head-text { flex: 1 1 14rem; min-width: 0; }
.eib-head-text h1 { margin: 0 0 0.35rem; font-size: 1.35rem; }
.eib-head-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
  flex: 1 1 18rem;
  justify-content: flex-end;
  min-width: 0;
}
.eib-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 16rem;
  min-width: 0;
}
.eib-filter-select { min-width: 8.5rem; max-width: 12rem; }
.eib-search { flex: 1 1 10rem; min-width: 9rem; max-width: 18rem; }
.eib-active-only { font-size: 0.85rem; white-space: nowrap; }
.eib-head-actions { display: inline-flex; flex-wrap: wrap; gap: 0.45rem; flex-shrink: 0; }
.eib-info-card {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  background: color-mix(in srgb, var(--primary) 4%, var(--surface));
}
.eib-table-wrap {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: auto;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.eib-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.eib-table th,
.eib-table td { padding: 0.55rem 0.65rem; border-bottom: 1px solid var(--border); text-align: right; vertical-align: middle; }
.eib-table th { background: var(--bg); font-weight: 600; font-size: 0.8rem; color: var(--text-muted); position: sticky; top: 0; z-index: 1; }
.eib-table tbody tr:hover { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.eib-row--inactive { opacity: 0.72; }
.eib-mono { font-family: ui-monospace, monospace; font-size: 0.82rem; direction: ltr; text-align: left; }
.eib-name-cell { display: flex; flex-direction: column; gap: 0.15rem; }
.eib-tariff { font-size: 0.8rem; color: var(--text-muted); }
.eib-dates { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; }
.eib-actions { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: flex-end; }
.eib-badge { display: inline-block; padding: 0.12rem 0.45rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.eib-badge--on { background: color-mix(in srgb, #16a34a 18%, transparent); color: #15803d; }
.eib-badge--off { background: color-mix(in srgb, #94a3b8 22%, transparent); color: #64748b; }
.eib-empty { padding: 2rem 1rem; text-align: center; }
.eib-branch-modal { max-width: 36rem; width: min(96vw, 36rem); }
.eib-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.eib-modal-head h3 { margin: 0; font-size: 1.1rem; }
.eib-modal-body { display: flex; flex-direction: column; gap: 0.35rem; max-height: min(70vh, 32rem); overflow: auto; }
.eib-modal-foot { display: flex; justify-content: flex-end; margin-top: 0.85rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.eib-cov-modal { max-width: min(96vw, 56rem); width: 56rem; }
@media (max-width: 900px) {
  .eib-head-tools { justify-content: stretch; }
  .eib-filters { flex-direction: column; align-items: stretch; }
  .eib-filter-select, .eib-search { max-width: none; width: 100%; }
  .eib-actions .btn-sm { padding: 0.25rem 0.4rem; font-size: 0.75rem; }
}

/* ===== ???? ????? (?????) ===== */
.inquiry-hub--mgmt,
.inquiry-hub--mine {
  max-width: none;
  margin: 0;
  padding: 0.75rem 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: calc(100vh - 7.5rem);
  box-sizing: border-box;
}
.inquiry-hub-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  padding: 1.15rem 1.35rem;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.09) 0%, rgba(255, 255, 255, 0.95) 45%, #fff 100%),
    radial-gradient(ellipse at 0% 0%, rgba(30, 58, 95, 0.07), transparent 55%);
  border: 1px solid var(--border);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.06);
}
.inquiry-hub-head h1 {
  margin: 0 0 0.3rem;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.inquiry-hub-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.inquiry-hub-head-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.inquiry-hub-refresh-btn {
  width: 2.35rem;
  min-width: 2.35rem;
  padding: 0.4rem;
  font-size: 1.1rem;
  line-height: 1;
}
.inquiry-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}
.inquiry-stat-card {
  border: 1px solid var(--border);
  background: var(--bg-card, #fff);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  text-align: start;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font: inherit;
  color: inherit;
}
.inquiry-stat-card:hover {
  border-color: var(--accent, #2563eb);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}
.inquiry-stat-card.is-active {
  border-color: var(--accent, #2563eb);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #2563eb) 22%, transparent);
}
.inquiry-stat-icon {
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.9;
}
.inquiry-stat-value {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}
.inquiry-stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.inquiry-stat-card--accent .inquiry-stat-value { color: var(--accent, #2563eb); }
.inquiry-stat-card--progress .inquiry-stat-value { color: #7c3aed; }
.inquiry-stat-card--danger .inquiry-stat-value { color: var(--error, #dc2626); }
.inquiry-stat-card--warn .inquiry-stat-value { color: var(--warning, #d97706); }

.inquiry-routing-drawer {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card, #fff);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  animation: inquiry-drawer-in 0.2s ease-out;
}
@keyframes inquiry-drawer-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.inquiry-routing-drawer-inner { padding: 1rem 1.15rem 1.15rem; }
.inquiry-routing-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.inquiry-routing-drawer-head h3 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.inquiry-routing-form--grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  align-items: start;
}
.inquiry-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.inquiry-field--full { grid-column: 1 / -1; }
.inquiry-field--toggle {
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  padding-top: 1.4rem;
}
.inquiry-field-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.inquiry-routing-save-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.25rem;
}
.inquiry-rr-users {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.35rem 0 0.65rem;
}
.inquiry-rr-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5.5rem auto;
  gap: 0.45rem;
  align-items: end;
}
.inquiry-rr-weight-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
}

.inquiry-main-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.inquiry-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}
.inquiry-filters-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
  flex: 1 1 28rem;
  min-width: 0;
}
.inquiry-filter-field--search { grid-column: span 1; }
.inquiry-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex-shrink: 0;
}

.inquiry-table-wrap {
  flex: 1;
  min-height: 14rem;
  max-height: min(68vh, 46rem);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.inquiry-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.inquiry-table th {
  text-align: start;
  padding: 0.72rem 0.85rem;
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}
.inquiry-table td {
  padding: 0.68rem 0.85rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
  vertical-align: middle;
}
.inquiry-table tbody tr {
  transition: background 0.12s;
}
.inquiry-table tbody tr:hover {
  background: color-mix(in srgb, var(--accent, #2563eb) 5%, transparent);
}
.inquiry-table-loading,
.inquiry-table-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem !important;
}
.inquiry-th-actions { text-align: end; width: 11rem; }
.inquiry-cell-subject { max-width: 16rem; }
.inquiry-cell-subject strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.inquiry-cell-subject span {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.inquiry-cell-contact strong { font-weight: 600; }
.inquiry-cell-contact .inquiry-contact-line {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}
.inquiry-cell-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.inquiry-assignee-cell {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.inquiry-avatar {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.inquiry-assignee-name {
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 7rem;
}

.inquiry-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.inquiry-pill--new { background: #dbeafe; color: #1d4ed8; }
.inquiry-pill--progress { background: #ede9fe; color: #6d28d9; }
.inquiry-pill--done { background: #dcfce7; color: #15803d; }
.inquiry-pill--public { background: #e0f2fe; color: #0369a1; }
.inquiry-pill--portal { background: #fef3c7; color: #b45309; }
.inquiry-pill--route {
  background: #f1f5f9;
  color: #475569;
  font-weight: 500;
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inquiry-sla-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}
.inquiry-sla-badge--ok { background: #dcfce7; color: #15803d; }
.inquiry-sla-badge--warn { background: #fef3c7; color: #b45309; }
.inquiry-sla-badge--over { background: #fee2e2; color: #b91c1c; }

.inquiry-action-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: flex-end;
}
.inquiry-action-group .btn-sm {
  min-height: 1.85rem;
  padding: 0.22rem 0.55rem;
  font-size: 0.76rem;
}
.inquiry-action-group .inquiry-btn-reply {
  font-weight: 600;
}

.inquiry-empty {
  text-align: center;
  padding: 3rem 1.25rem 2.5rem;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: #fafbfc;
}
.inquiry-empty-icon { font-size: 2.5rem; margin-bottom: 0.5rem; opacity: 0.85; }
.inquiry-empty h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.inquiry-empty p { margin: 0; color: var(--text-muted); font-size: 0.9rem; max-width: 28rem; margin-inline: auto; }

.inquiry-detail-modal {
  max-width: min(96vw, 42rem);
  width: 42rem;
  border-radius: 16px;
}
.inquiry-detail-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: min(70vh, 30rem);
  overflow: auto;
}
.inquiry-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1rem;
  font-size: 0.88rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
}
.inquiry-detail-meta dt { color: var(--text-muted); margin: 0; }
.inquiry-detail-meta dd { margin: 0; font-weight: 500; }

/* ===== ??? ???? ?????? ===== */
.inquiry-reply-overlay {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}
.inquiry-reply-shell {
  width: 100%;
  max-width: none;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}
.inquiry-reply-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.1) 0%, rgba(255, 255, 255, 0.98) 50%, #fff 100%);
}
.inquiry-reply-head-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.inquiry-reply-head-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}
.inquiry-reply-head h2 {
  margin: 0 0 0.15rem;
  font-size: 1.35rem;
  font-weight: 700;
}
.inquiry-reply-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.inquiry-reply-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.inquiry-reply-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr);
  gap: 0;
}
.inquiry-reply-side {
  border-left: 1px solid var(--border);
  background: #f8fafc;
  overflow: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.inquiry-reply-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}
.inquiry-reply-card h3 {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  font-weight: 700;
}
.inquiry-reply-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 0.75rem;
  font-size: 0.84rem;
  margin: 0 0 0.75rem;
}
.inquiry-reply-meta dt { margin: 0; color: var(--text-muted); }
.inquiry-reply-meta dd { margin: 0; font-weight: 500; }
.inquiry-reply-original {
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
  max-height: 11rem;
  overflow: auto;
  padding: 0.75rem;
  border-radius: 10px;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #bfdbfe;
}
.inquiry-reply-history {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 16rem;
  overflow: auto;
}
.inquiry-reply-history-item {
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fafbfc;
  font-size: 0.82rem;
}
.inquiry-reply-history-item-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.74rem;
  margin-bottom: 0.3rem;
}
.inquiry-reply-compose {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1rem 1.25rem 1.25rem;
  background: #fff;
}
.inquiry-reply-channels {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  padding: 0.35rem;
  background: #f1f5f9;
  border-radius: 12px;
  width: fit-content;
  max-width: 100%;
}
.inquiry-reply-channel-btn {
  flex: 0 0 auto;
  min-height: 2.15rem;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  padding: 0.45rem 0.9rem;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
  color: var(--text);
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
}
.inquiry-reply-channel-btn:hover {
  background: rgba(255, 255, 255, 0.7);
}
.inquiry-reply-channel-btn.active {
  border-color: var(--border);
  background: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.inquiry-reply-channel-panel {
  flex: 1;
  min-height: 14rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  overflow: auto;
  padding: 0.25rem 0.15rem;
}
.inquiry-reply-channel-panel label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 500;
}
.inquiry-reply-channel-panel .wa-textarea,
.inquiry-reply-channel-panel .search-input {
  font-size: 0.92rem;
}
.inquiry-reply-channel-panel .wa-textarea {
  min-height: 11rem;
  flex: 1;
  resize: vertical;
}
.inquiry-reply-compose-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 1200px) {
  .inquiry-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inquiry-filters-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inquiry-routing-form--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .inquiry-hub--mgmt { padding: 0.5rem 0.65rem 1rem; }
  .inquiry-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inquiry-filters-grid { grid-template-columns: 1fr 1fr; }
  .inquiry-toolbar { flex-direction: column; align-items: stretch; }
  .inquiry-reply-body { grid-template-columns: 1fr; }
  .inquiry-reply-side {
    border-left: none;
    border-bottom: 1px solid var(--border);
    max-height: 40vh;
  }
  .inquiry-detail-meta { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .inquiry-stats-grid { grid-template-columns: 1fr 1fr; }
  .inquiry-filters-grid { grid-template-columns: 1fr; }
  .inquiry-routing-form--grid { grid-template-columns: 1fr; }
  .inquiry-action-group { justify-content: flex-start; }
}

/* —— PBX routing wizard —— */
.pbx-routing-wizard {
  margin: 1.25rem 0 2rem;
  padding: 1.25rem 1.35rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.02), rgba(99, 102, 241, 0.04));
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
}
.pbx-rw-hero {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.pbx-rw-hero-accent {
  width: 4px;
  min-height: 3.5rem;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), #818cf8);
  flex-shrink: 0;
}
.pbx-rw-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.pbx-rw-heading {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
}
.pbx-rw-steps {
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.pbx-rw-panels {
  min-height: 200px;
}
.pbx-rw-panel {
  animation: pbxRwFadeIn 0.22s ease;
}
@keyframes pbxRwFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.pbx-rw-stage-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.pbx-rw-stage-tree {
  position: sticky;
  top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface, #fff);
  padding: 0.75rem;
  max-height: calc(100vh - 8rem);
  overflow: auto;
}
.pbx-rw-tree-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.pbx-rw-tree-node {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: calc(100% - var(--pbx-rw-indent, 0px));
  margin-right: var(--pbx-rw-indent, 0px);
  margin-bottom: 0.35rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  text-align: right;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.pbx-rw-tree-node:hover {
  background: rgba(99, 102, 241, 0.06);
}
.pbx-rw-tree-node.is-active {
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.1);
}
.pbx-rw-tree-label {
  font-weight: 600;
  font-size: 0.92rem;
}
.pbx-rw-tree-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.pbx-rw-stage-body {
  min-width: 0;
}
.pbx-rw-step-hint {
  margin-bottom: 0.85rem;
}
.pbx-rw-form-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: var(--surface, #fff);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.pbx-rw-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}
.pbx-rw-form-grid.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.pbx-rw-entity-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}
.pbx-rw-entity-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: var(--surface, #fff);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.pbx-rw-entity-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pbx-rw-entity-badge {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
}
.pbx-rw-entity-remove {
  margin-right: auto;
}
.pbx-rw-add-btn {
  margin-bottom: 0.5rem;
}
.pbx-rw-per-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.pbx-rw-per-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.4rem;
}
.pbx-rw-per-row .search-input {
  max-width: 6rem;
}
.pbx-rw-review-card {
  margin-bottom: 1rem;
}
.pbx-rw-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}
.pbx-rw-review-tile {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: var(--surface, #fff);
}
.pbx-rw-review-kicker {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.pbx-rw-review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.pbx-rw-json-details {
  margin-top: 0.5rem;
}
.pbx-rw-json-details summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
#pbx-ivr-builder .pbx-ivr-row.pbx-rw-row-stage-active {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}
#pbx-ivr-builder .pbx-ivr-row.pbx-rw-row-stage-dim {
  opacity: 0.55;
}
.pbx-num-key.pbx-num-key--dtmf {
  background: rgba(99, 102, 241, 0.25);
  transform: scale(0.94);
}
@media (max-width: 900px) {
  .pbx-rw-stage-layout {
    grid-template-columns: 1fr;
  }
  .pbx-rw-stage-tree {
    position: static;
    max-height: none;
  }
}

/* —— IVR row labels (routing wizard) —— */
.pbx-rw-stage-banner {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.07), rgba(255, 255, 255, 0.5));
}
.pbx-rw-stage-banner-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.pbx-rw-stage-banner-kicker {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}
.pbx-rw-stage-banner-title {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.pbx-rw-stage-banner-hint {
  margin: 0;
  max-width: 52rem;
}
.pbx-rw-stage-banner-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.14);
  color: var(--primary);
  font-weight: 600;
}
.pbx-rw-stage-empty {
  margin: 0.5rem 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.02);
}
.pbx-ivr-row-head {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.pbx-ivr-row--invalid {
  border-color: #e57373 !important;
  background: rgba(229, 115, 115, 0.08);
  box-shadow: inset 0 0 0 1px rgba(229, 115, 115, 0.35);
}
.pbx-ivr-row-grid {
  display: grid;
  grid-template-columns: minmax(72px, 0.45fr) minmax(160px, 1fr) minmax(160px, 1.1fr);
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}
.pbx-ivr-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.pbx-ivr-field--grow {
  flex: 1;
}
.pbx-ivr-field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}
.pbx-ivr-detail-hint {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
}
#pbx-ivr-builder .pbx-ivr-row {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.65rem;
  background: var(--surface, #fff);
}
#pbx-ivr-builder .pbx-ivr-row.pbx-rw-row-stage-active {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}
#pbx-ivr-builder .pbx-ivr-row.pbx-rw-row-hidden {
  display: none !important;
}
.pbx-ivr-row-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
}
@media (max-width: 760px) {
  .pbx-ivr-row-grid,
  .pbx-ivr-row-summary {
    grid-template-columns: 1fr;
  }
}

/* Identified IVR / error / mandatory */
.pbx-route-mode-nav {
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.pbx-route-mode-panel {
  animation: pbxRwFadeIn 0.2s ease;
}
.pbx-rw-sim-card {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px dashed rgba(99, 102, 241, 0.35);
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.05);
}
.pbx-rw-sim-card strong {
  display: block;
  margin-bottom: 0.25rem;
}
.pbx-id-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}
.pbx-mandatory-gaps {
  margin-bottom: 0.85rem;
}
.pbx-id-row .pbx-ivr-row-grid {
  grid-template-columns: minmax(64px, 0.35fr) minmax(120px, 1fr) minmax(140px, 1.1fr) minmax(140px, 1fr) auto;
}
.pbx-ws-warn { color: #b45309; }
.pbx-ws-ok { color: #047857; }

/* ===== סריקת תנאים + הצעות מחיר ===== */
.ts-shell, .quotes-shell { display: flex; flex-direction: column; gap: 1rem; padding-bottom: 2rem; }
.ts-page-head, .quotes-page-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 1rem; align-items: flex-start; margin: 0; }
.ts-page-head h1, .quotes-page-head h1 { margin: 0 0 0.35rem; font-size: 1.35rem; }
.ts-inner-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.ts-inner-tab { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 0.4rem 0.95rem; cursor: pointer; font-size: 0.88rem; }
.ts-inner-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.ts-scan-card, .ts-product-card { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 1rem 1.1rem; }
.ts-drop { border: 1.5px dashed var(--border); border-radius: 12px; padding: 1.5rem 1rem; text-align: center; background: color-mix(in srgb, var(--primary) 4%, transparent); }
.ts-drop--over { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }
.ts-drop-title { margin: 0 0 0.35rem; font-weight: 600; }
.ts-file-list { list-style: none; margin: 0.75rem 0 0; padding: 0; text-align: right; font-size: 0.85rem; }
.ts-scan-actions, .ts-review-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 1rem; }
.ts-review-list { display: flex; flex-direction: column; gap: 0.85rem; }
.ts-product-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; align-items: flex-start; margin-bottom: 0.75rem; }
.ts-product-head h3 { margin: 0; font-size: 1.05rem; }
.ts-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.55rem 0.75rem; }
.ts-product-grid .form-row { margin: 0; }
.ts-cov-preview details { margin-bottom: 0.35rem; }
.ts-cov-preview ul.ts-cov-items { margin: 0.35rem 0 0; padding: 0; list-style: none; font-size: 0.82rem; }
.ts-cov-item {
  margin: 0 0 0.55rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--border, #d8dee8) 85%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface, #fff) 92%, #eef3f9);
}
.ts-cov-item-head { margin-bottom: 0.35rem; }
.ts-term-body {
  white-space: normal;
  line-height: 1.45;
  color: color-mix(in srgb, var(--text, #1a2332) 88%, transparent);
  font-size: 0.8rem;
}
.ts-term-missing {
  margin: 0;
  color: #a15c00;
  font-size: 0.78rem;
}
.ts-company-match { margin: 0.25rem 0 0; font-size: 0.85rem; color: #0f766e; }
.ts-warn-list {
  margin: 0.4rem 0 0;
  padding: 0 1rem 0 0;
  color: #a15c00;
  font-size: 0.8rem;
}
.ts-cov-wrap-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.ts-cov-wrap-head h4 { margin: 0; }
.ts-review-table-wrap {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: auto;
  background: var(--surface, #fff);
  max-height: min(70vh, 52rem);
}
.ts-review-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 960px;
}
.ts-review-table th,
.ts-review-table td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--border);
  text-align: right;
  vertical-align: top;
}
.ts-review-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: color-mix(in srgb, var(--bg, #f4f6f9) 92%, #dfe7f1);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}
.ts-th-check, .ts-td-check { width: 2.2rem; text-align: center; }
.ts-review-table .input-elegant,
.ts-review-table textarea.input-elegant {
  width: 100%;
  min-width: 0;
  font-size: 0.8rem;
  margin-top: 0.2rem;
}
.ts-review-table textarea.input-elegant {
  min-height: 4.2rem;
  resize: vertical;
  line-height: 1.4;
}
.ts-cov-cell { display: flex; flex-direction: column; gap: 0.25rem; min-width: 10rem; }
.ts-match {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.ts-match--ok { background: rgba(15,118,110,0.1); color: #0f766e; border-color: rgba(15,118,110,0.25); }
.ts-match--soft { background: rgba(161,98,7,0.1); color: #a16207; border-color: rgba(161,98,7,0.25); }
.ts-match--new { background: rgba(30,64,175,0.08); color: #1e40af; border-color: rgba(30,64,175,0.2); }
.ts-match-hint { font-size: 0.7rem; }
.ts-kinds-cell {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 7.5rem;
}
.ts-kinds-cell label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.ts-product-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1.1rem 1.15rem;
  margin-bottom: 1rem;
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--surface, #fff) 88%, #e8eef6), var(--surface, #fff));
  box-shadow: 0 1px 0 color-mix(in srgb, var(--border) 55%, transparent);
}
.ts-product-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}
.ts-product-head h3 { margin: 0 0 0.25rem; font-size: 1.15rem; }
.ts-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 0.85rem;
  margin-bottom: 0.65rem;
}
@media (max-width: 960px) {
  .ts-product-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .ts-product-grid { grid-template-columns: 1fr; }
}
.ts-table-wrap, .quotes-table-wrap, .quotes-cmp-table-wrap { border: 1px solid var(--border); border-radius: 12px; overflow: auto; background: var(--surface); }
.ts-table, .quotes-table, .quotes-cmp-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.ts-table th, .ts-table td, .quotes-table th, .quotes-table td, .quotes-cmp-table th, .quotes-cmp-table td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); text-align: right; }
.ts-table th, .quotes-table th, .quotes-cmp-table th { background: var(--bg); font-size: 0.78rem; color: var(--text-muted); }
.quotes-cmp-notes {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: color-mix(in srgb, var(--text, #1a2332) 82%, transparent);
  max-height: 9rem;
  overflow: auto;
}
.quotes-cmp-notes--empty { color: #a15c00; }
.quotes-cmp-side strong { display: block; margin-bottom: 0.15rem; }
.ts-actions, .quotes-actions { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: flex-end; }
.ts-badge { display: inline-block; padding: 0.12rem 0.45rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.ts-badge--draft { background: color-mix(in srgb, #ca8a04 18%, transparent); color: #a16207; }
.ts-badge--active { background: color-mix(in srgb, #16a34a 18%, transparent); color: #15803d; }
.ts-badge--old { background: color-mix(in srgb, #94a3b8 22%, transparent); color: #64748b; }
.ts-badge--rej { background: color-mix(in srgb, #dc2626 15%, transparent); color: #b91c1c; }
.ts-muted { color: var(--text-muted); font-size: 0.8rem; }
.ts-empty, .quotes-empty { padding: 2rem 1rem; text-align: center; }
.ts-ver-modal, .quotes-editor-modal { width: min(96vw, 52rem); max-height: min(90vh, 780px); display: flex; flex-direction: column; overflow: hidden; }
.ts-modal-head, .quotes-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.ts-modal-body, .quotes-modal-body { overflow: auto; flex: 1; min-height: 0; }
.quotes-modal-foot { display: flex; justify-content: flex-end; padding-top: 0.75rem; border-top: 1px solid var(--border); margin-top: 0.75rem; }
.quotes-head-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.quotes-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 0.65rem 0; }
.quotes-side { border: 1px solid var(--border); border-radius: 10px; padding: 0.65rem; background: var(--bg-secondary); display: flex; flex-direction: column; gap: 0.4rem; }
.quotes-side h5 { margin: 0 0 0.2rem; font-size: 0.88rem; }
.quotes-compare-box h4 { margin: 0.5rem 0; font-size: 0.95rem; }
.quotes-cmp-changed { background: color-mix(in srgb, #ca8a04 8%, transparent); }
.quotes-cmp-left_only { background: color-mix(in srgb, #2563eb 7%, transparent); }
.quotes-cmp-right_only { background: color-mix(in srgb, #16a34a 7%, transparent); }
.quotes-change-policy-block { max-width: 40rem; }
@media (max-width: 720px) {
  .quotes-sides { grid-template-columns: 1fr; }
  .ts-product-grid { grid-template-columns: 1fr; }
}
