/* =========================================
   EHTravels CRM Design System
========================================= */

:root {
  --bg: #F5F8FC;
  --panel: #FFFFFF;
  --border: #E4ECF3;
  --text: #1F2937;
  --muted: #6B7280;

  --blue: #018FC7;
  --blue-dark: #00498D;
  --blue-mid: #0A74A5;
  --blue-soft: #EAF7FC;

  --orange: #FF9006;
  --orange-soft: #FFF3E4;

  --success: #2F855A;
  --warning: #B7791F;
  --danger-bg: #FCEEEE;
  --danger-text: #B77979;

  --shadow: 0 8px 28px rgba(15,23,42,.06);
  --shadow-soft: 0 18px 50px rgba(15,23,42,.12);

  --radius-xl: 16px;
  --radius-lg: 16px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

/* =========================================
   Base
========================================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #F8FAFC;
  color: var(--text);
  font-family: Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
}

/* =========================================
   Header
========================================= */

.app-header {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(228,236,243,.7);
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  margin-left: 230px;
}

.header-inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* =========================================
   App Layout
========================================= */

.app-grid {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

.main-content {
  padding: 20px 22px 38px;
  min-width: 0;
  margin-left: 230px;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 340px;
  gap: 18px;
  align-items: start;
}

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

.content-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 24px;
}

/* =========================================
   Sidebar
========================================= */

.sidebar {
  background: #FFFFFF;
  border-right: 1px solid #E7EDF5;
  padding: 24px 14px;
  position: fixed;
  top: 0;
  left: 0;
  width: 235px;
  height: 100vh;
  overflow-y: auto;
  z-index: 200;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 22px;
  margin-bottom: 12px;
  border-bottom: 1px solid #E7EDF5;
}

.sidebar-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.sidebar-brand h1 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #12324A;
  line-height: 1.1;
}

.sidebar-brand p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #6B7280;
}

.sidebar .sidebar-section-header h2,
.sidebar .trip-card h3,
.sidebar .crm-nav-card h3 {
  color: #111827;
}

.sidebar .sidebar-section-header p,
.sidebar .trip-card p,
.sidebar .crm-nav-card p {
  color: #6B7280;
}

.sidebar .badge,
.sidebar .trip-badge,
.sidebar .crm-badge {
  background: #F3F4F6;
  color: #334155;
}

.sidebar .trip-card,
.sidebar .crm-nav-card {
  color: #475569;
}

.sidebar .trip-card:hover,
.sidebar .crm-nav-card:hover {
  background: #F8FAFC;
}

.sidebar .trip-card.active,
.sidebar .crm-nav-card.active {
  background: #EEF4FF;
  border-color: #DCE7FF;
  color: #4D80AF;
}

.sidebar-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-item-row i {
  width: 12px;
  height: 12px;
  stroke-width: 2;
  flex-shrink: 0;
}

.sidebar svg {
  width: 13px !important;
  height: 13px !important;
}

.sidebar-item-row span {
  font-size: 12px;
  font-weight: 500;
}

/* =========================================
   CRM Navigation Cards
========================================= */

.trip-list,
.crm-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
}

.trip-card,
.crm-nav-card {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 16px;
  padding: 10px 12px;
  transition: .18s ease;
}

.app-grid > .sidebar .trip-card:hover,
.app-grid > .sidebar .crm-nav-card:hover {
  background: #F8FAFC;
}

.app-grid > .sidebar .trip-card.active,
.app-grid > .sidebar .crm-nav-card.active {
  background: #EEF4FF;
  border-color: #DCE7FF;
  color: #4D80AF;
}

.trip-card h3,
.crm-nav-card h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.trip-card p,
.crm-nav-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

/* =========================================
   Badges
========================================= */

.badge,
.trip-badge,
.crm-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(1,143,199,.10);
  color: #0A74A5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar .badge,
.sidebar .trip-badge,
.sidebar .crm-badge {
  background: #F3F4F6;
  color: #334155;
  border: 1px solid #E5E7EB;
}

/* =========================================
   Panels / Cards
========================================= */

.card,
.trip-details-panel,
.crm-panel {
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.98) 0%,
      rgba(252,253,255,.98) 100%
    );
  border: 1px solid rgba(228,236,243,.95);
  border-radius: 16px;
  box-shadow:
    0 10px 30px rgba(15,23,42,.05),
    0 1px 2px rgba(15,23,42,.03);
  backdrop-filter: blur(10px);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease;
}

.card:hover,
.trip-details-panel:hover,
.crm-panel:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 44px rgba(15,23,42,.08),
    0 2px 4px rgba(15,23,42,.04);
}

#mainPanel {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.trip-details-panel,
.crm-panel {
  margin-top: 22px;
  padding: 30px;
}

.card {
  padding: 22px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-title h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -.02em;
}

/* =========================================
   Forms
========================================= */

.checkbox-row,
.form-group label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-row input[type="checkbox"],
.form-group label input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #DCE7F1;
  background: rgba(255,255,255,.92);
  border-radius: 12px;
  min-height: 48px;
  padding: 0 16px;
  font-size: 12px;
  color: var(--text);
  outline: none;
  transition: .18s ease;
  box-shadow: inset 0 1px 2px rgba(15,23,42,.03);
}

textarea {
  min-height: 130px;
  padding-top: 14px;
  resize: vertical;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #BDDCEC;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
  background: #FFFFFF;
  box-shadow:
    0 0 0 4px rgba(1,143,199,.10),
    0 10px 24px rgba(1,143,199,.08);
}

label {
  display: block;
  margin-bottom: 9px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #4B5563;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.client-form-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  border-bottom: 1px solid #DCE7F1;
  padding-bottom: 10px;
}

.client-form-tab {
  border: 1px solid #DCE6F2;
  background: #FFFFFF;
  color: #25526F;
  padding: 0 14px;
  border-radius: 12px;
  cursor: pointer;
  min-height: 40px;
  box-shadow: none;
  font-size: 13px;
}

.client-form-tab.active {
  background: #00498D;
  border-color: #00498D;
  color: #FFFFFF;
}

.client-form-panel {
  display: none;
}

.client-form-panel.active {
  display: block;
}

/* =========================================
   Buttons
========================================= */

button {
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--text);
  border-radius: 14px;
  min-height: 42px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: .18s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
}

.primary-btn {
  background: #4D80AF;
  border-color: #4D80AF;
  color: #FFFFFF;
}

.secondary-btn {
  background: #FFFFFF;
  border-color: #DDE7F0;
  color: #25526F;
}

.secondary-btn:hover {
  background: var(--blue-soft);
  border-color: #C9E7F3;
}

.danger-btn {
  background: var(--danger-bg);
  border-color: #F6DADA;
  color: var(--danger-text);
}

.toolbar,
.top-actions-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-actions-bar {
  justify-content: space-between;
  width: 100%;
  margin: 24px 0 32px;
}

.top-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}

.client-edit-under-avatar {
  font-size: 12px;
  min-height: 38px;
}

/* =========================================
   CRM Hero / Summary
========================================= */

#tripHero,
#crmHero {
  display: block;
  width: 100%;
  margin-bottom: 24px;
}

.trip-hero-card,
.crm-hero-card {
  display: block;
  width: 100%;
  margin-bottom: 24px;
}

.print-trip-summary,
.crm-summary-card {
  display: block;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(245,251,255,.98));
  border: 1px solid rgba(228,236,243,.95);
  border-radius: 16px;
  padding: 22px 28px;
  box-shadow: 0 16px 44px rgba(15,23,42,.07);
  margin-bottom: 24px;
}

