/**
 * ODONTOSUITE - SISTEMA PARA DENTISTAS
 * Folha de Estilos - Design Profissional Odontológico
 */

/* ========================================
   IMPORTAÇÃO DA FONTE POPPINS (Mais Moderna)
======================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ========================================
   VARIÁVEIS CSS - TEMA ODONTOLÓGICO
======================================== */
:root {
    /* Cores Principais - Tema Odontológico */
    --azul-dental: #0891B2;
    --azul-escuro: #0E7490;
    --azul-claro: #06B6D4;
    --verde-dental: #10B981;
    --verde-escuro: #059669;
    --turquesa: #14B8A6;
    
    --branco: #FFFFFF;
    --cinza-ultra-claro: #F8FAFC;
    --cinza-claro: #F1F5F9;
    --cinza-medio: #94A3B8;
    --cinza-chumbo: #475569;
    --preto: #1E293B;
    
    /* Cores de Status */
    --sucesso: #10B981;
    --erro: #EF4444;
    --aviso: #F59E0B;
    --info: #0891B2;
    
    /* Gradientes */
    --gradiente-azul: linear-gradient(135deg, #0891B2 0%, #14B8A6 100%);
    --gradiente-verde: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --gradiente-roxo: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    --gradiente-laranja: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    
    /* Sombras Profissionais */
    --sombra-leve: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --sombra-media: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
    --sombra-forte: 0 10px 25px rgba(0, 0, 0, 0.1), 0 6px 12px rgba(0, 0, 0, 0.08);
    --sombra-card: 0 1px 3px rgba(14, 116, 144, 0.06), 0 1px 2px rgba(14, 116, 144, 0.03);
    
    /* Transições Suaves */
    --transicao-rapida: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transicao-media: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transicao-lenta: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layout */
    --sidebar-width: 280px;
    --header-height: 80px;
    --border-radius: 16px;
}

/* ========================================
   RESET E ESTILOS GLOBAIS
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--preto);
    background: var(--cinza-ultra-claro);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transicao-rapida);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: var(--transicao-rapida);
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ========================================
   PÁGINA DE LOGIN - DESIGN MODERNO
======================================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradiente-azul);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Elementos decorativos de fundo */
.login-container::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    top: -200px;
    right: -200px;
    animation: float 20s ease-in-out infinite;
}

.login-container::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
    animation: float 15s ease-in-out infinite reverse;
}

.login-box {
    background: var(--branco);
    padding: 50px;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 480px;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.login-logo {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo h1 {
    color: var(--azul-dental);
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--gradiente-azul);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-logo p {
    color: var(--cinza-chumbo);
    font-size: 14px;
    font-weight: 500;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--preto);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid var(--cinza-claro);
    border-radius: 12px;
    font-size: 15px;
    transition: var(--transicao-rapida);
    background-color: var(--cinza-ultra-claro);
    font-weight: 500;
}

.form-control:focus {
    outline: none;
    border-color: var(--azul-dental);
    background-color: var(--branco);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
}

.form-control::placeholder {
    color: var(--cinza-medio);
}

.btn {
    padding: 16px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    text-align: center;
    transition: var(--transicao-rapida);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 13px;
}

.btn-primary {
    background: var(--gradiente-azul);
    color: var(--branco);
    width: 100%;
    box-shadow: 0 4px 14px rgba(8, 145, 178, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(8, 145, 178, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    animation: slideInDown 0.4s ease;
}

.alert-success {
    background-color: #D1FAE5;
    color: #065F46;
    border-left: 4px solid var(--sucesso);
}

.alert-error {
    background-color: #FEE2E2;
    color: #991B1B;
    border-left: 4px solid var(--erro);
}

/* ========================================
   LAYOUT PRINCIPAL - MODERNO E CLEAN
======================================== */
.main-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--cinza-ultra-claro);
}

/* SIDEBAR PROFISSIONAL */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0891B2 0%, #0E7490 100%);
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: var(--transicao-media);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
}

.sidebar-header {
    padding: 32px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.sidebar-logo {
    color: var(--branco);
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.sidebar-menu {
    padding: 24px 0;
    list-style: none;
}

.menu-item {
    margin-bottom: 4px;
    padding: 0 12px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    transition: var(--transicao-rapida);
    border-radius: 12px;
    font-size: 14px;
}

.menu-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--branco);
    transform: translateX(4px);
}

