/* ===============================
   ROOT VARIABLES
=============================== */
:root {
    --icrm-blue: #036ec5;
    --icrm-yellow: #FFD545;
    --icrm-border: #e5e7eb;
    --icrm-bg: #f5f8fc;
    --icrm-text: #1f2937;
}

/* ------------------agent dashboard start --------------------------------*/
/* ===============================
   PAGE WRAPPER
=============================== */
.icrm-agent-dashboard {
    /* background: var(--icrm-bg); */
    padding: 30px;
    border-radius: 14px;
}

/* ===============================
   PAGE TITLE
=============================== */
.icrm-agent-dashboard>h2 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 25px;
}

/* ===============================
   STATS GRID
=============================== */
.icrm-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 35px;
}

@media (max-width: 1024px) {
    .icrm-dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .icrm-dashboard-stats {
        grid-template-columns: 1fr;
    }
}

/* ===============================
   STAT CARDS
=============================== */
.icrm-stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(3, 110, 197, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.icrm-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(3, 110, 197, 0.18);
}

/* Icon */
.icrm-stat-icon {
    font-size: 34px;
    background: linear-gradient(135deg, var(--icrm-blue), #1d4ed8);
    color: #fff;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

/* Yellow highlight card (Pending Requests) */
.icrm-dashboard-stats .icrm-stat-card:nth-child(2) .icrm-stat-icon {
    background: linear-gradient(135deg, var(--icrm-yellow), #fbbf24);
    color: #000;
}

/* Stat content */
.icrm-stat-content h3 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    color: var(--icrm-text);
}

.icrm-stat-content p {
    margin: 2px 0 0;
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
}

/* ===============================
   SECTIONS (CUSTOMERS / REQUESTS)
=============================== */
.icrm-recent-customers,
.icrm-recent-requests {
    background: #fff;
    border-radius: 14px;
    padding: 20px 22px;
    /* margin-bottom: 30px; */
    box-shadow: 0 10px 28px rgba(3, 110, 197, 0.08);
}

.icrm-recent-customers h3,
.icrm-recent-requests h3 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

/* ===============================
   TABLE
=============================== */
.icrm-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.icrm-table thead th {
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px;
    border-bottom: 1px solid var(--icrm-border);
}

.icrm-table tbody td {
    padding: 14px 12px;
    font-size: 14px;
    color: #1f2937;
    border-bottom: 1px solid var(--icrm-border);
}

.icrm-table tbody tr:hover {
    background: #f8fbff;
}

/* ===============================
   BADGES
=============================== */
.icrm-badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
}

.icrm-badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.icrm-badge-approved {
    background: #dcfce7;
    color: #166534;
}

.icrm-badge-rejected {
    background: #fee2e2;
    color: #991b1b;
}

/* ===============================
   BUTTONS
=============================== */
.icrm-btn {
    background: linear-gradient(135deg, var(--icrm-blue), #1d4ed8);
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.icrm-btn:hover {
    background: linear-gradient(135deg, #025aa2, #1e40af);
}

.icrm-btn-small {
    padding: 7px 14px;
}

/* ===============================
   TABLE RESPONSIVE
=============================== */
.icrm-table-responsive {
    overflow-x: auto;
}


/* ===============================
   MODAL OVERLAY
=============================== */
.icrm-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    z-index: 9999;
    backdrop-filter: blur(4px);
}

/* ===============================
   MODAL BOX
=============================== */
.icrm-modal-content {
    background: #ffffff;
    max-width: 900px;
    width: 90%;
    margin: 5% auto;
    border-radius: 16px;
    padding: 24px 26px 28px;
    position: relative;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
    animation: icrmModalIn 0.35s ease;
}
.customer-detail-modal-content{
    overflow-y: scroll;
}
/* ===============================
   MODAL ANIMATION
=============================== */
@keyframes icrmModalIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===============================
   CLOSE BUTTON
=============================== */
.icrm-modal-close {
    position: absolute;
    top: -5px;
    right: 10px;
    font-size: 26px;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.icrm-modal-close:hover {
    color: #ef4444;
    transform: rotate(90deg);
}

/* ===============================
   MODAL BODY
=============================== */
#icrm-modal-body,
#icrm-customer-modal-body {
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 6px;
}

/* Scrollbar */
#icrm-modal-body::-webkit-scrollbar,
#icrm-customer-modal-body::-webkit-scrollbar {
    width: 6px;
}

#icrm-modal-body::-webkit-scrollbar-thumb,
#icrm-customer-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* ===============================
   SECTION HEADINGS
=============================== */
#icrm-modal-body h3,
#icrm-modal-body h4,
#icrm-customer-modal-body h3,
#icrm-customer-modal-body h4 {
    margin: 0 0 12px;
    color: #036ec5;
    font-weight: 700;
}

/* ===============================
   REQUEST DETAILS INSIDE MODAL
=============================== */
#icrm-modal-body .icrm-request-details,
#icrm-customer-modal-body .icrm-request-details {
    background: #f8fbff;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 22px;
    border-left: 5px solid #036ec5;
}

