﻿html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zMTMgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%);
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
    gap: 20px;
    padding: 20px;
}

.sidebar {
    width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(220, 38, 38, 0.1);
    padding: 24px;
    overflow-y: auto;
    justify-content: center;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.logo {
    width: 100%;
    height: 60px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
}

    .logo img {
        width: 230px;
        height: 97px;
    }

.btn-create {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
    margin-bottom: 20px;
}

    .btn-create:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 24px rgba(239, 68, 68, 0.4);
    }

.mini-calendar {
    margin-bottom: 24px;
}

.mini-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

    .mini-calendar-header h3 {
        font-size: 14px;
        font-weight: 600;
        color: #1f2937;
    }

.mini-nav {
    display: flex;
    gap: 4px;
}

    .mini-nav button {
        width: 28px;
        height: 28px;
        border: none;
        background: #fef2f2;
        border-radius: 6px;
        cursor: pointer;
        color: #dc2626;
        font-size: 12px;
        transition: all 0.2s;
    }

        .mini-nav button:hover {
            background: #fee2e2;
        }

.mini-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.mini-weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    padding: 4px;
}

.mini-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.mini-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #374151;
}

    .mini-day:hover {
        background: #fef2f2;
    }

    .mini-day.other-month {
        color: #d1d5db;
    }

    .mini-day.today {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        color: white;
        font-weight: 700;
    }

.filters {
    border-top: 1px solid #f3f4f6;
    padding-top: 20px;
}

    .filters h3 {
        font-size: 13px;
        font-weight: 600;
        color: #6b7280;
        margin-bottom: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

.filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
}

    .filter-item:hover {
        background: #fef2f2;
    }

.filter-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

    .filter-checkbox.checked {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        border-color: #dc2626;
    }

        .filter-checkbox.checked::after {
            content: "✓";
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 12px;
            font-weight: bold;
        }

.filter-label {
    font-size: 14px;
    color: #374151;
}

.main-content {
    flex: 1;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(220, 38, 38, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #f3f4f6;
}

.calendar-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

.calendar-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-today {
    padding: 8px 16px;
    border: 2px solid #fee2e2;
    background: white;
    color: #dc2626;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-today:hover {
        background: #fef2f2;
    }

.view-toggle {
    display: flex;
    background: #fef2f2;
    border-radius: 8px;
    padding: 4px;
}

.view-btn {
    padding: 6px 16px;
    border: none;
    background: transparent;
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

    .view-btn.active {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        color: white;
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    }

.calendar-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #fef2f2;
    padding: 16px 0;
    border-bottom: 2px solid #fee2e2;
}

.weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #dc2626;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.days {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 1px;
    background: #f9fafb;
    overflow-y: auto;
}

.day {
    background: white;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s;
    overflow-y: auto;
    min-height: 100px;
}

    .day:hover {
        background: #fef2f2;
    }

