/* CSS Document */
* { margin: 0px;  padding: 0px;  font-family: Calibri, Arial, Helvetica; }
div#emcontent 			{width: 100vw;  max-width: 1600px;  margin: auto;  text-align: center; margin-top:1.0rem;}
form#login input 		{margin-top: 1rem;  padding: 0.5rem;  text-align: left; }
button 					{margin-top: 1rem;  padding: 0.5rem;  text-align: center; }
img.logo 				{max-width: 70vw; margin: auto;  margin-top: 1rem;  clear: both; }
img.logosmall 			{float: left; cursor: pointer;}
div.nav 				{display: flex;  align-items: center;  justify-content: space-between;  padding: 0.5rem;  position: relative; border-bottom: 2px solid #000; }
div.nav ul 				{list-style: none;  padding: 0;  margin: 0;  display: flex;  gap: 0.5rem;}
div.nav li 				{display: inline; }
div.nav a 				{text-decoration: none;  color: darkgrey;  padding:1rem; padding-bottom: 0.5rem;  display: block; font-size:1.2rem; border-bottom: 2px solid white;}
div.nav a:hover			{color: black; border-bottom: 2px solid black;}
div.pagination          {margin-bottom: 6rem;}
main                    {padding: 1.5rem; text-align: left;}
h1                      {font-size: 1.5rem;}
p                       {padding-top: 0.5rem;padding-bottom: 0.5rem;}

table 					{width: 100%;  border-collapse: collapse;  margin-top: 10px; font-size: 0.85rem;}
textarea 				{width: 300px;  padding: 0.25rem;  font-family: inherit;}

table             {margin-bottom: 2rem; max-width: 90vw !important; border-right: 1px solid #ccc;}
table.followups         {margin-bottom: 2rem;}
table.followups button  {margin-top: 0px;}
table#leads input       {width: 100%;}
table#leads textarea    {width: 100%;}
table#leads a           {color:black; text-decoration: none; padding: 3px;}
table#leads a:hover     {text-decoration: underline;}
th 					    {border: 1px solid #ccc;  padding:0.5rem;text-align: left; }
td 					    {border: 1px solid #ccc;  padding:0.1rem; padding-left: 0.5rem; padding-right: 0.5rem;  text-align: left; }
td select               {appearance: auto;  -webkit-appearance: auto;  -moz-appearance: auto;  background-color: white;  border: 1px solid #ccc;  cursor: pointer;}

th 						{background-color: #f4f4f4; }
.email-row 				{background-color: #fefefe; }
.known-contact 			{background-color:rgba(0,87,160,0.10) !important; }

div.emailhandling button       {border:2px solid #fff;}
div.emailhandling button:hover {border:2px solid #000;}

.delete-btn             {background: #c00;  color: white; border:none; cursor: pointer;}
td.action-cell          {display: flex; height: 100%; vertical-align:middle; flex-direction: row; border:none; border-top: 1px solid #ccc;}
.action-cell button     {border: none;  cursor: pointer;  opacity: 0.5;  background: none;  padding: 0.15rem 0.5rem;  margin: 0;  display: inline-block;  vertical-align: middle;}
.action-cell button:hover {opacity: 1.0;}

.lead-btn 				{background-color: #007700;  color: white;  padding: 0.25rem;  border: none;  cursor: pointer;  width: 100%;}
button#add-lead-btn     {margin-right: 5px; width: 90px; float: right; margin-right: 10px; margin-top: -53px; border: 2px solid #fff;}
button#add-lead-btn:hover{border: 2px solid #000;}

.event-btn        		{background-color: #0057a0 !important;}
.leadmessage          	{max-width:700px;word-wrap: break-word; overflow-wrap: break-word; white-space: normal;}
.save-button            {position: fixed;  top: 50%;  left: 50%;  transform: translate(-50%, -50%);  padding: 12px 24px;background-color: #28a745;  color: white;  border: none;  border-radius: 6px;  cursor: pointer;  z-index: 999;  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); }
.save-button:hover      {background-color: #218838; }
.hidden                 {display: none; }

.buttonlike 			{display: inline-block;  padding: 5px 12px;  background-color:rgba(134,134,134,1.00);  color: white;  text-decoration: none;  border: none;  border-radius: 4px;  cursor: pointer; }
.buttonlike:hover 		{background-color: #0056b3; }



.leads-filter-bar       {background: #f0f0f8; padding: 10px; border-radius: 5px; margin-bottom: 15px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.leads-filter-bar select {padding: 5px; }
.leads-filter-bar input[type=text] {padding: 5px; }
.leads-filter-bar button { padding: 6px 10px; cursor: pointer; margin-top:0px; }
.pagination             {padding: 10px; text-align: center; }
.pagination a           {padding: 4px 8px; margin: 0 3px; background: #f0f0f8; color: #333; text-decoration: none; border-radius: 3px; }
.pagination a.active    {background: #007bff; color: #fff; }

.notes-row				{background-color: #ffcfcf;}
.notes-container		{text-align: center; padding-bottom: 2rem;}
.close-notes            {margin: auto;margin-bottom: 1rem; margin-top: 1rem;}

.notestable table       {width: 100%;  border-collapse: collapse;  margin-top: 8px;}
.notestable th, .notestable td {border-bottom: 1px solid #ccc;  padding: 6px 8px;  text-align: left;  vertical-align: top; }
.notestable th          {background-color: #fff;  font-weight: bold; }
.notestable .note-date  {width: 70px;  white-space: nowrap; }
.notestable .note-user  {width: 70px;  white-space: nowrap; }
.notestable .note-actions {width: 70px;  white-space: nowrap; }
.notestable .note-text  {width: auto;  word-break: break-word; }
.notestable button      {background: none;  border: none;  cursor: pointer;  font-size: 1rem;  margin-left: 17px; margin-top: 0px; padding:0px; opacity: 0.6;}
.notestable button:hover{opacity: 1.0;}
.notestable tr:nth-child(even) td {background-color: #ffeded; }
.notestable tr:nth-child(odd) td  {background-color: #fff; }
.notestable tr:hover td           {background-color: #fff4f4	; }
.new-lead-row           {background-color:rgba(255,247,92,1.00) !important;}
.hot-lead-row           {background-color: #ffebee !important;}
.notesbut, .done-followup {padding:0.01rem; padding-left:0.5rem; padding-right: 0.5rem;}

.clickable-row          {cursor: pointer;transition: background-color 0.2s ease;}
.clickable-row:hover    {background-color: #f0f8ff; /* light blue */}
.two-column             {display: flex; flex-wrap: wrap; gap: 20px;}
.two-column > div       {flex: 1; min-width: 300px;}
h2.statusdrop           {margin-bottom: 1rem;}
h2.statusdrop select    {font-size: 1.2rem; margin-left: 0.5rem;}
.paxentry               {width: 50px; text-align: right;}
.paxentry input         {width: 50px; text-align: right;}
.paxentry input::-webkit-outer-spin-button,.paxentry input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0;}
.deleted-lead           {opacity: 0.6; background-color: #fdd;}
.booking-cell a         {pointer-events: auto; text-decoration: underline;}



/* Mobile (Portrait) */
@media (max-width: 1000px) {
img.logosmall 			{max-width: 90vw; max-height: 30px;}	
div.nav 				{flex-direction: column;  align-items: center; }
div.nav ul 				{display: none;  position: fixed;  top: 0;  left: 0;  width: 100%;  height: 100%;  background: rgba(0, 0, 0, 0.9);  flex-direction: column;  justify-content: center;  align-items: center;}
div.nav ul.show 		{display: flex;}
div.nav li 				{width: 100%;  text-align: center; }
div.nav a 				{font-size: 20px;  padding: 1.75rem; }
div.nav li:first-child a{border-top: 2px solid white;}
div.nav li:last-child a {background-color: rgba(111,43,44,1.00);}	
form#login input 		{width: 60vw; padding: 10px; clear: both; font-size: 1.2rem;}
form#login button 		{width: 30vw; display: block; margin: auto; clear: both; margin-top: 1rem; font-size: 1.2rem;}
table#leads td  		{font-size: 0.75rem !important;}
.two-column 			{flex-direction: column;}	
}

/* Desktop (Landscape) */
@media (min-width: 1000px) {
img.logosmall 			{max-width: 200px !important;}		
div.nav ul 				{margin-left: 3rem; }
div.nav li:last-child a {color: rgba(111,43,44,0.50);}	
div.emailhandling  		{width: 400px; display: flex; }
div.emailhandling form  {width: 150px; display: flex; margin-right: 1em;}
.new-note				{margin-top:0.5rem; min-height: 60px; padding: 1rem; width: 95%;}
.l_date					{width: 70px;}
.l_source				{width: 95px; word-break: break-word;}
.l_name	    			{width: 320px; word-break: break-word;}
.l_location	   			{width: 110px;}
.l_subject              {width: 200px !important; word-break: break-word;}
.l_phone				{width: 140px; word-break: break-word;}
.l_status				{width: 100px;}
.l_email			    {width: 320px !important; word-break: break-word;}
.l_action				{width: 80px;}
.l_message 	            {width: 480px;}
.buttonlike         	{margin-left: 30px;}
}


/* =========================================================
   DFG EVENTS LIST + EVENT DETAILS
   Replace the previous Events page CSS block with this block.
   ========================================================= */

/* ---------- Shared buttons and event-status controls ---------- */
.event-status-buttons {
    display: flex;
    align-items: center;
    gap: 7px;
}

.event-status-button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 8px 11px;
    background: #f8fafc;
    border: 1px solid #cfd4dc;
    border-radius: 9px;
    color: #475467;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.event-status-button:hover:not(:disabled) {
    background: #eef2f6;
    border-color: #98a2b3;
    transform: translateY(-1px);
}

.event-status-button.is-active,
.event-status-button.is-active:disabled {
    opacity: 1;
    background: #344054;
    border-color: #344054;
    color: #ffffff;
    box-shadow: 0 2px 7px rgba(16, 24, 40, 0.18);
    cursor: default;
}

.event-status-button[data-status-id="1"].is-active {
    background: #b54708;
    border-color: #b54708;
}

.event-status-button[data-status-id="2"].is-active {
    background: #067647;
    border-color: #067647;
}

.event-status-button[data-status-id="3"].is-active {
    background: #6941c6;
    border-color: #6941c6;
}

.event-status-button[data-status-id="4"].is-active {
    background: #b42318;
    border-color: #b42318;
}

.event-status-button[data-status-id="5"].is-active {
    background: #175cd3;
    border-color: #175cd3;
}

/* =========================================================
   EVENTS LIST PAGE
   ========================================================= */
#events-page {
    width: 100%;
    max-width: 1700px;
    margin: 0 auto;
    padding: 18px;
    box-sizing: border-box;
}

.events-heading-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

#events-page h2 {
    margin: 0 0 4px;
}

.events-summary {
    margin: 0;
    color: #667085;
    font-size: 14px;
}

.event-filters {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 14px 22px;
    align-items: start;
    margin-bottom: 18px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(16, 24, 40, 0.06);
}

.status-filter-group {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.status-filter-group legend {
    margin-bottom: 8px;
    padding: 0;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

.status-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-checkbox {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    box-sizing: border-box;
    background: #f8fafc;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    color: #344054;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.filter-checkbox:hover {
    border-color: #98a2b3;
}

.filter-checkbox:has(input:checked) {
    background: #eef4ff;
    border-color: #84adff;
    box-shadow: 0 0 0 2px rgba(53, 117, 255, 0.08);
}

.filter-checkbox input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #2563eb;
    cursor: pointer;
}

.filter-past {
    margin-top: 21px;
    white-space: nowrap;
}

.events-list-area {
    position: relative;
}

.events-loading {
    display: none;
    position: absolute;
    z-index: 5;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    padding: 9px 14px;
    background: #101828;
    border-radius: 999px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.22);
}

.events-list-area.is-loading .events-table-wrap,
.events-list-area.is-loading #events-pagination {
    opacity: 0.48;
    pointer-events: none;
}

.events-table-wrap {
    overflow-x: auto;
    transition: opacity 0.15s ease;
}

#events-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

#events-table thead th {
    padding: 7px 12px;
    color: #667085;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

#events-table tbody tr:not(.empty-row) {
    background: #ffffff;
    box-shadow: 0 2px 9px rgba(16, 24, 40, 0.07);
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.15s ease;
}

#events-table tbody tr:not(.empty-row):hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(16, 24, 40, 0.12);
}

#events-table tbody tr.is-updating {
    opacity: 0.55;
}

#events-table tbody td {
    padding: 14px 12px;
    border-top: 1px solid #eaecf0;
    border-bottom: 1px solid #eaecf0;
    color: #344054;
    font-size: 14px;
    line-height: 1.35;
    vertical-align: middle;
}

#events-table tbody td:first-child {
    border-left: 1px solid #eaecf0;
    border-radius: 12px 0 0 12px;
}

#events-table tbody td:last-child {
    border-right: 1px solid #eaecf0;
    border-radius: 0 12px 12px 0;
}

#events-table .event-date {
    min-width: 138px;
    white-space: nowrap;
    font-weight: 700;
}

#events-table .event-name {
    min-width: 220px;
    max-width: 380px;
    font-weight: 700;
}

.event-status-cell {
    min-width: 550px;
}

#events-table .event-status-buttons {
    min-height: 44px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    white-space: nowrap;
}

.action-cell {
    min-width: 185px;
    width: 185px;
    text-align: center;
}

.event-action-buttons {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.event-action-button,
.details-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 9px 13px;
    border: 1px solid #cfd4dc;
    border-radius: 9px;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.event-action-button:hover,
.details-button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.edit-event-button,
.details-button-secondary {
    background: #f8fafc;
    color: #344054;
}

.edit-event-button:hover,
.details-button-secondary:hover:not(:disabled) {
    background: #eef2f6;
    border-color: #98a2b3;
}

.delete-event-button,
.details-button-danger {
    background: #fff5f4;
    border-color: #fda29b;
    color: #b42318;
}

.delete-event-button:hover:not(:disabled),
.details-button-danger:hover:not(:disabled) {
    background: #fee4e2;
}

.delete-event-button:disabled,
.details-button:disabled {
    opacity: 0.5;
    cursor: wait;
    transform: none;
}

.empty-row td {
    padding: 28px !important;
    background: #ffffff;
    border: 1px solid #eaecf0 !important;
    border-radius: 12px !important;
    color: #667085 !important;
    text-align: center;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 18px 0 4px;
    transition: opacity 0.15s ease;
}

.page-numbers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.page-link,
.page-ellipsis {
    display: inline-flex;
    min-width: 40px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 8px 11px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.page-link {
    background: #ffffff;
    border: 1px solid #d0d5dd;
    color: #344054;
}

.page-link:hover:not(.is-current):not(.is-disabled) {
    background: #f2f4f7;
    border-color: #98a2b3;
}

.page-link.is-current {
    background: #175cd3;
    border-color: #175cd3;
    color: #ffffff;
}

.page-link.is-disabled {
    opacity: 0.45;
    cursor: default;
}

.page-nav {
    min-width: 104px;
}

.page-ellipsis {
    min-width: 25px;
    padding-right: 2px;
    padding-left: 2px;
    color: #667085;
}

/* =========================================================
   EVENT DETAILS PAGE
   ========================================================= */
#event-details-page {
    width: 100%;
    max-width: 1700px;
    margin: 0 auto;
    padding: 18px;
    box-sizing: border-box;
}

.details-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.details-page-header h2 {
    margin: 4px 0 4px;
    color: #101828;
}

.details-back-link {
    color: #475467;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.details-back-link:hover {
    color: #101828;
    text-decoration: underline;
}

.details-subtitle {
    margin: 0;
    color: #667085;
    font-size: 14px;
}

.details-status-card,
.details-card {
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(16, 24, 40, 0.06);
}

.details-status-card {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
    padding: 15px 16px;
}

.details-section-label {
    color: #344054;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.details-status-buttons {
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 2px 1px 4px;
}

.details-inline-state,
.details-card-state {
    min-height: 17px;
    color: #667085;
    font-size: 12px;
    font-weight: 700;
}

.details-inline-state.is-success,
.details-card-state.is-success {
    color: #067647;
}

.details-inline-state.is-error,
.details-card-state.is-error {
    color: #b42318;
}

.details-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.details-grid-primary {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.details-grid-work {
    grid-template-columns: minmax(340px, 0.8fr) minmax(620px, 1.4fr);
    align-items: start;
}

.details-card {
    min-width: 0;
    padding: 18px;
}

.details-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.details-card-heading h3 {
    margin: 0 0 3px;
    color: #101828;
    font-size: 18px;
}

.details-card-heading p {
    margin: 0;
    color: #667085;
    font-size: 13px;
}

.details-card-state {
    flex: 0 0 auto;
    padding-top: 3px;
}

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

.details-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

.details-field-full {
    grid-column: 1 / -1;
}

.details-field input,
.details-field textarea,
.details-note-composer textarea,
.details-slots-table input {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 10px 11px;
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    color: #344054;
    font: inherit;
    font-size: 14px;
    line-height: 1.35;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.details-field input,
.details-slots-table input {
    min-height: 42px;
}

.details-field textarea,
.details-note-composer textarea {
    resize: vertical;
}

.details-field input:focus,
.details-field textarea:focus,
.details-note-composer textarea:focus,
.details-slots-table input:focus {
    outline: none;
    border-color: #84adff;
    box-shadow: 0 0 0 3px rgba(53, 117, 255, 0.12);
}

.details-field input.is-saving,
.details-field textarea.is-saving,
.details-field input:disabled,
.details-field textarea:disabled {
    background: #f2f4f7;
}

.details-input-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 9px;
    align-items: center;
}

.details-button-primary {
    background: #175cd3;
    border-color: #175cd3;
    color: #ffffff;
}

.details-button-primary:hover:not(:disabled) {
    background: #1849a9;
    border-color: #1849a9;
}

.details-button.is-hidden {
    display: none;
}

.details-note-composer {
    margin-bottom: 16px;
    padding: 13px;
    background: #f8fafc;
    border: 1px solid #eaecf0;
    border-radius: 12px;
}

.details-note-composer textarea {
    min-height: 92px;
}

.details-note-composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.details-help-text {
    color: #667085;
    font-size: 12px;
}

.details-notes-list {
    display: flex;
    max-height: 620px;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding-right: 3px;
}

.details-note {
    position: relative;
    padding: 13px 66px 13px 13px;
    background: #ffffff;
    border: 1px solid #eaecf0;
    border-radius: 11px;
}

.details-note-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
    margin-bottom: 6px;
    color: #667085;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.details-note-text {
    color: #344054;
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.details-text-button {
    padding: 0;
    background: transparent;
    border: 0;
    color: #b42318;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
}

.details-text-button:hover {
    text-decoration: underline;
}

.details-note .delete-note {
    position: absolute;
    top: 13px;
    right: 13px;
}

.details-empty-state {
    margin: 0;
    padding: 18px;
    background: #f8fafc;
    border: 1px dashed #d0d5dd;
    border-radius: 11px;
    color: #667085;
    font-size: 14px;
    text-align: center;
}

.details-add-slot {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(90px, 0.7fr) minmax(90px, 0.7fr) minmax(75px, 0.55fr) minmax(190px, 1.6fr) max-content;
    gap: 10px;
    align-items: end;
    margin-bottom: 15px;
    padding: 13px;
    background: #f8fafc;
    border: 1px solid #eaecf0;
    border-radius: 12px;
}

.details-add-slot-button {
    min-height: 42px;
    white-space: nowrap;
}

.details-table-scroll {
    overflow-x: auto;
}

.details-slots-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.details-slots-table th {
    padding: 8px 7px;
    color: #667085;
    font-size: 11px;
    font-weight: 800;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.035em;
    white-space: nowrap;
}

.details-slots-table td {
    padding: 8px 7px;
    border-top: 1px solid #eaecf0;
    vertical-align: middle;
}

.details-slots-table tbody tr:last-child td {
    border-bottom: 1px solid #eaecf0;
}

.details-slots-table input[type="date"] {
    min-width: 135px;
}

.details-slots-table input[type="time"] {
    min-width: 100px;
}

.details-slots-table .slot-pax {
    min-width: 70px;
    max-width: 84px;
}

.details-slots-table .slot-description {
    min-width: 170px;
}

.details-slot-actions-cell {
    min-width: 176px;
}

.details-slot-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.slot-save-state {
    display: block;
    margin-top: 4px;
}

.details-empty-slot-row td {
    padding: 22px;
    color: #667085;
    text-align: center;
}

/* =========================================================
   MOBILE / TABLET
   ========================================================= */
@media (max-width: 1100px) {
    .details-grid-primary,
    .details-grid-work {
        grid-template-columns: 1fr;
    }

    .details-add-slot {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .details-slot-description {
        grid-column: 1 / 4;
    }

    .details-add-slot-button {
        grid-column: 4;
    }
}

@media (max-width: 900px) {
    #events-page,
    #event-details-page {
        padding: 10px;
    }

    .event-filters {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 13px;
        border-radius: 12px;
    }

    .filter-past {
        width: 100%;
        margin-top: 0;
    }

    .status-filter-options {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-checkbox {
        width: 100%;
        min-height: 46px;
    }

    .events-table-wrap {
        overflow: visible;
    }

    #events-table,
    #events-table tbody,
    #events-table tr,
    #events-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    #events-table thead {
        display: none;
    }

    #events-table {
        border-spacing: 0;
    }

    #events-table tbody tr:not(.empty-row) {
        overflow: hidden;
        margin-bottom: 14px;
        border: 1px solid #dfe3e8;
        border-radius: 14px;
        box-shadow: 0 4px 14px rgba(16, 24, 40, 0.08);
    }

    #events-table tbody tr:not(.empty-row):hover {
        transform: none;
    }

    #events-table tbody td,
    #events-table tbody td:first-child,
    #events-table tbody td:last-child {
        display: grid;
        grid-template-columns: minmax(105px, 34%) minmax(0, 1fr);
        gap: 12px;
        align-items: center;
        min-width: 0;
        max-width: none;
        padding: 12px 13px;
        border: 0;
        border-bottom: 1px solid #eaecf0;
        border-radius: 0;
        white-space: normal;
    }

    #events-table tbody td::before {
        content: attr(data-label);
        color: #667085;
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.025em;
        text-transform: uppercase;
    }

    #events-table tbody td:last-child {
        border-bottom: 0;
    }

    #events-table .event-date,
    #events-table .event-name {
        min-width: 0;
        max-width: none;
    }

    .event-status-cell {
        display: block !important;
    }

    .event-status-cell::before {
        display: block;
        margin-bottom: 9px;
    }

    #events-table .event-status-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        min-height: 0;
    }

    #events-table .event-status-button {
        width: 100%;
        min-height: 44px;
        padding: 9px 8px;
        font-size: 13px;
    }

    #events-table .event-status-button:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .action-cell {
        display: grid !important;
        grid-template-columns: minmax(105px, 34%) minmax(0, 1fr) !important;
        align-items: center !important;
        width: 100%;
        text-align: left;
    }

    .event-action-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        width: 100%;
        min-height: 0;
    }

    .event-action-button {
        width: 100%;
        min-height: 44px;
        padding: 9px 10px;
        font-size: 13px;
    }

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

    .page-numbers {
        order: 3;
        width: 100%;
    }

    .page-nav {
        flex: 1 1 120px;
        max-width: 180px;
    }

    .details-page-header {
        align-items: flex-start;
    }

    .details-status-card {
        grid-template-columns: 1fr;
    }

    .details-status-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
    }

    .details-status-buttons .event-status-button {
        width: 100%;
        min-height: 44px;
        font-size: 13px;
    }

    .details-status-buttons .event-status-button:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .details-card {
        padding: 14px;
    }

    .details-table-scroll {
        overflow: visible;
    }

    .details-slots-table,
    .details-slots-table tbody,
    .details-slots-table tr,
    .details-slots-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .details-slots-table thead {
        display: none;
    }

    .details-slots-table tbody tr[data-slot-id] {
        overflow: hidden;
        margin-bottom: 12px;
        border: 1px solid #dfe3e8;
        border-radius: 12px;
    }

    .details-slots-table td {
        display: grid;
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        padding: 10px 11px;
        border: 0;
        border-bottom: 1px solid #eaecf0;
    }

    .details-slots-table td::before {
        content: attr(data-label);
        color: #667085;
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .details-slots-table td:last-child {
        border-bottom: 0;
    }

    .details-slots-table input,
    .details-slots-table input[type="date"],
    .details-slots-table input[type="time"],
    .details-slots-table .slot-pax,
    .details-slots-table .slot-description {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .details-slot-actions-cell {
        min-width: 0;
    }

    .details-slot-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .details-slot-actions .details-button {
        width: 100%;
        min-height: 44px;
    }

    .details-empty-slot-row td {
        display: block;
        border: 1px dashed #d0d5dd;
        border-radius: 11px;
    }

    .details-empty-slot-row td::before {
        display: none;
    }
}

@media (max-width: 620px) {
    .status-filter-options,
    .details-status-buttons,
    .details-form-grid,
    .details-add-slot {
        grid-template-columns: 1fr;
    }

    .details-page-header {
        flex-direction: column;
    }

    .details-page-header > .details-button {
        width: 100%;
        min-height: 44px;
    }

    .details-status-buttons .event-status-button:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .details-field-full,
    .details-slot-description,
    .details-add-slot-button {
        grid-column: auto;
    }

    .details-input-action-row {
        grid-template-columns: 1fr;
    }

    .details-input-action-row .details-button {
        width: 100%;
        min-height: 44px;
    }

    .details-note-composer-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .details-note-composer-footer .details-button {
        width: 100%;
        min-height: 44px;
    }

    .details-note {
        padding: 13px 13px 42px;
    }

    .details-note .delete-note {
        top: auto;
        right: 13px;
        bottom: 13px;
    }

    #events-table tbody td,
    #events-table tbody td:first-child,
    #events-table tbody td:last-child {
        grid-template-columns: 94px minmax(0, 1fr);
        gap: 9px;
        padding: 10px 11px;
    }

    #events-table .event-status-buttons {
        grid-template-columns: 1fr;
    }

    .action-cell {
        grid-template-columns: 94px minmax(0, 1fr) !important;
    }

    #events-table .event-status-button:last-child:nth-child(odd) {
        grid-column: auto;
    }
}

/* =========================================================
   DFG DASHBOARD / FOLLOW-UPS / RECENT LEADS / EMAILS
   Add this block to the END of the existing stylesheet.
   ========================================================= */

#dashboard-page {
    width: 100%;
    max-width: 1700px;
    margin: 0 auto;
    padding: 18px;
    box-sizing: border-box;
    color: #344054;
}

#dashboard-page > h2 {
    margin: 24px 0 12px;
    color: #101828;
    font-size: 22px;
    line-height: 1.2;
}

#dashboard-page > h2:first-child {
    margin-top: 0;
}

