/* Admin Styles for Lead Management Hub */

/* Dashboard Styles */
.leadmahu-kpis-container, .leadmahu-kpis-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}
.leadmahu-kpi-card, .leadmahu-kpi-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 20px;
    min-width: 150px;
    flex: 1;
    text-align: center;
    border-left: 4px solid #2271b1;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.leadmahu-kpi-card:hover, .leadmahu-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.leadmahu-kpi-card.total, .leadmahu-kpi-card.total {
    border-left-color: #2271b1;
}
.leadmahu-kpi-card.nuevo, .leadmahu-kpi-card.nuevo {
    border-left-color: #00a32a;
}
.leadmahu-kpi-card.contactado, .leadmahu-kpi-card.contactado {
    border-left-color: #ff9800;
}
.leadmahu-kpi-card.convertido, .leadmahu-kpi-card.convertido {
    border-left-color: #0073aa;
}
.leadmahu-kpi-card.perdido, .leadmahu-kpi-card.perdido {
    border-left-color: #d63638;
}
.leadmahu-kpi-title, .leadmahu-kpi-title {
    margin: 0;
    font-size: 14px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.leadmahu-kpi-value, .leadmahu-kpi-value {
    margin: 10px 0 0;
    font-size: 28px;
    font-weight: bold;
    color: #2271b1;
}

/* Action Buttons */
.leadmahu-action-buttons, .leadmahu-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}
.leadmahu-action-button, .leadmahu-action-button {
    padding: 3px 8px !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    border-radius: 3px !important;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    margin-bottom: 3px;
}
.leadmahu-btn-view, .leadmahu-btn-view {
    background-color: #2271b1 !important;
    border-color: #2271b1 !important;
    color: #fff !important;
}
.leadmahu-btn-view:hover, .leadmahu-btn-view:hover {
    background-color: #135e96 !important;
    color: #fff !important;
}
.leadmahu-btn-edit, .leadmahu-btn-edit {
    background-color: #f0b849 !important;
    border-color: #f0b849 !important;
    color: #000 !important;
}
.leadmahu-btn-edit:hover, .leadmahu-btn-edit:hover {
    background-color: #daa520 !important;
    color: #000 !important;
}
.leadmahu-btn-delete, .leadmahu-btn-delete {
    background-color: #d63638 !important;
    border-color: #d63638 !important;
    color: #fff !important;
}
.leadmahu-btn-delete:hover, .leadmahu-btn-delete:hover {
    background-color: #b32d2e !important;
    color: #fff !important;
}

/* Lead Detail Card */
.lead-detail-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 25px;
    margin-top: 20px;
}
.lead-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 15px;
}
.lead-title {
    font-size: 24px;
    margin: 0;
    color: #2271b1;
    font-weight: 600;
}
.lead-id {
    background: #f1f1f1;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 13px;
    color: #666;
}
.lead-section {
    margin-bottom: 30px;
}
.lead-section-title {
    font-size: 16px;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}
.lead-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.lead-info-item {
    margin-bottom: 15px;
}
.lead-info-label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}
.lead-info-value {
    padding: 8px 12px;
    background: #f9f9f9;
    border-radius: 4px;
    border-left: 3px solid #2271b1;
}
.lead-info-value.status {
    font-weight: 600;
}
.lead-info-value.status.nuevo {
    border-left-color: #00a32a;
}
.lead-info-value.status.contactado {
    border-left-color: #ff9800;
}
.lead-info-value.status.convertido {
    border-left-color: #0073aa;
}
.lead-info-value.status.perdido {
    border-left-color: #d63638;
}
.lead-info-full {
    grid-column: 1 / -1;
}
.lead-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}
.lead-action-btn {
    padding: 8px 16px !important;
    text-decoration: none;
    border-radius: 4px !important;
    font-weight: 600 !important;
}
.lead-btn-back {
    background: #f1f1f1 !important;
    color: #333 !important;
}

/* Form Generator Styles */
.form-table th {
    width: 200px;
    text-align: left;
}
.form-table td {
    padding: 12px;
}
.available-fields-container {
    display: flex;
    flex-direction: column;
}
.available-fields-container label {
    margin-bottom: 8px;
}
.custom-field {
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
}
.custom-field label {
    display: block;
    margin-bottom: 5px;
}
.number-limits {
    margin-top: 10px;
    padding-left: 20px;
}

/* General Page Styles */
.leadmahu-general-page table.widefat {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 20px;
    border: 1px solid #ccd0d4;
}

.leadmahu-general-page .widefat th, 
.leadmahu-general-page .widefat td {
    padding: 12px !important;
    text-align: left;
    vertical-align: middle;
}

.leadmahu-general-page .widefat thead th {
    background-color: #f1f1f1;
    font-weight: bold;
    border-bottom: 1px solid #ccd0d4;
}

.leadmahu-general-page .widefat tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.leadmahu-general-page label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.leadmahu-general-page input[type="text"], 
.leadmahu-general-page input[type="date"], 
.leadmahu-general-page select {
    width: 300px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
}

.leadmahu-general-page .button-primary {
    padding: 8px 15px;
    background-color: #2271b1;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
    line-height: 2;
    min-height: 30px;
}

.leadmahu-general-page .button-primary:hover {
    background-color: #135e96;
}

.leadmahu-general-page .form-section {
    background: white;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.leadmahu-general-page h2 {
    font-size: 1.3em;
    margin-top: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #23282d;
}

.leadmahu-general-page p {
    margin: 15px 0;
}

.form-section h2 {
    font-size: 1.3em;
    margin-top: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #23282d;
}

.form-section p {
    margin: 15px 0;
}

.form-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-section input[type="text"],
.form-section input[type="date"],
.form-section select {
    width: 300px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
}

.form-section .button-primary {
    padding: 8px 15px;
    background-color: #2271b1;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
    line-height: 2;
    min-height: 30px;
}

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

.form-section .button {
    padding: 8px 15px;
    background-color: #f0f0f1;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
    line-height: 2;
    min-height: 30px;
}

.form-section .button:hover {
    background-color: #dfdfdf;
}