/* ===============================
   TABLE INSIDE MODAL
=============================== */
#icrm-modal-body .icrm-table,
#icrm-customer-modal-body .icrm-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

#icrm-modal-body .icrm-table thead th,
#icrm-customer-modal-body .icrm-table thead th {
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

#icrm-modal-body .icrm-table tbody td,
#icrm-customer-modal-body .icrm-table tbody td {
    padding: 14px 12px;
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
}

#icrm-modal-body .icrm-table tbody tr:hover,
#icrm-customer-modal-body .icrm-table tbody tr:hover {
    background: #f8fbff;
}

/* ===============================
   BUTTONS INSIDE MODAL
=============================== */
#icrm-modal-body .icrm-btn,
#icrm-customer-modal-body .icrm-btn {
    background: linear-gradient(135deg, #036ec5, #1d4ed8);
    color: #fff;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease;
}

#icrm-modal-body .icrm-btn:hover,
#icrm-customer-modal-body .icrm-btn:hover {
    background: linear-gradient(135deg, #025aa2, #1e40af);
}

/* ===============================
   MOBILE OPTIMIZATION
=============================== */
@media (max-width: 640px) {
    .icrm-modal-content {
        margin: 8% auto;
        padding: 20px;
    }

    #icrm-modal-body,
    #icrm-customer-modal-body {
        max-height: 70vh;
    }
}


/* ------------------agent dashboard end --------------------------------*/

.icrm-agent-kpis {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
}

.icrm-account-breakdown,
.icrm-agent-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    margin: 0 0 20px;
}

.icrm-account-breakdown span {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px 12px;
}

.icrm-renewal-center {
    background: #fff;
    border: 1px solid #dbeafe;
    border-left: 5px solid #2563eb;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 24px;
    box-shadow: 0 3px 14px rgba(15, 23, 42, .08);
}

.icrm-renewal-center-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 12px;
}

.icrm-renewal-center h3,
.icrm-renewal-group h4 {
    margin: 0 0 10px;
}

.icrm-renewal-group {
    margin-top: 16px;
}

.icrm-agent-filter-bar label,
.icrm-bulk-card label,
#icrm-commission-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
}

.icrm-agent-filter-bar input,
.icrm-agent-filter-bar select,
.icrm-bulk-card input,
.icrm-bulk-card select,
#icrm-commission-form input,
#icrm-commission-form select {
    min-height: 38px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    padding: 7px 9px;
}

.icrm-account-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 16px 0;
}

.icrm-account-tab {
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    color: #475569;
}

.icrm-account-tab.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.icrm-account-panel {
    display: none;
}

.icrm-account-panel.active {
    display: block;
}

.icrm-bulk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.icrm-bulk-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
}