/* ---------- Show All toggle ---------- */

#dashboard-page .dashboard-toggle {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    margin: 0 0 12px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

#dashboard-page .dashboard-toggle:hover {
    background: #f8fafc;
    border-color: #98a2b3;
}

#dashboard-page .dashboard-toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #175cd3;
    cursor: pointer;
}

/* ---------- Table containers ---------- */

#dashboard-page .dashboard-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 22px;
    padding: 2px;
    box-sizing: border-box;
}

#dashboard-page table {
    width: 100%;
    max-width: none !important;
    margin: 0;
    border: 0;
    border-collapse: separate;
    border-spacing: 0 8px;
    font-size: 13px;
}

#dashboard-page table.followups {
    min-width: 1050px;
}

#dashboard-page table#leads {
    min-width: 1100px;
}

#dashboard-page table#emails {
    min-width: 1250px;
}

#dashboard-page table th {
    padding: 7px 11px;
    background: transparent;
    border: 0;
    color: #667085;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

#dashboard-page table tr:has(td):not(.notes-row) {
    background: #ffffff;
    box-shadow: 0 2px 9px rgba(16, 24, 40, 0.07);
    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease;
}

#dashboard-page table tr:has(td):not(.notes-row):hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(16, 24, 40, 0.12);
}

#dashboard-page table td {
    padding: 12px 11px;
    background: inherit;
    border: 0;
    border-top: 1px solid #eaecf0;
    border-bottom: 1px solid #eaecf0;
    color: #344054;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    vertical-align: middle;
}

