@charset "UTF-8";
/* =======================================
   🔧 Global Utilities
   - Universal helper classes for visibility
   ======================================= */
.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Optional accessibility version (keep for screen readers) */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip-path: inset(100%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.8125rem;
  color: #111827;
  background-color: #F3F4F6;
  line-height: 1.5;
}

body[data-page=function-detail],
body.function-detail {
  background-color: #ffffff !important;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  color: #111827;
}

h1, h2, h3, h4, h5 {
  font-weight: 600;
  color: #111827;
  margin-bottom: 1.5rem;
}

.container {
  max-width: 1100px;
}

a {
  color: #6BB4DE;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: rgb(66.6475138122, 159.5511049724, 213.0024861878);
  text-decoration: underline;
}

.text-muted {
  color: #4B5563 !important;
}

hr {
  border-top: 1px solid #E5E7EB;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th {
  font-weight: 600;
}

button {
  cursor: pointer;
}

.bg-brand {
  background-color: #6BB4DE !important;
  color: #fff !important;
}

.text-brand {
  color: #6BB4DE !important;
}

.border-brand {
  border-color: #6BB4DE !important;
}

@media print {
  .no-print {
    display: none !important;
  }
}
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #F3F4F6;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #111827;
}

.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.main-content {
  width: 100%;
  min-height: calc(100vh - 70px);
  background-color: #F9FAFB;
  overflow-x: hidden;
  padding: 2rem;
}
.main-content.p-0, .main-content[data-page=function-detail], .main-content.function-detail {
  padding: 0;
  background-color: #ffffff;
}

