/**
 * CSS Ultra-Profissional para Modais de Formulário
 * Design moderno, elegante e responsivo
 */

/* ========== RESET E VARIÁVEIS ========== */
:root {
    --primary-color: #2D9CDB;
    --primary-dark: #1A7CC5;
    --success-color: #1cc88a;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --info-color: #36b9cc;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
    --gradient-primary: linear-gradient(135deg, #2D9CDB 0%, #1A7CC5 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --shadow-soft: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    --shadow-lifted: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.2);
    --border-radius: 0.375rem;
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== MODAL CONTAINER ========== */
.modal-xl .modal-dialog {
    max-width: 1200px;
}

.modal-content {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--shadow-lifted);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.98);
}

.modal-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: 1rem 1rem 0 0;
    padding: 1.5rem 2rem;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-title::before {
    content: '📝';
    font-size: 1.25em;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.modal-header .close {
    position: relative;
    z-index: 2;
    color: white;
    opacity: 0.8;
    font-size: 1.5rem;
    transition: var(--transition-base);
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-header .close:hover {
    opacity: 1;
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

/* ========== MODAL BODY ========== */
.modal-body {
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
    max-height: 70vh;
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: var(--transition-base);
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ========== FORMULÁRIO ========== */
.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Removido: risco azul vertical antes do label — padronização de formulários */

/* ========== CAMPOS DE INPUT ========== */
.form-control {
    border: 2px solid #e3e6f0;
    border-radius: var(--border-radius);
    padding: 0.875rem 1.125rem;
    font-size: 0.95rem;
    transition: var(--transition-base);
    background: white;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    line-height: 1.5;
    box-sizing: border-box;
    width: 100%;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.15), 0 4px 12px rgba(0,0,0,0.1);
    background: white;
    transform: translateY(-1px);
    outline: none;
}

/* Correção específica para inputs de texto */
.professional-input {
    height: auto;
    min-height: 2.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Wrapper de input para melhor controle */
.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper .form-control {
    width: 100%;
    display: block;
}

.form-control.is-valid {
    border-color: var(--success-color);
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path fill='%231cc88a' d='m2.3 6.73.89-.89 1.42 1.42 1.41-1.41 1.42 1.41L3.71 8.15z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem 1rem;
}

.form-control.is-invalid {
    border-color: var(--danger-color);
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path fill='%23e74a3b' d='M6 0C2.686 0 0 2.686 0 6s2.686 6 6 6 6-2.686 6-6S9.314 0 6 0zm0 9a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm1-3H5V3h2v3z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem 1rem;
}

/* ========== SELECT PERSONALIZADO ========== */
select.form-control {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='%23858796' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem 1rem;
    appearance: none;
    padding-right: 3rem;
    height: auto;
    min-height: 2.5rem;
    line-height: 1.5;
}

select.form-control option {
    padding: 0.5rem;
    background: white;
    color: var(--dark-color);
}

/* Força o alinhamento correto para todos os form-control no modal */
.modal .form-control {
    box-sizing: border-box !important;
    width: 100% !important;
    display: block !important;
    text-align: left !important;
}

/* ========== TEXTAREA ========== */
textarea.form-control {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
    font-family: inherit;
}

/* ========== CHECKBOX ESTILIZADO ========== */
.custom-control-input:checked ~ .custom-control-label::before {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(78, 115, 223, 0.3);
}

.custom-control-label {
    padding-left: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.custom-control-label::before {
    border: 2px solid #e3e6f0;
    border-radius: 0.25rem;
    transition: var(--transition-base);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.custom-control-label::after {
    transition: var(--transition-base);
}

/* ========== HELP TEXT ========== */
.form-text {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(78, 115, 223, 0.05);
    border-left: 3px solid var(--primary-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

.form-text small {
    color: #6c757d;
}

/* ========== CONTADOR DE CARACTERES ========== */
.character-counter {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #6c757d;
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid #e3e6f0;
    pointer-events: none;
}

/* ========== FEEDBACK DE VALIDAÇÃO ========== */
.invalid-feedback {
    display: block;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(231, 74, 59, 0.1);
    border-left: 3px solid var(--danger-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    color: var(--danger-color);
    font-size: 0.85rem;
    font-weight: 500;
}

.valid-feedback {
    display: block;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(28, 200, 138, 0.1);
    border-left: 3px solid var(--success-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    color: var(--success-color);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ========== ALERTAS CONTEXTUAIS ========== */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    box-shadow: var(--shadow-soft);
    border-left: 4px solid;
}

.alert-info {
    background: linear-gradient(135deg, rgba(54, 185, 204, 0.1), rgba(54, 185, 204, 0.05));
    border-left-color: var(--info-color);
    color: #155724;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(246, 194, 62, 0.1), rgba(246, 194, 62, 0.05));
    border-left-color: var(--warning-color);
    color: #856404;
}

/* ========== SEPARADORES DE SEÇÃO ========== */
.section-divider {
    margin: 2rem 0;
    position: relative;
    text-align: center;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e3e6f0, transparent);
}

.section-divider span {
    background: white;
    padding: 0 1.5rem;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========== MODAL FOOTER ========== */
.modal-footer {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
    border-top: 1px solid rgba(227, 230, 240, 0.5);
    border-radius: 0 0 1rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* ========== BOTÕES ESTILIZADOS ========== */
.btn {
    border-radius: var(--border-radius);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-base);
    border: none;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(78, 115, 223, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(78, 115, 223, 0.4);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
    color: white;
}

.btn-outline-warning {
    border: 2px solid var(--warning-color);
    color: var(--warning-color);
    background: transparent;
    box-shadow: none;
}

.btn-outline-warning:hover {
    background: var(--warning-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(246, 194, 62, 0.3);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* ========== RESPONSIVIDADE ========== */
@media (max-width: 768px) {
    .modal-xl .modal-dialog {
        max-width: 95%;
        margin: 1rem auto;
    }
    
    .modal-body {
        padding: 1.5rem;
        max-height: 60vh;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-footer {
        padding: 1rem 1.5rem;
        flex-direction: column;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
}

/* ========== ANIMAÇÕES ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.modal.fade .modal-dialog {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group {
    animation: fadeIn 0.5s ease-out forwards;
}

.form-group:nth-child(even) {
    animation-delay: 0.1s;
}

.form-group:nth-child(odd) {
    animation-delay: 0.05s;
}

/* ========== LOADING STATES ========== */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== TOOLTIPS CUSTOMIZADOS ========== */
.tooltip-hint {
    position: relative;
    cursor: help;
    color: var(--info-color);
}

.tooltip-hint::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
}

.tooltip-hint:hover::after {
    opacity: 1;
}

/* ========== MELHORIAS ESPECÍFICAS PARA CHAMADOS TI ========== */
#modalNovoChamado .form-row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

#modalNovoChamado .form-row .col {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

#modalNovoChamado .priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(78, 115, 223, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(78, 115, 223, 0.2);
}

/* ===== LOADING AND PROGRESS COMPONENTS ===== */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    border-radius: var(--border-radius-lg);
}

.loading-spinner {
    text-align: center;
    padding: 2rem;
}

.loading-text {
    margin-top: 1rem;
    color: var(--text-color);
    font-weight: 500;
}

.professional-progress {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.progress-message {
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-align: center;
}

.progress {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

/* ===== NOTIFICATION STYLES ===== */
.professional-notification {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
    animation: slideInDown 0.3s ease;
}

.professional-notification.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid #28a745;
    color: #155724;
}

.professional-notification.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f1b0b7 100%);
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.professional-notification.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #ffc107;
    color: #856404;
}

.professional-notification.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

/* ===== FIELD ICONS ===== */
.field-icon {
    font-size: 1.1em;
    margin-right: 0.5rem;
    opacity: 0.7;
}

.professional-field[data-field-type="email"] .field-icon {
    color: #007bff;
}

.professional-field[data-field-type="tel"] .field-icon {
    color: #28a745;
}

.professional-field[data-field-type="text"] .field-icon {
    color: #6c757d;
}

.professional-field[data-field-type="textarea"] .field-icon {
    color: #fd7e14;
}

.professional-field[data-field-type="select"] .field-icon {
    color: #6f42c1;
}

/* ===== INPUT WRAPPERS AND VISUAL ENHANCEMENTS ===== */
.input-wrapper,
.textarea-wrapper,
.select-wrapper {
    position: relative;
}

.character-counter {
    position: absolute;
    bottom: -20px;
    right: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s ease;
}

.professional-input:focus + .character-counter,
.professional-textarea:focus + .character-counter {
    color: var(--primary-color);
}

/* ===== VALIDATION STYLES ===== */
.is-valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #28a745;
    font-weight: 500;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
    font-weight: 500;
}

/* ===== CHECKBOX ENHANCEMENTS ===== */
.professional-checkbox {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    background: var(--bg-light);
    transition: all 0.3s ease;
}

.professional-checkbox:hover {
    border-color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.05);
}

.professional-checkbox-label {
    margin-bottom: 0;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.custom-control-input:checked ~ .professional-checkbox-label {
    color: var(--primary-color);
}

/* ===== MODULE CARDS LAYOUT ===== */
.module-card {
    background: white;
    border: 2px solid #e3e6f0;
    border-radius: 8px;
    padding: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    height: 90px;
    display: flex;
    flex-direction: column;
}

.module-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(78, 115, 223, 0.15);
    transform: translateY(-1px);
}

.module-card.selected {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #f8fffe 0%, #f0fdf8 100%);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.2);
}

.module-card.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--success-color), #10b981);
}

.module-content-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px 4px 12px;
    flex-shrink: 0;
}

.module-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--primary-color), #5a67d8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
}

.module-card.selected .module-icon {
    background: linear-gradient(135deg, var(--success-color), #10b981);
    transform: scale(1.05);
}

.module-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #e3e6f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 10px;
    transition: all 0.3s ease;
    background: white;
}

.module-card.selected .module-check {
    border-color: var(--success-color);
    background: var(--success-color);
    color: white;
    transform: scale(1.05);
}

.module-content {
    padding: 0 12px 8px 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.module-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0 0 2px 0;
    line-height: 1.2;
}

.module-card.selected .module-title {
    color: var(--success-color);
}

.module-description {
    font-size: 11px;
    color: #6c757d;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.module-card.selected .module-description {
    color: #059669;
}

/* Animação de seleção */
.module-card {
    animation: cardIdle 0.3s ease;
}

.module-card.selected {
    animation: cardSelected 0.3s ease;
}

@keyframes cardSelected {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes cardIdle {
    0% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    .module-card {
        height: 80px;
    }
    
    .module-header {
        padding: 6px 10px 3px 10px;
    }
    
    .module-content {
        padding: 0 10px 6px 10px;
    }
    
    .module-icon {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .module-check {
        width: 16px;
        height: 16px;
        font-size: 8px;
    }
    
    .module-title {
        font-size: 12px;
    }
    
    .module-description {
        font-size: 10px;
    }
}

/* ===== ADMIN TOGGLE CARD ===== */
.admin-toggle-container {
    max-width: 400px;
}

.admin-card {
    background: white;
    border: 2px solid #e3e6f0;
    border-radius: 8px;
    padding: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    height: 90px;
    display: flex;
    flex-direction: column;
}

.admin-card:hover {
    border-color: #dc3545;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.15);
    transform: translateY(-1px);
}

.admin-card.selected {
    border-color: #dc3545;
    background: linear-gradient(135deg, #fff8f8 0%, #fdf2f2 100%);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2);
}

.admin-card.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #dc3545, #c82333);
}

.admin-content-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px 4px 12px;
    flex-shrink: 0;
}

.admin-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
}

.admin-card.selected .admin-icon {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    transform: scale(1.05);
}

.admin-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #e3e6f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 10px;
    transition: all 0.3s ease;
    background: white;
}

.admin-card.selected .admin-check {
    border-color: #dc3545;
    background: #dc3545;
    color: white;
    transform: scale(1.05);
}

.admin-content {
    padding: 0 12px 8px 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.admin-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0 0 2px 0;
    line-height: 1.2;
}

.admin-card.selected .admin-title {
    color: #dc3545;
}

.admin-description {
    font-size: 11px;
    color: #6c757d;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.admin-card.selected .admin-description {
    color: #b91d29;
}

/* ===== ANIMATION CLASSES ===== */
@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.animate__animated {
    animation-duration: 0.5s;
    animation-fill-mode: both;
}

.animate__fadeInUp {
    animation-name: fadeInUp;
}

.animate__pulse {
    animation-name: pulse;
}

/* ===== DISABLED STATES ===== */
.btn.disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== ENHANCED MODAL HEADER ===== */
.modal-header {
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

/* ===== DARK MODE ADAPTATIONS ===== */
@media (prefers-color-scheme: dark) {
    .loading-overlay {
        background: rgba(30, 30, 30, 0.95);
    }
    
    .professional-notification.alert-success {
        background: linear-gradient(135deg, #1e3a2e 0%, #2d5a3d 100%);
        color: #a3d9a5;
    }
    
    .professional-notification.alert-danger {
        background: linear-gradient(135deg, #3a1e1e 0%, #5a2d2d 100%);
        color: #f5a3a3;
    }
    
    .professional-notification.alert-warning {
        background: linear-gradient(135deg, #3a3a1e 0%, #5a5a2d 100%);
        color: #f5f5a3;
    }
    
    .professional-notification.alert-info {
        background: linear-gradient(135deg, #1e3a3a 0%, #2d5a5a 100%);
        color: #a3f5f5;
    }
}

/* ===== AUTO-FILL EFFECT ===== */
.field-auto-filled {
    animation: autoFillHighlight 2s ease-in-out;
    border-color: #28a745 !important;
}

@keyframes autoFillHighlight {
    0% {
        background-color: rgba(40, 167, 69, 0.1);
        box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    }
    50% {
        background-color: rgba(40, 167, 69, 0.2);
        box-shadow: 0 0 0 0.3rem rgba(40, 167, 69, 0.35);
    }
    100% {
        background-color: transparent;
        box-shadow: none;
    }
}

/* ===== ENHANCED TOOLTIPS FOR AUTO-FILLED FIELDS ===== */
.professional-input.field-auto-filled::after {
    content: '✅';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #28a745;
    font-size: 0.9em;
    opacity: 0.8;
}

/* ===== ENHANCED USER INFO DISPLAY ===== */
.user-info-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.professional-field.has-auto-fill {
    position: relative;
}

.professional-field.has-auto-fill::before {
    content: '👤';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 12px;
    opacity: 0.6;
    z-index: 10;
}