#dashboard-page table tr:not(.notes-row) td:first-child {
    border-left: 1px solid #eaecf0;
    border-radius: 11px 0 0 11px;
}

#dashboard-page table tr:not(.notes-row) td:last-child {
    border-right: 1px solid #eaecf0;
    border-radius: 0 11px 11px 0;
}

#dashboard-page table a {
    color: #175cd3;
    text-decoration: none;
}

#dashboard-page table a:hover {
    text-decoration: underline;
}

/* ---------- Follow-up action column ---------- */

#dashboard-page td.action-cell {
    display: table-cell;
    width: 118px;
    min-width: 118px;
    height: auto;
    border-top: 1px solid #eaecf0;
    border-right: 1px solid #eaecf0;
    border-bottom: 1px solid #eaecf0;
    vertical-align: middle;
    white-space: nowrap;
}

#dashboard-page .action-cell button {
    display: inline-flex;
    min-width: 40px;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0 3px;
    padding: 7px 10px;
    border-radius: 8px;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    opacity: 1;
    cursor: pointer;
}

#dashboard-page .action-cell .notesbut {
    background: #f8fafc;
    border: 1px solid #d0d5dd;
    color: #475467;
}

#dashboard-page .action-cell .notesbut:hover {
    background: #eef2f6;
    border-color: #98a2b3;
}

