* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F6FF 100%);
    color: #333333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: linear-gradient(90deg, #6C4AB6 0%, #8B5FD1 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(108, 74, 182, 0.15);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
    width: 100%;
}

/* Access Denied Container */
.access-denied-container {
    background: white;
    border-radius: 20px;
    padding: 4rem 3rem;
    box-shadow: 0 8px 32px rgba(108, 74, 182, 0.12);
    border: 1px solid #E0E0E0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.access-denied-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF6B6B 0%, #FF8E8E 100%);
}

.access-denied-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

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

.access-denied-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #FF6B6B;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.access-denied-text {
    font-size: 1.1rem;
    color: #666666;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.access-denied-text strong {
    color: #6C4AB6;
    font-weight: 700;
}

.access-denied-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #6C4AB6 0%, #8B5FD1 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 4px 16px rgba(108, 74, 182, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5A3E9B 0%, #7A52C4 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(108, 74, 182, 0.4);
}

.btn-secondary {
    padding: 1rem 2.5rem;
    background: #F5F5F5;
    color: #666666;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-secondary:hover {
    background: #E8E8E8;
    border-color: #CCCCCC;
    transform: translateY(-2px);
}

/* Title Section */
.title-section {
    text-align: center;
    margin-bottom: 2.5rem;
}

.main-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6C4AB6 0%, #B89BE0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1rem;
    color: #666666;
    font-weight: 400;
}

/* Form Container */
.form-container {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(108, 74, 182, 0.12);
    border: 1px solid #E0E0E0;
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6C4AB6 0%, #B89BE0 100%);
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #333333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.required {
    color: #FF6B6B;
    margin-left: 0.25rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid #E0E0E0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: #F9F9F9;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #6C4AB6;
    background: white;
    box-shadow: 0 0 0 4px rgba(108, 74, 182, 0.1);
    transform: translateY(-1px);
}

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

/* Array Input Container */
.array-input-container {
    margin-bottom: 1rem;
}

.array-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.array-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.array-item input {
    flex: 1;
}

.btn-remove {
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-remove:hover {
    background: linear-gradient(135deg, #E85555 0%, #FF7A7A 100%);
    transform: scale(1.02);
}

.btn-add {
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, #6C4AB6 0%, #8B5FD1 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-add:hover {
    background: linear-gradient(135deg, #5A3E9B 0%, #7A52C4 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 74, 182, 0.3);
}

/* Section Divider */
.section-divider {
    margin: 2rem 0;
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #E0E0E0 50%, transparent 100%);
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #6C4AB6;
    margin-bottom: 1.5rem;
    margin-top: 1rem;
}

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

.btn-cancel {
    padding: 1rem 2rem;
    background: #F5F5F5;
    color: #666666;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-cancel:hover {
    background: #E8E8E8;
    border-color: #CCCCCC;
    transform: translateY(-2px);
}

.btn-submit {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #6C4AB6 0%, #8B5FD1 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 4px 16px rgba(108, 74, 182, 0.3);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #5A3E9B 0%, #7A52C4 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(108, 74, 182, 0.4);
}

.btn-submit:active {
    transform: translateY(-1px);
}

/* Footer */
.footer {
    background: #333333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer p {
    color: #B89BE0;
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.footer-links a {
    color: #B89BE0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

/* Help Text */
.help-text {
    font-size: 0.85rem;
    color: #888888;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
    }

    .access-denied-title {
        font-size: 2rem;
    }

    .access-denied-container {
        padding: 3rem 2rem;
    }

    .access-denied-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .form-container {
        padding: 1.5rem;
    }

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

    .form-actions {
        flex-direction: column;
    }

    .btn-cancel,
    .btn-submit {
        width: 100%;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .array-item {
        flex-direction: column;
    }

    .btn-remove {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 1rem;
    }

    .main-content {
        padding: 2rem 1rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    .access-denied-icon {
        font-size: 3.5rem;
    }

    .access-denied-text {
        font-size: 1rem;
    }
}

/* 
   Adicione este CSS ao final do arquivo criarPrincipio.css existente
   ou crie um novo arquivo e importe após o CSS principal
*/

/* Ajustes para campos de bulas com múltiplos inputs na mesma linha */
.array-item {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

/* Garantir que inputs de bula fiquem lado a lado em telas maiores */
@media (min-width: 769px) {
    .array-item input[style*="flex"] {
        min-width: 0; /* Previne overflow */
    }
}

/* Ajuste responsivo para campos de bula em telas menores */
@media (max-width: 768px) {
    #bulasItems .array-item {
        flex-direction: column;
    }
    
    #bulasItems .array-item input {
        width: 100%;
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
    }
    
    #bulasItems .btn-remove {
        width: 100%;
        margin-top: 0;
    }
}

/* Melhoria visual para textareas maiores */
.form-textarea {
    min-height: 100px;
}

#farmacodinamica,
#farmacocinetica {
    min-height: 120px;
}

/* Destaque sutil para campos opcionais vs obrigatórios */
.form-input:not([required]),
.form-textarea:not([required]) {
    background: #FAFAFA;
}

.form-input:not([required]):focus,
.form-textarea:not([required]):focus {
    background: white;
}