.day-number {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.day.other-month .day-number {
    color: #d1d5db;
}

.day.today {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
}


    .day.today .day-number {
        display: inline-block;
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        color: white;
        width: 28px;
        height: 28px;
        line-height: 28px;
        text-align: center;
        border-radius: 50%;
    }

/* --- ESTILO BASE DO EVENTO (Agora com cor fixa) --- */
.event {
    /* Layout (Mantive o teu) */
    padding: 4px 8px;
    margin-bottom: 4px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600; /* Aumentei ligeiramente o peso */
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* --- NOVAS CORES (Movidas do .meeting para aqui) --- */
    background: #eff6ff; /* Fundo Azul Claro */
    border-left: 4px solid #2563eb; /* Borda Azul Forte */
    color: #1e3a8a; /* Texto Azul Escuro */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

    /* Efeito Hover */
    .event:hover {
        transform: translateX(2px);
        background-color: #dbeafe; /* Azul um pouco mais escuro ao passar o rato */
        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
    }

/* --- ESTILOS PARA A VISTA SEMANAL (Novo) --- */
.week-event {
    /* Mesmas cores do evento mensal */
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    color: #1e3a8a;
    /* Layout específico para a grelha */
    display: flex;
    flex-direction: column;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 2px;
    transition: transform 0.1s;
}

    .week-event:hover {
        transform: scale(1.02);
        background-color: #dbeafe;
        z-index: 10;
    }

.week-event-time {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-bottom: 1px;
}

.week-event-title {
    font-weight: 700;
}


/* --- INICIO DA ALTERAÇÃO --- */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    overflow-y: auto; /* Permite scroll se a tela for pequena */
    padding: 20px; /* Espaço nas bordas */
}

    .modal.show {
        display: flex;
        align-items: center; /* Centraliza verticalmente */
        justify-content: center; /* Centraliza horizontalmente */
    }

/* Isso permite que o modal cresça */
.modal-content {
    background: white;
    border-radius: 20px;
    padding: 0; /* Removemos o padding geral para controlar melhor */
    width: 100%; /* Ocupa o espaço que o 'dialog' der */
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    /* IMPORTANTE: REMOVI O MAX-WIDTH: 500px */
}

/* Estilo para os inputs ficarem cinzentos (como na foto) */
.form-control-grey {
    background-color: #f3f4f6; /* Cinza claro */
    border: 1px solid transparent;
}

    .form-control-grey:focus {
        background-color: #fff;
        border-color: #cbd5e1;
        box-shadow: 0 0 0 4px rgba(226, 232, 240, 0.5);
    }
/* Ajustes para os Inputs ficarem cinza suave como na imagem */
.form-control.bg-light {
    background-color: #f3f4f6 !important;
    border: 1px solid transparent;
}

    .form-control.bg-light:focus {
        background-color: #fff !important;
        border-color: #e5e7eb;
        box-shadow: 0 0 0 4px rgba(229, 231, 235, 0.5);
    }

/* Animação suave */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* --- FIM DA ALTERAÇÃO --- */

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

    .modal-header h2 {
        font-size: 22px;
        color: #1f2937;
    }

.btn-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    color: #6b7280;
    transition: all 0.2s;
}

    .btn-close:hover {
        background: #e5e7eb;
    }

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-size: 14px;
        font-weight: 600;
        color: #374151;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 12px;
        border: 2px solid #f3f4f6;
        border-radius: 8px;
        font-size: 14px;
        transition: all 0.2s;
        font-family: inherit;
    }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: #ef4444;
            box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
        }

    .form-group textarea {
        resize: vertical;
        min-height: 80px;
    }

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn-secondary {
    padding: 10px 20px;
    border: 2px solid #e5e7eb;
    background: white;
    color: #6b7280;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-secondary:hover {
        background: #f9fafb;
    }

.btn-primary {
    padding: 10px 20px;
    border: none;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

    .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 24px rgba(239, 68, 68, 0.4);
    }

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f9fafb;
}

::-webkit-scrollbar-thumb {
    background: #fee2e2;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #fecaca;
    }

/* Estilos para a Vista Semanal */
.week-view-container {
    background: white;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 8px 32px rgba(220, 38, 38, 0.05);
}

.table th {
    border-bottom: 2px solid #f3f4f6;
    padding: 10px;
}

.table td:hover {
    background-color: #fafafa; /* Efeito hover na célula da hora */
}

/* Ajuste das cores dos eventos na semana (reutilizando as tuas classes) */
.event.work {
    background: #fef2f2;
    border-left: 3px solid #ef4444;
    color: #991b1b;
}

.event.personal {
    background: #fff7ed;
    border-left: 3px solid #f97316;
    color: #9a3412;
}

/* --- ESTILOS DA VISTA SEMANAL --- */

/* Wrapper da Tabela */
.week-view-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #e5e7eb transparent;
}

/* Tabela Base */
.week-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/* ========================================================= */
/* CORREÇÃO DO CABEÇALHO DO DIA (STICKY & Z-INDEX)           */
/* ========================================================= */
.week-header-cell {
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    /* --- CORREÇÃO APLICADA AQUI --- */
    position: sticky; /* Cola o cabeçalho no topo */
    top: 0;
    z-index: 500; /* Garante que fica ACIMA das etiquetas (que têm z-index 100) */
    background-color: white; /* Fundo sólido para tapar o que passa por baixo */
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* Pequena sombra para separar */
}

.day-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af; /* Cinza suave */
    margin-bottom: 2px;
}

.day-num {
    font-size: 1.5rem;
    font-weight: 500;
    color: #374151;
    line-height: 1;
}

/* Destaque para o dia "Hoje" */
.today-highlight .day-name {
    color: #dc2626;
}

.today-highlight .day-num {
    background-color: #dc2626;
    color: white;
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    margin: 0 auto;
}

/* Coluna das Horas (Lateral Esquerda) */
.time-col-header {
    width: 60px; /* Largura fixa da coluna de horas */
    background: white;
    /* Também tornamos sticky para não desaparecer no scroll */
    position: sticky;
    top: 0;
    z-index: 501; /* Ligeiramente acima do cabeçalho normal */
}