.print-brand-row,
.crm-brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.print-brand-row img,
.crm-brand-row img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.print-brand-row h2,
.crm-brand-row h2 {
  margin: 0;
  font-size: 13px;
  color: #0E3C65;
}

.print-brand-row p,
.crm-brand-row p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #667085;
}

.print-summary-grid,
.crm-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.print-summary-grid > div,
.crm-summary-grid > div {
  background: #FFFFFF;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(15,23,42,.04);
}

.print-summary-grid span,
.crm-summary-grid span {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: #667085;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.print-summary-grid strong,
.crm-summary-grid strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #12324A;
  letter-spacing: -.02em;
}

/* =========================================
   CRM Lists / Rows
========================================= */

.crm-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 20px 22px 20px 28px;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,.98) 0%,
    rgba(250,252,255,.98) 100%
  );
  border: 1px solid rgba(228,236,243,.9);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15,23,42,.05);
  margin-bottom: 14px;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease;
}

.crm-row::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 12px;
  width: 5px;
  height: calc(100% - 24px);
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    #018FC7,
    #0A74A5
  );
}

.crm-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(15,23,42,.08);
  border-color: #D7EAF5;
}

.crm-row-title {
  font-size: 13px;
  font-weight: 750;
  letter-spacing: -.02em;
  color: #17324D;
}

.crm-row-subtitle {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.2;
  color: #6B7280;
}

.crm-row-subtitle svg {
  width: 20px;
  height: 20px;
  display: block;
  align-self: center;
}

.crm-row-subtitle span {
  display: block;
  line-height: 20px;
}

.crm-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.crm-row-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.crm-row-actions button {
  min-width: 78px;
}

.crm-row-value {
  text-align: right;
  font-size: 13px;
  font-weight: 650;
  color: #2F5E9E;
}

/* =========================================
   Status / Utility
========================================= */

.empty,
.meta,
.status {
  color: var(--muted);
}

.empty {
  font-size: 12px;
  line-height: 1.6;
}

.meta {
  font-size: 12px;
}

.status {
  margin-top: 12px;
  font-size: 12px;
}

.status.success {
  color: var(--success);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #0A74A5;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
  box-shadow: inset 0 0 0 1px rgba(1,143,199,.12);
}

.status-pill.success {
  background: #ECFDF3;
  color: #067647;
}

.status-pill.warning {
  background: #FFF7E6;
  color: var(--warning);
}

.status-pill.danger {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.collapsed {
  display: none;
}

/* =========================================
   Client Detail Page
========================================= */

.client-detail-page {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
}

body.client-detail-mode .content-layout {
  grid-template-columns: 1fr;
}

body.client-detail-mode .content-right,
body.client-detail-mode #tripHero {
  display: none;
}

body.client-detail-mode .content-left {
  width: 100%;
}

.client-detail-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.client-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.client-profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 28px 30px;
  background: #FFFFFF;
  border: 1px solid #E5EEF6;
  border-radius: 12px;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.07);
}

.client-hero-divider {
  width: 1px;
  min-height: 205px;
  background: #E5EEF6;
}

.client-hero-left {
  display: grid;
  grid-template-columns: 132px 1px 250px;
  gap: 28px;
  align-items: start;
}

.client-hero-left-divider {
  width: 1px;
  min-height: 220px;
  background: #E5EEF6;
}

.client-avatar-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.client-avatar-wrap {
  position: relative;
  display: inline-block;
}

.client-avatar {
  width: 112px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--blue-mid));
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 16px 34px rgba(1, 143, 199, 0.22);
}

.client-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 999px;
}

.client-avatar-status-dot {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #22C55E;
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.client-edit-under-avatar {
  width: 100%;
  min-height: 40px;
  border-radius: 12px;
}

.client-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-name-row h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #12324A;
}

.client-name-row .status-pill {
  transform: translateY(1px);
}

.client-lead-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  color: #64748B;
}

.client-lead-row strong {
  color: #0A74A5;
  font-weight: 700;
}

.client-contact-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 30px;
}

.client-contact-list div {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: #334155;
}

.client-contact-list svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.2;
  color: #334155;
}

.client-contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
  font-size: 12px;
  color: #4B5563;
}

.client-hero-right {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 30px;
}

.client-hero-action-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}

.client-hero-action-row button {
  min-width: 118px;
}

.client-hero-action-row .primary-btn,
.client-hero-action-row .secondary-btn {
  min-height: 42px;
  border-radius: 12px;
}

.client-hero-action-row .primary-btn {
  background: #4D80AF;
  border-color: #4D80AF;
}

.client-hero-action-row .primary-btn:hover {
  background: #3F709D;
  border-color: #3F709D;
}

.client-stage-tracker {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  align-items: start;
}

.stage-step {
  position: relative;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #94A3B8;
}

.stage-step span {
  position: relative;
  z-index: 1;
  display: flex;
  width: 28px;
  height: 28px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 2px solid #CBD5E1;
}

.stage-step::before {
  content: '';
  position: absolute;
  top: 14px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: #CBD5E1;
  z-index: 0;
}

.stage-step:first-child::before {
  display: none;
}

.stage-step p {
  margin: 0;
}

.stage-step.active span {
  background: #4D80AF;
  border-color: #4D80AF;
  box-shadow: 0 8px 18px rgba(77, 128, 175, 0.24);
}

.stage-step.active p {
  color: #4D80AF;
  font-weight: 700;
}

.client-stage-note {
  margin: 0;
  font-size: 12px;
  color: #64748B;
}

.client-stage-summary-card {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  background: #FFFFFF;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.client-stage-summary-card span {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: #64748B;
}

.client-stage-summary-card strong {
  font-size: 13px;
  font-weight: 700;
  color: #12324A;
}

.client-stage-summary-divider {
  width: 1px;
  min-height: 42px;
  background: #E5EEF6;
}

.more-menu {
  position: relative;
}

.more-menu-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
  min-width: 180px;
  display: none;
  padding: 10px;
  background: #FFFFFF;
  border: 1px solid #E5EEF6;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
}

.more-menu-dropdown.open {
  display: block;
}

.more-menu-dropdown button {
  width: 100%;
  justify-content: flex-start;
  color: #B42318;
}

.client-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 1px solid #DCE7F1;
}

.client-tabs button {
  min-height: 44px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #64748B;
  box-shadow: none;
  font-size: 13px;
}

.client-tabs button.active {
  color: #0A74A5;
  border-bottom: 3px solid var(--blue);
}

.client-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.client-info-card {
  padding: 22px;
  background: #FFFFFF;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.client-info-card.wide {
  grid-column: 1 / -1;
}

.client-info-card h3 {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 600;
  color: #12324A;
}

.client-info-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #374151;
}

.info-grid {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 5px 5px;
  font-size: 12px;
}

.info-grid span {
  font-size: 12px;
  font-weight: 650;
  color: #64748B;
}

.info-grid strong {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
  color: #1F2937;
}

.client-overview-top-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.client-overview-bottom-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  margin-top: 18px;
}

.client-overview-personal,
.client-overview-contact,
.client-overview-bookings {
  min-height: 150px;
}

.client-overview-total-bookings,
.client-overview-total-spent,
.client-overview-commission,
.client-overview-last-contact,
.client-overview-notes {
  min-height: 150px;
}

.client-overview-stat-card {
  padding: 22px;
  background: #FFFFFF;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.client-overview-stat-card span {
  font-size: 12px;
  font-weight: 600;
  color: #12324A;
}

.client-overview-stat-card strong {
  font-size: 13px;
  font-weight: 800;
  color: #12324A;
}

.client-overview-booking-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #EEF3F8;
}