.page-section {
  background: #ffffff;
  border-radius: 6px;
  padding: 1.5rem 2rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.header {
  background-color: var(--color-primary);
  color: var(--color-on-primary);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.header .logo {
  font-size: 1.5rem;
  font-weight: bold;
}
.header .nav {
  display: flex;
  gap: 1rem;
}
.header .nav a {
  color: var(--color-on-primary);
  text-decoration: none;
  font-weight: 500;
}
.header .nav a:hover {
  text-decoration: underline;
}

.form-label {
  font-weight: 500;
  font-size: 0.85rem;
  color: #374151;
  margin-bottom: 0.2rem;
  display: inline-block;
}

.form-control,
.form-select,
textarea,
input {
  width: 100%;
  padding: 0.4rem 0.65rem;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  background-color: #ffffff;
  color: #111827;
  font-size: 0.85rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.form-control:focus,
.form-select:focus,
textarea:focus,
input:focus {
  outline: none;
  border-color: #6BB4DE;
  box-shadow: 0 0 0 3px rgba(107, 180, 222, 0.2);
  background-color: #E8F5FC;
}
.form-control:disabled,
.form-select:disabled,
textarea:disabled,
input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background-color: #F3F4F6;
}
.form-control::placeholder,
.form-select::placeholder,
textarea::placeholder,
input::placeholder {
  color: #374151;
  opacity: 0.6;
}

.is-invalid {
  border-color: #E25B5B;
  box-shadow: 0 0 0 3px rgba(226, 91, 91, 0.2);
}

.is-valid {
  border-color: #59C27A;
  box-shadow: 0 0 0 3px rgba(89, 194, 122, 0.2);
}

form.card {
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
}
form.card .form-label {
  color: #111827;
}

.workspace-header h1 {
  color: #111827;
  font-weight: 600;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 0.75rem;
}

input,
select,
textarea {
  margin-bottom: 0.5rem;
}

.contact-panel input,
.contact-panel select,
.contact-panel textarea,
.contact-add-panel input,
.contact-add-panel select,
.contact-add-panel textarea,
.contact-edit-panel input,
.contact-edit-panel select,
.contact-edit-panel textarea {
  margin-bottom: 0.75rem;
}
.contact-panel label,
.contact-add-panel label,
.contact-edit-panel label {
  margin-bottom: 0.25rem;
  color: #1F2937;
}

@media (prefers-color-scheme: dark) {
  .form-control,
  .form-select,
  textarea,
  input {
    background: rgb(37.6732142857, 53.1857142857, 86.4267857143);
    color: #ffffff;
    border-color: rgb(58.3464285714, 82.3714285714, 133.8535714286);
  }
  .form-label {
    color: #E5E7EB;
  }
}
/* =========================================================
   🃏 TASK, NOTE & MESSAGE CARDS — Unified Modern Version
   Combines SCSS variables with cleaned legacy layout
========================================================= */
/* ---------- Generic Card Shell ---------- */
.task-card,
.note-card,
.message-card {
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.task-card:hover,
.note-card:hover,
.message-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

/* ---------- TASK CARD SPECIFIC ---------- */
.task-card {
  position: relative;
  padding: 1rem;
  border-left: 4px solid #6BB4DE;
  border-radius: 0.75rem;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  overflow: visible;
}
.task-card .task-card-title,
.task-card .card-title {
  color: #6BB4DE;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  text-decoration: none;
}
.task-card .task-card-title a,
.task-card .card-title a {
  color: inherit;
  text-decoration: none;
}
.task-card .task-card-title a:hover,
.task-card .card-title a:hover {
  color: rgb(65.2983425414, 158.8674033149, 212.7016574586);
}
.task-card .task-card-desc {
  font-size: 0.9rem;
  color: #6c757d;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}
.task-card .task-card-meta {
  font-size: 0.85rem;
  color: #4B5563;
}
.task-card .task-card-meta strong {
  color: #333;
}
.task-card .task-card-status {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
  background: #e7f1ff;
  color: #6BB4DE;
  border: 1px solid #6BB4DE;
  border-radius: 20px;
  padding: 0.4em 0.75em;
}
.task-card .task-card-status.bg-brand {
  background-color: #6BB4DE !important;
  color: #fff !important;
}
.task-card .btn {
  font-size: 0.75rem;
  border-radius: 0.4rem;
  margin-bottom: 0.25rem;
}

/* ---------- GRID LAYOUT ---------- */
.task-cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}
.task-cards-grid .col-md-6,
.task-cards-grid .col-lg-4 {
  display: flex;
}
.task-cards-grid .task-card {
  flex: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.task-cards-grid .task-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

/* ---------- BADGE UTILITY ---------- */
.badge.bg-brand {
  background-color: #6BB4DE !important;
  color: #fff !important;
}

/* ---------- Utility / Notes ---------- */
.note-type-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background-color: #E5E7EB;
  color: #111827;
}

.table.compact-table > :not(caption) > * > * {
  padding: 0.4rem 0.5rem;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.saved-flash {
  animation: flashHighlight 0.8s ease;
}

@keyframes flashHighlight {
  0% {
    background-color: #A6D5EE;
  }
  100% {
    background-color: #ffffff;
  }
}
/* =========================================================
   🧩 TASK CARD BUTTON ALIGNMENT FIX
   Ensures all button rows align properly and stay inside cards
========================================================= */
.task-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.task-card .task-card-desc,
.task-card .task-card-meta {
  flex-grow: 1;
}
.task-card .d-flex.justify-content-end {
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.task-card .btn {
  min-width: 80px;
  text-align: center;
  white-space: nowrap;
}

/* =========================================================
   🧮 TASK CARD BUTTONS — Alignment & Wrapping Fix
   Keeps all task card buttons aligned, even when one is missing
========================================================= */
.task-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.task-card .d-flex.justify-content-end {
  flex-wrap: nowrap !important;
  justify-content: flex-end !important;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: auto;
  overflow-x: hidden;
}
.task-card .btn {
  min-width: 85px;
  flex: 0 0 auto;
  text-align: center;
  white-space: nowrap;
  margin-bottom: 0;
}
.task-card .btn + .btn {
  margin-left: 0 !important;
}

.task-card {
  cursor: pointer;
}
.task-card:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.task-card .btn {
  cursor: default;
}

.function-layout-two-col {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  background-color: #F3F4F6;
  height: calc(100vh - 70px);
  overflow: hidden;
  padding: 0;
  margin: 0;
  gap: 0;
  box-sizing: border-box;
}
.function-layout-two-col > * {
  margin: 0;
  padding: 0;
}
@media (max-width: 992px) {
  .function-layout-two-col {
    flex-direction: column;
    height: auto;
    min-height: auto;
  }
}

.function-sidebar {
  flex-shrink: 0;
  width: 320px;
  background: #f2f5fa;
  border-right: 1px solid #E5E7EB;
  overflow: hidden;
  z-index: 900;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
@media (max-width: 992px) {
  .function-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #E5E7EB;
  }
}

.function-workspace {
  flex: 1;
  background: #ffffff;
  padding: 1rem 2rem 2rem 2rem;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  margin: 0;
  border-left: none;
}
.function-workspace h1, .function-workspace h2, .function-workspace h3 {
  font-weight: 600;
  color: #111827;
  margin-bottom: 1.25rem;
}
.function-workspace p {
  color: #374151;
}
@media (max-width: 992px) {
  .function-workspace {
    padding: 1.25rem;
    height: auto;
  }
}

.function-tabs {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border-bottom: 1px solid #E5E7EB;
  margin-bottom: 1.5rem;
  margin-left: 2rem;
  padding-bottom: 0.5rem;
  flex-wrap: wrap;
}
.function-tabs a {
  color: #4B5563;
  font-weight: 500;
  text-decoration: none;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}
.function-tabs a:hover {
  color: #4A9ECC;
  border-bottom-color: rgba(107, 180, 222, 0.25);
}
.function-tabs a.active {
  color: #6BB4DE;
  border-bottom-color: #6BB4DE;
  font-weight: 600;
}

.tabs-bar.mb-4 {
  margin-left: 2rem;
}

.function-body {
  max-width: 100%;
  overflow-x: hidden;
  flex: 1;
  box-sizing: border-box;
}

.message-card {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  background: #ffffff;
  transition: background-color 0.15s ease;
}
.message-card:hover {
  background-color: #F9FAFB;
}

.message-card--communication {
  align-items: flex-start;
  gap: 1rem;
}
.message-card--communication .msg-subject {
  font-size: 1rem;
  color: #111827;
}
.message-card--communication .msg-address span {
  line-height: 1.2;
}
.message-card--communication .msg-preview {
  color: #4B5563;
}
.message-card--communication .msg-date {
  min-width: 120px;
}

.message-card--detail {
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}
.message-card--detail .msg-subject {
  margin-bottom: 0.625rem;
}
.message-card--detail .msg-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.header-user-avatar {
  background: #6BB4DE;
  color: #ffffff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 14px rgba(31, 41, 55, 0.2);
  cursor: pointer;
}

.quote-page {
  background: #f7f8fb;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.quote-page, .quote-page p, .quote-page li, .quote-page table, .quote-page td, .quote-page th, .quote-page label, .quote-page input, .quote-page select, .quote-page button, .quote-page .form-control, .quote-page .form-select {
  font-size: 12.8px;
}
@media (max-width: 768px) {
  .quote-page {
    padding: 1rem;
  }
}

.quote-stage {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
}
@media (max-width: 768px) {
  .quote-stage {
    gap: 0.75rem;
  }
}

.quote-card {
  border: 1px solid #e0e4ee;
  border-radius: 16px;
  background: #ffffff;
  padding: 1.5rem;
  width: 100%;
}
.quote-card.thin {
  padding: 1rem;
}
@media (max-width: 768px) {
  .quote-card {
    border-radius: 12px;
    padding: 1rem;
  }
}

#quoteMenuMount {
  flex: 1;
  min-height: 320px;
}

.quote-info-grid .quote-info-card {
  border: 1px solid #e0e4ee;
  border-radius: 16px;
  background: #fff;
  padding: 1.25rem 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.quote-info-grid .quote-info-title {
  font-weight: 600;
  color: #111927;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}
.quote-info-grid .quote-info-table th {
  width: 32%;
  color: #6b7280;
  font-weight: 500;
  text-transform: none;
}
.quote-info-grid .quote-info-table td {
  color: #111927;
  font-weight: 600;
}
.quote-info-grid .quote-info-table .badge {
  letter-spacing: 0.05em;
}

.quote-table {
  width: 100%;
}
.quote-table td,
.quote-table th {
  vertical-align: middle;
}
.quote-table caption.quote-menu-caption {
  caption-side: top;
  padding: 0;
  margin-bottom: 0.5rem;
}
.quote-table caption.quote-menu-caption > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quote-menu {
  border: 1px solid #e0e4ee;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}
.quote-menu__header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eef1f7;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.quote-menu__body {
  overflow: visible;
}
.quote-menu__table {
  width: 100%;
}
.quote-menu .line-total {
  font-weight: 600;
  color: #111928;
}

.quote-totals {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.quote-totals dl {
  margin: 0;
}
.quote-totals dl dt {
  font-weight: 500;
}
@media (max-width: 992px) {
  .quote-totals {
    flex-direction: column;
  }
}

.quote-actions .btn {
  min-width: 160px;
}
@media (max-width: 768px) {
  .quote-actions {
    flex-direction: column;
    width: 100%;
  }
  .quote-actions .btn {
    width: 100%;
  }
}

.proposal-builder-wrapper {
  margin-top: 1.5rem;
}

.proposal-builder-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.proposal-builder-toggle .btn {
  min-width: 140px;
}

.proposal-builder-card {
  border: 1px solid #e3e7ef;
  border-radius: 16px;
  background: #ffffff;
  padding: 1.5rem;
}
.proposal-builder-card, .proposal-builder-card p, .proposal-builder-card li, .proposal-builder-card label, .proposal-builder-card .form-control, .proposal-builder-card .form-select, .proposal-builder-card .btn, .proposal-builder-card textarea, .proposal-builder-card input {
  font-size: 12.8px;
}
@media (max-width: 768px) {
  .proposal-builder-card {
    padding: 1.25rem;
  }
}

.proposal-builder__title {
  font-size: 1rem;
  font-weight: 600;
}

.proposal-builder__subtitle {
  font-size: 0.875rem;
}

.contact-panel .contact-edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.contact-panel .contact-edit-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.contact-panel .contact-edit-header .close {
  background: #e8f5fc;
  border: 1px solid #d1e8f6;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #256891;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.contact-panel .contact-panel-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.contact-panel .tab-btn {
  flex: 1;
  border: 1px solid #d1e8f6;
  background: #f4f9fd;
  color: #256891;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.contact-panel .tab-btn.active {
  background: #6bb4de;
  color: #fff;
  border-color: #6bb4de;
  box-shadow: 0 4px 12px rgba(107, 180, 222, 0.25);
}

.proposal-panel {
  border: 1px solid #e9edf5;
  border-radius: 14px;
  background: #ffffff;
}
.proposal-panel__header {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid #eef1f6;
  font-weight: 600;
  font-size: 0.95rem;
}
.proposal-panel__body {
  padding: 1rem 1.1rem 1.2rem;
}
@media (max-width: 768px) {
  .proposal-panel__body {
    padding: 0.9rem;
  }
}

.proposal-section-empty {
  padding: 0.5rem;
}

.proposal-contact-option {
  padding: 0.35rem 0;
  border-bottom: 1px solid #f0f2f8;
}
.proposal-contact-option:last-child {
  border-bottom: 0;
}

.proposal-terms-list .term-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.section-content {
  min-height: 110px;
  border: 1px solid #dfe3ec;
  border-radius: 0.65rem;
  padding: 0.75rem 0.85rem;
  background: #ffffff;
  white-space: normal;
  overflow-wrap: break-word;
}
.section-content:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.function-overview {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (max-width: 768px) {
  .function-overview {
    padding-left: 0;
    padding-right: 0;
    gap: 0.75rem;
  }
}

.overview-card {
  border: 1px solid #e5e8f0;
  border-radius: 14px;
  background: #ffffff;
  padding: 1.25rem;
}
.overview-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.overview-card__title {
  font-size: 1rem;
  font-weight: 600;
}
.overview-card__subtitle {
  font-size: 0.85rem;
  color: #4B5563;
}
@media (max-width: 768px) {
  .overview-card {
    padding: 1rem;
  }
  .overview-card__header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.overview-snapshot .snapshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
@media (min-width: 1024px) {
  .overview-snapshot .snapshot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.snapshot-row {
  background: #f8f9ff;
  border: 1px solid #edf0f7;
  border-radius: 12px;
  padding: 0.85rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 0.75rem;
  align-items: center;
}
@media (max-width: 992px) {
  .snapshot-row {
    grid-template-columns: 1fr;
  }
}

.snapshot-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6B7280;
}

.snapshot-value {
  font-weight: 600;
  color: #111827;
}

.snapshot-updated {
  font-size: 0.75rem;
  color: #6B7280;
  text-align: right;
}
@media (max-width: 992px) {
  .snapshot-updated {
    text-align: left;
  }
}

.notes-list,
.menu-list,
.comms-feed {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.feedback-feed {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.empty-state {
  padding: 1rem;
  border: 1px dashed #d4d9e5;
  border-radius: 12px;
  text-align: center;
  color: #6B7280;
  font-size: 0.9rem;
}

.note-card {
  border: 1px solid #ebeff6;
  border-radius: 14px;
  padding: 1rem;
  background: #fbfcff;
}
.note-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}
.note-card__type {
  font-weight: 600;
}
.note-card__preview {
  color: #374151;
  font-size: 0.9rem;
}
.note-card__meta {
  font-size: 0.8rem;
  color: #6B7280;
}

.menu-row {
  border: 1px solid #ebeff6;
  border-radius: 14px;
  padding: 1rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.menu-row__body {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.menu-row__title {
  font-weight: 600;
}
.menu-row__meta {
  font-size: 0.85rem;
}
.menu-row__totals {
  min-width: 140px;
}
.menu-row__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.financial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}
.financial-grid .financial-item {
  border: 1px solid #edf0f7;
  border-radius: 12px;
  padding: 0.9rem;
  background: #fcfdff;
}
.financial-grid .financial-item span {
  display: block;
  font-size: 0.8rem;
  color: #4B5563;
  margin-bottom: 0.25rem;
}
.financial-grid .financial-item strong {
  font-size: 1rem;
  font-weight: 600;
}

.feedback-entry {
  border: 1px solid rgba(107, 180, 222, 0.15);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  background: rgba(107, 180, 222, 0.04);
}
.feedback-entry__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(107, 180, 222, 0.12);
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: #6BB4DE;
}
.feedback-entry__body p {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
}
.feedback-entry__body small {
  color: #4B5563;
}
.feedback-entry__meta {
  font-size: 0.8rem;
  color: #4B5563;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}
.feedback-entry__meta .badge {
  font-weight: 600;
  letter-spacing: 0.02em;
  background: #ffffff;
  color: #4A9ECC;
  border: 1px solid rgba(107, 180, 222, 0.2);
}
@media (max-width: 768px) {
  .feedback-entry {
    grid-template-columns: auto 1fr;
  }
  .feedback-entry .feedback-entry__meta {
    grid-column: 2/-1;
    align-items: flex-start;
  }
}

.comms-entry {
  border: 1px solid #ebeff6;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
}
.comms-entry__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #f1f4ff;
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: #6BB4DE;
}
.comms-entry__body p {
  font-size: 0.95rem;
  font-weight: 600;
}
.comms-entry__body small {
  color: #4B5563;
}
.comms-entry__meta {
  font-size: 0.8rem;
  color: #4B5563;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}
@media (max-width: 768px) {
  .comms-entry {
    grid-template-columns: auto 1fr;
  }
  .comms-entry .comms-entry__meta {
    grid-column: 2/-1;
    text-align: left;
  }
}

.overview-actions .btn {
  min-width: 160px;
}

.proposal-print {
  color: #111827;
  font-size: 0.95rem;
}
.proposal-print .card {
  border: 1px solid #E5E7EB;
}

.proposal-header {
  display: grid;
  grid-template-columns: minmax(90px, auto) minmax(0, 1fr) minmax(90px, auto);
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
}
.proposal-header__logo {
  display: flex;
  align-items: center;
  justify-content: center;
}
.proposal-header__logo img {
  display: block;
  max-height: 36px;
  width: auto;
  object-fit: contain;
}
.proposal-header__meta {
  text-align: center;
}
.proposal-header__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.proposal-header__date {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: #4B5563;
  margin-bottom: 0.05rem;
}
.proposal-header__contact {
  line-height: 1.5;
}
.proposal-header__contact span {
  display: block;
  color: #4B5563;
  font-size: 0.75rem;
}
.proposal-header__issued {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6B7280;
  margin-top: 0.1rem;
}
@media (max-width: 768px) {
  .proposal-header {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .proposal-header__logo {
    justify-content: center;
  }
}

.message-body-html,
.message-body-plain {
  width: 100%;
  line-height: 1.5;
  color: #1F2937;
  word-break: break-word;
}
.message-body-html p,
.message-body-plain p {
  margin-bottom: 0.5rem;
}

.message-body-plain {
  white-space: pre-wrap;
}

.message-body-html > *:first-child {
  margin-top: 0;
}
.message-body-html > * {
  max-width: 100%;
}

.proposal-logo--primary {
  max-height: 36px;
  max-width: 90px;
}
.proposal-logo--secondary {
  max-height: 36px;
  max-width: 110px;
}

.letter-tight {
  letter-spacing: 0.08em;
}

.proposal-catering-card {
  page-break-before: always;
}

.proposal-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.proposal-summary-card .card-body {
  padding: 0.625rem;
}

.proposal-summary__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.proposal-summary__list {
  margin: 0;
}
.proposal-summary__list > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.proposal-summary__list dt {
  font-size: 0.75rem;
  font-weight: 700;
  color: #374151;
  text-transform: none;
}
.proposal-summary__list dd {
  margin: 0;
  font-weight: 400;
  text-align: right;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4B5563;
}

.proposal-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.proposal-contact-list li {
  margin-bottom: 0.5rem;
}
.proposal-contact-list li span {
  display: block;
  color: #4B5563;
  font-size: 0.8rem;
}

.proposal-table-card,
.proposal-section,
.proposal-flat {
  margin-bottom: 1.25rem;
}

.run-sheet-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.run-sheet-summary__group {
  display: flex;
  flex-direction: column;
}
@media print {
  .run-sheet-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.proposal-content-rail {
  margin-left: 20px;
  margin-right: 20px;
}

.proposal-table-card,
.proposal-flat {
  border: 1px solid #e0e4ee;
  border-radius: 12px;
  background: #fff;
  padding: 1.25rem 1.5rem;
}

.proposal-run-sheet__list {
  margin: 0;
  padding-left: 1rem;
  list-style-position: inside;
}
.proposal-run-sheet__list li {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.proposal-run-sheet__title,
.proposal-financial__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.proposal-table__grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.proposal-table__grid th,
.proposal-table__grid td {
  border: 1px solid #E5E7EB;
  padding: 0.45rem 0.6rem;
}
.proposal-table__grid thead th {
  background: #F3F4F6;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #4B5563;
}
.proposal-table__grid .proposal-cell--item {
  width: auto;
}
.proposal-table__grid .proposal-cell--qty {
  width: 70px;
  text-align: center;
}
.proposal-table__grid .proposal-cell--price,
.proposal-table__grid .proposal-cell--total {
  width: 115px;
  text-align: right;
  padding-left: 10px;
  padding-right: 5px;
}
.proposal-table__grid thead .proposal-cell--qty {
  text-align: center;
}
.proposal-table__grid thead .proposal-cell--price,
.proposal-table__grid thead .proposal-cell--total {
  text-align: right;
}

.proposal-table__menu td {
  background: #F9FAFB;
  font-weight: 600;
}

.proposal-category:not(:last-child) {
  margin-bottom: 1.5rem;
}
.proposal-category {
  page-break-inside: avoid;
}
.proposal-category__title {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.proposal-financial__table {
  width: 100%;
}
.proposal-financial__table td:first-child {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4B5563;
  font-size: 0.75rem;
  font-weight: 600;
}
.proposal-financial__table .proposal-financial__highlight td {
  font-weight: 600;
}
.proposal-financial__table .proposal-financial__total-due td {
  font-weight: 700;
  font-size: 1.05rem;
}

.proposal-financial h5 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.proposal-financial .proposal-financial__table {
  margin: 0;
}
.proposal-financial .proposal-financial__table td:first-child {
  font-weight: 500;
}

.proposal-terms__body {
  line-height: 1.3;
}
.proposal-terms__body p {
  margin: 0 0 0.3rem;
}
.proposal-terms__body p:last-child {
  margin-bottom: 0;
}
.proposal-terms__body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.5rem;
}
.proposal-terms__body table th,
.proposal-terms__body table td {
  border: 1px solid #d8dde8;
  padding: 0.3rem 0.45rem;
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}
.proposal-terms__body table th {
  background: #f5f7fb;
  font-weight: 600;
}

@media screen {
  .proposal-terms__body {
    margin: 2em;
  }
}
@media print {
  .proposal-print {
    padding: 0;
  }
  .proposal-table__grid {
    page-break-inside: avoid;
  }
  .proposal-catering-card {
    page-break-before: always;
  }
  .proposal-header {
    grid-template-columns: minmax(70px, auto) minmax(0, 1fr) minmax(70px, auto);
  }
  .proposal-header__logo img {
    max-height: 30px;
  }
  .proposal-terms {
    page-break-before: always;
  }
  .proposal-print .card {
    box-shadow: none !important;
    border-color: #E5E7EB;
  }
  .proposal-print .card-header,
  .proposal-print .card-body {
    padding: 0.625rem !important;
    background: #fff !important;
  }
  .proposal-table-card.card {
    border: none;
  }
  .proposal-table-card .card-body {
    padding: 0 !important;
  }
  .proposal-table__grid thead th {
    background: #fff;
  }
  .proposal-category {
    page-break-inside: avoid;
  }
  .proposal-terms__body {
    margin: 2em;
  }
  .proposal-terms {
    page: terms-page;
    margin: 0;
  }
}
@media print {
  @page terms-page {
    margin: 2cm;
  }
}
.function-sidebar {
  display: flex;
  flex-direction: column;
  width: 360px;
  max-width: 100%;
  background-color: #f2f5fa;
  border-right: 1px solid #d0d6e0;
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.03);
  color: #556173;
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  z-index: 10;
}
.function-sidebar .sidebar-scroll-container {
  flex: 1;
  height: calc(100vh - 70px);
  overflow-y: scroll;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: content-box;
  width: calc(100% + 8px);
  padding: 1.25rem 1.25rem 1rem 0.2rem;
  margin-right: -8px;
  scrollbar-width: thin;
  scrollbar-color: #9db1c7 transparent;
}
.function-sidebar .sidebar-scroll-container::-webkit-scrollbar {
  width: 8px;
}
.function-sidebar .sidebar-scroll-container::-webkit-scrollbar-thumb {
  background-color: #9db1c7;
  border-radius: 4px;
}
.function-sidebar .sidebar-scroll-container::-webkit-scrollbar-track {
  background-color: rgba(0, 0, 0, 0.05);
}
.function-sidebar .function-meta,
.function-sidebar .function-contact-block,
.function-sidebar .function-details {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.function-sidebar .function-meta h2 {
  font-size: 0.90625rem;
  font-weight: 600;
  color: #2b3a4a;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 0.25rem;
}
.function-sidebar .function-meta .status-select {
  width: 100%;
  font-size: 0.90625rem;
  border-radius: 6px;
}
.function-sidebar .function-contact-block h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #2b3a4a;
  margin-bottom: 0.75rem;
}
.function-sidebar .function-contact-block .contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.function-sidebar .function-contact-block .contact-list .contact-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
  padding: 0.5rem 0;
}
.function-sidebar .function-contact-block .contact-list .contact-card:last-child {
  border-bottom: none;
}
.function-sidebar .function-contact-block .contact-list .contact-card .contact-info strong {
  display: block;
  font-size: 0.95rem;
  color: #2b3a4a;
}
.function-sidebar .function-contact-block .contact-list .contact-card .contact-info small {
  display: block;
  font-size: 0.8rem;
  color: #556173;
}
.function-sidebar .function-details h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #2b3a4a;
}
.function-sidebar .function-details label {
  display: block;
  font-size: 0.8rem;
  color: #556173;
  margin-bottom: 0.25rem;
}
.function-sidebar .function-details input,
.function-sidebar .function-details select,
.function-sidebar .function-details button {
  width: 100%;
  font-size: 0.85rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.4rem;
  background-color: #fff;
}
.function-sidebar .function-details input:focus,
.function-sidebar .function-details select:focus,
.function-sidebar .function-details button:focus {
  border-color: #6BB4DE;
  box-shadow: 0 0 0 2px rgba(107, 180, 222, 0.15);
  outline: none;
}
.function-sidebar .function-details .detail-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.function-sidebar .function-details .detail-row .detail-item.half {
  flex: 1;
}
.function-sidebar .function-details .time-modal-btn {
  background-color: #F9FAFB;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  font-size: 0.85rem;
  color: #1F2937;
}
.function-sidebar .function-details .time-modal-btn:hover {
  background-color: #F3F4F6;
}
.function-sidebar .menu-container {
  position: relative;
}
.function-sidebar .menu-container .menu-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #556173;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.function-sidebar .menu-container .menu-btn:hover {
  background-color: rgba(157, 177, 199, 0.1);
  color: #6BB4DE;
}
.function-sidebar .menu-container .menu-dropdown {
  position: absolute;
  right: 0;
  top: 24px;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  min-width: 140px;
  z-index: 10;
  display: flex;
  flex-direction: column;
}
.function-sidebar .menu-container .menu-dropdown button {
  background: transparent;
  border: none;
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  cursor: pointer;
  color: #2b3a4a;
  transition: background 0.2s;
}
.function-sidebar .menu-container .menu-dropdown button:hover {
  background-color: rgba(157, 177, 199, 0.08);
  color: #6BB4DE;
}

.function-layout-two-col {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  margin: 0;
  padding: 0;
  gap: 0;
  background-color: #ffffff;
  height: calc(100vh - 70px);
  overflow: hidden;
  width: 100%;
}

.function-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}
.function-workspace .function-body {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

.function-dashboard {
  background: #F9FAFB;
  color: #111827;
}
.function-dashboard .page-title {
  color: #444;
  font-weight: 600;
}
.function-dashboard .function-dashboard .function-header {
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #E5E7EB;
}
.function-dashboard .btn-brand {
  background: #6BB4DE;
  color: #fff;
  font-weight: 600;
  border-radius: 6px;
}
.function-dashboard .btn-brand:hover {
  background: #4A9ECC;
}
.function-dashboard .kpi-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.function-dashboard .kpi {
  background: #fff;
  border-left: 4px solid #6BB4DE;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 0.75rem 1rem;
}
.function-dashboard .kpi .label {
  font-size: 0.85rem;
  color: #4B5563;
  text-transform: uppercase;
}
.function-dashboard .kpi .value {
  font-size: 1.25rem;
  font-weight: 600;
  color: #4A9ECC;
}
.function-dashboard .status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.function-dashboard .filter-pill {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #6BB4DE;
  color: #6BB4DE;
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: capitalize;
  transition: all 0.2s ease;
}
.function-dashboard .filter-pill:hover {
  background: #4A9ECC;
  color: #fff;
}
.function-dashboard .filter-pill.active {
  background: #6BB4DE;
  color: #fff;
  font-weight: 600;
}
.function-dashboard .function-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.4rem;
}
.function-dashboard .function-table tr {
  background: #fff;
  transition: all 0.2s ease;
  cursor: pointer;
}
.function-dashboard .function-table tr:hover {
  background: #E8F5FC;
}
.function-dashboard .function-table th {
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  border-bottom: 2px solid #E5E7EB;
}
.function-dashboard .function-table td {
  font-size: 0.9rem;
  color: #1F2937;
  vertical-align: middle;
}
.function-dashboard .function-table .event-link {
  font-weight: 600;
  color: #6BB4DE;
}
.function-dashboard .function-table .event-link:hover {
  color: #4A9ECC;
  text-decoration: underline;
}
.function-dashboard .function-table .subtext {
  font-size: 0.8rem;
  color: #4B5563;
}
.function-dashboard .function-table .table-actions .btn {
  margin-right: 0.25rem;
}
.function-dashboard .status-badge {
  text-transform: capitalize;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
  padding: 0.25em 0.6em;
  background: #E8F5FC;
  color: #6BB4DE;
}

.kpi-bar {
  border-top: 2px solid #F3F4F6;
  padding-top: 1rem;
}

.status-badge {
  display: inline-block;
  text-transform: capitalize;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  padding: 0.3em 0.75em;
  background: #ffffff;
  border: 1.5px solid #D1D5DB;
  color: #374151;
  transition: all 0.2s ease;
  line-height: 1.2;
}
.status-badge:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
}
.status-badge.status-lead {
  border-color: #6BB4DE;
  color: #4A9ECC;
}
.status-badge.status-lead:hover {
  background: rgb(238.9, 248, 252.9);
}
.status-badge.status-qualified {
  border-color: #F5C044;
  color: rgb(131, 115.8, 75.8);
}
.status-badge.status-qualified:hover {
  background: rgb(247, 204.6, 105.4);
}
.status-badge.status-confirmed {
  border-color: #59C27A;
  color: rgb(66.9, 110.15, 95.35);
}
.status-badge.status-confirmed:hover {
  background: rgb(122.2, 206.2, 148.6);
}
.status-badge.status-balance_due {
  border-color: #5BC0DE;
  color: rgb(69.4, 115.8, 137.4);
}
.status-badge.status-balance_due:hover {
  background: rgb(123.8, 204.6, 228.6);
}
.status-badge.status-completed {
  border-color: #9CA3AF;
  color: #374151;
}
.status-badge.status-completed:hover {
  background: #F3F4F6;
}
.status-badge.status-active {
  border-color: #4A9ECC;
  color: rgb(62.6, 102.2, 130.2);
}
.status-badge.status-active:hover {
  background: rgb(237.75, 247.5, 252.75);
}

.page-dashboard {
  background: #F9FAFB;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  min-height: calc(100vh - 80px);
}
.page-dashboard .page-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 2rem;
  border-bottom: 1px solid #E5E7EB;
  padding-bottom: 0.5rem;
}
.page-dashboard .kpi-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.page-dashboard .kpi-bar .kpi {
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-left: 5px solid #6BB4DE;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 1rem 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.page-dashboard .kpi-bar .kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.page-dashboard .kpi-bar .kpi .label {
  color: #4B5563;
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}
.page-dashboard .kpi-bar .kpi .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
}
.page-dashboard .dashboard-card {
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  transition: box-shadow 0.25s ease;
}
.page-dashboard .dashboard-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.page-dashboard .dashboard-card .card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 1.25rem;
}
.page-dashboard table {
  font-size: 0.95rem;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}
.page-dashboard table th {
  background: #F3F4F6;
  color: #374151;
  text-transform: uppercase;
  font-size: 0.8rem;
  padding: 0.75rem;
  border-bottom: 2px solid #E5E7EB;
}
.page-dashboard table td {
  padding: 0.75rem;
  border-bottom: 1px solid #E5E7EB;
  color: #1F2937;
}
.page-dashboard table tr:hover td {
  background: #F9FAFB;
}
.page-dashboard canvas {
  max-width: 100%;
  margin-top: 0.5rem;
}
.page-dashboard td:last-child {
  font-weight: 600;
  text-transform: capitalize;
}
.page-dashboard td:last-child.confirmed {
  color: #59C27A;
}
.page-dashboard td:last-child.lead {
  color: #4A9ECC;
}
.page-dashboard td:last-child.completed {
  color: #4B5563;
}
.page-dashboard td:last-child.cancelled {
  color: #E25B5B;
}

.menus-page {
  padding: 1.5rem;
}

.menu-category-block,
.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.card-header,
.menu-category-block > .d-flex {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 0.75rem 1rem;
}

.table thead th {
  background-color: var(--bs-light);
  border-bottom: 2px solid #ddd;
}

.add-menu-btn {
  transition: 0.2s ease;
}
.add-menu-btn:hover {
  background-color: rgba(var(--bs-primary-rgb), 0.1);
}

.edit-menu-btn {
  transition: 0.2s ease;
}
.edit-menu-btn:hover {
  background-color: var(--bs-secondary-bg);
}

.menus-builder-page {
  padding: 1.5rem;
}
.menus-builder-page .table thead th {
  background-color: var(--bs-light);
  border-bottom: 2px solid #ddd;
}
.menus-builder-page .edit-menu-btn {
  transition: 0.2s ease;
}
.menus-builder-page .edit-menu-btn:hover {
  background-color: var(--bs-secondary-bg);
}
.menus-builder-page .card-header {
  background: #f8f9fa;
}

.calendar-page .page-title {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
}

.calendar-controls,
.calendar-wrapper {
  border-radius: 0.75rem;
}

.calendar-view-label {
  font-size: 0.9rem;
  color: #475569;
  font-weight: 500;
}

.calendar-print-title {
  display: none;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 3mm;
}

.calendar-print-header {
  display: none;
}

.calendar-print-shell {
  max-width: 1200px;
  margin: 0 auto;
}

.calendar-print-wrapper,
.calendar-print-month,
.calendar-print-week,
.calendar-print-day {
  display: none;
}

.calendar-print-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.calendar-print-table th,
.calendar-print-table td {
  border: 1px solid #d1d5db;
  vertical-align: top;
  padding: 4px;
}
.calendar-print-table th {
  background: #f3f4f6;
  text-align: center;
  font-weight: 600;
}

.print-day-cell {
  min-height: 80px;
}

.print-day-number {
  font-weight: 600;
  margin-bottom: 2px;
}

.print-event-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.print-event-list li {
  font-size: 0.85rem;
  margin-bottom: 2px;
  word-break: break-word;
}

.calendar-print-day {
  display: none;
}

.calendar-print-day-meta {
  font-weight: 600;
  margin-bottom: 4px;
}

.calendar-print-day-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.calendar-print-day-list li {
  margin-bottom: 6px;
}

.calendar-room-toggle .calendar-room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
}
.calendar-room-toggle .calendar-room-btn.active {
  background-color: #6BB4DE;
  border-color: #6BB4DE;
  color: #fff;
  box-shadow: none;
}

#functionCalendar {
  min-height: 600px;
}

.calendar-shell .fc {
  --fc-border-color: #e5e7eb;
  --fc-event-bg-color: #6bb4de;
  --fc-event-border-color: #6bb4de;
  --fc-page-bg-color: #fff;
  --fc-event-text-color: #333333;
  --fc-small-font-size: 0.75em;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.calendar-shell .fc-non-business {
  background: transparent !important;
  opacity: 1;
}
.calendar-shell .fc-bg-event.restaurant-closed,
.calendar-shell .restaurant-closed {
  background-color: #f5f5f5 !important;
  border-color: #f5f5f5 !important;
  opacity: 0.75 !important;
}
.calendar-shell .fc .restaurant-closed ~ .fc-timegrid-slot,
.calendar-shell .fc .restaurant-closed ~ .fc-timegrid-slot-label {
  color: #9aa0a6 !important;
}
.calendar-shell .fc-timegrid-col.fc-day-today,
.calendar-shell .fc-timeGridDay-view .fc-day-today,
.calendar-shell .fc-timeGridWeek-view .fc-day-today {
  background: transparent !important;
}
.calendar-shell .fc-event,
.calendar-shell .fc-event * {
  color: #333 !important;
}
.calendar-shell .fc .fc-small,
.calendar-shell .fc .fc-small * {
  font-size: 0.75em !important;
}
.calendar-shell .fc-event {
  border-radius: 0.5rem;
  padding: 2px 6px;
  font-weight: 500;
}

.calendar-event-card {
  background-color: #fff !important;
  color: #0f172a !important;
  border: 1px solid #dbe1ea !important;
  border-left: 4px solid var(--calendar-event-accent, #6bb4de) !important;
  border-radius: 10px !important;
  padding: 6px 8px !important;
  white-space: normal !important;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.calendar-event-card .fc-event-time {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 2px;
}
.calendar-event-card .fc-event-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #0f172a;
  white-space: normal;
}
.calendar-event-card * {
  color: #0f172a !important;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }
  body,
  html {
    background: #fff !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    font-family: "Helvetica Neue", Arial, sans-serif;
  }
  header,
  footer,
  nav,
  .no-print,
  .btn,
  .modal,
  .calendar-controls,
  .calendar-room-toggle,
  #calendarEventModal,
  .fc-header-toolbar,
  .fc-toolbar {
    display: none !important;
  }
  .calendar-print-shell {
    width: 270mm !important;
    margin: 0 auto !important;
  }
  .calendar-print-header {
    display: block !important;
    text-align: center;
    margin-bottom: 3mm;
    page-break-after: avoid;
  }
  .calendar-print-title {
    display: block !important;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 2mm;
  }
  .calendar-page,
  .calendar-wrapper,
  .card,
  .container,
  .container-fluid {
    padding: 0 !important;
    margin: 0 auto !important;
    box-shadow: none !important;
    background: transparent !important;
    border: 0 !important;
  }
  .calendar-page {
    display: block;
  }
  .calendar-wrapper {
    border: none !important;
    padding: 0 !important;
  }
  .calendar-area {
    display: none !important;
  }
  .calendar-print-wrapper,
  .calendar-print-header {
    display: block !important;
  }
  .print-mode-month .calendar-print-month,
  .print-mode-week .calendar-print-week,
  .print-mode-day .calendar-print-day {
    display: block !important;
  }
  .print-mode-month .calendar-print-table {
    table-layout: fixed;
    width: 100%;
    page-break-inside: avoid;
  }
  .print-mode-month .print-day-cell {
    height: 32mm;
  }
  .print-mode-week .calendar-print-table {
    table-layout: fixed;
    width: 100%;
    page-break-inside: avoid;
  }
  .print-mode-week .print-day-cell {
    min-height: 35mm;
  }
  .print-mode-day .calendar-print-day {
    min-height: 160mm;
    page-break-inside: avoid;
  }
  #functionCalendar,
  #functionCalendar .fc-view-harness,
  #functionCalendar .fc-scrollgrid,
  #functionCalendar .fc-daygrid,
  #functionCalendar .fc-timegrid-body {
    width: 100% !important;
    min-height: auto !important;
    page-break-inside: avoid !important;
  }
  #functionCalendar {
    font-size: 0.65rem;
  }
  .calendar-shell .fc-daygrid,
  .calendar-shell .fc-scrollgrid-table {
    table-layout: fixed !important;
  }
  .calendar-shell .fc-daygrid-day-frame,
  .calendar-shell .fc-daygrid-day-top {
    padding: 1px 2px !important;
  }
  .calendar-shell .fc-daygrid-day-number {
    font-size: 0.65rem !important;
  }
  .calendar-shell .fc-daygrid-event {
    font-size: 0.65rem !important;
    padding: 1px 2px !important;
    margin-bottom: 1px;
    color: #333 !important;
  }
  .calendar-shell .fc-timegrid-event {
    color: #333 !important;
  }
  .calendar-shell .fc-timegrid-event .fc-event-title,
  .calendar-shell .fc-timegrid-event .fc-event-time {
    color: #333 !important;
  }
  .calendar-shell .fc-daygrid-day-events {
    margin: 0 !important;
    overflow: visible !important;
  }
  .fc-day-today,
  .fc-now-indicator,
  .fc-timegrid-now-indicator-line,
  .fc-timegrid-now-indicator-arrow {
    display: none !important;
  }
}
#contactOverlay,
.modal-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
#contactOverlay.panel-open,
.modal-overlay.panel-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.25s ease;
}
#contactOverlay.hidden,
.modal-overlay.hidden {
  display: block !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.time-modal-container {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1200;
  opacity: 1;
  transition: opacity 0.25s ease;
}
.time-modal-container.is-fading-out {
  opacity: 0;
}

.time-modal-box {
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  padding: 1.5rem 1.75rem;
  min-width: 340px;
  max-width: 90vw;
  color: #111827;
  animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.contact-panel,
.contact-add-panel,
.contact-edit-panel {
  --panel-width: 420px;
  position: fixed;
  top: 0;
  right: 0;
  width: var(--panel-width);
  max-width: min(95vw, var(--panel-width));
  height: 100dvh;
  background: #ffffff;
  border-left: 1px solid #E5E7EB;
  box-shadow: -3px 0 15px rgba(0, 0, 0, 0.1);
  z-index: 1300;
  transform: translateX(calc(100% + 8px));
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.25s ease;
  padding: 1.75rem;
  overflow-y: auto;
  border-radius: 0;
}
.contact-panel:focus-visible,
.contact-add-panel:focus-visible,
.contact-edit-panel:focus-visible {
  outline: 2px solid rgb(80.0983425414, 166.3674033149, 216.0016574586);
  outline-offset: 2px;
}
.contact-panel .btn,
.contact-add-panel .btn,
.contact-edit-panel .btn {
  background-color: #6BB4DE;
  border-color: #6BB4DE;
  color: #fff;
}
.contact-panel .btn:hover,
.contact-add-panel .btn:hover,
.contact-edit-panel .btn:hover {
  background-color: rgb(80.0983425414, 166.3674033149, 216.0016574586);
  border-color: rgb(80.0983425414, 166.3674033149, 216.0016574586);
}

.contact-panel.panel-open,
.contact-add-panel.panel-open,
.contact-edit-panel.panel-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.contact-panel.hidden,
.contact-add-panel.hidden,
.contact-edit-panel.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 8px));
}

@media (max-width: 768px) {
  .contact-panel,
  .contact-add-panel,
  .contact-edit-panel {
    width: 100%;
    max-width: 100%;
    border-left: none;
    border-top: 1px solid #E5E7EB;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  }
}
.modal.fade {
  display: none;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

.modal.show {
  display: block;
}

.modal-dialog {
  pointer-events: none;
  max-width: 900px;
  width: 90%;
  margin: 2rem auto;
  transition: transform 0.3s ease-in-out;
}

.modal-dialog-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100% - 3.5rem);
}

.modal-content {
  pointer-events: auto;
  border: none;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.modal-header {
  border-bottom: 1px solid #E5E7EB;
  background: #E8F5FC;
  color: #4A9ECC;
}
.modal-header .modal-title {
  font-weight: 600;
}

.modal-footer {
  border-top: 1px solid #E5E7EB;
  background: #E8F5FC;
}

.modal-backdrop.show {
  opacity: 0.5;
}

@media (max-width: 768px) {
  .modal-dialog {
    margin: 1rem;
    max-width: 100%;
  }
}
#timeInputModal .modal-dialog {
  max-width: 350px;
}

#timeInputModal .modal-content {
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

#timeInputModal .modal-body {
  padding: 1.2rem;
}

.settings-modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9999;
}
.settings-modal.hidden {
  display: none !important;
}
.settings-modal .time-modal-container.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.settings-modal .settings-modal-dialog {
  background: #fff;
  border-radius: 8px;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.settings-modal .settings-modal-dialog header, .settings-modal .settings-modal-dialog footer {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #E5E7EB;
}
.settings-modal .settings-modal-dialog header:last-child, .settings-modal .settings-modal-dialog footer:last-child {
  border-bottom: none;
  border-top: 1px solid #E5E7EB;
  justify-content: flex-end;
  gap: 0.5rem;
}
.settings-modal .settings-modal-dialog .settings-modal-body {
  padding: 1rem;
}
.settings-modal .settings-modal-dialog .settings-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99999;
}