.time-label {
    width: 60px;
    vertical-align: top; /* Hora alinhada ao topo da linha */
    text-align: center;
    padding: 0 !important;
    position: relative;
    border-right: 1px solid #f3f4f6;
}

    .time-label span {
        font-size: 0.75rem;
        color: #9ca3af;
        position: relative;
        top: -10px; /* Sobe o texto para ficar na linha da grelha */
        background: white;
        padding: 0 4px;
    }

/* Slots da Grelha (Células onde clica) */
.week-slot {
    height: 70px; /* Altura de cada hora */
    border-bottom: 1px solid #f3f4f6; /* Linha horizontal */
    border-right: 1px solid #f3f4f6; /* Linha vertical */
    vertical-align: top;
    padding: 4px !important;
    transition: background-color 0.1s;
    cursor: pointer;
}

    .week-slot:hover {
        background-color: #f9fafb; /* Efeito hover suave */
    }

/* Eventos dentro da Semana */
.week-event {
    border-radius: 4px;
    padding: 4px 6px;
    margin-bottom: 4px;
    font-size: 0.8rem;
    border-left: 3px solid;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: transform 0.1s;
    /* Z-Index menor que o cabeçalho */
    z-index: 10;
    position: relative;
}

    .week-event:hover {
        transform: scale(1.02);
        z-index: 20; /* Sobe apenas no hover, mas ainda abaixo do header (500) */
        position: relative;
    }

.week-event-time {
    font-size: 0.7rem;
    font-weight: bold;
    opacity: 0.8;
}

.week-event-title {
    font-weight: 500;
}

/* Cores dos Eventos (Reutilizando as tuas categorias) */
.week-event.work {
    background: #fef2f2;
    border-color: #ef4444;
    color: #7f1d1d;
}

.week-event.personal {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e3a8a;
}

/* ========================================= */
/* ESTILO ROSA CLARO (COMO ANTES)          */
/* ========================================= */

/* Eventos na vista MENSAL e SEMANAL */
.event, .week-event {
    /* As cores "Rosa/Vermelho" que tinhas antes */
    background-color: #fef2f2 !important; /* Fundo Rosa Muito Claro */
    border-left: 4px solid #ef4444 !important; /* Barra Lateral Vermelha/Rosa */
    color: #991b1b !important; /* Texto Vermelho Escuro */
    /* Formatação igual */
    padding: 4px 8px;
    margin-bottom: 4px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

/* Ajuste específico para a grelha da semana (layout flex) */
.week-event {
    display: flex;
    flex-direction: column;
    padding: 4px 6px;
    font-size: 0.8rem;
    overflow: hidden;
}

.week-event-time {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-bottom: 2px;
}

/* Efeito Hover (Ao passar o rato) */
.event:hover, .week-event:hover {
    background-color: #fee2e2 !important; /* Rosa um pouco mais escuro */
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.15); /* Sombra avermelhada */
}

/* ========================================================= */
/* 1. ESTILIZAÇÃO DO MODAL (WIDESCREEN & CLEAN)             */
/* ========================================================= */

/* Força o modal a ocupar 95% da tela em largura */
.modal-dialog-widescreen {
    max-width: 95vw !important;
    width: 1400px !important;
    margin: 0 auto;
}

/* Estilo do cartão do modal (arredondado e sombra) */
.modal-content-custom {
    min-height: 80vh;
    border-radius: 24px;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    background: white;
}

/* Inputs cinzentos modernos */
.form-control-grey {
    background-color: #f3f4f6 !important;
    border: 1px solid transparent !important;
    color: #333;
    border-radius: 8px;
}

    .form-control-grey:focus {
        background-color: #fff !important;
        border-color: #cbd5e1 !important;
        box-shadow: 0 0 0 4px rgba(226, 232, 240, 0.5) !important;
    }

/* ========================================================= */
/* 2. TIME PICKER (SELETORES DE HORA E MINUTO)              */
/* ========================================================= */

/* --- TIME PICKER (VERDE APENAS NO CLIQUE/FOCO) --- */

.time-picker-box {
    background-color: #fff;
    border: 1px solid #ced4da; /* Borda fina padrão (Cinza) */
    border-radius: 12px;
    padding: 4px;
    transition: all 0.2s ease-in-out;
    box-shadow: none;
}

    /* Quando passa o rato: Contorno cinza um pouco mais escuro */
    .time-picker-box:hover {
        border-color: #a0a0a0;
    }

    /* QUANDO CLICA/FOCA: Apenas aqui fica VERDE FINO */
    .time-picker-box:focus-within {
        border: 1px solid #26b050 !important; /* Borda 1px Verde */
        box-shadow: 0 0 0 2px rgba(38, 176, 80, 0.25) !important; /* Brilho Verde */
        /* Remove a transformação para ser mais sutil */
        transform: none;
    }

