/* =========================================================
   Goal Form Styles
   =========================================================
   Este arquivo contém estilos específicos para o formulário de Goals.
   Estilos compartilhados entre Goal e Department estão em department_form.css
   ========================================================= */

/* Enhanced form container with modern design */
.goal-form-page {
    width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: auto;
}

.form-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem clamp(1rem, 2vw, 2rem);
    background: transparent;
    width: 100%;
    flex: 1;
    box-sizing: border-box;
}

/* Modern form header with glass effect */
.form-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(197, 165, 114, 0.2);
    border-radius: 1rem 1rem 0 0;
    padding: 1.5rem clamp(1.25rem, 3vw, 2rem);
    margin-bottom: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-header.is-sticky {
    border-radius: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.98);
}

.form-header h4 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #c5a572, #9d8359);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced form card */
.form-card {
    background: #ffffff;
    border-radius: 0 0 1rem 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(197, 165, 114, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
}

/* Modern form sections */
.form-section {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 1.25rem clamp(1.25rem, 3vw, 2rem);
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    gap: 1rem;
}

.form-section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(197, 165, 114, 0.1), transparent);
    transition: left 0.6s ease;
}

.form-section-header:hover {
    background: linear-gradient(135deg, rgba(197, 165, 114, 0.05) 0%, #f8f9fa 100%);
    transform: translateY(-1px);
}

.form-section-header:hover::before {
    left: 100%;
}

.form-section-header.collapsed {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
}

.form-section-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-section-title i {
    color: #c5a572;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.collapse-icon {
    color: #6c757d;
    font-size: 0.9rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-section-header.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

/* Enhanced form section content */
.form-section-content {
    padding: 1.5rem clamp(1.25rem, 3vw, 2rem);
    background: #ffffff;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    max-height: none; /* Permite crescimento natural quando expandido */
}

.form-section-content.collapsed {
    padding: 0 2rem;
    max-height: 0 !important;
}

/* Modern form grid system */
.form-grid {
    display: grid;
    gap: 1.5rem;
    width: 100%;
}

.form-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.form-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

/* Enhanced field groups */
.field-group {
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
    border: 1px solid rgba(197, 165, 114, 0.15);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.field-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #c5a572, #9d8359);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.field-group:hover {
    border-color: rgba(197, 165, 114, 0.3);
    box-shadow: 0 4px 16px rgba(197, 165, 114, 0.15);
    transform: translateY(-2px);
}

.field-group:hover::before {
    transform: scaleX(1);
}

/* Read-only section styling */
.form-section.readonly .form-section-header {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #ffc107;
}

.form-section.readonly .form-section-header:hover {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
}

.form-section.readonly .field-group {
    background: linear-gradient(135deg, #fff8e1 0%, #ffffff 100%);
    border-color: rgba(255, 193, 7, 0.3);
}

.form-section.readonly .field-group:hover {
    border-color: rgba(255, 193, 7, 0.5);
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.1);
}

.form-section.readonly .form-control-plaintext {
    background-color: #fff8e1;
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    color: #495057;
    font-weight: 500;
}

/* Badge styling for read-only indicator */
.badge.bg-warning {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.field-group-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(197, 165, 114, 0.2);
}

.field-group-title > span:first-child,
.field-group-title > i:first-child + span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.field-group-title i {
    color: #c5a572;
    font-size: 0.9rem;
}

/* Botão criar departamento no field-group-title */
.field-group-title .btn,
.field-group-title a.btn {
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid #c5a572;
    color: #c5a572;
    background: transparent;
    border-radius: 0.375rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 2rem;
    width: 2rem;
    height: 2rem;
}

.field-group-title .btn:hover,
.field-group-title a.btn:hover {
    background: #c5a572;
    color: #fff;
    border-color: #c5a572;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(197, 165, 114, 0.3);
}

.field-group-title .btn:active,
.field-group-title a.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(197, 165, 114, 0.2);
}

.field-group-title .btn i,
.field-group-title a.btn i {
    font-size: 0.75rem;
}

/* Enhanced form controls */
.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
}