#dashboard-page .action-cell .done-followup {
    background: #067647;
    border: 1px solid #067647;
    color: #ffffff;
}

#dashboard-page .action-cell .done-followup:hover {
    background: #05603a;
    border-color: #05603a;
}

/* ---------- Notes panel ---------- */

#dashboard-page .notes-row {
    background: transparent;
    box-shadow: none;
}

#dashboard-page .notes-row > td {
    padding: 0;
    background: transparent;
    border: 0;
}

#dashboard-page .notes-container {
    margin: 0 4px 10px;
    padding: 18px;
    background: #fff8f7;
    border: 1px solid #fecdca;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(16, 24, 40, 0.07);
}

#dashboard-page .new-note {
    width: 100%;
    min-height: 86px;
    box-sizing: border-box;
    margin: 0 0 12px;
    padding: 11px;
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    color: #344054;
    font: inherit;
    font-size: 14px;
    resize: vertical;
}

#dashboard-page .new-note:focus {
    outline: none;
    border-color: #84adff;
    box-shadow: 0 0 0 3px rgba(53, 117, 255, 0.12);
}

#dashboard-page .new-note:disabled {
    background: #f2f4f7;
    color: #667085;
}

#dashboard-page .close-notes {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 12px auto;
    padding: 8px 14px;
    background: #ffffff;
    border: 1px solid #cfd4dc;
    border-radius: 9px;
    color: #344054;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