.menu-link.active {
    background: var(--branco);
    color: var(--azul-dental);
    box-shadow: var(--sombra-media);
}

.menu-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* CONTENT AREA - ESPAÇAMENTO PROFISSIONAL */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    background: var(--cinza-ultra-claro);
}

.top-header {
    background: var(--branco);
    height: var(--header-height);
    box-shadow: var(--sombra-leve);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(8, 145, 178, 0.08);
}

.header-title h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--preto);
    background: var(--gradiente-azul);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 16px;
    background: var(--cinza-ultra-claro);
    border-radius: 50px;
    transition: var(--transicao-rapida);
}

.user-info:hover {
    box-shadow: var(--sombra-leve);
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradiente-azul);
    color: var(--branco);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.2);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 700;
    color: var(--preto);
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: var(--cinza-medio);
    font-weight: 500;
}

.content-area {
    padding: 40px;
    max-width: 1600px;
    margin: 0 auto;
}

/* ========================================
   CARDS MODERNOS COM TEMA DENTAL
======================================== */
.card {
    background: var(--branco);
    border-radius: var(--border-radius);
    box-shadow: var(--sombra-card);
    margin-bottom: 32px;
    overflow: hidden;
    border: 1px solid rgba(8, 145, 178, 0.08);
    transition: var(--transicao-rapida);
}

.card:hover {
    box-shadow: var(--sombra-media);
    transform: translateY(-2px);
}

.card > *:not(.card-header) {
    padding: 28px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px !important;
    margin-bottom: 0;
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    border-bottom: 2px solid var(--cinza-claro);
}

.card-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--preto);
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--gradiente-azul);
    border-radius: 4px;
}

/* STATS GRID - CARDS DE ESTATÍSTICAS PROFISSIONAIS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 36px;
}

.stat-card {
    background: var(--gradiente-azul);
    color: var(--branco);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(8, 145, 178, 0.25);
    position: relative;
    overflow: hidden;
    transition: var(--transicao-rapida);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(8, 145, 178, 0.35);
}

.stat-label {
    font-size: 13px;
    opacity: 0.95;
    margin-bottom: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1;
}

/* ========================================
   TABELAS PROFISSIONAIS
======================================== */
.table-responsive {
    overflow-x: auto;
    border-radius: 12px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
}

.table th {
    padding: 18px;
    text-align: left;
    font-weight: 700;
    color: var(--preto);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--cinza-claro);
}

.table td {
    padding: 18px;
    border-bottom: 1px solid var(--cinza-claro);
    font-size: 14px;
    font-weight: 500;
}

.table tbody tr {
    transition: var(--transicao-rapida);
}

.table tbody tr:hover {
    background: var(--cinza-ultra-claro);
}

/* ========================================
   BADGES E STATUS - TEMA DENTAL
======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-success {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    color: #065F46;
}

.badge-warning {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    color: #92400E;
}

.badge-danger {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    color: #991B1B;
}

.badge-info {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    color: #1E40AF;
}

/* ========================================
   BOTÕES PROFISSIONAIS
======================================== */
.btn-secondary {
    background: var(--cinza-claro);
    color: var(--preto);
}

.btn-secondary:hover {
    background: var(--cinza-medio);
    color: var(--branco);
}

.btn-success {
    background: var(--gradiente-verde);
    color: var(--branco);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 12px;
}

/* ========================================
   CALENDÁRIO MODERNO
======================================== */
.calendario {
    width: 100%;
    overflow: hidden;
}

.calendario a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.calendario a:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 20px rgba(8, 145, 178, 0.2);
    z-index: 10;
}

/* ========================================
   MODAIS PROFISSIONAIS
======================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--branco);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

/* ========================================
   ANIMAÇÕES PROFISSIONAIS
======================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* ========================================
   SCROLLBAR PERSONALIZADA
======================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--cinza-claro);
}

::-webkit-scrollbar-thumb {
    background: var(--azul-dental);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--azul-escuro);
}

/* ========================================
   RESPONSIVIDADE PROFISSIONAL
======================================== */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 240px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .top-header {
        padding: 0 20px;
    }
    
    .content-area {
        padding: 20px;
    }
    
    .login-box {
        padding: 40px 24px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .user-details {
        display: none;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .header-title h2 {
        font-size: 20px;
    }
    
    .stat-value {
        font-size: 32px;
    }
}