/* ============================================
   PAINEL DE RECEITA - ESTILOS PRINCIPAIS
   ============================================ */

/* Reset e Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #3498db;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --neutral: #ecf0f1;
    --text: #2c3e50;
    --bg: #f8f9fa;
    --border: #dfe6e9;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================
   AUTENTICAÇÃO
   ============================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.auth-box {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.auth-logo p {
    color: #7f8c8d;
    font-size: 0.95rem;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 0.9rem;
}

.auth-footer p {
    margin: 8px 0;
}

.trial-info {
    color: var(--success);
    font-weight: 600;
    margin-top: 15px !important;
}

/* ============================================
   FORMULÁRIOS
   ============================================ */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal !important;
}

.checkbox-label input {
    width: auto !important;
    margin-right: 8px;
}

/* ============================================
   BOTÕES
   ============================================ */

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* ============================================
   ALERTAS
   ============================================ */

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    border-left: 4px solid var(--success);
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border-left: 4px solid var(--danger);
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-left: 4px solid var(--warning);
    color: #856404;
}

.trial-banner {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white !important;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ============================================
   HEADER/NAVEGAÇÃO
   ============================================ */

.main-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-logo h2 {
    color: var(--primary);
    font-size: 1.5rem;
}

.header-nav {
    display: flex;
    gap: 20px;
}

.header-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.header-nav a:hover {
    color: var(--primary);
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.metric-icon {
    font-size: 3rem;
    line-height: 1;
}

.metric-content h3 {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.metric-success .metric-value {
    color: var(--success);
}

.metric-warning .metric-value {
    color: var(--warning);
}

.actions-section {
    margin-bottom: 40px;
}

.actions-section h2 {
    margin-bottom: 20px;
}

.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.action-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    color: var(--text);
    display: block;
    position: relative;
    border: 2px solid var(--border);
    transition: all 0.3s;
}

.action-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.action-card .badge {
    position: absolute;
    top: 15px;
    right: 15px;
}

.action-card strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.action-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-primary {
    background: var(--primary);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: white;
}

.badge-danger {
    background: var(--danger);
    color: white;
}

/* ============================================
   GRÁFICOS E BARRAS
   ============================================ */

.chart-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.origin-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.origin-bar-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.origin-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

.origin-bar {
    background: var(--neutral);
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
}

.origin-bar-fill {
    background: linear-gradient(90deg, var(--primary), #667eea);
    height: 100%;
    transition: width 0.5s;
}

/* ============================================
   PIPELINE/KANBAN
   ============================================ */

.pipeline-wrapper {
    padding: 20px;
}

.pipeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.pipeline-actions {
    display: flex;
    gap: 10px;
}

.pipeline-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.kanban-column {
    min-width: 300px;
    background: var(--neutral);
    border-radius: 12px;
    padding: 15px;
    flex-shrink: 0;
}

.column-header {
    padding: 15px;
    border-radius: 8px;
    color: white;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-header h3 {
    font-size: 1rem;
    margin: 0;
}

.column-header .count {
    background: rgba(255,255,255,0.3);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.cards-container {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.patient-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.patient-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.sortable-ghost {
    opacity: 0.4;
}

.card-avatar {
    margin-bottom: 12px;
}

.card-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.card-info h4 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.card-info .tag {
    display: inline-block;
    background: var(--neutral);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.sessoes-info,
.valor-info {
    font-size: 0.9rem;
    margin: 5px 0;
}

.card-info .alert {
    font-size: 0.8rem;
    padding: 6px 10px;
    margin-top: 8px;
}

.btn-add-card {
    width: 100%;
    background: rgba(255,255,255,0.5);
    border: 2px dashed #bdc3c7;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s;
}

.btn-add-card:hover {
    background: white;
    border-color: var(--primary);
}

/* ============================================
   BOTÃO FLUTUANTE
   ============================================ */

.btn-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.4);
    text-decoration: none;
    transition: all 0.3s;
    z-index: 1000;
}

.btn-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(52, 152, 219, 0.6);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast {
    position: fixed;
    top: -100px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    transition: top 0.3s;
    z-index: 9999;
}

.toast.show {
    top: 20px;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

/* ============================================
   RESPONSIVO
   ============================================ */

@media (max-width: 768px) {
    .pipeline-container {
        flex-direction: column;
    }
    
    .kanban-column {
        min-width: 100%;
    }
    
    .header-nav {
        display: none;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ANIMAÇÕES
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.metric-card,
.action-card,
.patient-card {
    animation: fadeIn 0.5s ease-out;
}