.toast-message {
  background: #111827;
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  font-size: 0.875rem;
  opacity: 0;
  transform: translateY(-10px);
  animation: toastIn 0.3s forwards, toastOut 0.3s ease 3s forwards;
}
.toast-message.success {
  background: #59C27A;
}
.toast-message.error {
  background: #E25B5B;
}
.toast-message.warning {
  background: #F5C044;
  color: #111827;
}

@keyframes toastIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}
#menuDrawer .offcanvas-header {
  background: var(--bs-light);
  border-bottom: 1px solid #ddd;
}
#menuDrawer .offcanvas-body {
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
#menuDrawer .list-group-item {
  font-size: 0.9rem;
}

.task-card,
.note-card,
.message-card {
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 1.25rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.task-card:hover,
.note-card:hover,
.message-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.task-card {
  position: relative;
  border-left: 4px solid #6BB4DE;
  background-color: #fff;
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
}
.task-card .task-card-title,
.task-card .card-title {
  color: #6BB4DE;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.task-card .task-card-title a,
.task-card .card-title a {
  color: inherit;
  text-decoration: none;
}
.task-card .task-card-title a:hover,
.task-card .card-title a:hover {
  color: rgb(80.0983425414, 166.3674033149, 216.0016574586);
}
.task-card .task-card-desc {
  font-size: 0.9rem;
  color: #4B5563;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}
.task-card .task-card-meta {
  font-size: 0.85rem;
  color: #4B5563;
}
.task-card .task-card-meta strong {
  color: #111827;
}
.task-card .task-card-status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  background: #E8F5FC;
  color: #6BB4DE;
  border: 1px solid rgb(93.5491712707, 173.1837016575, 219.0008287293);
  border-radius: 20px;
  padding: 0.35em 0.75em;
}
.task-card .task-card-status.bg-brand {
  background-color: #6BB4DE !important;
  color: #fff !important;
  border-color: #6BB4DE !important;
}
.task-card .d-flex.justify-content-end {
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: auto;
}
.task-card .btn {
  min-width: 85px;
  font-size: 0.8rem;
  border-radius: 0.4rem;
  white-space: nowrap;
}

.task-cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}
.task-cards-grid .col-md-6,
.task-cards-grid .col-lg-4 {
  display: flex;
}
.task-cards-grid .task-card {
  flex: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.task-cards-grid .task-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.badge.bg-brand {
  background-color: #6BB4DE !important;
  color: #fff !important;
}

.note-type-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background-color: #F3F4F6;
  color: #111827;
}

.task-card {
  cursor: pointer;
}
.task-card:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.task-card .btn {
  cursor: default;
}

.saved-flash {
  animation: flashHighlight 0.8s ease;
}

@keyframes flashHighlight {
  0% {
    background-color: rgb(158.8, 206.25, 233.55);
  }
  100% {
    background-color: #ffffff;
  }
}
@media (max-width: 1200px) {
  .function-layout-two-col {
    flex-direction: column;
    padding: 1.5rem;
  }
  .function-sidebar {
    width: 100%;
    position: relative;
    top: auto;
    min-height: auto;
    margin-bottom: 1.5rem;
  }
  .function-workspace {
    padding: 1.2rem;
  }
}
@media (max-width: 991px) {
  .function-layout-two-col {
    flex-direction: column;
    padding: 0.25rem;
    gap: 0.25rem;
  }
  .function-sidebar {
    position: static;
    width: 100%;
    flex: 1 1 auto;
    order: 2;
    margin-top: 1rem;
  }
  .function-workspace {
    order: 1;
    width: 100%;
    padding: 1rem;
  }
  .workspace-content {
    padding: 1rem;
  }
}
@media (max-width: 768px) {
  .task-cards-grid .col-md-6,
  .task-cards-grid .col-lg-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .workspace-header h1 {
    font-size: 1.5rem;
  }
  .contact-panel.panel-open {
    width: 100%;
    border-radius: 0;
  }
}
@media (min-width: 1400px) {
  .function-layout-two-col {
    gap: 0rem;
  }
  .function-layout-two-col .function-sidebar {
    flex: 0 0 320px;
  }
}
@media (max-width: 992px) {
  .function-layout-two-col {
    flex-direction: column;
    align-items: stretch;
    padding: 0.1rem;
  }
  .function-sidebar {
    flex: 0 0 auto;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #eaeaea;
    box-shadow: none;
    border-radius: 0;
    margin-bottom: 1rem;
    min-height: auto;
  }
  .function-workspace {
    flex: 1;
    width: 100%;
    padding: 1rem;
    box-shadow: none;
    border-radius: 0;
  }
  ::after, ::before {
    box-sizing: border-box;
  }
}
@media (max-width: 768px) {
  .navbar-toggler {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #ddd;
    z-index: 9999;
  }
  .navbar-toggler-icon {
    filter: invert(0.4);
  }
}
/* =========================================================
   🧭 FINAL LAYOUT + HEADER FIX
========================================================= */
/* ---------- HEADER ---------- */
.main-header.navbar {
  position: sticky;
  top: 0;
  z-index: 1050;
  width: 100%;
  background-color: #212529 !important; /* ensure dark header stays dark */
}

.navbar-nav .nav-link {
  font-size: 14.5px;
}

/* Burger button visibility and alignment */
.navbar-toggler {
  background-color: #fff !important;
  border: 1px solid #aaa !important;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(0,0,0,0.8)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Ensure collapse background covers full width in mobile view */
@media (max-width: 992px) {
  .navbar-collapse {
    background: #212529 !important;
    padding: 1rem;
  }
  .navbar-collapse .nav-link {
    color: #fff !important;
    font-weight: 500;
    margin: 0.25rem 0;
  }
  /* Keep user icon aligned right, not at bottom */
  .header-right {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.75rem;
  }
}
/* ---------- SIDEBAR LAYOUT ---------- */
.function-layout-two-col {
  display: flex;
  align-items: stretch; /* equal column height */
  justify-content: flex-start;
  min-height: calc(100vh - 80px); /* fill viewport minus header */
}

.function-sidebar {
  flex: 0 0 360px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: #f2f5fa;
  border-right: 0px solid #e0e0e0;
  box-shadow: 0px 0 0px rgba(0, 0, 0, 0.04);
  padding: 1.25rem 1rem 2rem 1rem;
}

.function-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.function-details .detail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.function-details .detail-row .detail-item {
  flex: 1 1 47%;
  display: flex;
  flex-direction: column;
}
.function-details .detail-row .detail-item label {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
  color: #333;
}
.function-details .detail-row .detail-item input, .function-details .detail-row .detail-item select, .function-details .detail-row .detail-item button {
  width: 100%;
  font-size: 0.9rem;
}

/* ---------- RESPONSIVE STACK ---------- */
@media (max-width: 992px) {
  .function-layout-two-col {
    flex-direction: column;
    align-items: stretch;
  }
  .function-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #eaeaea;
    box-shadow: none;
    margin-bottom: 1rem;
  }
  .function-workspace {
    width: 100%;
    padding: 1rem;
  }
}
/* =========================================================
   🧭 FUNCTION PAGE TABS — Responsive + Scrollable
========================================================= */
.tabs-bar {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto; /* allow horizontal scroll */
  scrollbar-width: thin; /* Firefox */
  -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
  border-bottom: 1px solid #e0e0e0;
  background: #fff;
  padding: 0.25rem 0.5rem;
  gap: 0.5rem;
}
.tabs-bar a {
  flex: 0 0 auto; /* prevent stretching */
  display: inline-block;
  text-decoration: none;
  padding: 0.6rem 1rem;
  font-weight: 500;
  color: #555;
  border-radius: 6px 6px 0 0;
  transition: background 0.2s ease, color 0.2s ease;
}
.tabs-bar a:hover {
  background: #f5f5f5;
  color: #000;
}
.tabs-bar a.active {
  background: #6BB4DE;
  color: #fff;
  font-weight: 600;
}

/* 📱 Small screens — center or scrollable nav */
@media (max-width: 768px) {
  .tabs-bar {
    justify-content: flex-start;
    overflow-x: auto;
    gap: 0.4rem;
    padding: 0.5rem;
  }
  .tabs-bar a {
    font-size: 0.9rem;
    padding: 0.45rem 0.75rem;
    white-space: nowrap;
  }
  /* Optional: subtle shadow to indicate scroll */
  .tabs-bar::after {
    content: "";
    flex: 0 0 1rem;
  }
}
/* 🖥️ Desktop — keep them inline, spaced evenly */
@media (min-width: 769px) {
  .tabs-bar {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
.kpi-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi {
  background: var(--white);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 12px 16px;
  transition: all 0.2s ease;
}
.kpi:hover {
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.kpi .label {
  color: #666;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.kpi .value {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--deep);
  margin-top: 4px;
}

.inbox-list {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}
.inbox-list .message-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.inbox-list .message-card:hover {
  background-color: #f8f9fa;
}
.inbox-list .message-card.border-warning {
  border-left: 4px solid #ffb300;
}
.inbox-list .message-card .msg-left {
  flex: 1;
}
.inbox-list .message-card .msg-left .msg-from {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
  color: #212529;
}
.inbox-list .message-card .msg-left .msg-from .badge {
  font-size: 0.75rem;
  font-weight: 500;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.inbox-list .message-card .msg-left .msg-from .badge.bg-success {
  background: #6bb4de;
}
.inbox-list .message-card .msg-left .msg-from .badge.bg-warning {
  background: #ffc107;
  color: #212529;
}
.inbox-list .message-card .msg-left .msg-subject {
  font-size: 0.9rem;
  color: #0f766e;
  margin-bottom: 0.2rem;
}
.inbox-list .message-card .msg-left .msg-preview {
  font-size: 0.85rem;
  color: #6c757d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 600px;
}
.inbox-list .message-card .msg-date {
  font-size: 0.8rem;
  color: #6c757d;
  text-align: right;
  min-width: 120px;
  white-space: nowrap;
}

.inbox-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.inbox-header-bar h1 {
  font-size: 1.5rem;
  color: #0f766e;
}
.inbox-header-bar .inbox-stats {
  display: flex;
  gap: 1rem;
}
.inbox-header-bar .inbox-stats .stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.inbox-header-bar .inbox-stats .stat-box .stat-number {
  font-weight: 700;
  font-size: 1.2rem;
}
.inbox-header-bar .inbox-stats .stat-box .stat-number.linked {
  color: #6bb4de;
}
.inbox-header-bar .inbox-stats .stat-box .stat-number.unlinked {
  color: rgb(211, 158.25, 0);
}
.inbox-header-bar .inbox-stats .stat-box .stat-label {
  font-size: 0.8rem;
  color: #6c757d;
}

#inboxTabs .nav-link {
  font-weight: 500;
  color: #6bb4de;
}
#inboxTabs .nav-link.active {
  color: #0f766e;
  border-color: #0f766e #0f766e transparent;
  background: rgba(15, 118, 110, 0.05);
}
#inboxTabs .nav-link .badge {
  font-size: 0.7rem;
  margin-left: 0.25rem;
  vertical-align: middle;
}

.empty-box {
  padding: 3rem 1rem;
  text-align: center;
  color: #6c757d;
  font-style: italic;
}

.message-card {
  position: relative;
}
.message-card::after {
  content: "";
  position: absolute;
  inset: 0;
}
.message-card a {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.delete-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  border-radius: 6px;
  color: #dc3545;
  border: 1px solid #dc3545;
  background: #fff;
  transition: all 0.2s ease;
}
.delete-btn:hover {
  background: #dc3545;
  color: #fff;
}

#deleted .message-card {
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#deleted .message-card:hover {
  opacity: 1;
  transform: scale(1.01);
}

.restore-btn {
  font-size: 0.8rem;
  padding: 4px 8px;
}

.badge-linked {
  background-color: #ffffff;
  color: black;
}

.badge-unlinked {
  background-color: #e0a800;
  color: black;
}

.badge-followup {
  background-color: #6bb4de;
  color: white;
}

.badge-deleted {
  background-color: #6c757d;
  color: white;
}

.badge-lead {
  background-color: #6c757d;
  color: white;
}

:root {
  --bs-primary: #6BB4DE;
  --bs-primary-rgb: 107, 180, 222;
  --bs-secondary: #4A9ECC;
  --bs-info: #A6D5EE;
  --bs-success: #59C27A;
  --bs-danger: #E25B5B;
  --bs-warning: #F5C044;
  --bs-link-color: #6BB4DE;
  --bs-link-hover-color: #4A9ECC;
}

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #6BB4DE;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #4A9ECC;
  --bs-btn-hover-border-color: #4A9ECC;
  --bs-btn-active-bg: #4A9ECC;
  --bs-btn-active-border-color: #4A9ECC;
  --bs-btn-disabled-bg: #E8F5FC;
  --bs-btn-disabled-border-color: #E8F5FC;
}