#dashboard-page .close-notes:hover {
    background: #eef2f6;
    border-color: #98a2b3;
}

/* ---------- Existing notes history ---------- */

#dashboard-page .notestable table {
    width: 100%;
    min-width: 0;
    max-width: none !important;
    margin: 8px 0 0;
    border: 1px solid #eaecf0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
}

#dashboard-page .notestable table tr {
    box-shadow: none;
    transform: none;
}

#dashboard-page .notestable th {
    padding: 8px;
    background: #f8fafc;
    border: 0;
    border-bottom: 1px solid #eaecf0;
}

#dashboard-page .notestable td {
    padding: 8px;
    background: #ffffff;
    border: 0;
    border-bottom: 1px solid #eaecf0;
}

#dashboard-page .notestable tr:last-child td {
    border-bottom: 0;
}

/* ---------- Next Action panel ---------- */

#dashboard-page .next-action-panel {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #fecdca;
}

#dashboard-page .next-action-title {
    margin: 0 0 12px;
    padding: 0;
    color: #101828;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
}

#dashboard-page .action-buttons {
    display: grid;
    grid-template-columns: repeat(5, minmax(125px, 1fr));
    gap: 9px;
}

#dashboard-page .next-action-button {
    min-height: 42px;
    box-sizing: border-box;
    margin: 0;
    padding: 9px 10px;
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    color: #344054;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.15;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.1s ease;
}

