body {
    background: #f5f7fb;
}

.sales-shell,
.sales-detail-shell {
    min-height: calc(100vh - 78px);
    background: #f5f7fb;
    padding: 1px;
}

.sales-shell {

    height: calc(100vh - 78px);

    min-height: calc(100vh - 78px);

    display: flex;

    flex-direction: column;

    gap: 2px;

    overflow: hidden;

    contain: layout;

    position: relative;
}

.sales-header,
.sales-filter-panel,
.sales-card,
.sales-footer {
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
}

.sales-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
}

.sales-header h1,
.sales-detail-header h1 {
    margin: 0;
    color: #172033;
    font-size: 21px;
    font-weight: 900;
}

.sales-header p {
    margin: 2px 0 0;
    color: #64748b;
    font-size: 12px;
}

.sales-header-actions,
.sales-filter-panel,
.sales-action-bar,
.sales-pages {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.sales-filter-panel {
    display: none;
    padding: 8px;
}

.sales-filter-panel.open {
    display: flex;
}

.sales-field,
.sales-search {
    min-height: 34px;
    border: 1px solid #ced8e6;
    border-radius: 6px;
    background: #fff;
    color: #1f2937;
    font-size: 13px;
    padding: 6px 9px;
    outline: none;
}

.sales-field {
    min-width: 150px;
}

.sales-search {
    width: 220px;
}




.sales-btn:hover {
    background: #f6f8fc;
}

.sales-btn.primary {
    border-color: #275bd8;
    background: #275bd8;
    color: #fff;
}

.sales-btn.danger {
    border-color: #c33a3a;
    background: #c33a3a;
    color: #fff;
}

.sales-alert {
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 800;
}

.sales-alert.success {
    border: 1px solid #b9e4c5;
    background: #edf9f0;
    color: #146c2e;
}

.sales-alert.error {
    border: 1px solid #efc0c0;
    background: #fff1f1;
    color: #a32626;
}

.sales-table-wrap {

    flex: 1;

    min-height: 0;

    height: calc(100vh - 210px);

    overflow: auto;

    border: 1px solid #dbe3ef;

    border-radius: 8px;

    background: #fff;

    position: relative;
}

.sales-table {

    width: 100%;

   min-width: max-content;
    opacity: 1;

    transition: opacity .12s ease;

    table-layout: auto;

    border-collapse: separate;

    border-spacing: 0;
}

.sales-table th,
.sales-table td {

    min-width: 180px;
}

/* CHECKBOX */

.pin-check {

    width: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
}

/* LEAD NAME */

.pin-name {

    width: 320px !important;
    min-width: 320px !important;
    max-width: 320px !important;
}

.sales-table th {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 42px;
    padding: 0 10px;
    border-bottom: 1px solid #dbe3ef;
    background: #eef3f8;
    color: #1f2a44;
    font-size: 11px;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.sales-table td {
    height: 48px;
    max-width: 240px;
    padding: 7px 10px;
    border-bottom: 1px solid #edf1f6;
    color: #334155;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sales-table tbody {

    min-height: 600px;
}

.sales-table tbody tr:hover td {
    background: #f8fbff;
}

.sales-table tbody tr:hover .pin-check,
.sales-table tbody tr:hover .pin-name {
    background: #f8fbff !important;
}

.pin-check {

    position: sticky;
    left: 0;

    will-change: transform;

    z-index: 80;

    width: 42px;
    min-width: 42px;

    text-align: center;

    background: #ffffff !important;

    box-shadow: 1px 0 0 #e2e8f0;
}

.pin-name {

    position: sticky;

    left: 42px;

    will-change: transform;

    z-index: 70;

    min-width: 220px;
    width: 220px;
    max-width: 220px;

    background: #ffffff !important;

    border-right: 1px solid #dbe3ef;

    box-shadow: 6px 0 12px rgba(15,23,42,.04);
}

thead .pin-check,
thead .pin-name {
    z-index: 60;
    background: #eef3f8;
}

.pin-actions {

    min-width: 220px;

    width: 220px;

    background: #ffffff;

    border-left: 1px solid #e2e8f0;
}

.sales-table th.pin-actions {

    position: sticky;

    right: 0;

    z-index: 25;

    background: #eef3f8;
}

.sales-table td.pin-actions {

    position: sticky;

    right: 0;

    z-index: 20;

    background: #ffffff;
}






.sales-table th:not(.pin-check):not(.pin-name):not(.pin-actions),
.sales-table td:not(.pin-check):not(.pin-name):not(.pin-actions) {

    min-width: 170px;
}



.sales-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 9px;
    border-radius: 999px;
    background: #eaf1ff;
    color: #204eb8;
    font-size: 12px;
    font-weight: 900;
}

.sales-row-actions {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    width: 100%;
}

.sales-row-actions button {

    height: 30px;

    min-width: 62px;

    padding: 0 10px;

    border: 0;

    border-radius: 6px;

    background: #eef3f8;

    color: #23324b;

    font-size: 12px;

    font-weight: 800;

    cursor: pointer;

    white-space: nowrap;
}

/* DETAILS BUTTON */
.sales-row-actions button:nth-child(1){
    background: #2563eb;
    color: #fff;
    border: 1px solid #2563eb;
}

/* EDIT BUTTON */
.sales-row-actions button:nth-child(2){
    background: #059669;
    color: #fff;
    border: 1px solid #059669;
}

/* STAGE BUTTON */
.sales-row-actions button:nth-child(3){
    background: #ea580c;
    color: #fff;
    border: 1px solid #ea580c;
}

/* HOVER EFFECT */
.sales-row-actions button:hover{
    opacity: .9;
    transform: translateY(-1px);
}

.sales-empty {
    padding: 48px !important;
    text-align: center;
    color: #64748b;
}

.sales-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 10px;
    color: #475569;
    font-size: 13px;
}

