/* Main Plugin Styles */
.mine-crm-wrap {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Card Styles */
.mine-crm-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mine-crm-card h2 {
    margin-top: 0;
    color: #23282d;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-box {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    transition: transform 0.2s;
}

.stat-box:hover {
    transform: translateY(-2px);
}

.stat-label {
    display: block;
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #2271b1;
}

/* Table Styles */
.mine-crm-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.mine-crm-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #23282d;
    border-bottom: 2px solid #ddd;
}

.mine-crm-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.mine-crm-table tr:hover {
    background-color: #f8f9fa;
}

/* Form Styles */
.mine-crm-form {
    max-width: 600px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-field {
    margin-bottom: 15px;
}

.form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #23282d;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="number"],
.form-field input[type="date"],
.form-field input[type="datetime-local"],
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #000;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
    color: #000;
}

/* Modal Styles */
.mine-crm-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 25px;
    border-radius: 4px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #000;
}

/* Status Badge Styles */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.status-new {
    background: #e3f2fd;
    color: #1976d2;
}

.status-contacted {
    background: #fff3e0;
    color: #f57c00;
}

.status-meeting-scheduled {
    background: #e8f5e9;
    color: #388e3c;
}

.status-deal-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-declined {
    background: #ffebee;
    color: #c62828;
}

.status-lost {
    background: #fafafa;
    color: #616161;
}

/* Button Styles */
.mine-crm-button {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.button-primary {
    background: #2271b1;
    color: #fff;
    border: none;
}

.button-primary:hover {
    background: #135e96;
}

.button-secondary {
    background: #f8f9fa;
    color: #23282d;
    border: 1px solid #ddd;
}

.button-secondary:hover {
    background: #f1f1f1;
}

/* Responsive Styles */
@media screen and (max-width: 782px) {
    .mine-crm-wrap {
        padding: 10px;
    }

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

    .mine-crm-table {
        display: block;
        overflow-x: auto;
    }

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

    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
}

/* Loading Spinner */
.mine-crm-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.role-ibc .show-admin-bar,
.role-ca .show-admin-bar,
.role-pd .show-admin-bar {
    display: none !important;
}

body.role-ibc,
body.role-ca,
body.role-pd {
    margin-top: 0 !important;
}

/* Styles for the Update Contract Info form labels */
.mine-crm-update-info-form label {
    color: #ffc107; /* Match the button color for better visibility */
}