@media (max-width: 768px) {

    .icrm-renewal-center-header,
    .icrm-agent-filter-bar {
        align-items: stretch;
        flex-direction: column;
    }
}

/* ===============================
   PAGE BACKGROUND
=============================== */
.icrm-create-quote-form {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(3, 110, 197, 0.08);
}

/* ===============================
   REQUEST DETAILS CARD
=============================== */
.icrm-request-details {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 30px;
    box-shadow: 0 8px 24px rgba(3, 110, 197, 0.08);
    border-left: 6px solid #036ec5;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 30px;
}

/* Mobile */
@media (max-width: 768px) {
    .icrm-request-details {
        grid-template-columns: 1fr;
    }
}

/* ===============================
   LABEL + VALUE STYLE
=============================== */
.icrm-request-details p {
    margin: 0;
    font-size: 14px;
    color: #374151;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Label */
.icrm-request-details p strong {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

/* Value */
.icrm-request-details p span,
.icrm-request-details p {
    font-size: 15px;
    color: #111827;
}

/* ===============================
   HIGHLIGHTS
=============================== */

/* Budget highlight */
.icrm-request-details p:last-child {
    background: #fff8e1;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #FFD545;
}

/* Insurance type emphasis */
.icrm-request-details p:nth-child(4) {
    color: #036ec5;
    font-weight: 600;
}



tr.exist-quotes td {
    font-size: 16px;
}

/* ===============================
   SECTION HEADERS
=============================== */
.icrm-create-quote-form h2,
.icrm-existing-quotes h2 {
    background: linear-gradient(90deg, var(--icrm-blue), #1d4ed8);
    color: #fff;
    padding: 14px 20px;
    margin: -20px -20px 20px -20px;
    border-radius: 10px 10px 0 0;
    position: relative;
    font-size: 24px;
}

.icrm-create-quote-form h2::after,
.icrm-existing-quotes h2::after {
    content: "";
    position: absolute;
    left: 20px;
    bottom: 0;
    width: 80px;
    height: 4px;
    background: var(--icrm-yellow);
    border-radius: 4px;
}

/* ===============================
   QUOTES GRID (2 COLUMNS)
=============================== */
#icrm-quotes-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Responsive */
@media (max-width: 900px) {
    #icrm-quotes-container {
        grid-template-columns: 1fr;
    }
}

/* ===============================
   QUOTE CARD
=============================== */
.icrm-quote-item {
    background: #fff;
    border: 1px solid var(--icrm-border);
    border-radius: 12px;
    padding: 18px;
    position: relative;
    transition: all 0.25s ease;
}

.icrm-quote-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(3, 110, 197, 0.12);
    border-color: var(--icrm-blue);
}

/* ===============================
   CARD HEADER
=============================== */
.icrm-quote-item h3 {
    margin: 0 0 14px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--icrm-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===============================
   REMOVE BUTTON (ICON STYLE)
=============================== */
.icrm-remove-quote {
    background: none !important;
    border: none !important;
    color: #dc2626;
    font-size: 14px;
    cursor: pointer;
}

.icrm-remove-quote:hover {
    color: #991b1b;
}

/* ===============================
   FORM FIELDS
=============================== */
.icrm-quote-item label {
    font-weight: 600;
    color: var(--icrm-text);
    margin-bottom: 6px;
    display: block;
    font-size: 16px;
}

.icrm-quote-item input[type="number"],
.icrm-quote-item textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--icrm-border);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.icrm-quote-item input:focus,
.icrm-quote-item textarea:focus {
    outline: none;
    border-color: var(--icrm-blue);
    box-shadow: 0 0 0 3px rgba(3, 110, 197, 0.15);
}

/* ===============================
   FILE INPUT
=============================== */
.icrm-quote-item input[type="file"] {
    border: 1px dashed var(--icrm-border);
    padding: 10px;
    border-radius: 8px;
    background: #fafafa;
    cursor: pointer;
}

.pdf-fname {
    font-size: 12px;
    color: #16a34a;
    margin-top: 6px;
    display: block;
}

/* ===============================
   ADD QUOTE BUTTON
=============================== */
#icrm-add-quote {
    background: var(--icrm-yellow);
    color: #000;
    font-weight: 700;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

#icrm-add-quote:hover {
    background: #ffcf33;
    transform: translateY(-2px);
}