.sales-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(260px, 3fr);
    gap: 10px;
}

.sales-main {
    display: grid;
    gap: 10px;
}

.sales-card {
    padding: 12px;
}

.sales-back-row {
    margin-bottom: 8px;
}

.sales-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.sales-kicker {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.sales-meta,
.sales-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: #64748b;
    font-size: 13px;
}

.sales-tags {
    justify-content: flex-end;
}

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

.sales-section-title h2 {
    margin: 0;
    color: #172033;
    font-size: 16px;
    font-weight: 900;
}

.sales-two-col {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.sales-timeline,
.sales-list,
.sales-task-grid {
    display: grid;
    gap: 8px;
}

.sales-timeline-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
}

.sales-timeline-dot {
    width: 10px;
    height: 10px;
    margin-top: 5px;
    border-radius: 50%;
    background: #275bd8;
    box-shadow: 0 0 0 4px #eaf1ff;
}

.sales-timeline-item header,
.sales-timeline-item footer,
.sales-task header,
.sales-task footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
}

.sales-timeline-item p,
.sales-note p,
.sales-task p {
    margin: 4px 0;
    color: #334155;
    font-size: 13px;
}

.sales-timeline-item span,
.sales-note span,
.sales-task span,
.sales-reminder span {
    color: #64748b;
    font-size: 12px;
}

.sales-note,
.sales-task,
.sales-reminder {
    border: 1px solid #edf1f6;
    border-radius: 7px;
    padding: 8px;
    background: #fbfcff;
}

.sales-task.overdue {
    border-color: #f3b6b6;
    background: #fff7f7;
}

.sales-reminder {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    align-items: center;
}

.sales-deal-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.sales-deal-grid .sales-section-title {
    grid-column: 1 / -1;
}

