/* Insurance CRM Pro - Frontend Styles */

.icrm-alert {
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 4px;
    border-left: 4px solid;
}

.icrm-alert-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}
.crm-btn-primary {
    padding: 12px 15px;
    background: #2563eb;
    color: #fff;
    text-decoration: none !important;
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}
.icrm-alert-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.icrm-alert-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.icrm-login-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 20px;
}

.icrm-login-box {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.icrm-login-box h2 {
    margin-top: 0;
    color: #333;
}

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

.icrm-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.icrm-form-group input[type="text"],
.icrm-form-group input[type="email"],
.icrm-form-group input[type="tel"],
.icrm-form-group input[type="number"],
.icrm-form-group input[type="date"],
.icrm-form-group select,
.icrm-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.icrm-form-group textarea {
    resize: vertical;
}

.icrm-help-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.icrm-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.icrm-btn-primary {
    background: #0073aa;
    color: #fff;
}

.icrm-btn-primary:hover {
    background: #005a87;
}

.icrm-btn-secondary {
    background: #666;
    color: #fff;
}

.icrm-btn-secondary:hover {
    background: #555;
}

.icrm-btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

.icrm-message {
    margin: 15px 0;
}

/* Tabs */
.icrm-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.icrm-tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: #f8f9fa;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.icrm-tab-btn.active {
    background: #fff;
    color: #0073aa;
    border-bottom-color: #0073aa;
}

.icrm-tab-btn:hover {
    background: #e9ecef;
}

.icrm-tab-content {
    display: none;
}

.icrm-tab-content.active {
    display: block;
}

.icrm-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    z-index: 9999;
}

.icrm-modal-content {
    background: #fff;
    width: min(960px, 92%);
    max-height: 85vh;
    overflow-y: auto;
    margin: 5vh auto;
    padding: 24px;
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
    position: relative;
}

.icrm-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 28px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
}

.icrm-customer-detail-body {
    max-height: calc(85vh - 60px);
    overflow-y: auto;
}

/* Dashboard */
.icrm-customer-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.icrm-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 16px;
}

.icrm-dashboard-kicker {
    margin: 0 0 4px;
    color: #5f6b7a;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.icrm-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 20px;
    margin-bottom: 30px;
}

.icrm-stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 4px solid #0073aa;
}

.icrm-stat-icon {
    font-size: 40px;
}

.icrm-stat-content h3 {
    margin: 0;
    font-size: 32px;
    color: #0073aa;
}

.icrm-stat-content p {
    margin: 5px 0 0 0;
    color: #666;
}

.icrm-stat-link {
    display: inline-block;
    margin-top: 5px;
    color: #0073aa;
    text-decoration: none;
    font-size: 12px;
}

.icrm-dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.icrm-dashboard-toolbar {
    display: flex;
    align-items: end;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.icrm-dashboard-toolbar label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #394150;
    font-size: 13px;
    font-weight: 600;
}

.icrm-dashboard-toolbar input,
.icrm-dashboard-toolbar select {
    min-width: 220px;
    min-height: 40px;
    border: 1px solid #d4d9e2;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
}

.icrm-dashboard-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.icrm-dashboard-tab {
    border: 1px solid #d4d9e2;
    background: #fff;
    color: #293241;
    border-radius: 6px;
    padding: 10px 14px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
}

.icrm-dashboard-tab.active {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.icrm-dashboard-panel {
    display: none;
    margin-bottom: 28px;
}

.icrm-dashboard-panel.active {
    display: block;
}

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

.icrm-dashboard-section-header h3 {
    margin: 0;
    color: #202936;
}

.icrm-dashboard-loading,
.icrm-dashboard-loading-card {
    color: #5f6b7a;
    font-size: 14px;
}

.icrm-dashboard-loading-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
}

.icrm-responsive-table {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.icrm-dashboard-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.icrm-dashboard-table th,
.icrm-dashboard-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #edf0f4;
    vertical-align: middle;
}

.icrm-dashboard-table th {
    color: #394150;
    background: #f7f8fa;
    font-size: 13px;
    font-weight: 700;
}

.icrm-dashboard-table tr:last-child td {
    border-bottom: 0;
}

.icrm-dashboard-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.icrm-page-btn {
    border: 1px solid #d4d9e2;
    background: #fff;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
}

