/* Variáveis dinâmicas são injetadas pelo PHP */
:root {
    --cv-bg: #f5f7fa;
    --cv-white: #ffffff;
    --cv-text: #333;
    --cv-radius: 8px;
    --cv-purple: #684c71;
    --cv-yellow: #ffd02d;
}

/* Auth Cards (Login/Registo) */
.cv-auth-wrapper { max-width: 600px; margin: 40px auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.cv-card { background: var(--cv-white); padding: 30px; border-radius: var(--cv-radius); box-shadow: 0 5px 20px rgba(0,0,0,0.1); }
.cv-card-large { max-width: 700px; padding: 40px; }
.cv-card-header { text-align: center; margin-bottom: 25px; color: var(--cv-purple); }
.cv-logo { max-height: 60px; margin-bottom: 10px; }

/* Formulário de Registo */
.cv-register-form { }
.cv-form-section { margin-bottom: 30px; padding-bottom: 25px; border-bottom: 2px solid #f0f0f0; }
.cv-form-section:last-of-type { border-bottom: none; }
.cv-form-section h4 { margin: 0 0 20px 0; color: var(--cv-purple); font-size: 1.1em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

/* Campos */
.cv-field { margin-bottom: 15px; }
.cv-field label { display: block; font-weight: 600; font-size: 0.9em; margin-bottom: 5px; color: #666; }
.cv-field input, .cv-field select, .cv-field textarea { 
    width: 100%; 
    padding: 12px; 
    border: 2px solid #e0e0e0; 
    border-radius: 6px; 
    box-sizing: border-box; 
    font-size: 1em;
    transition: border-color 0.3s;
}
.cv-field input:focus, .cv-field select:focus, .cv-field textarea:focus {
    outline: none;
    border-color: var(--cv-purple);
    box-shadow: 0 0 0 3px rgba(104, 76, 113, 0.1);
}
.cv-field small { display: block; color: #999; font-size: 0.85em; margin-top: 5px; }

/* Rows e Colunas */
.cv-row { display: flex; gap: 15px; margin: 0 -7.5px; }
.cv-col-half { flex: 1; min-width: 0; padding: 0 7.5px; }

/* Botões */
.cv-btn { 
    background: var(--cv-yellow); 
    color: #1a1a1a; 
    border: none; 
    padding: 15px; 
    width: 100%; 
    font-weight: bold; 
    cursor: pointer; 
    border-radius: 6px; 
    font-size: 1em;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.cv-btn:hover { background: #e6bb1a; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255, 208, 45, 0.3); }
.cv-btn-large { padding: 18px; font-size: 1.1em; }

/* RGPD */
.cv-rgpd-section { background: #f9f9f9; padding: 20px; border-radius: 6px; border-left: 4px solid var(--cv-purple); }
.cv-checkbox-label { display: flex; align-items: flex-start; cursor: pointer; }
.cv-checkbox-label input[type="checkbox"] { margin-right: 10px; margin-top: 4px; width: 18px; height: 18px; cursor: pointer; }
.cv-checkbox-label span { flex: 1; line-height: 1.6; }
.cv-checkbox-label a { color: var(--cv-purple); font-weight: 600; text-decoration: underline; }

/* Info Box */
.cv-info-box { background: #fff9e6; border-left: 4px solid var(--cv-yellow); padding: 15px; margin-top: 20px; border-radius: 4px; }
.cv-info-box strong { color: var(--cv-purple); }

/* Card Footer */
.cv-card-footer { margin-top: 20px; text-align: center; font-size: 0.9em; }
.cv-card-footer a { color: var(--cv-purple); font-weight: bold; text-decoration: none; }
.cv-card-footer a:hover { text-decoration: underline; }

/* Alertas */
.cv-alert { padding: 15px; border-radius: 6px; margin-bottom: 20px; text-align: center; }
.cv-alert-error { background: #fee; color: #c00; border-left: 4px solid #c00; }
.cv-alert-success { background: #efe; color: #060; border-left: 4px solid #060; }
.cv-alert-info { background: #eef; color: #006; border-left: 4px solid #006; }

/* Dashboard Layout */
.cv-dashboard-wrapper { display: flex; min-height: 500px; background: var(--cv-bg); border-radius: var(--cv-radius); overflow: hidden; font-family: sans-serif; margin-top: 20px; }
.cv-sidebar { width: 250px; background: var(--cv-white); border-right: 1px solid #eee; display: flex; flex-direction: column; }
.cv-content { flex: 1; padding: 30px; }

/* Sidebar User */
.cv-user-info { padding: 30px 20px; text-align: center; border-bottom: 1px solid #eee; }
.cv-avatar { width: 60px; height: 60px; background: var(--cv-purple); color: #fff; font-size: 24px; font-weight: bold; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.cv-welcome { font-size: 0.9em; color: #666; }
.cv-welcome strong { color: var(--cv-purple); font-size: 1.1em; display: block; }

/* Navigation */
.cv-nav { padding: 20px 0; }
.cv-nav-item { display: flex; align-items: center; padding: 12px 25px; color: #666; text-decoration: none; transition: 0.3s; border-left: 3px solid transparent; }
.cv-nav-item:hover, .cv-nav-item.active { background: #f9f9f9; color: var(--cv-purple); border-left-color: var(--cv-yellow); }
.cv-icon { margin-right: 10px; font-size: 1.2em; width: 24px; text-align: center; }

/* Content Cards */
.cv-card-white { background: var(--cv-white); padding: 20px; border-radius: var(--cv-radius); box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
.cv-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 20px; }
.cv-stat-card { background: var(--cv-white); padding: 20px; border-radius: var(--cv-radius); border-top: 4px solid var(--cv-purple); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.cv-stat-card h3 { margin: 0 0 10px; font-size: 0.9em; color: #999; text-transform: uppercase; }
.cv-stat-card p { margin: 0; font-size: 1.5em; font-weight: bold; color: #333; }
.cv-btn-small { background: #eee; border:none; padding: 5px 10px; cursor: pointer; border-radius: 4px; }

/* Activity Items (Timeline) */
.cv-activity-item {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 15px;
    padding: 15px !important;
    margin-bottom: 10px !important;
    background: #f9f9f9 !important;
    border-left: 3px solid var(--cv-purple) !important;
    border-radius: 6px !important;
    transition: all 0.3s;
}
.cv-activity-item:hover {
    background: #f5f5f5 !important;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.cv-activity-content {
    flex: 1 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 15px;
}
.cv-activity-icon {
    font-size: 1.8em;
    min-width: 40px;
    text-align: center;
}
.cv-activity-details {
    flex: 1 !important;
}
.cv-activity-title {
    font-weight: 600 !important;
    color: #333 !important;
    margin-bottom: 3px;
}
.cv-activity-label {
    color: #999 !important;
    font-size: 0.85em;
}
.cv-activity-date {
    color: #ffd02d !important;
    font-weight: bold !important;
    font-size: 0.85em;
    white-space: nowrap;
    background: rgba(255, 208, 45, 0.1) !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

/* Data Items (Meus Dados) - Mesmo estilo dos Activity Items */
.cv-data-section {
    margin-bottom: 30px;
}
.cv-data-grid {
    display: grid;
    gap: 10px;
}
.cv-data-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 15px !important;
    background: #f9f9f9 !important;
    border-left: 3px solid #e0e0e0 !important;
    border-radius: 6px !important;
    transition: all 0.3s;
}
.cv-data-item:hover {
    background: #f5f5f5 !important;
    border-left-color: var(--cv-purple) !important;
    transform: translateX(3px);
}
.cv-data-label {
    font-weight: 600 !important;
    color: #666 !important;
    min-width: 180px;
    font-size: 0.9em;
}
.cv-data-value {
    color: #333 !important;
    flex: 1;
    text-align: right;
}

/* Mobile Responsivo */
@media (max-width: 768px) {
    .cv-auth-wrapper { padding: 0 15px; }
    .cv-card, .cv-card-large { padding: 20px; }
    .cv-row { flex-direction: column; margin: 0; }
    .cv-col-half { padding: 0; }
    
    .cv-dashboard-wrapper { flex-direction: column; }
    .cv-sidebar { width: 100%; border-right: none; border-bottom: 1px solid #eee; }
    .cv-user-info { display: flex; align-items: center; text-align: left; padding: 15px; }
    .cv-avatar { margin: 0 15px 0 0; width: 40px; height: 40px; font-size: 18px; }
}