.sales-deal-grid span,
.sales-mini span {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.sales-deal-grid strong,
.sales-mini strong {
    color: #172033;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.sales-analytics {
    position: sticky;
    top: 8px;
    display: grid;
    align-content: start;
    gap: 8px;
}

.sales-mini {
    display: grid;
    gap: 3px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
    padding: 10px;
}

.sales-muted {
    color: #64748b;
    font-size: 13px;
}

.sales-modal-backdrop {

    align-items: center !important;

    justify-content: center !important;

    padding: 24px !important;

    position: fixed;

    inset: 0;

    z-index: 999999 !important;

    display: flex;     

    overflow: hidden;

    background: rgba(15, 23, 42, 0.55);

    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}










.sales-modal .sales-form {

    flex: 1;

    min-height: 0;

    overflow-y: auto;

    overflow-x: hidden;

    padding: 16px 18px 24px;

    display: grid;

    align-content: start;
}

.sales-modal .sales-form::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.sales-modal .sales-form::-webkit-scrollbar-track {
    background: transparent;
}

.sales-modal .sales-form::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.25);
    border-radius: 8px;
    border: 2px solid transparent; /* creates padding around thumb */
    background-clip: padding-box;
}

.sales-modal-close {

    width: 38px;

    height: 38px;

    border: none;

    border-radius: 10px;

    background: #f3f4f6;

    color: #111827;

    font-size: 18px;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    transition: .18s ease;
}

.sales-modal-close:hover {

    background: #e5e7eb;
}


.sales-modal header,
.sales-modal footer {

    padding: 14px 18px;

    background: #ffffff;

    flex-shrink: 0;
}



.sales-modal h2 {
    margin: 0;
    color: #172033;
    font-size: 18px;
}



.sales-form.grid {

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 12px 14px;
}

.sales-form .sales-field,
.sales-form select,
.sales-form input {

    height: 42px;

    font-size: 14px;

    border-radius: 8px;
}



.sales-form label {
    display: grid;
    gap: 5px;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
}


.sales-check {
    display: flex !important;
    align-items: center;
    gap: 8px;
}


@media (max-width: 768px) {

    .sales-modal {

        width: 96vw;

        max-height: 92vh;

        border-radius: 10px;
    }

    .sales-form.grid {

        grid-template-columns: 1fr;
    }

    .sales-modal .sales-form {

        padding: 14px;
    }
}

@media (max-width: 980px) {
    .sales-shell {
        height: auto;
        min-height: calc(100vh - 78px);
        overflow: visible;
    }

    .sales-header,
    .sales-detail-header {
        flex-direction: column;
    }

    .sales-detail-layout,
    .sales-two-col,
    .sales-deal-grid,
    .sales-form.grid {
        grid-template-columns: 1fr;
    }

    .sales-tags {
        justify-content: flex-start;
    }

    .sales-search {
        width: 100%;
    }
}


/* =========================================
   TOP STAGE GRID
========================================= */

.sales-stage-grid {

    display: grid;

    grid-template-columns: repeat(5, 1fr);

    gap: 14px;

    margin-bottom: 1px;
}

/* CARD */

/* CARD */

.sales-stage-card {

    border: none;

    border-radius: 10px;

    height: 30px;

    padding: 0 18px;

    display: flex;

    flex-direction: row;

    align-items: center;

    justify-content: center;

    gap: 8px;

    cursor: pointer;

    color: white;

    transition: all .18s ease;

    font-size: 14px;

    font-weight: 700;
}

/* COLORS */

