/* KPI Create Form Styles */
.main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 100px 20px 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.page-header .page-subtitle {
    display: block;
    font-size: 1rem;
    font-weight: normal;
    color: #666;
    margin-top: 0.5rem;
}

.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 6px;
    text-align: center;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Form Styles */
.kpi-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h2 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.25rem;
    font-weight: 600;
}

.section-description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2eaadc;
    box-shadow: 0 0 0 3px rgba(46, 170, 220, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}

/* Radio Button Styles */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-option {
    position: relative;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-option label {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fff;
}

.radio-option input[type="radio"]:checked + label {
    border-color: #2eaadc;
    background-color: #f8fbfd;
}

.radio-option label:hover {
    border-color: #2eaadc;
    background-color: #f8fbfd;
}

.radio-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: #e9ecef;
    font-size: 1.2rem;
    font-weight: bold;
    color: #6c757d;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.radio-option input[type="radio"]:checked + label .radio-icon {
    background-color: #2eaadc;
    color: white;
}

.radio-option label > div {
    flex: 1;
}

.radio-option label small {
    display: block;
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    font-weight: normal;
}

/* Checkbox Styles */
.checkbox-group {
    margin-top: 0.5rem;
}

.empty-habits {
    padding: 1.5rem;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.empty-habits p {
    margin: 0;
    color: #6c757d;
}

.empty-habits a {
    color: #2eaadc;
    text-decoration: none;
    font-weight: 600;
}

.empty-habits a:hover {
    text-decoration: underline;
}

.habit-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background-color: #fafafa;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: white;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.checkbox-option:hover {
    background-color: #f8fbfd;
}

.checkbox-option input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

.checkbox-option label {
    cursor: pointer;
    margin: 0;
    font-weight: 500;
    color: #333;
    flex: 1;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background-color: #2eaadc;
    color: white;
}

.btn-primary:hover {
    background-color: #2691bd;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding: 100px 15px 20px;
    }
    
    .kpi-form {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .radio-group {
        gap: 0.75rem;
    }
    
    .radio-option label {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .habit-list {
        grid-template-columns: 1fr;
    }
}