#dashboard-page .next-action-button:hover:not(:disabled) {
    background: #eef4ff;
    border-color: #84adff;
    color: #1849a9;
    transform: translateY(-1px);
}

#dashboard-page .next-action-dead {
    background: #fff5f4;
    border-color: #fda29b;
    color: #b42318;
}

#dashboard-page .next-action-dead:hover:not(:disabled) {
    background: #fee4e2;
    border-color: #f97066;
    color: #912018;
}

/* ---------- Extra actions beneath the schedule buttons ---------- */

#dashboard-page .next-action-extra {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(180, 35, 24, 0.15);
}

#dashboard-page .mark-client-button {
    display: inline-flex;
    width: 100%;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0;
    padding: 9px 14px;
    background: #067647;
    border: 1px solid #067647;
    border-radius: 9px;
    color: #ffffff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
}

#dashboard-page .mark-client-button:hover:not(:disabled) {
    background: #05603a;
    border-color: #05603a;
}

#dashboard-page .assign-followup-row {
    display: grid;
    grid-template-columns: max-content minmax(220px, 1fr) 78px;
    gap: 9px;
    align-items: center;
}

#dashboard-page .assign-followup-row label {
    color: #344054;
    font-size: 13px;
    font-weight: 800;
}

#dashboard-page .assign-user-select {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    margin: 0;
    padding: 9px 11px;
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    color: #344054;
    font: inherit;
    font-size: 14px;
}

#dashboard-page .assign-user-select:focus {
    outline: none;
    border-color: #84adff;
    box-shadow: 0 0 0 3px rgba(53, 117, 255, 0.12);
}

#dashboard-page .assign-user-go {
    min-width: 78px;
    min-height: 42px;
    box-sizing: border-box;
    margin: 0;
    padding: 9px 14px;
    background: #175cd3;
    border: 1px solid #175cd3;
    border-radius: 9px;
    color: #ffffff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
}

#dashboard-page .assign-user-go:hover:not(:disabled) {
    background: #1849a9;
    border-color: #1849a9;
}

#dashboard-page .assign-user-go:disabled,
#dashboard-page .next-action-panel button:disabled {
    background: #eaecf0;
    border-color: #d0d5dd;
    color: #98a2b3;
    cursor: not-allowed;
    transform: none;
}

#dashboard-page .next-action-state {
    min-height: 18px;
    margin-top: 10px;
    color: #667085;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

#dashboard-page .next-action-state.is-success {
    color: #067647;
}

#dashboard-page .next-action-state.is-error {
    color: #b42318;
}

/* ---------- Dashboard email buttons ---------- */

#dashboard-page .emailhandling {
    display: flex;
    width: auto;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

#dashboard-page .emailhandling form {
    display: block;
    width: auto;
    margin: 0;
}

#dashboard-page .emailhandling button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 9px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

#dashboard-page .emailhandling .lead-btn {
    width: auto;
    background: #067647;
    color: #ffffff;
}

#dashboard-page .emailhandling .event-btn {
    background: #175cd3 !important;
}

#dashboard-page .emailhandling .delete-btn {
    background: #fff5f4;
    border-color: #fda29b;
    color: #b42318;
}

/* ---------- Mobile / tablet ---------- */

@media (max-width: 1050px) {
    #dashboard-page .action-buttons {
        grid-template-columns: repeat(3, minmax(125px, 1fr));
    }
}

@media (max-width: 700px) {
    #dashboard-page {
        padding: 10px;
    }

    #dashboard-page > h2 {
        margin-top: 20px;
        font-size: 20px;
    }

    #dashboard-page .dashboard-toggle {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    #dashboard-page .dashboard-table-wrap {
        margin-right: -2px;
        margin-left: -2px;
    }

    #dashboard-page .notes-container {
        padding: 12px;
    }

    #dashboard-page .action-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #dashboard-page .assign-followup-row {
        grid-template-columns: 1fr;
        text-align: left;
    }

    #dashboard-page .assign-user-go {
        width: 100%;
        min-height: 44px;
    }

    #dashboard-page .emailhandling {
        display: grid;
        grid-template-columns: 1fr;
    }

    #dashboard-page .emailhandling form,
    #dashboard-page .emailhandling button {
        width: 100%;
    }
}