/* ===============================
   SUBMIT BUTTON
=============================== */
#submit-quote-btn {
    background: var(--icrm-blue);
    color: #fff;
    font-weight: 700;
    border-radius: 10px;
    padding: 14px 28px;
    border: none;
    margin-top: 20px;
    box-shadow: 0 8px 20px rgba(3, 110, 197, 0.25);
    cursor: pointer;
}

#submit-quote-btn:hover {
    background: #025aa2;
    color:#fff;
}

/* ===============================
   EXISTING QUOTES TABLE
=============================== */
.icrm-existing-quotes table {
    border-radius: 8px;
    overflow: hidden;
}

.icrm-existing-quotes thead th {
    background: #eef5ff;
    color: var(--icrm-blue);
    font-weight: 700;
    font-size: 20px;
}

.icrm-existing-quotes tbody tr:hover {
    background: #f8fbff;
}

/* ===============================
   VIEW PDF BUTTON
=============================== */
.icrm-existing-quotes a {
    background: var(--icrm-blue);
    color: #fff !important;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
}

.icrm-existing-quotes a:hover {
    background: #025aa2;
}

/* --------------------------------------------admin dashboard sidebar start --------------------------------------------*/
/* Dashboard layout */
.icrm-dashboard-layout {
    display: grid;
    gap: 20px;
    grid-template-columns: calc(25% - 10px) calc(75% - 10px);
    min-height: 60vh;
}



/* Sidebar */
.icrm-dashboard-sidebar {
    width: 100%;
    background: #111827;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: space-between;
}

.sidebar-item1 {
    display: flex;
    flex-direction: column;
}