.client-overview-booking-row:last-child {
  border-bottom: none;
}

.client-overview-booking-title {
  font-size: 13px;
  font-weight: 700;
  color: #12324A;
}

.client-overview-booking-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: #64748B;
}

/* =========================================
   Content Right Column
========================================= */

.content-right .card {
  padding: 14px;
}

.content-right .section-title h2 {
  font-size: 13px;
  font-weight: 600;
}

.content-right .meta {
  font-size: 12px;
}

/* =========================================
   Login - Split Screen
========================================= */

.login-brand h1,
.login-brand p,
.login-message h2,
.login-message p {
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 56% 44%;
  padding: 10px;
  background: #F3F6FA;
}

.login-left {
  position: relative;
  padding: 54px 58px;
  color: #FFFFFF;
  background: url('/login-hero.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 24px 0 0 24px;
  overflow: hidden;
}

.login-trust {
  position: absolute;
  margin-left: 30px;
  bottom: 54px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #FFFFFF;
}

.login-trust-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-trust-icon svg {
  width: 22px;
  height: 22px;
  color: #F4D28B;
}

.login-trust-title {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
}

.login-trust-text {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,.92);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: 30px;
}

.login-brand img {
  width: 80px;
  height: auto;
}

.login-brand h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.04em;
  color: #0F172A;
}

.login-brand p {
  margin: 4px 0 0;
  font-size: 14px;
  color: #475569;
}

.login-message {
  margin-top: 86px;
  max-width: 540px;
  margin-left: 30px;
}

.login-message h2 {
  font-size: 48px;
  line-height: 1.12;
  font-weight: 500;
  color: #FFFFFF;
}

.login-message p {
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255,255,255,.95);
}

.login-right {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border-radius: 0 24px 24px 0;
}

.login-card {
  width: min(430px, 100%);
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.login-card .logo {
  display: none;
}

.login-card h1 {
  margin: 0;
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -.04em;
  color: #0F172A;
}

.login-card .subtitle {
  margin: 10px 0 34px;
  font-size: 15px;
  color: #64748B;
}

.login-card label {
  font-size: 12px;
  font-weight: 700;
  color: #0F172A;
}

.login-card input {
  min-height: 52px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid #DCE7F1;
  font-size: 14px;
}

.login-card .primary-btn {
  width: 100%;
  height: 56px;
  margin-top: 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
}

.login-card .footer-note {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #E5E7EB;
  text-align: center;
}

.login-card input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset;
  -webkit-text-fill-color: #0F172A;
}

.login-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #667085;
}

.login-security svg {
  width: 14px;
  height: 14px;
}

.login-copyright {
  margin-top: 10px;
  font-size: 11px;
  color: #98A2B3;
}

.login-accent-line {
  width: 52px;
  height: 2px;
  background: #FF9006;
  border-radius: 999px;
  margin: 26px 0;
}

.login-card .form-group {
  margin-bottom: 20px;
}

/* =========================================
   Modal
========================================= */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background:
    linear-gradient(
      180deg,
      rgba(15,23,42,.45),
      rgba(15,23,42,.55)
    );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 40px;
  overflow-y: auto;
}

.modal-backdrop.open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.modal {
  width: min(980px,100%);
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.99) 0%,
      rgba(248,251,255,.98) 100%
    );
  border: 1px solid rgba(228,236,243,.95);
  border-radius: 16px;
  padding: 34px;
  box-shadow:
    0 30px 100px rgba(15,23,42,.22),
    0 4px 10px rgba(15,23,42,.05);
  animation: modalFloat .22s ease;
}

@keyframes modalFloat {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal .form-grid {
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

/* =========================================
   Responsive
========================================= */

@media (max-width: 1200px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .content-right {
    position: relative;
    top: 0;
  }
}

@media (max-width: 768px) {
  .global-commissions-header {
    align-items: stretch;
    flex-direction: column;
  }

  .global-commission-export-btn {
    width: 100%;
  }

  .main-content {
    padding: 22px 18px 40px;
  }

  .client-avatar-column {
    margin: 0 auto;
  }

  #mainPanel {
    padding: 0;
  }

  .form-grid,
  .modal .form-grid,
  .print-summary-grid,
  .crm-summary-grid {
    grid-template-columns: 1fr;
  }

  .crm-row {
    grid-template-columns: 1fr;
  }

  .crm-row-value {
    text-align: left;
  }

  .modal-backdrop {
    padding: 20px;
  }

  .client-detail-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .client-detail-actions {
    justify-content: stretch;
  }

  .client-detail-actions button {
    flex: 1;
  }

  .client-profile-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .client-avatar {
    margin: 0 auto;
  }

  .client-name-row {
    justify-content: center;
    flex-wrap: wrap;
  }

  .client-contact-list {
    align-items: center;
  }

  .client-contact-list div {
    justify-content: center;
  }

  .client-stage-tracker {
    grid-template-columns: repeat(2, 1fr);
  }

  .client-detail-grid {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   Document Upload
========================================= */

.document-upload-box {
  min-height: 94px;
  border: 1px solid #DCE7F1;
  border-radius: 16px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.upload-icon-btn {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: none;
  background: #EEF6FF;
  color: #018FC7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-icon-btn svg {
  width: 20px;
  height: 20px;
}

.document-upload-box span {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

/* =========================================
   Today Reminders
========================================= */

.today-reminder-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

.today-reminder-row svg {
  width: 14px;
  height: 14px;
}

.today-reminder-detail {
  margin: -2px 0 10px 22px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

/* =========================================
   Check-Boxes
========================================= */

.seat-preference-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.crm-checkbox-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #DCE7F1;
  border-radius: 999px;
  background: #FFFFFF;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.crm-checkbox-pill input {
  width: 14px;
  height: 14px;
  min-height: auto;
  accent-color: #00498D;
}

/* =========================================
  Booking Card
========================================= */

.booking-card-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.7fr) minmax(280px, 1.3fr) minmax(280px, 1.3fr) auto;
  gap: 34px;
  align-items: center;
}

.booking-card-main {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.booking-card-main > div:last-child {
  min-width: 0;
}

.booking-card-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 50%;
  background: #EEF6FC;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00498D;
}

.booking-card-icon svg {
  display: block !important;
  width: 26px !important;
  height: 26px !important;
  stroke: #00498D !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.booking-card-main .crm-row-title {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.booking-card-main .crm-row-subtitle {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.booking-card-info,
.booking-card-financials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 28px;
  border-left: 1px solid #DCE6F2;
  padding-left: 30px;
  min-width: 0;
}

.booking-card-info span,
.booking-card-financials span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #7A8797;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.booking-card-info strong,
.booking-card-financials strong {
  display: block;
  font-size: 13px;
  color: #24364B;
  line-height: 1.35;
  word-break: normal;
}

.booking-card-actions {
  position: relative;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.booking-menu-btn {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1;
}

.booking-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: #FFFFFF;
  border: 1px solid #E5EEF6;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(15,23,42,.14);
  padding: 8px;
  display: none;
  z-index: 100;
}

.booking-menu-dropdown.open {
  display: block;
}

.booking-menu-dropdown button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  background: transparent;
  border: none;
  box-shadow: none;
}

.booking-menu-danger {
  color: #B42318 !important;
}

.booking-card-row {
  overflow: visible;
  z-index: 1;
}

.booking-card-row:has(.booking-menu-dropdown.open) {
  z-index: 50;
}

.booking-menu-dropdown {
  z-index: 9999;
}

/* =========================================
  View Booking Modal
========================================= */

.booking-view-modal {
  width: min(980px, 100%);
}

.booking-view-card {
  background: #FFFFFF;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 16px 44px rgba(15,23,42,.08);
}

.booking-view-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E5EEF6;
}

.booking-view-header img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  flex: 0 0 70px;
}