/* --- ESTILO DOS SELECTS --- */
.custom-time-select {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: transparent;
    font-size: 1.2rem;
    font-weight: 600;
    color: #374151;
    text-align: center;
    cursor: pointer;
    width: 100%;
    padding: 6px 0;
    outline: none !important;
}

    .custom-time-select:hover {
        background-color: #f3f4f6;
        border-radius: 6px;
    }

.time-separator {
    font-size: 1.2rem;
    font-weight: bold;
    color: #9ca3af;
    padding: 0 5px;
    margin-bottom: 2px;
}
/* O resto do CSS mantém-se */
/* ========================================================= */
/* 3. EVENTOS DO CALENDÁRIO (TEMA ROSA/VERMELHO)            */
/* ========================================================= */

/* Estilo base para Mês e Semana */
.event, .week-event {
    background-color: #fef2f2 !important; /* Fundo Rosa Muito Claro */
    border-left: 4px solid #ef4444 !important; /* Barra Lateral Vermelha */
    color: #991b1b !important; /* Texto Bordeaux */

    padding: 4px 8px;
    margin-bottom: 4px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    /* Efeito Hover (Levanta e Escurece) */
    .event:hover, .week-event:hover {
        background-color: #fee2e2 !important;
        transform: translateY(-1px);
        box-shadow: 0 4px 6px rgba(239, 68, 68, 0.15);
        z-index: 10;
    }

/* Ajustes específicos para a grelha da Semana */
.week-event {
    display: flex;
    flex-direction: column;
    padding: 4px 6px;
    font-size: 0.8rem;
    height: auto;
    margin-bottom: 2px;
}

.week-event-time {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-bottom: 2px;
}

.week-event-title {
    font-weight: 700;
}

/* ========================================================= */
/* 4. GRELHA DA VISTA SEMANAL                               */
/* ========================================================= */

.week-view-wrapper {
    scrollbar-width: thin;
}

.week-table {
    table-layout: fixed;
    width: 100%;
}

/* REPETIÇÃO DO STICKY HEADER AQUI TAMBÉM POR PRECAUÇÃO */
.week-header-cell {
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    position: sticky;
    top: 0;
    z-index: 500;
    background-color: white;
}

.day-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    margin-bottom: 2px;
}

.day-num {
    font-size: 1.5rem;
    font-weight: 500;
    color: #374151;
    line-height: 1;
}

/* Destaque do dia "Hoje" (Vermelho) */
.today-highlight .day-name {
    color: #ef4444;
}

.today-highlight .day-num {
    background-color: #ef4444;
    color: white;
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    margin: 0 auto;
}

.time-col-header {
    width: 60px;
    background: white;
}

.time-label {
    width: 60px;
    vertical-align: top;
    text-align: center;
    padding: 0 !important;
    border-right: 1px solid #f3f4f6;
}

    .time-label span {
        font-size: 0.75rem;
        color: #9ca3af;
        position: relative;
        top: -10px;
        background: white;
        padding: 0 4px;
    }

.week-slot {
    height: 70px;
    border-bottom: 1px solid #f3f4f6;
    border-right: 1px solid #f3f4f6;
    vertical-align: top;
    padding: 4px !important;
    cursor: pointer;
}

    .week-slot:hover {
        background-color: #f9fafb;
    }

/* Fundo invisível que cobre tudo para detetar clique fora */
.context-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9998;
    background: transparent;
}

/* O menu flutuante */
.context-menu {
    position: fixed;
    z-index: 9999;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 5px 0;
    min-width: 180px;
    border: 1px solid #e0e0e0;
    animation: fadeIn 0.1s ease-in-out;
}