.sales-stage-card:nth-child(1) {

    background: linear-gradient(135deg,#4b5563,#374151);
}

.sales-stage-card:nth-child(2) {

    background: linear-gradient(135deg,#ef4444,#dc2626);
}

.sales-stage-card:nth-child(3) {

    background: linear-gradient(135deg,#0ea5e9,#0284c7);
}

.sales-stage-card:nth-child(4) {

    background: linear-gradient(135deg,#f59e0b,#d97706);
}

.sales-stage-card:nth-child(5) {

    background: linear-gradient(135deg,#14b8a6,#0f766e);
}

/* HOVER */

.sales-stage-card:hover {

    transform: translateY(-3px);

    box-shadow:
        0 12px 24px rgba(15,23,42,.16);
}

/* ACTIVE */

.sales-stage-card.active {

    outline: 4px solid rgba(255,255,255,.45);

    transform: translateY(-2px);
}

/* TITLE */

.stage-title {

    font-size: 15px;

    font-weight: 800;

    line-height: 1.2;
}

/* COUNT */


/* RESPONSIVE */

@media (max-width: 1100px) {

    .sales-stage-grid {

        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {

    .sales-stage-grid {

        grid-template-columns: 1fr;
    }
}

/* =========================================
   ULTRA COMPACT CRM TOOLBAR
========================================= */

.sales-toolbar {

    display: flex;

    align-items: center;

    flex-wrap: nowrap;

    gap: 9px;

    padding: 4px;

    border: 1px solid #dbe3ef;

    border-radius: 10px;

    background: #ffffff;

    overflow: hidden;

    position: relative;

    width: 100%;
}

/* SELECT */

.sales-toolbar-field {

    min-width: 110px !important;

    max-width: 150px !important;

    height: 30px !important;

    padding: 0 6px !important;

    font-size: 11px !important;

    border-radius: 6px !important;

    line-height: 1 !important;
}

/* BUTTON */



/* SEARCH */

.sales-search {

   
    min-width: 160px !important;

    height: 30px !important;

    padding: 0 6px !important;

    font-size: 11px !important;

    border-radius: 6px !important;
}


/* REMOVE EXTRA SHADOW SPACE */

.sales-toolbar-dropdown {

    position: relative;

    overflow: visible;
}

.sales-toolbar-menu {

    position: absolute;

    top: 36px;

    left: 0;

    z-index: 9999;

    border: 1px solid #dbe3ef;

    border-radius: 8px;

    background: #ffffff;

    box-shadow:
        0 10px 24px rgba(15,23,42,.12);

    overflow: hidden;
}

.sales-toolbar-menu:not(.sales-column-menu) {

    width: 170px;
}

.sales-toolbar-menu button {

    width: 100%;

    height: 36px;

    border: none;

    background: white;

    text-align: left;

    padding: 0 12px;

    font-size: 12px;

    cursor: pointer;
}

.sales-toolbar-menu button:hover {

    background: #f3f4f6;
}

.sales-toolbar > * {

    flex-shrink: 0;
}



.sales-column-menu {

    position: absolute;

    top: calc(100% + 4px);

    right: 0;

    left: auto;

    width: 720px !important;

    background: #ffffff;

    border: 1px solid #dbe3ef;

    border-radius: 10px;

    padding: 18px;

    z-index: 99999;

    box-shadow: 0 10px 24px rgba(15,23,42,.12);

    display: grid;

    grid-template-columns: repeat(3, minmax(180px, 1fr));

    column-gap: 24px;

    row-gap: 16px;
}




.sales-column-item input {

    width: 14px;

    height: 14px;

    margin: 0;

    padding: 0;

    cursor: pointer;
}

.sales-toolbar {

    overflow: visible !important;
}

.sales-toolbar-dropdown {

    position: relative;

    overflow: visible !important;
}



.sales-column-item span {

    display: inline-block;

    padding-left: 2px;
}

.sales-lead-cell {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.sales-avatar {
    width: 38px;
    height: 38px;

    border-radius: 10px;

    background: linear-gradient(135deg, #2563eb, #1d4ed8);

    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

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

    flex-shrink: 0;

    margin-top: 2px;
}

.sales-lead-info {
    display: flex;
    flex-direction: column;
    gap: 2px;

    min-width: 0;
}

.sales-link {

    display: block;

    background: transparent;

    border: none;

    color: #1d4ed8;

    font-size: 15px;

    font-weight: 700;

    padding: 0;

    text-align: left;

    cursor: pointer;

    white-space: normal;

    overflow: visible;

    text-overflow: unset;

    max-width: 100%;
}

.sales-mobile-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.sales-mobile {
    font-size: 13px;
    color: #475569;
}

.sales-email {

    font-size: 12px;

    color: #64748b;

    white-space: normal;

    overflow: visible;

    text-overflow: unset;

    word-break: break-word;

    max-width: 100%;
}

.sales-whatsapp {

    width: 19px;

    height: 18px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    text-decoration: none;
}

.whatsapp-icon {

    width: 100%;

    height: 100%;

    object-fit: contain;

    display: block;
}

/* =========================================
   IMPORT LEADS MODAL
========================================= */





/* HEADER */

.lead-import-header h3{

    margin:0;

    font-size:34px;

    font-weight:800;

    color:#172033;
}

/* FILE ROW */

.lead-import-upload-row{

    display:flex;

    align-items:center;

    gap:18px;

    flex-wrap:wrap;
}

.lead-import-file-btn{

    position:relative;

    display:inline-flex;

    align-items:center;

    justify-content:center;

    height:44px;

    padding:0 18px;

    border-radius:10px;

    border:1px solid #dbe3ef;

    background:#ffffff;

    font-size:14px;

    font-weight:700;

    cursor:pointer;

    overflow:hidden;
}

.lead-import-hidden-input{

    position:absolute;

    inset:0;

    opacity:0;

    cursor:pointer;
}

.lead-import-file-name{

    font-size:14px;

    font-weight:600;

    color:#2563eb;
}

/* CARD */

.lead-import-card{

    padding:18px;

    border:1px solid #e2e8f0;

    border-radius:14px;

    background:#f8fbff;
}

/* RADIO */

.lead-import-radio-group{

    display:flex;

    align-items:center;

    gap:26px;

    flex-wrap:wrap;
}

.lead-import-radio{

    display:flex;

    align-items:center;

    gap:8px;

    font-size:15px;

    font-weight:600;

    color:#334155;
}

/* NOTE */

.lead-import-note{

    margin-top:14px;

    font-size:13px;

    line-height:1.6;

    color:#64748b;
}

/* GRID */

.lead-import-grid{

    display:grid;

    grid-template-columns:repeat(2,minmax(0,1fr));

    gap:22px;
}

.lead-import-section{

    display:flex;

    flex-direction:column;

    gap:8px;
}

.lead-import-label{

    font-size:14px;

    font-weight:700;

    color:#334155;
}

/* FULL WIDTH */

.full-width{

    grid-column:1 / -1;
}


/* =========================================
   UNIVERSAL BUTTON
========================================= */

.sales-btn {

    min-height: 34px;

    border: 1px solid #cfd8e5;

    border-radius: 6px;

    background: #ffffff;

    color: #243044;

    font-size: 13px;

    font-weight: 800;

    padding: 6px 10px;

    cursor: pointer;

    white-space: nowrap;

    transition: .18s ease;
}

/* =========================================
   BODY SCROLL LOCK
========================================= */

body.modal-open {

    overflow: hidden;
}

/* =========================================
   UNIVERSAL MODAL BACKDROP
========================================= */

.sales-modal-backdrop {

    position: fixed;

    inset: 0;

    z-index: 999999 !important;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 24px;

    overflow: hidden;

    background: rgba(15, 23, 42, 0.55);

    -webkit-backdrop-filter: blur(4px);

    backdrop-filter: blur(4px);

    overscroll-behavior: contain;
}

/* =========================================
   UNIVERSAL MODAL
========================================= */

.sales-modal,
.lead-import-modal {

    height: calc(100vh - 48px) !important;

    max-height: calc(100vh - 48px) !important;

    display: flex !important;

    flex-direction: column !important;

    overflow: hidden !important;

    overscroll-behavior: contain;
}

.lead-import-modal header {

    flex-shrink: 0;
}

.lead-import-modal .sales-modal-form {

    flex: 1 1 auto !important;

    min-height: 0 !important;

    height: 100% !important;

    overflow-y: auto !important;

    overflow-x: hidden !important;

    padding: 22px !important;

    display: block !important;

    overscroll-behavior: contain;
}



.sales-modal .sales-form::-webkit-scrollbar,
.lead-import-container::-webkit-scrollbar {

    width: 8px;
}

.sales-modal .sales-form::-webkit-scrollbar-thumb,
.lead-import-container::-webkit-scrollbar-thumb {

    background-color: rgba(0,0,0,.24);

    border-radius: 999px;
}

/* =========================================
   MODAL HEADER
========================================= */

.sales-modal header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 16px;

    padding: 16px 22px;

    border-bottom: 1px solid #e2e8f0;

    background: #ffffff;

 flex-shrink: 0 !important;

    position: sticky;

    top: 0;

    z-index: 20;
}
body.modal-open {

    overflow: hidden;
}

/* =========================================
   MODAL FOOTER
========================================= */

.sales-modal footer,
.lead-import-footer {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 12px;

    padding: 16px 22px;

    border-top: 1px solid #e2e8f0;

    background: #ffffff;

      flex-shrink: 0 !important;

    position: sticky;

    bottom: 0;

    z-index: 10;

    overscroll-behavior: contain;
}

/* =========================================
   MODAL TITLE
========================================= */

.sales-modal h2,
.lead-import-header h3 {

    margin: 0;

    color: #172033;

    font-size: 22px;

    font-weight: 800;
}

/* =========================================
   MODAL CLOSE BUTTON
========================================= */

.sales-modal-close {

    width: 40px;

    height: 40px;

    border: none;

    border-radius: 10px;

    background: #f3f4f6;

    color: #111827;

    font-size: 18px;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    transition: .18s ease;
}

.sales-modal-close:hover {

    background: #e5e7eb;
}

/* =========================================
   FORM GRID
========================================= */

.sales-form.grid,
.lead-import-grid {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}

/* =========================================
   FULL WIDTH FIELD
========================================= */

.sales-form .full,
.full-width {

    grid-column: 1 / -1;
}

/* =========================================
   FORM LABEL
========================================= */

.sales-form label,
.lead-import-label {

    display: flex;

    flex-direction: column;

    gap: 7px;

    color: #475569;

    font-size: 13px;

    font-weight: 700;
}

/* =========================================
   UNIVERSAL INPUTS
========================================= */

.sales-form input,
.sales-form select,
.sales-form textarea,
.sales-field {

    width: 100%;

    min-width: 100%;

    border: 1px solid #dbe3ef;

    border-radius: 10px;

    background: #ffffff;

    color: #172033;

    font-size: 14px;

    transition: .18s ease;
}

/* =========================================
   INPUT HEIGHT
========================================= */

.sales-form input,
.sales-form select,
.sales-field {

    height: 46px;

    padding: 0 14px;
}

/* =========================================
   TEXTAREA
========================================= */

.sales-form textarea,
.sales-textarea {

    min-height: 130px;

    padding: 14px;

    resize: vertical;
}

/* =========================================
   INPUT FOCUS
========================================= */

.sales-form input:focus,
.sales-form select:focus,
.sales-form textarea:focus,
.sales-field:focus {

    outline: none;

    border-color: #2563eb;

    box-shadow:
        0 0 0 4px rgba(37,99,235,.10);
}

/* =========================================
   TOOLBAR SEARCH ONLY
========================================= */

.sales-toolbar .sales-search {

    min-width: 160px !important;

    height: 30px !important;

    padding: 0 6px !important;

    font-size: 11px !important;

    border-radius: 6px !important;
}

/* =========================================
   TOOLBAR BUTTON ONLY
========================================= */

.sales-toolbar .sales-btn {

    height: 30px !important;

    padding: 0 8px !important;

    font-size: 11px !important;

    border-radius: 6px !important;

    line-height: 1 !important;
}

/* =========================================
   COLUMN ITEM
========================================= */

.sales-column-item {

    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 14px;

    font-weight: 600;

    white-space: nowrap;

    width: 100%;

    min-width: 0;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 768px) {

    .sales-modal,
    .lead-import-modal {

        width: 100%;

        max-height: 100vh;

        border-radius: 0;
    }

    

    .sales-form.grid,
    .lead-import-grid {

        grid-template-columns: 1fr;
    }

  

}


/* MAIN MODAL */

.sales-modal,
.lead-import-modal {

    width: min(1100px, 96vw);

    max-height: calc(100vh - 48px);

    background: #ffffff;

    border-radius: 18px;

    display: flex;

    flex-direction: column;

    overflow: hidden;
}

/* HEADER */

.sales-modal header {

    flex-shrink: 0;

    padding: 18px 22px;

    border-bottom: 1px solid #e2e8f0;

    background: #ffffff;
}

/* BODY */

.sales-modal-form {

    flex: 1;

    min-height: 0;

    overflow-y: auto;

    overflow-x: hidden;

    padding: 22px;
}

/* FOOTER */

.lead-import-footer {

    flex-shrink: 0 !important;

    position: sticky;

    bottom: 0;

    background: #ffffff;

    z-index: 20;
}

.lead-import-modal .sales-modal-form::-webkit-scrollbar {

    width: 8px;
}
.lead-import-modal .sales-modal-form::-webkit-scrollbar-thumb {

    background: rgba(0,0,0,.25);

    border-radius: 999px;
}

.lead-import-grid {

    padding-bottom: 120px;
}

.sales-form.grid,
.lead-import-grid {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;

    align-content: start;
}


/* BUTTON FIX */

.lead-import-modal .sales-btn{

    height:42px !important;

    padding:0 18px !important;

    font-size:14px !important;

    border-radius:10px !important;
}

/* RESPONSIVE */

@media(max-width:768px){

    .lead-import-grid{

        grid-template-columns:1fr;
    }

    .lead-import-header h3{

        font-size:26px;
    }
}


/* =========================================
   FINAL WORKING IMPORT MODAL SCROLL
========================================= */

.lead-import-modal {

    height: calc(100vh - 48px) !important;

    max-height: calc(100vh - 48px) !important;

    display: flex !important;

    flex-direction: column !important;

    overflow: hidden !important;
}

/* EDIT FORM */

.lead-import-edit-form {

    flex: 1 !important;

    min-height: 0 !important;

    display: flex !important;

    flex-direction: column !important;

    overflow: hidden !important;
}

/* SCROLL CONTAINER */

.lead-import-modal .sales-modal-form {

    flex: 1 !important;

    min-height: 0 !important;

    overflow-y: auto !important;

    overflow-x: hidden !important;

    padding: 22px !important;
}

/* HEADER */

.lead-import-modal header {

    flex-shrink: 0 !important;
}

/* FOOTER */

.lead-import-footer {

    flex-shrink: 0 !important;

    border-top: 1px solid #e2e8f0;

    background: #ffffff;
}

/* SCROLLBAR */

.lead-import-modal .sales-modal-form::-webkit-scrollbar {

    width: 8px;
}

.lead-import-modal .sales-modal-form::-webkit-scrollbar-thumb {

    background: rgba(0,0,0,.25);

    border-radius: 999px;
}
.lead-import-success-box {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
}

.lead-import-success-text {
    color: #166534;
    font-size: 15px;
    font-weight: 700;
}

/* =========================================
   MOVE STAGE MODAL
========================================= */

.move-stage-header h2{

    margin:0;

    font-size:28px;

    font-weight:800;

    color:#172033;
}

.move-stage-header p{

    margin:6px 0 0;

    color:#64748b;

    font-size:14px;
}

.move-stage-form{

    display:flex;

    flex-direction:column;

    gap:22px;
}

/* FIELD */

.move-stage-field{

    display:flex;

    flex-direction:column;

    gap:10px;
}

.move-stage-label{

    font-size:13px;

    font-weight:800;

    color:#334155;

    text-transform:uppercase;

    letter-spacing:.4px;
}

.move-stage-help{

    color:#64748b;

    font-size:12px;
}

/* INPUT */

.move-stage-input{

    height:52px !important;

    border-radius:14px !important;

    border:1px solid #dbe3ef !important;

    background:#ffffff !important;

    font-size:15px !important;

    padding:0 16px !important;
}

.move-stage-input:focus{

    border-color:#2563eb !important;

    box-shadow:
        0 0 0 4px rgba(37,99,235,.10);
}

/* TEXTAREA */

.move-stage-textarea{

    min-height: 90px !important;

    height: 90px !important;

    resize: none;

    padding-top: 12px !important;
}

/* REMINDER CARD */

.move-stage-reminder-card{

    border:1px solid #dbe3ef;

    border-radius:18px;

    padding:22px;

    background:#f8fbff;

    display:flex;

    flex-direction:column;

    gap:22px;
}

/* REMINDER TOGGLE */

.move-stage-reminder-toggle{

    display:flex !important;

    align-items:center;

    gap:16px;

    cursor:pointer;
}

.move-stage-reminder-toggle input {

    width: 18px;

    height: 18px;

    margin: 0;

    accent-color: #2563eb;
}

.move-stage-reminder-toggle strong {

    display: block;

    font-size: 15px;

    font-weight: 700;

    color: #172033;

    line-height: 1.2;
}

.move-stage-reminder-toggle small{

    color:#64748b;

    font-size:13px;
}

/* REMINDER GRID */

.move-stage-reminder-grid{

    display:grid;

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

/* FOOTER */

.move-stage-footer{

    display:flex;

    justify-content:flex-end;

    gap:14px;

    padding-top:18px;
}

/* BUTTON */

.move-stage-footer .sales-btn{

    height:46px;

    min-width:120px;

    border-radius:12px;

    font-size:14px;

    font-weight:700;
}

.move-stage-footer .sales-btn.primary{

    background:linear-gradient(135deg,#2563eb,#1d4ed8);

    border:none;

    box-shadow:
        0 10px 20px rgba(37,99,235,.18);
}

/* RESPONSIVE */

@media(max-width:768px){

    .move-stage-reminder-grid{

    margin-top: 6px;
}

    .move-stage-header h2{

        font-size:22px;
    }

    .move-stage-textarea{

        min-height:90px !important;
    }
}
/* =========================================
   MOVE STAGE TOP GRID
========================================= */

.move-stage-top-grid {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 22px;

    align-items: start;
}

/* =========================================
   COMMENT BOX
========================================= */

.move-stage-textarea{

    min-height: 70px !important;

    height: 70px !important;

    resize: none;
}

/* =========================================
   REMINDER OUTER BOX
========================================= */

.move-stage-reminder-box {

    border: 2px solid #1e293b;

    border-radius: 16px;

    background: #f8fafc;

    padding: 12px 16px;

    display: flex;

    flex-direction: column;

    gap: 12px;
}

/* =========================================
   REMINDER TOGGLE
========================================= */

.move-stage-reminder-toggle {

    display: flex !important;

    align-items: center;

    justify-content: flex-start;

    gap: 12px;

    cursor: pointer;

    margin: 0;

    padding: 0;
}

.move-stage-reminder-toggle input {

    width: 22px;

    height: 22px;

    accent-color: #2563eb;
}

.move-stage-reminder-toggle strong {

    display: block;

    font-size: 18px;

    font-weight: 800;

    color: #0f172a;
}

.move-stage-reminder-toggle small {

    display: block;

    margin-top: 2px;

    font-size: 12px;

    color: #64748b;

    line-height: 1.3;
}

/* =========================================
   RESPONSIVE
========================================= */

@media(max-width:768px){

    .move-stage-top-grid{

        grid-template-columns:1fr;
    }
}

/* REMINDER MAIN ROW */

.move-stage-reminder-row{

    display:flex;

    align-items:flex-start;

    justify-content:space-between;

    gap:22px;

    border:2px solid #1e293b;

    border-radius:16px;

    padding:14px 18px;

    background:#f8fafc;
}

/* LEFT SIDE */

.move-stage-reminder-toggle{

    display:flex !important;

    align-items:center;

    gap:12px;

    min-width:260px;

    margin-top:24px;
}

/* RIGHT SIDE */

.move-stage-reminder-inline-fields{

    flex:1;

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:18px;
}

/* CHECKBOX */

.move-stage-reminder-toggle input{

    width:18px;

    height:18px;

    margin:0;
}

/* RESPONSIVE */

@media(max-width:768px){

    .move-stage-reminder-row{

        flex-direction:column;
    }

    .move-stage-reminder-inline-fields{

        grid-template-columns:1fr;
    }
}