.btn-outline-primary {
  --bs-btn-color: #6BB4DE;
  --bs-btn-border-color: #6BB4DE;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #6BB4DE;
  --bs-btn-hover-border-color: #6BB4DE;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #4A9ECC;
  --bs-btn-active-border-color: #4A9ECC;
  --bs-btn-disabled-color: #A6D5EE;
  --bs-btn-disabled-border-color: #A6D5EE;
}

.alert-primary {
  background-color: #E8F5FC;
  border-color: #A6D5EE;
  color: #111827;
}

.badge.bg-primary {
  background-color: #6BB4DE !important;
}

.badge-outline-primary {
  background-color: transparent;
  color: #6BB4DE;
  border: 1px solid #6BB4DE;
}

a,
.pagination .page-link {
  color: #6BB4DE;
  text-decoration: none;
}
a:hover, a:focus,
.pagination .page-link:hover,
.pagination .page-link:focus {
  color: #4A9ECC;
  text-decoration: underline;
}

.form-control:focus,
.form-select:focus {
  border-color: #6BB4DE;
  box-shadow: 0 0 0 0.2rem rgba(107, 180, 222, 0.25);
}

.progress-bar,
.nav-pills .nav-link.active,
.navbar-nav .nav-link.active {
  background-color: #6BB4DE;
  border-color: #6BB4DE;
}

.bg-light {
  --bs-bg-opacity: 1;
  background-color: #f2f5fa !important;
}

.py-3 {
  padding-top: 2.5rem !important;
  padding-bottom: 1rem !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.border-bottom {
  border-bottom: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important;
}

.text-success {
  --bs-text-opacity: 1;
  color: #4a9ecc !important;
}

.border-bottom {
  border-bottom: 0px var(--bs-border-style) var(--bs-border-color) !important;
}

.py-4 {
  padding-top: 1rem !important;
  padding-bottom: 1.5rem !important;
}

.function-sidebar {
  background: #f0f4fa;
}

.btn-primary,
.btn-outline-primary {
  --bs-btn-color: #6BB4DE;
  --bs-btn-border-color: #6BB4DE;
  --bs-btn-hover-bg: #6BB4DE;
  --bs-btn-hover-border-color: #6BB4DE;
  --bs-btn-active-bg: #4A9ECC;
  --bs-btn-active-border-color: #4A9ECC;
  --bs-btn-disabled-color: #A6D5EE;
}