.booking-view-header h2 {
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
  color: #12324A;
}

.booking-view-header p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #667085;
  line-height: 1.2;
}

.booking-view-grid,
.booking-view-financials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 18px;
}

.booking-view-grid > div,
.booking-view-financials > div {
  background: #F8FAFC;
  border: 1px solid #E5EEF6;
  border-radius: 12px;
  padding: 16px;
}

.booking-view-grid span,
.booking-view-financials span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #667085;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.booking-view-grid strong,
.booking-view-financials strong {
  display: block;
  font-size: 13px;
  color: #12324A;
}

.booking-view-financials {
  margin-top: 18px;
}

.booking-print-options {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.booking-print-options label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.booking-print-options input {
  width: auto;
  min-height: auto;
}

.booking-copy-badge {
  display: inline-block;
  margin-bottom: 20px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #EEF6FF;
  color: #00498D;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* =========================================
   Booking Print Versions
========================================= */

.booking-print-version {
  display: none;
}

.booking-print-card {
  background: #FFFFFF;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  padding: 34px;
}

.booking-print-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #E5EEF6;
}

.booking-print-header img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.booking-print-header h2 {
  margin: 0;
  font-size: 13px;
  color: #12324A;
}

.booking-print-header p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748B;
}

.booking-copy-badge {
  margin-left: auto;
  padding: 12px 18px;
  border-radius: 999px;
  background: #EEF6FF;
  color: #00498D;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .10em;
}

.booking-print-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.booking-print-grid > div {
  border: 1px solid #E5EEF6;
  border-radius: 12px;
  padding: 16px;
}

.booking-print-grid span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.booking-print-grid strong {
  display: block;
  font-size: 13px;
  color: #12324A;
}

/* =========================================
   Booking Print / PDF
========================================= */

@page {
  size: Letter portrait;
  margin: 0.5in 0.45in 1.05in 0.45in;
}

@media print {
  html,
  body {
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #FFFFFF !important;
    overflow: visible !important;
  }

  body > * {
    display: none !important;
  }

  #bookingPrintArea {
    display: block !important;
    width: 100%;
    box-sizing: border-box;
    background: #FFFFFF !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .booking-print-version {
    display: none !important;
  }

  body.print-client-copy #clientPrintVersion {
    display: block !important;
  }

  body.print-agency-copy #agencyPrintVersion {
    display: block !important;
  }

  .booking-print-card {
    padding: 0 !important;
    border: none !important;
    border-radius: 0 12px;
    box-shadow: none !important;
    background: #FFFFFF !important;
  }

  .booking-print-header,
  .booking-print-grid,
  .booking-print-grid > div,
  .travel-insurance-separator,
  .booking-print-legal h3,
  .booking-print-legal h4 {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .travel-insurance-separator,
  .booking-print-legal h3,
  .booking-print-legal h4 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .booking-print-legal {
    break-inside: auto;
    page-break-inside: auto;
    orphans: 3;
    widows: 3;
    margin: 0 0 18px 0;
  }

  .booking-print-legal p {
    margin: 0 0 12px 0;
  }

  .booking-print-footer {
    display: none !important;
  }

  body::after {
    content: "Exploring Horizons LLC - EHTravels | 6551 SW 35th St. Miami, FL 33155 (USA) | Tel. 786-505-1055 | support@ehtravels.com\A Florida Independent Seller of Travel License No. TI116450";
    white-space: pre-line;
    position: fixed;
    left: 0.45in;
    right: 0.45in;
    bottom: 0.2in;
    display: block;
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
    color: #667085;
    background: #FFFFFF;
    border-top: 1px solid #D0D7E2;
    padding-top: 6px;
    z-index: 9999;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* =========================================
   Client-Commissions Panel
========================================= */

.client-commissions-panel {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.client-commissions-header h2 {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.15;
  color: #12324A;
}

.client-commissions-header p {
  margin: 0;
  font-size: 12px;
  color: #667085;
}

.client-commissions-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.client-commission-stat-card {
  background: #F9FCFF;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  padding: 18px 18px 16px;
}

.client-commission-stat-label {
  font-size: 12px;
  color: #667085;
  margin-bottom: 14px;
}

.client-commission-stat-value {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  color: #12324A;
  margin-bottom: 14px;
}

.client-commission-stat-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  line-height: 1;
}

.client-commission-stat-pill-blue {
  background: #EEF6FF;
  color: #00498D;
}

.client-commission-stat-pill-amber {
  background: #FFF4E8;
  color: #B35A00;
}

.client-commission-stat-pill-green {
  background: #EAFBF2;
  color: #14804A;
}

.client-commissions-table-section h3 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #12324A;
}

.client-commissions-table-section p {
  margin: 0 0 18px;
  font-size: 13px;
  color: #667085;
}

.client-commissions-table-head,
.client-commissions-table-row {
  display: grid;
  grid-template-columns: 2.1fr 1fr 1fr 1fr 1fr 1fr;
  gap: 18px;
  align-items: center;
  border: 1px solid #E5EEF6;
  border-radius: 12px;
  padding: 18px 16px;
}

.client-commissions-table-head {
  background: #F8FAFC;
  font-size: 12px;
  font-weight: 700;
  color: #12324A;
  margin-bottom: 12px;
}

.client-commissions-table-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.client-commissions-table-row {
  background: #FFFFFF;
  font-size: 13px;
  color: #667085;
}

.client-commissions-booking-name {
  font-size: 13px;
  font-weight: 700;
  color: #12324A;
}

.client-commission-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  line-height: 1;
}

.client-commission-status-pill-green {
  background: #EAFBF2;
  color: #14804A;
}

.client-commission-status-pill-amber {
  background: #FFF4E8;
  color: #B35A00;
}

@media (max-width: 1200px) {
  .client-commissions-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-commissions-table-head,
  .client-commissions-table-row {
    grid-template-columns: 1.8fr 1fr 1fr 1fr 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .client-commissions-summary {
    grid-template-columns: 1fr;
  }

  .client-commissions-table-head {
    display: none;
  }

  .client-commissions-table-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* =========================================
   Client-Task Panel
========================================= */

.client-tasks-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.client-tasks-header h2 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: #12324A;
}

.client-tasks-header p {
  margin: 0;
  font-size: 12px;
  color: #64748B;
}

.client-tasks-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.client-task-stat-card {
  padding: 18px;
  background: #FFFFFF;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.client-task-stat-label {
  font-size: 12px;
  color: #64748B;
}

.client-task-stat-value {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 800;
  color: #12324A;
}

.client-task-stat-pill,
.client-task-inline-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.client-task-stat-pill {
  margin-top: 10px;
}

.client-task-pill-red {
  background: #FEE2E2;
  color: #B91C1C;
}

.client-task-pill-amber {
  background: #FEF3C7;
  color: #B45309;
}

.client-task-pill-blue {
  background: #DBEAFE;
  color: #1D4ED8;
}

.client-task-pill-green {
  background: #DCFCE7;
  color: #15803D;
}

.client-task-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.client-task-filter-chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #D7E4F0;
  border-radius: 999px;
  background: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  color: #64748B;
  cursor: pointer;
}

.client-task-filter-chip.active {
  background: #EAF4FF;
  border-color: #C7DCF4;
  color: #0A74A5;
}

