/* ========================================
   CARTÃO BLACK SAÚDE - ESTILOS PRINCIPAIS
   ======================================== */

:root {
    --preto: #000000;
    --verde: #009639;
    --dourado: #DAA520;
    --cinza-escuro: #1a1a1a;
    --cinza-medio: #2a2a2a;
    --cinza-claro: #3a3a3a;
    --branco: #ffffff;
    --erro: #ff4444;
    --sucesso: #00c851;
    --aviso: #ffbb33;
    
    --shadow-gold: 0 4px 20px rgba(218, 165, 32, 0.3);
    --shadow-dark: 0 2px 10px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--preto) 0%, var(--cinza-escuro) 100%);
    color: var(--branco);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   HEADER
   ======================================== */

.header {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--dourado);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-dark);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--branco);
}

.logo .gold {
    color: var(--dourado);
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--branco);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--dourado);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--dourado);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-weight: 500;
    color: var(--dourado);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--verde), var(--dourado));
    border: 2px solid var(--dourado);
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.main-content {
    padding: 3rem 0;
}

/* ========================================
   PROGRESS STEPS
   ======================================== */

.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-bottom: 3rem;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 25%;
    right: 25%;
    height: 2px;
    background: var(--cinza-claro);
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.step-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--cinza-medio);
    border: 2px solid var(--cinza-claro);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.step-icon svg {
    color: var(--cinza-claro);
    transition: var(--transition);
}

.step span {
    font-size: 0.875rem;
    color: var(--cinza-claro);
    transition: var(--transition);
}

.step.active .step-icon {
    background: var(--dourado);
    border-color: var(--dourado);
    box-shadow: var(--shadow-gold);
    animation: pulse 2s infinite;
}

.step.active .step-icon svg {
    color: var(--preto);
}

.step.active span {
    color: var(--dourado);
    font-weight: 600;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(218, 165, 32, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(218, 165, 32, 0);
    }
}

/* ========================================
   SECTIONS
   ======================================== */

.section {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.section.active {
    display: block;
}

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

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--dourado);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--cinza-claro);
    font-size: 1.1rem;
}

/* ========================================
   FORM
   ======================================== */

.form {
    background: var(--cinza-escuro);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-dark);
    border: 1px solid var(--cinza-medio);
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: slideIn 0.4s ease-out;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dourado);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    background: var(--cinza-medio);
    border: 2px solid var(--cinza-claro);
    border-radius: 8px;
    color: var(--branco);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--dourado);
    box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.1);
}

.form-group input:disabled,
.form-group select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.error-message {
    display: block;
    color: var(--erro);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 1rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--cinza-medio);
    border: 2px solid var(--cinza-claro);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.radio-label:hover {
    border-color: var(--dourado);
}

.radio-label input[type="radio"] {
    width: auto;
    accent-color: var(--dourado);
}

.radio-label input[type="radio"]:checked + span {
    color: var(--dourado);
    font-weight: 600;
}

/* Horários Grid */
.horarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.horario-item {
    padding: 0.75rem;
    background: var(--cinza-medio);
    border: 2px solid var(--cinza-claro);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.horario-item:hover {
    border-color: var(--verde);
    transform: translateY(-2px);
}

.horario-item.selected {
    background: var(--verde);
    border-color: var(--verde);
    color: var(--branco);
    box-shadow: 0 4px 15px rgba(0, 150, 57, 0.4);
}

.horario-item.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--verde), #00b347);
    color: var(--branco);
    box-shadow: 0 4px 15px rgba(0, 150, 57, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 150, 57, 0.4);
}

.btn-secondary {
    background: var(--cinza-medio);
    color: var(--branco);
    border: 2px solid var(--cinza-claro);
}

.btn-secondary:hover {
    border-color: var(--dourado);
    color: var(--dourado);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

/* ========================================
   CONFIRMATION CARD
   ======================================== */

.confirmation-card {
    background: var(--cinza-medio);
    border-radius: 12px;
    padding: 2rem;
    border: 2px solid var(--dourado);
    margin-bottom: 2rem;
}

.confirmation-card h3 {
    color: var(--dourado);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.confirmation-details {
    display: grid;
    gap: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--cinza-escuro);
    border-radius: 8px;
}

.detail-item .label {
    color: var(--cinza-claro);
    font-weight: 500;
}

.detail-item .value {
    color: var(--dourado);
    font-weight: 600;
}

/* ========================================
   PRONTUÁRIO
   ======================================== */

.prontuario-content {
    display: grid;
    gap: 2rem;
}

.card {
    background: var(--cinza-escuro);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--cinza-medio);
    box-shadow: var(--shadow-dark);
}