@media (max-width: 440px) {
    #dashboard-page .action-buttons {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   DFG LEADS PAGE
   Add to the END of the existing stylesheet.
   ========================================================= */

#leads-page {
    width: 100%;
    max-width: 1700px;
    margin: 0 auto;
    padding: 18px;
    box-sizing: border-box;
    color: #344054;
}

#leads-page h2 {
    margin: 0 0 14px;
    color: #101828;
    font-size: 24px;
    line-height: 1.2;
}

/* ---------- Filters ---------- */

#leads-page .leads-filter-bar {
    display: grid;
    grid-template-columns:
        minmax(145px, 0.8fr)
        minmax(145px, 0.8fr)
        minmax(155px, 0.9fr)
        minmax(220px, 1.4fr)
        max-content
        max-content;
    gap: 10px;
    align-items: center;
    margin: 0 0 15px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(16, 24, 40, 0.06);
}

#leads-page .leads-filter-bar select,
#leads-page .leads-filter-bar input[type="text"] {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    box-sizing: border-box;
    margin: 0;
    padding: 9px 11px;
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    color: #344054;
    font: inherit;
    font-size: 14px;
}

#leads-page .leads-filter-bar select:focus,
#leads-page .leads-filter-bar input[type="text"]:focus {
    outline: none;
    border-color: #84adff;
    box-shadow: 0 0 0 3px rgba(53, 117, 255, 0.12);
}

#leads-page .leads-filter-bar button,
#leads-page .leads-filter-bar .buttonlike {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0;
    padding: 9px 14px;
    border-radius: 9px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

#leads-page .leads-filter-bar button {
    background: #175cd3;
    border: 1px solid #175cd3;
    color: #ffffff;
}

#leads-page .leads-filter-bar button:hover {
    background: #1849a9;
    border-color: #1849a9;
}

#leads-page .leads-filter-bar .buttonlike {
    margin-left: 0;
    background: #f8fafc;
    border: 1px solid #cfd4dc;
    color: #344054;
}

#leads-page .leads-filter-bar .buttonlike:hover {
    background: #eef2f6;
    border-color: #98a2b3;
}

/* ---------- New Lead ---------- */

#leads-page #add-lead-btn {
    display: flex;
    width: auto;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    float: none;
    box-sizing: border-box;
    margin: 0 0 12px auto;
    padding: 9px 14px;
    background: linear-gradient(135deg, #067647, #039855);
    border: 1px solid #067647;
    border-radius: 9px;
    color: #ffffff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 7px rgba(6, 118, 71, 0.20);
}

#leads-page #add-lead-btn:hover {
    background: linear-gradient(135deg, #05603a, #067647);
    border-color: #05603a;
    transform: translateY(-1px);
}

/* ---------- Table ---------- */

#leads-page .leads-table-wrap {
    width: 100%;
    overflow-x: auto;
    padding: 2px;
    box-sizing: border-box;
}

#leads-page table#leads {
    width: 100%;
    min-width: 1420px;
    max-width: none !important;
    margin: 0 0 18px;
    border: 0;
    border-collapse: separate;
    border-spacing: 0 8px;
    font-size: 13px;
}

#leads-page #leads th {
    padding: 7px 10px;
    background: transparent;
    border: 0;
    color: #667085;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

#leads-page #leads tr:not(:first-child):not(.notes-row) {
    background: #ffffff;
    box-shadow: 0 2px 9px rgba(16, 24, 40, 0.07);
    transition:
        box-shadow 0.12s ease,
        transform 0.12s ease;
}

#leads-page #leads tr:not(:first-child):not(.notes-row):hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(16, 24, 40, 0.12);
}

#leads-page #leads td {
    height: auto;
    padding: 12px 10px;
    background: inherit;
    border: 0;
    border-top: 1px solid #eaecf0;
    border-bottom: 1px solid #eaecf0;
    color: #344054;
    font-size: 13px;
    line-height: 1.35;
    vertical-align: middle;
}

#leads-page #leads tr:not(.notes-row) td:first-child {
    border-left: 1px solid #eaecf0;
    border-radius: 11px 0 0 11px;
}

#leads-page #leads tr:not(.notes-row) td:last-child {
    border-right: 1px solid #eaecf0;
    border-radius: 0 11px 11px 0;
}

#leads-page #leads td.editable {
    cursor: pointer;
}

#leads-page #leads td.editable:hover {
    box-shadow: inset 0 0 0 2px rgba(23, 92, 211, 0.12);
}

#leads-page #leads td a {
    color: #175cd3;
    text-decoration: none;
}

#leads-page #leads td a:hover {
    text-decoration: underline;
}

#leads-page #leads .new-lead-row {
    background: #fff8c5 !important;
}

#leads-page #leads .hot-lead-row {
    background: #fff0f0 !important;
}

#leads-page #leads .deleted-lead {
    background: #fef3f2 !important;
    opacity: 0.65;
}

/* ---------- Inline editing ---------- */

#leads-page #leads input,
#leads-page #leads select,
#leads-page #leads textarea {
    width: 100%;
    min-width: 90px;
    box-sizing: border-box;
    margin: 0;
    padding: 8px 9px;
    background: #ffffff;
    border: 1px solid #84adff;
    border-radius: 7px;
    color: #344054;
    font: inherit;
    font-size: 13px;
    box-shadow: 0 0 0 3px rgba(53, 117, 255, 0.10);
}

#leads-page #leads textarea {
    min-height: 72px;
    resize: vertical;
}

/* ---------- Row action buttons ---------- */

#leads-page #leads td.action-cell {
    display: table-cell;
    width: 84px;
    min-width: 84px;
    height: auto;
    border-top: 1px solid #eaecf0;
    border-bottom: 1px solid #eaecf0;
    border-right: 1px solid #eaecf0;
    vertical-align: middle;
    white-space: nowrap;
}