.client-tasks-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.client-task-list-card,
.client-task-detail-card {
  padding: 18px;
  background: #FFFFFF;
  border: 1px solid #E5EEF6;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.client-task-list-head,
.client-task-row {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 0.9fr 1fr;
  gap: 16px;
  align-items: center;
}

.client-task-list-head {
  padding: 0 0 14px;
  border-bottom: 1px solid #EEF3F8;
  font-size: 12px;
  font-weight: 700;
  color: #12324A;
}

.client-task-row {
  padding: 16px 0;
  border-bottom: 1px solid #EEF3F8;
  font-size: 12px;
  color: #334155;
}

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

.client-task-title {
  font-size: 13px;
  font-weight: 700;
  color: #12324A;
}

.client-task-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: #64748B;
}

.client-task-detail-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.client-task-detail-card h3 {
  margin: 8px 0 18px;
  font-size: 13px;
  font-weight: 800;
  color: #12324A;
}

.client-task-detail-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.client-task-detail-meta span {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: #64748B;
}

.client-task-detail-meta strong {
  font-size: 13px;
  color: #12324A;
}

.client-task-detail-note {
  margin-top: 18px;
  padding: 14px;
  background: #F8FBFE;
  border: 1px solid #E5EEF6;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.6;
  color: #475569;
}

.client-task-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* =========================================
   Client Notes Panel
========================================= */

.client-notes-panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.client-notes-header h2 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: #12324A;
}

.client-notes-header p {
  margin: 0;
  font-size: 12px;
  color: #64748B;
}

.client-notes-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.client-note-add-btn {
  margin-left: auto;
}

.client-note-filter-chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #D7E4F0;
  border-radius: 999px;
  background: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  color: #64748B;
}

.client-note-filter-chip.active {
  background: #EAF4FF;
  border-color: #C7DCF4;
  color: #4D80AF;
}

.client-note-filter-internal {
  background: #F3E8FF;
  color: #8B5CF6;
  border-color: #E9D5FF;
}

.client-note-filter-private {
  background: #FEE2E2;
  color: #DC2626;
  border-color: #FECACA;
}

.client-note-filter-general {
  background: #FEF3C7;
  color: #D97706;
  border-color: #FDE68A;
}

.client-note-filter-pinned {
  background: #DCFCE7;
  color: #16A34A;
  border-color: #BBF7D0;
}

.client-notes-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(340px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.client-notes-feed-card,
.client-note-detail-card {
  padding: 22px;
  background: #FFFFFF;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  min-height: 520px;
}

.client-notes-feed-card h3,
.client-note-detail-card h3,
.client-note-composer h4 {
  margin: 0 0 18px;
  color: #12324A;
}

.client-note-card {
  padding: 18px;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  background: #FFFFFF;
  margin-bottom: 14px;
  cursor: pointer;
  transition: 0.18s ease;
}

.client-note-card:last-child {
  margin-bottom: 0;
}

.client-note-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.client-note-card.active {
  border-color: #4D80AF;
  box-shadow: 0 0 0 2px rgba(77, 128, 175, 0.12);
}

.client-note-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.client-note-card-title {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #12324A;
}

.client-note-type-pill,
.client-note-flag-pill,
.client-note-urgent-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.client-note-type-internal {
  background: #F3E8FF;
  color: #8B5CF6;
}

.client-note-type-private {
  background: #FEE2E2;
  color: #DC2626;
}

.client-note-type-general {
  background: #FEF3C7;
  color: #D97706;
}

.client-note-flag-pill {
  background: #DCFCE7;
  color: #16A34A;
}

.client-note-urgent-pill {
  background: #FEE2E2;
  color: #DC2626;
}

.client-note-card-body {
  font-size: 12px;
  line-height: 1.6;
  color: #334155;
}

.client-note-card-meta {
  margin-top: 14px;
  font-size: 12px;
  color: #64748B;
}

.client-note-card-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.client-note-pin-btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.client-note-detail-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
}

.client-note-detail-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.client-note-detail-box {
  padding: 16px;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  background: #F8FBFE;
  font-size: 12px;
  line-height: 1.6;
  color: #334155;
  white-space: pre-wrap;
}

.client-note-detail-meta {
  margin-top: 14px;
  font-size: 12px;
  color: #64748B;
}

.client-note-detail-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.client-note-composer {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #E8EEF5;
}

.client-note-composer input,
.client-note-composer textarea {
  margin-bottom: 12px;
}

.client-note-composer textarea {
  min-height: 120px;
}

.client-note-composer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.client-note-type-btn {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.client-note-type-btn.active {
  box-shadow: 0 0 0 2px rgba(77, 128, 175, 0.12);
}

.client-note-type-internal-btn {
  background: #F3E8FF;
  color: #8B5CF6;
  border-color: #E9D5FF;
}

.client-note-type-private-btn {
  background: #FEE2E2;
  color: #DC2626;
  border-color: #FECACA;
}

.client-note-type-general-btn {
  background: #FEF3C7;
  color: #D97706;
  border-color: #FDE68A;
}

@media (max-width: 768px) {
  .client-notes-layout {
    grid-template-columns: 1fr;
  }

  .client-note-add-btn {
    margin-left: 0;
  }

  .client-notes-toolbar .client-note-add-btn {
    margin-left: auto;
    margin-right: 16px;
  }
}

/* =========================================
   Client-Manual-Tasks Panel
========================================= */

.client-manual-tasks-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 32px;
  padding: 0 24px 24px;
}

.client-manual-tasks-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.client-manual-tasks-header h2 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: #12324A;
}

.client-manual-tasks-header p {
  margin: 0;
  font-size: 12px;
  color: #64748B;
}

.client-manual-tasks-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 32px;
}

.client-manual-task-add-btn {
  margin-left: auto;
}

.client-manual-task-filter-chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #D7E4F0;
  border-radius: 999px;
  background: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  color: #64748B;
}

.client-manual-task-filter-chip.active {
  background: #EAF4FF;
  border-color: #C7DCF4;
  color: #4D80AF;
}

.client-manual-tasks-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(340px, 0.9fr);
  gap: 18px;
  align-items: start;
  margin: 0;
}