/* Sidebar buttons */
.icrm-side-link {
    background: transparent;
    color: #d1d5db;
    border: none;
    padding: 12px 15px;
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.icrm_cs_btns {
    color: #000000;
    border: 1px solid #a1a1a1;
}

.icrm-side-link:hover {
    background: #1f2933;
    color: #fff;
}

.icrm-side-link.active {
    background: #2563eb;
    color: #fff;
}

/* Content area */
.icrm-recent-customers,
.icrm-recent-requests {
    flex: 1;
}

/* Toggle sections */
.icrm-content-section {
    display: none;
}

.icrm-content-section.active {
    display: block;
}

.icrm-tab-loader {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    color: #475569;
    display: flex;
    font-weight: 700;
    justify-content: center;
    min-height: 160px;
}

/* --------------------------------------------admin dashboard sidebar end --------------------------------------------*/


/*---------------------------------------------- create policy stye start---------------------------------------------- */
.icrm-create-policy {
    max-width: 900px;
    margin: 30px auto;
    background: #f8fafc;
    padding: 30px;
    border-radius: 18px;
    font-family: Inter, system-ui, sans-serif;
}

.icrm-policy-wizard {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.icrm-step-card h3 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.icrm-wizard-step {
    animation: fadeStep 0.3s ease;
}

@keyframes fadeStep {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.icrm-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.icrm-form-grid>div {
    display: flex;
    flex-direction: column;
}

.icrm-form-grid label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.icrm-form-grid input,
.icrm-form-grid textarea,
.icrm-form-grid select {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
}

.icrm-form-grid textarea {
    resize: vertical;
}

.icrm-form-grid [style*="grid-column"] {
    grid-column: 1 / -1;
}

input[type="file"] {
    background: #f1f5f9;
    padding: 10px;
    border-radius: 10px;
    border: 1px dashed #94a3b8;
}

.icrm-policy-dropzone {
    align-items: center;
    background: #f8fafc;
    border: 2px dashed #94a3b8;
    border-radius: 12px;
    color: #334155;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    min-height: 130px;
    padding: 22px;
    text-align: center;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.icrm-policy-dropzone.is-dragover,
.icrm-policy-dropzone:hover {
    background: #eff6ff;
    border-color: #036ec5;
    color: #036ec5;
}

.icrm-policy-dropzone-title {
    font-size: 15px;
    font-weight: 700;
}

.icrm-policy-dropzone-subtitle {
    color: #64748b;
    font-size: 12px;
}

#policy-file-input {
    height: 1px;
    opacity: 0;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

#step-3-payment>div:first-of-type {
    background: #f0f9ff;
    border-left: 5px solid #036ec5;
    padding: 18px;
    border-radius: 12px;
}

.icrm-step-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
}

.icrm-step-actions button {
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

button[id^="btn-"],
#submit-policy-btn {
    background: #036ec5;
    color: #fff;
}

button[id^="btn-"]:hover {
    background: #025aa3;
}

.btn-back {
    background: #64748b !important;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

#icrm-policy-message div,
#payment-message div {
    border-radius: 10px;
    font-size: 14px;
}

.icrm-create-policies {
    width: 100%;
}

button.loading {
    background: #c9c9c9;
    pointer-events: none;
}

/*---------------------------------------------- create policy stye end---------------------------------------------- */

/* Responsive and color refinement */
.icrm-agent-dashboard,
.icrm-agent-dashboard *,
.icrm-modal,
.icrm-modal * {
    box-sizing: border-box;
}

.icrm-agent-dashboard {
    color: #172033;
    padding: clamp(14px, 3vw, 28px);
}

.icrm-agent-dashboard>h2 {
    font-size: clamp(22px, 5vw, 30px);
    line-height: 1.15;
}

.icrm-stat-card,
.icrm-recent-customers,
.icrm-recent-requests,
.icrm-renewal-center,
.icrm-bulk-card,
.icrm-create-quote-form,
.icrm-request-details,
.icrm-policy-wizard,
.icrm-quote-item {
    border: 1px solid #e3e8f0;
    box-shadow: 0 8px 22px rgba(22, 32, 51, 0.07);
}

.icrm-stat-card:hover,
.icrm-quote-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(22, 32, 51, 0.1);
}

.icrm-btn,
.icrm-side-link,
.icrm-account-tab,
.icrm-step-actions button,
#icrm-add-quote,
#submit-quote-btn,
button[id^="btn-"] {
    min-height: 44px;
}

.icrm-btn,
.icrm-side-link.active,
.icrm-account-tab.active,
#submit-quote-btn,
button[id^="btn-"],
#icrm-modal-body .icrm-btn,
#icrm-customer-modal-body .icrm-btn {
    background: #1457b8;
}

.icrm-btn:hover,
button[id^="btn-"]:hover,
#submit-quote-btn:hover {
    background: #0f4697;
    color:#fff;
}

.icrm-dashboard-sidebar {
    background: #172033;
}

.icrm-side-link:hover {
    background: #263246;
}

.icrm-table-responsive {
    border: 1px solid #e3e8f0;
    border-radius: 8px;
    background: #fff;
}

.icrm-table {
    min-width: 760px;
}

.icrm-table td,
.icrm-table th {
    vertical-align: middle;
}

.icrm-agent-filter-bar input,
.icrm-agent-filter-bar select,
.icrm-bulk-card input,
.icrm-bulk-card select,
#icrm-commission-form input,
#icrm-commission-form select,
.icrm-form-grid input,
.icrm-form-grid textarea,
.icrm-form-grid select,
.icrm-quote-item input[type="number"],
.icrm-quote-item textarea {
    min-height: 44px;
    width: 100%;
    background: #fff;
    border-color: #cfd7e3;
}