.form-control:focus, .form-select:focus {
    border-color: #c5a572;
    box-shadow: 0 0 0 0.2rem rgba(197, 165, 114, 0.15);
    transform: translateY(-1px);
}

.form-control.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.38 1.38.94-.94L2.3 6.73z'/%3e%3c/svg%3e");
}

.form-control.is-invalid {
    border-color: #dc3545;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 20%, 50%, 80%, 100% { transform: translateX(0); }
    10%, 30%, 70%, 90% { transform: translateX(-5px); }
    40%, 60% { transform: translateX(5px); }
}

/* ===== Radio cards: Repeat Type (fix) ===== */
/* Enhanced radio buttons - Fixed version */
.form-section .form-group .form-check {
    position: relative;
    padding: 0;              /* remove padding do wrapper */
    margin: 0 0 14px 0;
    background: none;
    border: none;
    border-radius: 0;
}

/* esconde o radio padrão (mas mantém acessível) */
.form-section .form-group .form-check-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    margin: 0;
    width: 0;
    height: 0;
}

/* o "card" é o label */
.form-section .form-group .form-check-label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px 16px 16px 52px;
    border: 1px solid rgba(197, 165, 114, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    user-select: none;
    overflow: hidden;       /* <<< corta qualquer highlight exagerado */
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    color: var(--dark-color);
    font-weight: 500;
}

/* bolinha do radio (substitui o oval gigante) */
.form-section .form-group .form-check-label::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(197, 165, 114, 0.4);
    background: #fff;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    z-index: 1;
}

/* highlight sutil (não oval gigante) */
.form-section .form-group .form-check-label::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease;
    z-index: 0;
    /* brilho leve, sem "faixa" */
    background: radial-gradient(circle at 20% 50%, rgba(197, 165, 114, 0.08), transparent 60%);
}

/* hover state */
.form-section .form-group .form-check-label:hover {
    border-color: rgba(197, 165, 114, 0.4);
    background: rgba(197, 165, 114, 0.05);
    transform: translateX(2px);
}

.form-section .form-group .form-check-label:hover::before {
    border-color: rgba(197, 165, 114, 0.6);
}

/* estado selecionado */
.form-section .form-group .form-check-input:checked + .form-check-label {
    border-color: rgba(197, 165, 114, 0.6);
    background: rgba(197, 165, 114, 0.1);
    color: #9d8359;
    font-weight: 700;
}

.form-section .form-group .form-check-input:checked + .form-check-label::before {
    border-color: #c5a572;
    background: #c5a572;
    box-shadow: 0 0 0 4px rgba(197, 165, 114, 0.2);
}

.form-section .form-group .form-check-input:checked + .form-check-label::after {
    opacity: 1;
}

/* foco acessível (teclado) */
.form-section .form-group .form-check-input:focus-visible + .form-check-label {
    outline: 3px solid rgba(197, 165, 114, 0.4);
    outline-offset: 2px;
}