.client-manual-tasks-feed-card,
.client-manual-task-detail-card {
  min-height: 520px;
  padding: 22px;
  background: #FFFFFF;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.client-manual-tasks-feed-card h3,
.client-manual-task-detail-card h3,
.client-manual-task-composer h4 {
  margin: 0 0 18px;
  color: #12324A;
}

.client-manual-task-card {
  padding: 18px;
  margin-bottom: 14px;
  background: #FFFFFF;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  cursor: pointer;
  transition: 0.18s ease;
}

.client-manual-task-card:last-child {
  margin-bottom: 0;
}

.client-manual-task-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.client-manual-task-card.active {
  border-color: #4D80AF;
  box-shadow: 0 0 0 2px rgba(77, 128, 175, 0.12);
}

.client-manual-task-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.client-manual-task-card-title {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #12324A;
}

.client-manual-task-card-body {
  font-size: 12px;
  line-height: 1.6;
  color: #334155;
}

.client-manual-task-card-meta {
  margin-top: 14px;
  font-size: 12px;
  color: #64748B;
}

.client-manual-task-card-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.client-manual-task-action-btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.client-manual-task-type-pill,
.client-manual-task-flag-pill,
.client-manual-task-urgent-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.client-manual-task-type-call {
  background: #DBEAFE;
  color: #1D4ED8;
}

.client-manual-task-type-email {
  background: #F3E8FF;
  color: #8B5CF6;
}

.client-manual-task-type-payment {
  background: #FEE2E2;
  color: #DC2626;
}

.client-manual-task-type-docs {
  background: #DCFCE7;
  color: #15803D;
}

.client-manual-task-type-followup {
  background: #FEF3C7;
  color: #D97706;
}

.client-manual-task-flag-pill {
  background: #DCFCE7;
  color: #16A34A;
}

.client-manual-task-urgent-pill {
  background: #FEE2E2;
  color: #DC2626;
}

.client-manual-task-detail-label {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748B;
}

.client-manual-task-detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.client-manual-task-detail-box {
  padding: 16px;
  background: #F8FBFE;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  font-size: 12px;
  line-height: 1.6;
  color: #334155;
  white-space: pre-wrap;
}

.client-manual-task-detail-meta {
  margin-top: 14px;
  font-size: 12px;
  color: #64748B;
}

.client-manual-task-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.client-manual-task-composer {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #E8EEF5;
}

.client-manual-task-composer input,
.client-manual-task-composer textarea {
  margin-bottom: 12px;
}

.client-manual-task-composer textarea {
  min-height: 120px;
}

.client-manual-task-composer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.client-manual-task-type-btn {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.client-manual-task-type-btn.active {
  box-shadow: 0 0 0 2px rgba(77, 128, 175, 0.12);
}

@media (max-width: 768px) {
  .client-manual-tasks-layout {
    grid-template-columns: 1fr;
  }

  .client-manual-task-add-btn {
    margin-left: 0;
  }

}

/* =========================================
   Client Email Modal
========================================= */

.email-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  padding: 40px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.email-modal-overlay.open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.email-modal-shell {
  width: min(920px, 100%);
  margin: 0;
  padding: 32px;
  background: #FFFFFF;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  box-shadow: 0 30px 100px rgba(15, 23, 42, 0.22);
}

.email-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.email-modal-header h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #12324A;
}

.email-modal-close-btn,
.email-modal-cancel-btn,
.email-modal-send-btn,
.email-modal-ghost-btn,
.email-modal-remove-btn {
  appearance: none;
  border: none;
  outline: none;
  cursor: pointer;
  font-family: Inter, sans-serif;
  transition: 0.18s ease;
}

.email-modal-close-btn,
.email-modal-cancel-btn,
.email-modal-ghost-btn {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #DDE7F0;
  border-radius: 12px;
  background: #FFFFFF;
  color: #25526F;
  font-size: 13px;
  font-weight: 650;
}

.email-modal-send-btn {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  background: #4D80AF;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 650;
}

.email-modal-remove-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  background: #FCEEEE;
  color: #B77979;
  font-size: 13px;
  font-weight: 650;
}

.email-modal-close-btn:hover,
.email-modal-cancel-btn:hover,
.email-modal-ghost-btn:hover,
.email-modal-send-btn:hover,
.email-modal-remove-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.email-modal-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.email-modal-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.email-modal-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.email-modal-field label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #4B5563;
}

.email-modal-input,
.email-modal-select,
.email-modal-textarea {
  width: 100%;
  border: 1px solid #DCE7F1;
  border-radius: 12px;
  background: #FFFFFF;
  color: #1F2937;
  font-family: Inter, sans-serif;
  font-size: 12px;
  outline: none;
  transition: 0.18s ease;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.email-modal-input,
.email-modal-select {
  min-height: 48px;
  padding: 0 16px;
}

.email-modal-textarea {
  min-height: 220px;
  padding: 14px 16px;
  resize: vertical;
}

.email-modal-input:hover,
.email-modal-select:hover,
.email-modal-textarea:hover {
  border-color: #BDDCEC;
}

.email-modal-input:focus,
.email-modal-select:focus,
.email-modal-textarea:focus {
  border-color: #018FC7;
  box-shadow:
    0 0 0 4px rgba(1, 143, 199, 0.10),
    0 10px 24px rgba(1, 143, 199, 0.08);
}

.email-modal-attachments-box {
  padding: 16px;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  background: #F8FBFE;
}

.email-modal-attachments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.email-modal-attachment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  background: #FFFFFF;
}

.email-modal-attachment-name {
  min-width: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
  word-break: break-word;
}

.email-modal-signature-preview {
  padding: 16px;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  background: #F8FBFE;
  min-height: 120px;
  display: flex;
  align-items: center;
}

.email-modal-signature-text {
  font-size: 12px;
  line-height: 1.7;
  color: #334155;
  white-space: pre-wrap;
}

.email-modal-signature-image {
  display: block;
  width: 360px;
  max-width: 100%;
  height: auto;
  margin-left: -12px;
}

.email-modal-helper-text {
  font-size: 12px;
  line-height: 1.6;
  color: #64748B;
}

.email-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #E8EEF5;
}

.email-modal-status {
  margin-top: 16px;
  font-size: 12px;
  color: #64748B;
}

.email-modal-status.success {
  color: #2F855A;
}

@media (max-width: 768px) {
  .email-modal-overlay {
    padding: 20px;
  }

  .email-modal-shell {
    padding: 22px;
  }

  .email-modal-header {
    flex-direction: column;
    align-items: stretch;
  }

  .email-modal-row {
    grid-template-columns: 1fr;
  }

  .email-modal-footer {
    justify-content: stretch;
  }

  .email-modal-footer button {
    width: 100%;
  }
}

/* =========================================
   Client Documents Modal
========================================= */

.client-documents-page-panel {
  background: #FFFFFF;
  border: 1px solid #D8E2EC;
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.client-documents-page-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.client-documents-page-header h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: #111827;
}

.client-documents-page-header p {
  margin: 6px 0 0;
  font-size: 12px;
  color: #64748B;
}

.client-documents-page-upload-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.client-documents-page-upload-row select {
  width: 150px;
  min-height: 40px;
  border-radius: 12px;
  font-size: 12px;
}

.client-documents-page-upload-row button {
  min-height: 40px;
  border-radius: 12px;
  background: #111827;
  border-color: #111827;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 650;
}

.client-documents-page-list {
  border: 1px solid #D8E2EC;
  border-radius: 18px;
  padding: 16px;
  margin-top: 12px;
}

.client-documents-page-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid #D8E2EC;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #FFFFFF;
}

.client-documents-page-row:last-child {
  margin-bottom: 0;
}

.client-documents-page-row strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: #111827;
  word-break: break-word;
}

.client-documents-page-row span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #64748B;
}

.client-documents-page-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.client-documents-page-actions a,
.client-documents-page-actions button {
  min-height: 34px;
  border: 1px solid #CBD8E6;
  border-radius: 999px;
  background: #FFFFFF;
  padding: 7px 12px;
  color: #334155;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.client-documents-page-actions button {
  border-color: #F9B6C1;
  color: #E11D48;
}

.client-documents-page-search {
  width: 100%;
  min-height: 42px;
  border: 1px solid #D8E2EC;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 12px;
  margin-bottom: 32px;
}

.client-documents-page-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.client-documents-page-chip {
  min-height: 34px;
  border: 1px solid #CBD8E6;
  border-radius: 999px;
  background: #FFFFFF;
  padding: 0 14px;
  color: #475569;
  font-size: 13px;
  font-weight: 650;
}

.client-documents-page-chip.active {
  background: #EEF4FF;
  border-color: #AFC7FF;
  color: #1E40AF;
}

@media (max-width: 760px) {
  .client-documents-page-header,
  .client-documents-page-upload-row,
  .client-documents-page-row {
    display: block;
  }

  .client-documents-page-upload-row select,
  .client-documents-page-upload-row button {
    width: 100%;
    margin-top: 10px;
  }

  .client-documents-page-actions {
    flex-wrap: wrap;
    margin-top: 12px;
  }
}

/* =========================================
   Global Commissions Page
========================================= */