/* Itens do menu */
.context-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 15px;
    border: none;
    background: none;
    text-align: left;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
}

    .context-item:hover {
        background-color: #f5f5f5;
    }

    .context-item .icon {
        margin-right: 10px;
        font-size: 1.1em;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Padrão de riscas para horário bloqueado */
.blocked-pattern {
    background-image: repeating-linear-gradient( 45deg, #f3f4f6, #f3f4f6 10px, #e5e7eb 10px, #e5e7eb 20px );
    color: #6b7280;
    border: 1px solid #d1d5db;
    cursor: not-allowed !important; /* Mostra ícone de proibido */
    opacity: 0.8;
}

/* Ajuste para o texto dentro do bloqueio */
.blocked-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-weight: bold;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Classe para o efeito de riscas */
.striped-blocked {
    /* Padrão de riscas diagonais */
    background-image: repeating-linear-gradient( 45deg, #f3f4f6, /* Cor de fundo */
    #f3f4f6 10px, #d1d5db 10px, /* Cor da risca */
    #d1d5db 20px );
    border: 1px solid #9ca3af !important;
    color: #4b5563 !important;
    opacity: 0.9;
    cursor: not-allowed !important; /* Mostra o sinal de proibido no rato */
    /* Garante que preenche bem o espaço */
    width: 100%;
    height: 100%;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
}

    /* Opcional: Estilo para o ícone ou texto dentro do bloqueio */
    .striped-blocked .week-event-title {
        font-style: italic;
        color: #374151;
    }

.bloqueio-dinamico {
    border-radius: 6px;
    padding: 4px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    cursor: context-menu;
    z-index: 10;
    font-size: 0.8rem;
    border: 1px solid transparent;
    opacity: 0.9;
    transition: transform 0.1s;
}

    .bloqueio-dinamico:hover {
        opacity: 1;
        transform: scale(1.02);
    }

.bloqueio-subtexto {
    background-color: rgba(255,255,255,0.25);
    color: white;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: normal;
}

/* Container dividido */
.split-container {
    display: flex;
    width: 100%;
    height: 100%;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-color: white;
    position: relative;
    z-index: 1;
}

/* LADO ESQUERDO: Bloqueio */
.split-block-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 2px;
    cursor: context-menu;
    min-width: 50%;
    font-size: 0.65rem;
    line-height: 1.2;
    word-break: break-word;
    overflow: hidden;
}

/* LADO DIREITO: Lista de Clientes */
.split-client-list {
    flex: 1;
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centra verticalmente se for só 1 */
    gap: 2px;
    padding: 2px;
    min-width: 50%;
    border-left: 1px solid rgba(0,0,0,0.05);
    /* REMOVE SCROLLBARS */
    overflow: hidden;
    /* Garante que o clique passa para os filhos */
    pointer-events: auto;
}

/* CARTÃO DO CLIENTE */
.mini-client-card {
    background-color: white;
    border: 1px solid #cbd5e1;
    border-left: 3px solid #3b82f6;
    border-radius: 3px;
    padding: 3px 5px;
    font-size: 0.65rem;
    /* ASSEGURA O CLIQUE */
    cursor: pointer;
    position: relative;
    z-index: 10;
    box-shadow: 0 1px 1px rgba(0,0,0,0.05);
    transition: background-color 0.2s;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .mini-client-card:hover {
        background-color: #dbeafe; /* Azul muito claro ao passar o rato */
        border-color: #93c5fd;
    }

.mini-client-time {
    font-weight: 800;
    color: #1e293b;
    margin-right: 3px;
}

.mini-client-name {
    font-weight: 600;
    color: #334155;
}

/* Container do Bloqueio */
.bloqueio-container {
    border-radius: 6px;
    padding: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Alinha ao topo */
    align-items: center;
    height: 100%;
    cursor: context-menu; /* Cursor para o fundo (bloqueio) */
    position: relative;
    z-index: 1;
}

/* Etiqueta do Cliente (O botão branco) */
.cliente-etiqueta {
    background-color: white;
    color: #333;
    border-radius: 4px;
    padding: 4px 8px;
    margin-top: 4px;
    width: 95%; /* Quase a largura toda */
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border-left: 4px solid #333; /* Cor de destaque */
    /* SEGREDOS PARA O CLIQUE FUNCIONAR */
    cursor: pointer; /* Mãozinha */
    pointer-events: auto; /* Força a aceitar cliques */
    z-index: 100; /* Fica acima do fundo colorido */
    position: relative;
}

    .cliente-etiqueta:hover {
        background-color: #f3f4f6;
        transform: scale(1.02);
        transition: transform 0.1s;
    }

.calendar-controls {
    display: flex;
    align-items: center;
    /* gap: 10px; já deve existir, se não, adicione */
}

/* Remove o brilho azul padrão do input ao clicar */
.search-wrapper .form-control:focus {
    box-shadow: none;
    border-color: #ced4da;
}

/* Efeito hover no botão da lupa */
.search-wrapper .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    color: #333;
}


