/* ============================================================
   PORTAL DO PACIENTE - LUMINAR
   Paleta: Luxo Natural (mesmas cores do Dashboard)
   ============================================================ */

:root {
    /* Cores Luminar - Luxo Natural */
    --primary: #2E4C52;           /* Azul Petróleo - Base Institucional */
    --primary-dark: #1f3438;      /* Azul Petróleo Escuro */
    --secondary: #C79A29;         /* Dourado - Destaques e Elementos Nobres */
    --secondary-light: #d4ab47;   /* Dourado Claro */
    --background: #F6F1E9;        /* Bege Claro - Fundos */
    --accent: #B8B59B;            /* Verde Oliva Suave - Detalhes */
    --dark: #3B3B3B;              /* Grafite - Textos */
    --light: #F6F1E9;             /* Bege Claro */
    
    /* Estados */
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --info: #2E4C52;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
}

/* ============================================================
   PÁGINAS DE ATIVAÇÃO E LOGIN
   ============================================================ */

.portal-activation,
.portal-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.activation-container,
.login-container {
    width: 100%;
    max-width: 500px;
}

.portal-logo {
    text-align: center;
    margin-bottom: 30px;
}

.portal-logo img {
    max-width: 200px;
    height: auto;
    margin-bottom: 15px;
}

.portal-logo h1 {
    color: white;
    font-size: 28px;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.activation-card,
.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.card-header i {
    font-size: 50px;
    color: var(--primary);
    margin-bottom: 15px;
}

.card-header h2 {
    font-size: 26px;
    color: #333;
    margin-bottom: 10px;
}

.card-header p {
    color: #6c757d;
    font-size: 15px;
}

/* Alertas */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.alert i {
    font-size: 20px;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
}

.alert-success {
    background: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
}

/* Informações do Paciente */
.patient-info {
    background: var(--light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
}

.info-item:not(:last-child) {
    border-bottom: 1px solid #dee2e6;
}

.info-item i {
    font-size: 24px;
    color: var(--primary);
    width: 30px;
    text-align: center;
}

.info-item label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
}

.info-item strong {
    font-size: 16px;
    color: #333;
}

/* Formulários */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group label i {
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #6c757d;
}

/* Input de Senha com Toggle */
.password-input {
    position: relative;
}

.password-input .form-control {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: var(--primary);
}

/* Força da Senha */
.password-strength {
    margin-top: 10px;
}

.strength-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s;
}

.password-strength span {
    font-size: 12px;
    font-weight: 600;
}

/* Info Box */
.info-box,
.help-box {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    gap: 15px;
}

.info-box i,
.help-box i {
    font-size: 24px;
    color: #0066cc;
    flex-shrink: 0;
}

.info-box strong,
.help-box strong {
    display: block;
    margin-bottom: 10px;
    color: #004085;
}

.info-box ul {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}

.info-box ul li {
    padding: 4px 0;
    color: #004085;
    font-size: 14px;
}

.info-box ul li:before {
    content: "✓ ";
    color: var(--success);
    font-weight: bold;
    margin-right: 8px;
}

.help-box p {
    color: #004085;
    font-size: 14px;
    margin: 0;
}

/* Botões de Ação */
.btn-activate,
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-activate:hover,
.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* Opções do Formulário */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
}

.link-recovery {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.link-recovery:hover {
    text-decoration: underline;
}

/* Rodapé dos Cards */
.card-footer {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid #e9ecef;
    margin-top: 25px;
}

.card-footer p {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 10px;
}

.link-login,
.link-website {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
}

.link-login:hover,
.link-website:hover {
    gap: 12px;
}

/* Rodapé do Portal */
.portal-footer {
    text-align: center;
    color: white;
    padding: 30px 20px;
    margin-top: 40px;
}

.portal-footer p {
    margin-bottom: 15px;
    font-size: 14px;
    opacity: 0.9;
}

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 13px;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ============================================================
   DASHBOARD DO PACIENTE
   ============================================================ */

.portal-dashboard-page {
    background: #f5f7fa;
}

/* Header do Dashboard */
.portal-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    max-width: 150px;
    height: auto;
}

.logo span {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #495057;
}

.user-info i {
    font-size: 24px;
    color: var(--primary);
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--danger), #c82333);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.4);
}

/* Main Content */
.portal-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 30px;
}

.container {
    width: 100%;
}

/* Boas-vindas */
.welcome-section {
    margin-bottom: 40px;
}

.welcome-section h1 {
    font-size: 36px;
    color: #333;
    margin-bottom: 8px;
}

.welcome-section p {
    color: #6c757d;
    font-size: 18px;
}

/* Cards de Resumo */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.summary-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    display: flex;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    flex-shrink: 0;
}

.card-appointments .card-icon { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.card-documents .card-icon { background: linear-gradient(135deg, var(--secondary), var(--secondary-light)); }
.card-financial .card-icon { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.card-treatments .card-icon { background: linear-gradient(135deg, var(--success), #38f9d7); }

.card-content h3 {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 10px;
    font-weight: 500;
}

.card-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.card-content p {
    font-size: 13px;
    color: #6c757d;
}

/* Grid de Conteúdo */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.content-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-header {
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header i {
    color: var(--primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 60px;
    opacity: 0.3;
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-state small {
    font-size: 13px;
    opacity: 0.7;
}

/* Lista de Agendamentos */
.appointments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.appointment-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s;
}

.appointment-item:hover {
    background: #e9ecef;
}

.apt-date {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    min-width: 70px;
}

.apt-day {
    font-size: 28px;
    font-weight: 700;
}

.apt-month {
    font-size: 14px;
    text-transform: uppercase;
}

.apt-details {
    flex: 1;
}

.apt-details h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
}

.apt-details p {
    font-size: 14px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.apt-details i {
    color: var(--primary);
}

.apt-status {
    display: flex;
    align-items: center;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-agendado { background: #d1ecf1; color: #0c5460; }
.badge-confirmado { background: #d4edda; color: #155724; }
.badge-realizado { background: #d1e7dd; color: #0f5132; }
.badge-cancelado { background: #f8d7da; color: #721c24; }

/* Lista de Documentos */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.document-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s;
}

.document-item:hover {
    background: #e9ecef;
}

.doc-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.doc-details {
    flex: 1;
}

.doc-details h4 {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.doc-details p {
    font-size: 12px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-doc-download {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-doc-download:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

/* Ações Rápidas */
.quick-actions {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.quick-actions h2 {
    font-size: 22px;
    color: #333;
    margin-bottom: 25px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 25px 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s;
}

.action-card:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    color: white;
    box-shadow: 0 10px 25px rgba(199, 154, 41, 0.3);
}

.action-card i {
    font-size: 32px;
}

.action-card span {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        padding: 15px 20px;
    }
    
    .portal-main {
        padding: 30px 20px;
    }
    
    .welcome-section h1 {
        font-size: 28px;
    }
    
    .summary-cards,
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .user-info span {
        display: none;
    }
}