.global-commissions-panel {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 30px 36px;
  max-width: 100%;
  overflow: hidden;
}

.global-commissions-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.global-commissions-header h2 {
  margin: 0;
  font-size: 13px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.04em;
  color: #0F172A;
}

.global-commissions-header p {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #8A94A6;
}

.global-commission-export-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid #1D4ED8;
  border-radius: 12px;
  background: #4D80AF;
  color: #FFFFFF;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.global-commission-export-btn svg,
.global-commission-export-btn i {
  width: 18px;
  height: 18px;
}

.global-commissions-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.global-commission-stat-card {
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  padding: 12px;
}

.global-commission-stat-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.global-commission-stat-icon svg {
  width: 18px;
  height: 18px;
}

.global-commission-stat-icon.blue { background:#EEF4FF; color:#4D80AF; }
.global-commission-stat-icon.green { background:#ECFDF3; color:#067647; }
.global-commission-stat-icon.amber { background:#FFF7E6; color:#B7791F; }
.global-commission-stat-icon.purple { background:#F3E8FF; color:#7E22CE; }
.global-commission-stat-icon.slate { background:#F1F5F9; color:#475569; }
.global-commission-stat-icon.red { background:#FEE2E2; color:#DC2626; }

.global-commission-stat-content span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  color: #667085;
}

.global-commission-stat-content strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 800;
  color: #12324A;
}

.global-commission-stat-content small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.1;
  color: #8A94A6;
}

.global-commissions-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px 240px 150px;
  gap: 18px;
  margin-bottom: 24px;
}

.global-commission-search-wrap {
  position: relative;
}

.global-commission-search-wrap svg,
.global-commission-search-wrap i {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: #8A94A6;
}

.global-commission-search-wrap input {
  width: 100%;
  padding-left: 44px;
}

.global-commissions-filters input,
.global-commissions-filters select,
.global-commission-filter-btn,
.global-commission-advanced-filters input,
.global-commission-advanced-filters select {
  min-height: 48px;
  border: 1px solid #DDE7F0;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
}

.global-commission-filter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.global-commission-advanced-filters {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.global-commission-advanced-filters.open {
  display: grid;
}

.global-commissions-list {
  width: 100%;
  background: #fff;
  border: 1px solid #E5EEF6;
  border-radius: 18px;
  overflow-x: auto;
  overflow-y: visible;
}

.global-commission-table {
  min-width: 980px;
}

.global-commission-table-head,
.global-commission-table-row {
  display: grid;
  grid-template-columns:
    minmax(120px, 1fr)
    minmax(110px, 1fr)
    minmax(140px, 1.2fr)
    minmax(130px, 1fr)
    minmax(90px, .75fr)
    minmax(120px, 1fr)
    minmax(80px, .7fr)
    minmax(60px, .45fr);
  gap: 14px;
  align-items: center;
}

.global-commission-table-head {
  padding: 18px 20px;
  border-bottom: 1px solid #E5EEF6;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.global-commission-table-row {
  padding: 22px 20px;
  border-top: 1px solid #EEF2F7;
}

.global-commission-booking-cell strong,
.global-commission-client-cell strong,
.global-commission-supplier-cell strong,
.global-commission-money-cell strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #12324A;
}

.global-commission-booking-cell span,
.global-commission-client-cell span,
.global-commission-money-cell span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #667085;
}

.global-commission-date-cell,
.global-commission-money-cell {
  font-size: 12px;
  color: #334155;
}

.global-commission-expanded-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0 14px 18px;
  padding: 18px 24px;
  border-radius: 14px;
}

.global-commission-expanded-row.alt-a { background:#F8FAFC; }
.global-commission-expanded-row.alt-b { background:#FFF8ED; }

.global-commission-expanded-row span {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 800;
  color: #667085;
  text-transform: uppercase;
}

.global-commission-expanded-row strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: #12324A;
}

.global-commission-payout-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.global-commission-payout-pill.paid { background:#DCFCE7; color:#166534; }
.global-commission-payout-pill.partial { background:#FEF3C7; color:#92400E; }
.global-commission-payout-pill.pending { background:#FFEDD5; color:#C2410C; }

.global-commission-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-top: 1px solid #E5EEF6;
  font-size: 12px;
  color: #667085;
}

.global-commission-pagination-controls {
  display: flex;
  gap: 6px;
}

.global-commission-pagination button {
  min-width: 34px;
  min-height: 34px;
  border-radius: 12px;
  font-size: 12px;
}

.global-commission-pagination button.active {
  background: #12324A;
  color: #fff;
}

.global-commission-pagination select {
  width: 120px;
  min-height: 38px;
}

.global-commission-actions-cell {
  position: relative;
}

.global-commission-action-toggle {
  min-width: 38px;
  min-height: 38px;
  border-radius: 14px;
  font-size: 13px;
}

.global-commission-action-menu {
  display: none;
  position: absolute;
  top: 44px;
  right: 0;
  z-index: 50;
  min-width: 160px;
  padding: 8px;
  background: #fff;
  border: 1px solid #E5EEF6;
  border-radius: 14px;
}

.global-commission-action-menu.open {
  display: block;
}

.global-commission-action-menu button {
  width: 100%;
  min-height: 36px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 12px;
}

.global-commission-action-menu button.danger {
  color: #DC2626;
}

/* =========================================
   Commissions Edit Modal
========================================= */

.commission-edit-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.commission-edit-overlay.open {
  display: flex;
}

.commission-edit-panel {
  width: min(560px, 100%);
  background: #FFFFFF;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.commission-edit-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.commission-edit-header h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #12324A;
}

.commission-edit-header p {
  margin: 6px 0 0;
  font-size: 12px;
  color: #667085;
}

.commission-edit-header button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 13px;
}

.commission-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.commission-edit-grid label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.commission-edit-grid input {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  border: 1px solid #DDE7F0;
  border-radius: 12px;
  padding: 0 12px;
  font-size: 12px;
}

.commission-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.commission-edit-actions button {
  min-height: 42px;
  border-radius: 12px;
  font-size: 13px;
}

/* =========================================
   Invoices Page
========================================= */

.invoice-main {
  padding: 20px 22px 38px;
  min-width: 0;
  margin-left: 230px;
}

.invoice-panel {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.invoice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.invoice-header h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #12324A;
}

.invoice-header p {
  margin: 6px 0 0;
  font-size: 12px;
  color: #667085;
}

.invoice-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.invoice-primary-button,
.invoice-secondary-button,
.invoice-pagination button,
.invoice-tab {
  border: 1px solid #4D80AF;
  background: #4D80AF;
  color: #ffffff;
  border-radius: 14px;
  min-height: 42px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: .18s ease;
}

.invoice-primary-button,
.invoice-secondary-button,
.invoice-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.invoice-secondary-button {
  background: #ffffff;
  color: #4D80AF;
}

.invoice-primary-button:hover,
.invoice-secondary-button:hover,
.invoice-pagination button:hover,
.invoice-tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.invoice-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.invoice-summary-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
}

.invoice-summary-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.invoice-summary-icon svg {
  width: 22px;
  height: 22px;
}

.invoice-icon-blue {
  background: #EAF7FC;
  color: #018FC7;
}

.invoice-icon-amber {
  background: #FFF3E4;
  color: #FF9006;
}

.invoice-icon-green {
  background: #ECFDF3;
  color: #2F855A;
}

.invoice-icon-red {
  background: #FCEEEE;
  color: #B77979;
}

.invoice-summary-card span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #667085;
}

.invoice-summary-card strong {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  font-weight: 800;
  color: #12324A;
}

