/* ===== VARIÁVEIS CSS ===== */
:root {
    --primary-color: #6c5ce7;
    --primary-light: #a29bfe;
    --secondary-color: #00b894;
    --accent-color: #fd79a8;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --danger-color: #e17055;
    --light-bg: #f8f9fa;
    --dark-bg: #2d3436;
    --text-primary: #2d3436;
    --text-secondary: #33332f;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(108, 92, 231, 0.1);
    --transition: all 0.3s ease;
}

/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ===== PÁGINA DE LOGIN ===== */
.login-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.login-illustration {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%), url('../../img/login.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.login-illustration::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.illustration-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.illustration-text h2 {
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.features-list {
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
}

.feature-item i {
    font-size: 1.5rem;
    margin-right: 1rem;
    width: 30px;
    text-align: center;
}

.feature-item span {
    font-weight: 500;
    font-size: 1.1rem;
}

.login-form-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.login-form-wrapper {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    animation: slideInRight 0.6s ease-out;
}

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

.logo-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.3);
}

.logo-icon {
    font-size: 2rem;
    color: white;
}

.login-form .form-control {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
}

.login-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(108, 92, 231, 0.25);
}

.login-form .input-group-text {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-right: none;
    color: var(--text-secondary);
}

.login-form .input-group .form-control {
    border-left: none;
}

.login-form .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border: none;
    border-radius: var(--border-radius);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.login-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.3);
}

/* ===== DASHBOARD ===== */
.dashboard-container {
    background: var(--light-bg);
    min-height: 100vh;
}

.sidebar {
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    margin-right: 1rem;
}

.nav-link:hover,
.nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    transform: translateX(5px);
}

.nav-link i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.main-content {
    margin-left: 280px;
    padding: 2rem;
    transition: var(--transition);
}

.header {
    background: white;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

/* ===== CARDS ===== */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(108, 92, 231, 0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* ===== ESTATÍSTICAS ===== */
.stats-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
}

.stats-card:hover {
    transform: translateY(-3px);
}

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stats-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== TABELAS ===== */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    padding: 1rem;
    font-weight: 600;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
}

/* ===== BOTÕES ===== */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    border: none;
    padding: 0.5rem 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #00cec9);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #fdcb6e);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #d63031);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ===== FORMULÁRIOS ===== */
.form-control {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(108, 92, 231, 0.25);
}

/* ===== CALENDÁRIO ===== */
.calendar-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.calendar-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e9ecef;
}

.calendar-day {
    background: white;
    padding: 1rem;
    min-height: 100px;
    cursor: pointer;
    transition: var(--transition);
}

.calendar-day:hover {
    background: #f8f9fa;
}

.calendar-day.today {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
}

.calendar-day.has-appointment {
    background: linear-gradient(135deg, var(--success-color), #00cec9);
    color: white;
}

/* ===== CALENDÁRIO AVANÇADO ===== */
.calendar-month {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
}

.calendar-day-header {
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.calendar-day-header:last-child {
    border-right: none;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e9ecef;
}

.calendar-day {
    background: white;
    padding: 0.75rem;
    min-height: 80px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    border: 1px solid #f8f9fa;
}

.calendar-day:hover {
    background: #f8f9fa;
    transform: scale(1.02);
    z-index: 1;
}

.calendar-day.other-month {
    background: #f8f9fa;
    color: #adb5bd;
}

.calendar-day.today {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    font-weight: 600;
}

.calendar-day.today .day-number {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.day-number {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.appointments-indicator {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.day-appointments-list {
    margin-top: 0.5rem;
    max-height: 120px;
    overflow-y: auto;
}

.appointment-item-mini {
    cursor: pointer;
    padding: 2px 4px;
    margin: 1px 0;
    font-size: 0.75rem;
    border-radius: 3px;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.appointment-item-mini:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    z-index: 10;
    position: relative;
}

.appointment-item-mini.completed {
    background: #d4edda !important;
    border-color: #c3e6cb;
}

.appointment-item-mini.confirmed {
    background: #cfe2ff !important;
    border-color: #b6d4fe;
}

.appointment-item-mini.scheduled {
    background: #f8f9fa !important;
    border-color: #dee2e6;
}

.appointment-item-mini.cancelled {
    background: #f8d7da !important;
    border-color: #f5c2c7;
}

.appointment-item-mini.no_show {
    background: #fff3cd !important;
    border-color: #ffecb5;
}

.calendar-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e9ecef;
    min-height: 400px;
}

.calendar-week-day {
    background: white;
    padding: 1rem;
    border: 1px solid #f8f9fa;
}

.calendar-week-day.today {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
}

.week-day-header {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.day-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.week-day-appointments {
    min-height: 200px;
}

.appointment-item {
    background: var(--success-color);
    color: white;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
}

.appointment-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.appointment-item.pending {
    background: var(--warning-color);
}

.appointment-item.cancelled {
    background: var(--danger-color);
}

.appointment-time {
    font-weight: 600;
    font-size: 0.7rem;
}

.appointment-patient {
    font-size: 0.7rem;
    opacity: 0.9;
}

.calendar-day-view {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
}

.day-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.day-timeline {
    max-height: 600px;
    overflow-y: auto;
}

.time-slot {
    display: flex;
    border-bottom: 1px solid #e9ecef;
    min-height: 60px;
}

.time-label {
    width: 80px;
    padding: 1rem;
    background: #f8f9fa;
    font-weight: 600;
    text-align: center;
    border-right: 1px solid #e9ecef;
}

.time-content {
    flex: 1;
    padding: 0.5rem;
}

.appointment-card {
    background: var(--success-color);
    color: white;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.appointment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.appointment-card.pending {
    background: var(--warning-color);
}

.appointment-card.cancelled {
    background: var(--danger-color);
}

.appointments-list {
    max-height: 400px;
    overflow-y: auto;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .login-illustration {
        display: none;
    }
    
    .login-form-container {
        min-height: 100vh;
    }
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ===== UTILITÁRIOS ===== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.1);
}

.border-radius-lg {
    border-radius: var(--border-radius);
}