@media (max-width: 900px) {
    .icrm-dashboard-layout {
        display: block;
    }

    .icrm-dashboard-sidebar {
        margin-bottom: 16px;
        position: sticky;
        top: 0;
        z-index: 20;
    }

    .sidebar-item1 {
        display: flex;
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 3px;
    }

    .icrm-side-link {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .sidebar-acc .icrm-side-link {
        display: block;
        margin-top: 8px;
        text-align: center;
    }

    .icrm-form-grid,
    .icrm-request-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .icrm-agent-dashboard {
        padding: 12px;
    }

    .icrm-dashboard-stats,
    .icrm-agent-kpis,
    .icrm-bulk-grid,
    #icrm-quotes-container {
        grid-template-columns: 1fr !important;
    }

    .icrm-stat-card,
    .icrm-recent-customers,
    .icrm-recent-requests,
    .icrm-renewal-center,
    .icrm-create-policy,
    .icrm-policy-wizard,
    .icrm-create-quote-form,
    .icrm-existing-quotes,
    .icrm-request-details {
        padding: 16px;
        border-radius: 10px;
    }

    .icrm-create-policy {
        margin: 12px 0;
    }

    .icrm-create-quote-form h2,
    .icrm-existing-quotes h2 {
        margin: -16px -16px 16px;
        font-size: 20px;
    }

    .icrm-step-actions,
    .icrm-renewal-center-header,
    .icrm-agent-filter-bar,
    .icrm-account-breakdown {
        align-items: stretch;
        flex-direction: column;
    }

    .icrm-step-actions button,
    .icrm-agent-filter-bar label,
    .icrm-agent-filter-bar .icrm-btn,
    .icrm-account-breakdown span,
    #icrm-add-quote,
    #submit-quote-btn {
        width: 100%;
    }

    .icrm-table-responsive {
        border: 0;
        background: transparent;
        overflow: visible;
    }

    .icrm-table {
        min-width: 0;
    }

    .icrm-table thead {
        display: none;
    }

    .icrm-table,
    .icrm-table tbody,
    .icrm-table tr,
    .icrm-table td {
        display: block;
        width: 100%;
    }

    .icrm-table tr {
        background: #fff;
        border: 1px solid #e3e8f0;
        border-radius: 10px;
        margin-bottom: 12px;
        padding: 8px 0;
    }

    .icrm-table tbody td {
        align-items: flex-start;
        border-bottom: 0;
        display: flex;
        gap: 12px;
        justify-content: space-between;
        padding: 8px 12px;
        text-align: right;
        overflow-wrap: anywhere;
    }

    .icrm-table td::before {
        color: #5b6678;
        content: attr(data-label);
        flex: 0 0 42%;
        font-weight: 700;
        text-align: left;
    }

    .icrm-table td[colspan] {
        display: block;
        text-align: left;
    }

    .icrm-table td[colspan]::before {
        content: "";
        display: none;
    }

    .icrm-modal-content {
        border-radius: 12px;
        margin: 12px auto;
        max-height: calc(100vh - 24px);
        padding: 18px;
        width: calc(100% - 24px);
    }
}


.icrm-button-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.icrm-renewal-table td[data-label="Actions"] .icrm-btn,
.icrm-renewal-table td[data-label="Actions"] a.icrm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .icrm-renewal-table td[data-label="Actions"] .icrm-btn,
    .icrm-renewal-table td[data-label="Actions"] a.icrm-btn,
    .icrm-button-group .icrm-btn,
    .icrm-button-group a.icrm-btn {
        width: 100%;
        justify-content: flex-start;
        white-space: normal;
        text-align: left;
    }

    .icrm-renewal-table td[data-label="Actions"] .icrm-btn span,
    .icrm-renewal-table td[data-label="Actions"] a.icrm-btn span {
        line-height: 1.2;
    }

    .icrm-renewal-table td[data-label="Actions"] {
        display: flex !important;
        flex-direction: column;
        gap: 8px;
        text-align: left;
    }

    .icrm-renewal-table td[data-label="Actions"] .icrm-btn {
        min-height: 44px;
    }
}