.invoice-summary-card small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #98A2B3;
}

.invoice-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 190px auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.invoice-search {
  position: relative;
}

.invoice-search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  color: #667085;
}

.invoice-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px 0 44px;
  border: 1px solid #DCE7F1;
  border-radius: 12px;
  background: rgba(255,255,255,.92);
  color: #1F2937;
  font-size: 12px;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(15,23,42,.03);
}

.invoice-filters select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid #DCE7F1;
  border-radius: 12px;
  background: rgba(255,255,255,.92);
  color: #1F2937;
  font-size: 12px;
  outline: none;
}

.invoice-search input:focus,
.invoice-filters select:focus {
  border-color: #018FC7;
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(1,143,199,.10),
    0 10px 24px rgba(1,143,199,.08);
}

.invoice-filter-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 48px;
  width: 150px;

  background: #FFFFFF;
  color: #1F2937;

  border: 1px solid #DDE7F0;
  border-radius: 12px;

  font-size: 13px;
  font-weight: 500;

  cursor: pointer;
  transition: .18s ease;
}

.invoice-filter-button:hover {
  border-color: #BDDCEC;
  background: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
}

.invoice-filter-button svg {
  width: 18px;
  height: 18px;
}

.invoice-table-wrap {
  overflow-x: auto;
  overflow-y: visible;

  background: #ffffff;
  border: 1px solid #E5EEF6;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
}

.invoice-table {
  min-width: 1180px;
  overflow: visible;
}

.invoice-table-row {
  overflow: visible;
}

.invoice-actions-cell {
  position: relative;
  overflow: visible;
}

.invoice-table-head,
.invoice-table-row {
  display: grid;
  grid-template-columns:
    125px
    minmax(170px, 1.2fr)
    minmax(190px, 1.4fr)
    120px
    120px
    120px
    115px
    115px
    70px;
  gap: 14px;
  align-items: center;
}

.invoice-table-head {
  padding: 18px 20px;
  background: #F8FAFC;
  border-bottom: 1px solid #E5EEF6;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.invoice-table-row {
  padding: 20px;
  border-bottom: 1px solid #EEF3F8;
  font-size: 13px;
  color: #334155;
}

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

.invoice-table-row a {
  display: block;
  color: #0A74A5;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.invoice-table-row strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #12324A;
}

.invoice-table-row span:not(.invoice-status) {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #667085;
}

.invoice-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.invoice-status.paid {
  background: #ECFDF3;
  color: #067647;
}

.invoice-status.partial {
  background: #FFF7E6;
  color: #B7791F;
}

.invoice-status.sent {
  background: #EAF7FC;
  color: #0A74A5;
}

.invoice-status.overdue {
  background: #FCEEEE;
  color: #B77979;
}

.invoice-status.draft {
  background: #F3F4F6;
  color: #475569;
}

.invoice-action-button {
  min-width: 38px;
  min-height: 38px;
  padding: 0;

  border: 1px solid #DDE7F0;
  border-radius: 14px;

  background: #FFFFFF;
  color: #12324A;

  font-size: 20px;
  line-height: 1;
  cursor: pointer;

  transition: .18s ease;
}

.invoice-action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
}

.invoice-action-menu {
  display: none;
  position: fixed;
  z-index: 99999;
  min-width: 160px;
  padding: 8px;
  background: #FFFFFF;
  border: 1px solid #E5EEF6;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(15,23,42,.14);
}

.invoice-action-menu.open {
  display: block;
}

.invoice-action-menu button {
  width: 100%;
  min-height: 36px;

  border: none;
  background: transparent;

  text-align: left;

  font-size: 12px;
  color: #12324A;

  box-shadow: none;
}

.invoice-action-menu button:hover {
  background: #F8FAFC;
}

.invoice-action-menu button.danger {
  color: #DC2626;
}

.invoice-actions-cell {
  position: relative;
  overflow: visible;
}

.invoice-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.invoice-pagination p {
  margin: 0;
  font-size: 12px;
  color: #667085;
}

.invoice-pagination div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.invoice-pagination button {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 12px;
}

.invoice-pagination button:not(.active) {
  background: #ffffff;
  color: #4D80AF;
}

.invoice-pagination button.active {
  background: #4D80AF;
  border-color: #4D80AF;
  color: #ffffff;
}

@media (max-width: 1200px) {
  .invoice-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invoice-filters {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .invoice-main {
    margin-left: 0;
    padding: 22px 18px 40px;
  }

  .invoice-panel {
    padding: 22px;
    border-radius: 16px;
  }

  .invoice-header {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-header-actions {
    width: 100%;
  }

  .invoice-header-actions button {
    flex: 1;
  }

  .invoice-summary-grid,
  .invoice-filters {
    grid-template-columns: 1fr;
  }

  .invoice-pagination {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* =========================================
   New Invoice Modal
========================================= */

.invoice-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 40px;
  overflow-y: auto;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(10px);
}

.invoice-modal-backdrop.open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.invoice-modal {
  width: min(900px, 100%);
  background: #FFFFFF;
  border: 1px solid #E5EEF6;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 30px 100px rgba(15, 23, 42, .22);
}

.invoice-modal-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.invoice-modal-header h2,
.invoice-items-header h3 {
  margin: 0;
  font-size: 13px;
  color: #12324A;
}

.invoice-modal-header p {
  margin: 6px 0 0;
  font-size: 12px;
  color: #667085;
}

.invoice-modal-header button {
  min-width: 38px;
  min-height: 38px;
  border-radius: 12px;
  font-size: 13px;
}

.invoice-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.invoice-form label {
  font-size: 12px;
}

.invoice-form input,
.invoice-form select,
.invoice-form textarea {
  border-radius: 12px;
  font-size: 12px;
}

.invoice-items-section {
  margin: 22px 0;
}

.invoice-items-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.invoice-items-header button {
  min-height: 38px;
  border-radius: 12px;
  font-size: 13px;
}

.invoice-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 130px 42px;
  gap: 10px;
  margin-bottom: 10px;
}

.invoice-item-row button {
  min-width: 42px;
  min-height: 42px;
  border-radius: 14px;
}

.invoice-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.invoice-modal-actions button {
  min-height: 42px;
  border-radius: 12px;
  font-size: 13px;
}

@media (max-width: 768px) {
  .invoice-modal-backdrop {
    padding: 20px;
  }

  .invoice-form-grid,
  .invoice-item-row {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   Invoice View Modal
========================================= */

.invoice-view-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.invoice-view-grid > div,
.invoice-view-totals > div {
  background: #F8FAFC;
  border: 1px solid #E5EEF6;
  border-radius: 16px;
  padding: 14px;
}

.invoice-view-grid span,
.invoice-view-totals span {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  color: #667085;
}

.invoice-view-grid strong,
.invoice-view-totals strong {
  display: block;
  font-size: 13px;
  color: #12324A;
}

.invoice-view-section {
  margin-top: 18px;
}

.invoice-view-section h3 {
  margin: 0 0 10px;
  font-size: 13px;
  color: #12324A;
}

.invoice-view-item-row,
.invoice-view-payment-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #EEF3F8;
  font-size: 12px;
}

.invoice-view-item-row:last-child,
.invoice-view-payment-row:last-child {
  border-bottom: none;
}

.invoice-view-item-row span,
.invoice-view-payment-row span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #667085;
}

.invoice-view-item-row strong,
.invoice-view-payment-row strong {
  font-size: 13px;
  color: #12324A;
}

.invoice-view-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

@media (max-width: 768px) {
  .invoice-view-grid,
  .invoice-view-totals {
    grid-template-columns: 1fr;
  }
}