.icrm-page-btn:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.icrm-content-section {
    display: none;
    margin-top: 20px;
}

.icrm-content-section.active {
    display: block;
}

.icrm-action-btn {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.icrm-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.icrm-action-icon {
    font-size: 32px;
}

.icrm-action-text {
    color: #333;
    font-weight: 600;
}

/* Badge */
.icrm-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.icrm-badge-pending {
    background: #fff3cd;
    color: #856404;
}

.icrm-badge-sent,
.icrm-badge-viewed {
    background: #cfe2ff;
    color: #084298;
}

.icrm-badge-accepted {
    background: #d1e7dd;
    color: #0f5132;
}

.icrm-badge-rejected {
    background: #f8d7da;
    color: #842029;
}

.icrm-badge-active {
    background: #d1e7dd;
    color: #0f5132;
}

.icrm-badge-expired {
    background: #f8d7da;
    color: #842029;
}

/* Upload Area */
.icrm-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.icrm-upload-area:hover,
.icrm-upload-area.icrm-drag-over {
    border-color: #0073aa;
    background: #f0f8ff;
}

.icrm-upload-area.icrm-file-selected {
    border-color: #28a745;
    background: #d4edda;
}

.icrm-upload-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.icrm-upload-or {
    margin: 10px 0;
    color: #666;
}

.icrm-file-preview {
    align-items: center;
    background: #fff;
    border: 1px solid #e3e8f0;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
    padding: 12px;
}

.icrm-file-preview img {
    border-radius: 6px;
    height: 64px;
    object-fit: cover;
    width: 64px;
}

.icrm-file-preview strong,
.icrm-file-preview small {
    display: block;
}

.icrm-file-icon {
    align-items: center;
    background: #eaf2ff;
    border-radius: 6px;
    color: #1457b8;
    display: inline-flex;
    font-weight: 800;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.icrm-upload-progress {
    background: #e3e8f0;
    border-radius: 999px;
    height: 8px;
    margin-top: 14px;
    overflow: hidden;
}

.icrm-upload-progress span {
    background: #1457b8;
    display: block;
    height: 100%;
    transition: width .2s ease;
    width: 0;
}

.icrm-uploaded-documents {
    margin-top: 28px;
}

/* Tables */
.icrm-quotes-table,
.icrm-policies-grid {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.icrm-policies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.icrm-policy-card {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.icrm-policy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.icrm-policy-badges {
    display: flex;
    gap: 8px;
    align-items: center;
}

.icrm-policy-header h3 {
    margin: 0;
    color: #0073aa;
}

.icrm-badge-uploaded {
    background: #cfe2ff;
    color: #084298;
}

.icrm-expired {
    color: #dc3545;
    font-weight: 600;
}

.icrm-empty-state {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

/* Activity */
.icrm-recent-activity {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.icrm-activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.icrm-activity-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.icrm-activity-list li:last-child {
    border-bottom: none;
}

.icrm-activity-desc {
    flex: 1;
}

.icrm-activity-date {
    color: #666;
    font-size: 12px;
}

.required {
    color: #dc3545;
}

/* Modern customer dashboard */
.icrm-customer-dashboard {
    color: #101a33;
    font-family: inherit;
}

.icrm-customer-dashboard .icrm-dashboard-header h2,
.icrm-agent-dashboard-header h2 {
    color: #101a33;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    margin: 0;
}

.icrm-modern-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.icrm-modern-stats .icrm-stat-card {
    border: 1px solid #e3e9f4;
    border-left: 0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 35, 70, .08);
    min-height: 96px;
    padding: 18px 22px;
}

.icrm-modern-stats .icrm-stat-icon {
    align-items: center;
    background: #eaf2ff;
    border-radius: 999px;
    color: #0969da;
    display: inline-flex;
    flex: 0 0 52px;
    height: 52px;
    justify-content: center;
    width: 52px;
}

.icrm-modern-stats .icrm-stat-icon svg {
    height: 26px;
    width: 26px;
}

.icrm-modern-stats .icrm-stat-card-active_policies .icrm-stat-icon {
    background: #dcfce7;
    color: #16a34a;
}

.icrm-modern-stats .icrm-stat-card-expiring_policies .icrm-stat-icon,
.icrm-modern-stats .icrm-stat-card-policies_expiring_30 .icrm-stat-icon {
    background: #ffedd5;
    color: #f97316;
}

.icrm-modern-stats .icrm-stat-card-expired_policies .icrm-stat-icon {
    background: #fee2e2;
    color: #ef4444;
}

.icrm-modern-stats .icrm-stat-content h3 {
    color: #101a33;
    font-size: 28px;
    line-height: 1;
}

.icrm-modern-stats .icrm-stat-content p {
    color: #66728a;
    font-size: 13px;
    font-weight: 700;
}

.icrm-dashboard-toolbar {
    background: #fff;
    border: 1px solid #e3e9f4;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 35, 70, .06);
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    padding: 20px;
}

.icrm-dashboard-toolbar label span {
    color: #101a33;
    font-size: 12px;
}

.icrm-dashboard-toolbar input,
.icrm-dashboard-toolbar select {
    border-color: #d7dfec;
    border-radius: 7px;
    min-width: 0;
    width: 100%;
}

.icrm-dashboard-tabs {
    background: #fff;
    border: 1px solid #dfe6f2;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 4px 16px rgba(15, 35, 70, .05);
    gap: 0;
    margin: 26px 0 22px;
    padding: 0;
}

.icrm-dashboard-tab {
    align-items: center;
    background: #fff;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    color: #101a33;
    display: inline-flex;
    flex: 1 0 150px;
    gap: 8px;
    justify-content: center;
    min-height: 70px;
}

.icrm-dashboard-tab svg {
    height: 22px;
    width: 22px;
}

/* .icrm-dashboard-tab.active {
    background: #fff;
    border-bottom-color: #0969da;
    color: #0969da;
} */

.icrm-dashboard-section-header h3 {
    color: #101a33;
    font-size: 26px;
}

.icrm-responsive-table {
    border-color: #dfe6f2;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 35, 70, .05);
}

.icrm-dashboard-table th {
    background: #f8fbff;
    color: #101a33;
    font-size: 12px;
}

.icrm-dashboard-table td {
    color: #101a33;
}

.icrm-badge {
    border-radius: 999px;
    padding: 8px 16px;
}

.icrm-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.icrm-button-group .icrm-btn,
.icrm-table .icrm-btn {
    align-items: center;
    background: #fff;
    border: 1px solid #cfe0f8;
    border-radius: 6px;
    color: #0969da;
    display: inline-flex;
    gap: 6px;
    justify-content: center;
    min-height: 36px;
}

.icrm-button-group .icrm-btn svg,
.icrm-table .icrm-btn svg {
    height: 16px;
    width: 16px;
}

.icrm-button-group .icrm-btn-accept {
    border-color: #b7ebc6;
    color: #16a34a;
}

.icrm-button-group .icrm-btn-reject {
    border-color: #ffcaca;
    color: #ef4444;
}

.icrm-button-group .icrm-btn-changes {
    border-color: #e0d4ff;
    color: #7c3aed;
}

.icrm-dashboard-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.icrm-dashboard-actions .icrm-action-btn {
    align-items: center;
    border: 1px solid #dfe6f2;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(15, 35, 70, .06);
    color: #101a33;
    flex-direction: row;
    font-size: 18px;
    font-weight: 700;
    justify-content: space-between;
    padding: 22px 28px;
}

.icrm-dashboard-actions .icrm-action-btn span {
    align-items: center;
    display: inline-flex;
    gap: 12px;
}

.icrm-dashboard-actions .icrm-action-btn svg {
    color: #0969da;
    height: 26px;
    width: 26px;
}

.icrm-mobile-label {
    display: none;
}

@media (max-width: 960px) {
    .icrm-modern-stats,
    .icrm-dashboard-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 700px) {
    .icrm-customer-dashboard {
        padding: 0 14px 24px;
    }

    .icrm-dashboard-header,
    .icrm-dashboard-toolbar {
        display: none;
    }

    .icrm-modern-stats {
        display: none !important;
    }

    .icrm-dashboard-tabs {
        border-left: 0;
        border-radius: 0;
        border-right: 0;
        margin: 0 -14px 28px;
        overflow-x: auto;
    }

    .icrm-dashboard-tab {
        flex: 0 0 33.333%;
        flex-direction: column;
        font-size: 16px;
        min-height: 96px;
        padding: 12px 8px;
        white-space: normal;
    }

    .icrm-dashboard-tab svg {
        height: 30px;
        width: 30px;
    }

    .icrm-dashboard-tab span {
        display: block;
        line-height: 1.15;
    }

    .icrm-dashboard-section-header h3 {
        font-size: 28px;
        margin-left: 2px;
    }

    .icrm-dashboard-panel .icrm-responsive-table {
        background: transparent;
        border: 0;
        box-shadow: none;
        overflow: visible;
    }

    .icrm-dashboard-table {
        min-width: 0;
    }

    .icrm-dashboard-table thead {
        display: none;
    }

    .icrm-dashboard-table,
    .icrm-dashboard-table tbody,
    .icrm-dashboard-table tr,
    .icrm-dashboard-table td {
        display: block;
        width: 100%;
    }

    .icrm-dashboard-table tr {
        background: #fff;
        border: 1px solid #dfe6f2;
        border-radius: 8px;
        box-shadow: 0 8px 24px rgba(15, 35, 70, .06);
        margin-bottom: 22px;
        padding: 22px 28px;
    }

    .icrm-dashboard-table td {
        align-items: center;
        border-bottom: 1px solid #e7edf7;
        display: flex;
        justify-content: space-between;
        min-height: 70px;
        padding: 14px 0;
        text-align: right;
    }

    .icrm-dashboard-table td::before {
        color: #77839a;
        content: attr(data-label);
        font-weight: 700;
        margin-right: 18px;
        text-align: left;
    }

    .icrm-dashboard-table td:last-child {
        border-bottom: 0;
    }

    .icrm-dashboard-table .icrm-quote-id-cell {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .icrm-dashboard-table .icrm-quote-id-cell::before {
        display: none;
    }

    .icrm-mobile-label {
        color: #66728a;
        display: block;
        font-weight: 700;
    }

    .icrm-dashboard-table .icrm-quote-id-cell strong {
        font-size: 28px;
    }

    .icrm-actions-column {
        align-items: stretch !important;
        display: block !important;
    }

    .icrm-actions-column::before {
        color: #101a33 !important;
        display: block;
        font-size: 22px;
        margin: 0 0 16px;
    }

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

    .icrm-button-group .icrm-btn {
        flex-direction: column;
        font-size: 16px;
        font-weight: 800;
        /* min-height: 96px; */
        padding: 18px 22px;
    }

    .icrm-button-group .icrm-btn svg {
        height: 32px;
        width: 32px;
    }

    .icrm-button-group .icrm-btn-changes {
        grid-column: 1 / -1;
    }

    .icrm-dashboard-actions {
        grid-template-columns: 1fr;
        margin-top: 18px;
    }

    .icrm-dashboard-actions .icrm-action-btn {
        font-size: 20px;
        padding: 20px 26px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .icrm-dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .icrm-dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .icrm-dashboard-actions {
        grid-template-columns: 1fr;
    }
    
    .icrm-policies-grid {
        grid-template-columns: 1fr;
    }

    .icrm-dashboard-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .icrm-dashboard-toolbar input,
    .icrm-dashboard-toolbar select {
        min-width: 0;
        width: 100%;
    }

    .icrm-responsive-table {
        border: 0;
        background: transparent;
    }

    .icrm-dashboard-table {
        min-width: 0;
    }

    .icrm-dashboard-table thead {
        display: none;
    }

    .icrm-dashboard-table,
    .icrm-dashboard-table tbody,
    .icrm-dashboard-table tr,
    .icrm-dashboard-table td {
        display: block;
        width: 100%;
    }

    .icrm-dashboard-table tr {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 8px 0;
    }

    .icrm-dashboard-table td {
        border-bottom: 0;
        display: flex;
        justify-content: space-between;
        gap: 12px;
        padding: 8px 12px;
        text-align: right;
    }

    .icrm-dashboard-table td::before {
        content: attr(data-label);
        color: #5f6b7a;
        font-weight: 700;
        text-align: left;
    }

    .icrm-dashboard-pagination {
        justify-content: center;
    }
}

.icrm-settings-grid,
.icrm-detail-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.icrm-settings-card,
.icrm-detail-grid p {
    background: #fff;
    border: 1px solid #e3e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(22, 32, 51, 0.07);
    margin: 0;
    padding: 16px;
}

.icrm-grid-full {
    grid-column: 1 / -1;
}

.icrm-settings-card label,
.icrm-detail-grid strong,
.icrm-detail-grid span {
    display: block;
}

.icrm-settings-card input,
.icrm-settings-card textarea {
    margin-top: 6px;
    min-height: 44px;
    width: 100%;
}

.icrm-detail-grid strong {
    color: #5b6678;
    font-size: 12px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.icrm-quote-timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.icrm-quote-timeline span {
    border: 1px solid #d4d9e2;
    border-radius: 999px;
    padding: 8px 12px;
}

.icrm-quote-timeline .is-complete {
    background: #1457b8;
    border-color: #1457b8;
    color: #fff;
}

@media (max-width: 480px) {
    .icrm-login-container {
        margin: 20px;
        padding: 10px;
    }
    
    .icrm-customer-dashboard {
        padding: 10px;
    }
}

/* Mobile-first polish */
.icrm-customer-dashboard,
.icrm-login-container,
.icrm-content-section {
    box-sizing: border-box;
}

.icrm-customer-dashboard *,
.icrm-login-container *,
.icrm-content-section * {
    box-sizing: border-box;
}

.icrm-customer-dashboard {
    color: #172033;
}

.icrm-login-box,
.icrm-stat-card,
.icrm-action-btn,
.icrm-recent-activity,
.icrm-quotes-table,
.icrm-policies-grid,
.icrm-policy-card,
.icrm-dashboard-loading-card {
    border: 1px solid #e3e8f0;
    box-shadow: 0 8px 22px rgba(22, 32, 51, 0.07);
}

.icrm-btn,
.crm-btn-primary,
.icrm-tab-btn,
.icrm-dashboard-tab,
.icrm-page-btn,
.icrm-action-btn {
    min-height: 44px;
}

.icrm-btn-primary,
.crm-btn-primary,
.icrm-dashboard-tab.active {
    background: #1457b8;
}

.icrm-btn-primary:hover,
.crm-btn-primary:hover {
    background: #0f4697;
}

.icrm-btn-secondary {
    background: #485568;
}

.icrm-dashboard-header h2 {
    margin: 0;
    color: #121a2b;
    font-size: clamp(22px, 5vw, 32px);
    line-height: 1.15;
}

.icrm-form-group input[type="text"],
.icrm-form-group input[type="email"],
.icrm-form-group input[type="tel"],
.icrm-form-group input[type="number"],
.icrm-form-group input[type="date"],
.icrm-form-group select,
.icrm-form-group textarea,
.icrm-dashboard-toolbar input,
.icrm-dashboard-toolbar select {
    min-height: 44px;
    background: #fff;
    border-color: #cfd7e3;
}

.icrm-dashboard-tabs {
    scrollbar-width: thin;
}

.icrm-dashboard-tab {
    flex: 0 0 auto;
}

.icrm-policy-header,
.icrm-activity-list li {
    gap: 12px;
}

@media (max-width: 768px) {
    .icrm-login-container {
        max-width: none;
        margin: 16px auto;
        padding: 12px;
    }

    .icrm-login-box {
        padding: 20px;
    }

    .icrm-tabs,
    .icrm-dashboard-tabs {
        margin-left: -10px;
        margin-right: -10px;
        padding: 0 10px 6px;
    }

    .icrm-tab-btn,
    .icrm-dashboard-tab {
        padding: 11px 14px;
        white-space: nowrap;
    }

    .icrm-dashboard-toolbar label,
    .icrm-dashboard-toolbar .icrm-btn,
    .icrm-dashboard-actions .icrm-action-btn,
    .icrm-btn,
    .crm-btn-primary {
        width: 100%;
    }

    .icrm-stat-card {
        padding: 16px;
        align-items: flex-start;
    }

    .icrm-stat-content h3 {
        font-size: 26px;
    }

    .icrm-dashboard-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .icrm-dashboard-table td {
        align-items: flex-start;
        min-height: 38px;
        overflow-wrap: anywhere;
    }

    .icrm-dashboard-table td::before {
        flex: 0 0 42%;
    }

    .icrm-upload-area {
        padding: 28px 16px;
    }

    .icrm-policy-header,
    .icrm-activity-list li {
        align-items: flex-start;
        flex-direction: column;
    }
}