#leads-page .action-cell button {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0 3px;
    padding: 0;
    background: #f8fafc;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    color: #475467;
    font-size: 16px;
    opacity: 1;
    cursor: pointer;
}

#leads-page .action-cell button:hover {
    background: #eef2f6;
    border-color: #98a2b3;
}

#leads-page .action-cell .trashbut {
    background: #fff5f4;
    border-color: #fda29b;
    color: #b42318;
}

#leads-page .action-cell .trashbut:hover {
    background: #fee4e2;
}

/* ---------- Notes panel ---------- */

#leads-page #leads .notes-row {
    background: transparent;
    box-shadow: none;
}

#leads-page #leads .notes-row > td {
    padding: 0;
    background: transparent;
    border: 0;
}

#leads-page .notes-container {
    margin: 0 4px 8px;
    padding: 18px;
    background: #fff8f7;
    border: 1px solid #fecdca;
    border-radius: 13px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(16, 24, 40, 0.06);
}

#leads-page .new-note {
    width: 100%;
    min-height: 82px;
    box-sizing: border-box;
    margin: 0 0 12px;
    padding: 11px;
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    color: #344054;
    font: inherit;
    font-size: 14px;
    resize: vertical;
}

#leads-page .new-note:focus {
    outline: none;
    border-color: #84adff;
    box-shadow: 0 0 0 3px rgba(53, 117, 255, 0.12);
}

#leads-page .close-notes {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 14px auto;
    padding: 8px 14px;
    background: #ffffff;
    border: 1px solid #cfd4dc;
    border-radius: 9px;
    color: #344054;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

#leads-page .close-notes:hover {
    background: #eef2f6;
    border-color: #98a2b3;
}

/* ---------- Existing notes table ---------- */

#leads-page .notestable table {
    width: 100%;
    max-width: none !important;
    margin: 8px 0 0;
    border: 1px solid #eaecf0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
}

#leads-page .notestable table tr {
    box-shadow: none;
    transform: none;
}

#leads-page .notestable th {
    padding: 8px;
    background: #f8fafc;
    border: 0;
    border-bottom: 1px solid #eaecf0;
}

#leads-page .notestable td {
    padding: 8px;
    background: #ffffff;
    border: 0;
    border-bottom: 1px solid #eaecf0;
}

#leads-page .notestable tr:last-child td {
    border-bottom: 0;
}

/* ---------- Follow-up buttons ---------- */

#leads-page .followup-buttons {
    display: grid;
    grid-template-columns: repeat(4, minmax(125px, 1fr));
    gap: 9px;
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid #fecdca;
}

#leads-page .followup-buttons::before {
    content: "Schedule next action";
    grid-column: 1 / -1;
    margin-bottom: 1px;
    color: #344054;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

#leads-page .followup-buttons button {
    min-height: 40px;
    box-sizing: border-box;
    margin: 0;
    padding: 8px 10px;
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    color: #344054;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

#leads-page .followup-buttons button:hover {
    background: #eef4ff;
    border-color: #84adff;
    color: #1849a9;
}

/* ---------- Lead assignment ---------- */

#leads-page .lead-assignment-panel {
    display: grid;
    grid-template-columns: max-content minmax(220px, 1fr) 78px;
    gap: 9px;
    align-items: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(180, 35, 24, 0.15);
}

#leads-page .lead-assignment-label {
    color: #344054;
    font-size: 13px;
    font-weight: 800;
}

#leads-page .lead-assign-user {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    margin: 0;
    padding: 9px 11px;
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    color: #344054;
    font: inherit;
    font-size: 14px;
}

#leads-page .lead-assign-user:focus {
    outline: none;
    border-color: #84adff;
    box-shadow: 0 0 0 3px rgba(53, 117, 255, 0.12);
}

#leads-page .lead-assign-go {
    min-width: 78px;
    min-height: 42px;
    box-sizing: border-box;
    margin: 0;
    padding: 9px 14px;
    background: #175cd3;
    border: 1px solid #175cd3;
    border-radius: 9px;
    color: #ffffff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
}

#leads-page .lead-assign-go:hover:not(:disabled) {
    background: #1849a9;
    border-color: #1849a9;
}

#leads-page .lead-assign-go:disabled {
    background: #eaecf0;
    border-color: #d0d5dd;
    color: #98a2b3;
    cursor: not-allowed;
}

#leads-page .lead-assignment-state {
    grid-column: 1 / -1;
    min-height: 17px;
    color: #667085;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

#leads-page .lead-assignment-state.is-success {
    color: #067647;
}

#leads-page .lead-assignment-state.is-error {
    color: #b42318;
}

/* ---------- Pagination ---------- */

#leads-page .pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 18px 0 60px;
    padding: 0;
}

#leads-page .pagination a {
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0;
    padding: 7px 10px;
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

#leads-page .pagination a:hover {
    background: #f2f4f7;
    border-color: #98a2b3;
}

#leads-page .pagination a.active {
    background: #175cd3;
    border-color: #175cd3;
    color: #ffffff;
}

/* ---------- Tablet ---------- */

@media (max-width: 1200px) {
    #leads-page .leads-filter-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #leads-page .leads-filter-bar input[type="text"] {
        grid-column: span 2;
    }

    #leads-page .followup-buttons {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }
}

/* ---------- Mobile ---------- */

@media (max-width: 700px) {
    #leads-page {
        padding: 10px;
    }

    #leads-page .leads-filter-bar {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    #leads-page .leads-filter-bar input[type="text"] {
        grid-column: auto;
    }

    #leads-page .leads-filter-bar button,
    #leads-page .leads-filter-bar .buttonlike {
        width: 100%;
    }

    #leads-page #add-lead-btn {
        width: 100%;
        min-height: 44px;
    }

    #leads-page .notes-container {
        padding: 12px;
    }

    #leads-page .followup-buttons {
        grid-template-columns: 1fr;
    }

    #leads-page .lead-assignment-panel {
        grid-template-columns: 1fr;
        text-align: left;
    }

    #leads-page .lead-assignment-state {
        grid-column: auto;
    }

    #leads-page .lead-assign-go {
        width: 100%;
        min-height: 44px;
    }
}