.card h3 {
    color: var(--dourado);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

/* Histórico de Consultas */
.historico-list {
    display: grid;
    gap: 1rem;
}

.historico-item {
    background: var(--cinza-medio);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--verde);
    transition: var(--transition);
}

.historico-item:hover {
    transform: translateX(5px);
    border-left-color: var(--dourado);
}

.historico-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.historico-item-title {
    font-weight: 600;
    color: var(--dourado);
}

.historico-item-date {
    color: var(--cinza-claro);
    font-size: 0.875rem;
}

.historico-item-info {
    color: var(--branco);
    font-size: 0.95rem;
}

.historico-item-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px;
    background: var(--verde);
    color: var(--branco);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-small:hover {
    background: var(--dourado);
    color: var(--preto);
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--cinza-claro);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.upload-area:hover {
    border-color: var(--dourado);
    background: rgba(218, 165, 32, 0.05);
}

.upload-area svg {
    color: var(--dourado);
    margin-bottom: 1rem;
}

.upload-area p {
    color: var(--cinza-claro);
}

.upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.files-list {
    margin-top: 1rem;
    display: grid;
    gap: 0.75rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--cinza-medio);
    border-radius: 8px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: var(--verde);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-icon svg {
    color: var(--branco);
}

.file-name {
    font-weight: 500;
}

.file-size {
    color: var(--cinza-claro);
    font-size: 0.875rem;
}

.file-remove {
    background: var(--erro);
    color: var(--branco);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.file-remove:hover {
    background: #cc0000;
}

/* Anotações */
.anotacoes-textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    background: var(--cinza-medio);
    border: 2px solid var(--cinza-claro);
    border-radius: 8px;
    color: var(--branco);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1rem;
}

.anotacoes-textarea:focus {
    outline: none;
    border-color: var(--dourado);
}

/* ========================================
   RECEITUÁRIO
   ======================================== */

.receitas-list {
    display: grid;
    gap: 1.5rem;
}

.receita-card {
    background: var(--cinza-escuro);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--cinza-medio);
    box-shadow: var(--shadow-dark);
    transition: var(--transition);
}

.receita-card:hover {
    border-color: var(--dourado);
    transform: translateY(-5px);
    box-shadow: var(--shadow-gold);
}

.receita-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--cinza-medio);
}

.receita-info h4 {
    color: var(--dourado);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.receita-info p {
    color: var(--cinza-claro);
    font-size: 0.9rem;
}

.receita-badge {
    padding: 0.5rem 1rem;
    background: var(--verde);
    color: var(--branco);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.receita-badge.assinada {
    background: var(--dourado);
    color: var(--preto);
}

.receita-content {
    margin-bottom: 1.5rem;
}

.receita-content h5 {
    color: var(--verde);
    margin-bottom: 0.75rem;
}

.receita-content p {
    color: var(--branco);
    line-height: 1.8;
}

.receita-actions {
    display: flex;
    gap: 1rem;
}

.btn-download {
    flex: 1;
    background: var(--dourado);
    color: var(--preto);
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-download:hover {
    background: #c99a1f;
    transform: translateY(-2px);
}

/* ========================================
   NOTIFICATION
   ======================================== */

.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--cinza-escuro);
    border: 2px solid var(--verde);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-gold);
    transform: translateX(400px);
    transition: var(--transition);
    z-index: 2000;
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-content svg {
    color: var(--verde);
    flex-shrink: 0;
}

.notification-content span {
    color: var(--branco);
    font-weight: 500;
}

.notification.error {
    border-color: var(--erro);
}

.notification.error svg {
    color: var(--erro);
}

/* ========================================
   LOADING OVERLAY
   ======================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    z-index: 3000;
}

.loading-overlay.show {
    display: flex;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--cinza-medio);
    border-top-color: var(--dourado);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-overlay p {
    color: var(--dourado);
    font-size: 1.1rem;
    font-weight: 600;
}