/* Fallback para form-check fora de form-section */
.form-check:not(.form-section .form-group .form-check) {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid rgba(197, 165, 114, 0.2);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.form-check:not(.form-section .form-group .form-check):hover {
    border-color: rgba(197, 165, 114, 0.4);
    background: linear-gradient(135deg, rgba(197, 165, 114, 0.05) 0%, #f8f9fa 100%);
    transform: translateX(4px);
}

.form-check-input:checked + .form-check-label:not(.form-section .form-group .form-check-label) {
    color: #9d8359;
    font-weight: 600;
}

.form-check-input:not(.form-section .form-group .form-check-input) {
    margin-top: 0.2rem;
    width: 1.05rem !important;
    height: 1.05rem !important;
    min-width: 1.05rem !important;
    min-height: 1.05rem !important;
    max-width: 1.05rem !important;
    max-height: 1.05rem !important;
    padding: 0 !important;
    flex-shrink: 0;
}

/* Enhanced alert styling */
.alert {
    border: none;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
    border-left: 4px solid #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.1);
}

.alert-heading {
    color: #dc3545;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Enhanced form actions */
.form-actions {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 1.5rem clamp(1.25rem, 3vw, 2rem);
    border-top: 1px solid rgba(197, 165, 114, 0.1);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, #c5a572, #9d8359);
    color: white;
    box-shadow: 0 4px 16px rgba(197, 165, 114, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #9d8359, #8a6f4f);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(197, 165, 114, 0.4);
}

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

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(108, 117, 125, 0.4);
}

/* Enhanced apply-to-future container */
.apply-to-future-container {
    background: linear-gradient(135deg, #fff8e1 0%, #ffffff 100%);
    border: 2px dashed #ffc107;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1rem;
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0%, 100% { border-color: #ffc107; background: linear-gradient(135deg, #fff8e1 0%, #ffffff 100%); }
    50% { border-color: #e0a800; background: linear-gradient(135deg, #fff3cd 0%, #ffffff 100%); }
}

/* Responsive design improvements */
@media (max-width: 992px) {
    .form-container {
        padding: 1rem;
    }
    
    .form-header {
        padding: 1.25rem 1.5rem;
    }
    
    .form-header h4 {
        font-size: 1.5rem;
    }
    
    .form-section-content {
        padding: 1.25rem 1.5rem;
    }
    
    .form-section-header {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .form-container {
        padding: 0.75rem;
    }
    
    .form-header {
        padding: 1rem 1.25rem;
        border-radius: 0.75rem 0.75rem 0 0;
    }
    
    .form-header h4 {
        font-size: 1.35rem;
    }
    
    .form-section-content {
        padding: 1rem 1.25rem;
    }
    
    .form-section-header {
        padding: 0.875rem 1.25rem;
    }
    
    .form-section-title {
        font-size: 1.1rem;
    }
    
    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .field-group {
        padding: 1rem;
    }
    
    .field-group-title {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
        flex-wrap: wrap;
    }
    
    .field-group-title .btn,
    .field-group-title a.btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        margin-top: 0.25rem;
    }
    
    .form-actions {
        padding: 1.25rem;
        flex-direction: column-reverse;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
    }
    
    .form-card {
        border-radius: 0 0 0.75rem 0.75rem;
    }
}

/* Loading states and animations */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: rgba(15, 23, 42, 0.7);
    font-size: 1.1rem;
}

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

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

/* Enhanced tooltips */
.tooltip-inner {
    background: linear-gradient(135deg, #2c3e50, #34495e) !important;
    color: white !important;
    font-size: 0.875rem !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Custom scrollbar */
.form-section-content::-webkit-scrollbar {
    width: 6px;
}

.form-section-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.form-section-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #c5a572, #9d8359);
    border-radius: 3px;
}

.form-section-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #9d8359, #8a6f4f);
}

/* Validation animations */
@keyframes fadeInScale {
    from { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.8); 
    }
    to { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1); 
    }
}

@keyframes fadeOutScale {
    from { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1); 
    }
    to { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.8); 
    }
}

/* Enhanced validation styling */
.form-control.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.38 1.38.94-.94L2.3 6.73z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4M7.2 4.6l-1.4 1.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Radio button validation styling */
.form-check-input.is-valid {
    border-color: #28a745;
}

.form-check-input.is-invalid {
    border-color: #dc3545;
}

/* Field group validation indicators */
.field-group.has-error {
    border-color: #dc3545;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

.field-group.has-success {
    border-color: #28a745;
    background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
}

/* Section validation highlighting */
.form-section.has-validation-errors {
    border: 2px solid #dc3545;
    border-radius: 0.75rem;
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.2);
}

.form-section.has-validation-errors .form-section-header {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
    border-left: 4px solid #dc3545;
}

.form-section.has-validation-errors .form-section-title {
    color: #dc3545;
}

/* Pulsing animation for sections with errors */
@keyframes pulse-error {
    0%, 100% { 
        box-shadow: 0 4px 20px rgba(220, 53, 69, 0.2); 
    }
    50% { 
        box-shadow: 0 4px 30px rgba(220, 53, 69, 0.4); 
    }
}

/* Goal Type Styles */
.goal-type-field {
    border-left: 4px solid #c5a572;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.goal-type-field.negative-goal {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

.goal-type-toggle {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.goal-type-option {
    border: 2px solid rgba(197, 165, 114, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 0;
    cursor: pointer;
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.75);
}

.goal-type-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(197, 165, 114, 0.08), transparent);
    transition: left 0.6s ease;
    z-index: 0;
    pointer-events: none;
}

.goal-type-option:hover::before {
    left: 100%;
}

.goal-type-option .form-check-label {
    position: relative;
    z-index: 1;
}

.goal-type-option[data-type="positive"] {
    background: linear-gradient(135deg, #f0f8ff 0%, #ffffff 100%);
}

.goal-type-option[data-type="positive"]:hover {
    border-color: #10b981;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8ff 100%);
    transform: translateX(4px);
}

.goal-type-option[data-type="negative"] {
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

.goal-type-option[data-type="negative"]:hover {
    border-color: #dc3545;
    background: linear-gradient(135deg, #ffe8e8 0%, #fff5f5 100%);
    transform: translateX(4px);
}

.goal-type-option input[type="radio"]:checked + label {
    color: #9d8359;
    font-weight: 700;
}

.goal-type-option[data-type="positive"] input[type="radio"]:checked + label {
    color: #10b981;
}

.goal-type-option[data-type="negative"] input[type="radio"]:checked + label {
    color: #ef4444;
}

.goal-type-option input[type="radio"]:checked ~ label {
    color: inherit;
}

.goal-type-option input[type="radio"]:checked {
    background-color: #c5a572;
    border-color: #c5a572;
}

.goal-type-option[data-type="positive"] input[type="radio"]:checked {
    background-color: #10b981;
    border-color: #10b981;
}

.goal-type-option[data-type="negative"] input[type="radio"]:checked {
    background-color: #ef4444;
    border-color: #ef4444;
}

/* Goal Type Badge */
#goal-type-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    margin-left: 0.5rem;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

#goal-type-badge.positive {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

#goal-type-badge.negative {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
}

/* Goal Preview Styles */
.goal-preview {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.preview-content {
    text-align: center;
}

.preview-header {
    margin-bottom: 1rem;
}

.preview-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.preview-progress {
    margin-top: 1rem;
}

.progress-bar-container {
    width: 100%;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    position: relative;
}

.progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.progress-bar.positive {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.progress-bar.negative {
    background: linear-gradient(90deg, #dc3545, #e74c3c);
}

/* Initial state - show default message */
#preview-progress-bar:not(.positive):not(.negative) {
    width: 0%;
    background: transparent;
}

/* Selected option highlight */
.goal-type-option.selected {
    border: 2px solid rgba(197, 165, 114, 0.5);
    background: rgba(197, 165, 114, 0.1);
    border-radius: 14px;
}

.goal-type-option[data-type="positive"].selected {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.1);
}

.goal-type-option[data-type="negative"].selected {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.1);
}

.progress-text {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
}

/* Responsive adjustments for goal type */
@media (max-width: 768px) {
    .goal-type-toggle {
        gap: 0.75rem;
    }
    
    .goal-type-option {
        padding: 1rem;
    }
    
    .goal-preview {
        padding: 1rem;
    }
    .goal-form-page{
        --dark-color: #3b311e;
      }
      
}
