﻿:root {
    --pura-gold: #C5A059;
    --pura-gold-light: #FDFBF7;
    --pura-gold-bg: #FCF9F2;
    --pura-gold-border: #EAE0D1;
}

/* Isto diz ao browser: "Neste elemento, não faças scroll, apenas deixa o JS tratar do toque" */
[draggable="true"] {
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Utilitários Globais PuraSkin */
.text-gold {
    color: var(--pura-gold) !important;
}

.bg-gold {
    background-color: var(--pura-gold) !important;
    color: #ffffff !important;
}

.border-gold {
    border-color: var(--pura-gold) !important;
}

/* O DOCUMENTO NUNCA FAZ SCROLL.
   A app e uma casca fixa com scrollers internos (listas, article.content).
   Sem esta regra o <html> ficava scrollavel: tinha apenas "overflow-x: hidden"
   e, pela especificacao CSS, um eixo "hidden" + o outro "visible" faz o
   "visible" computar para AUTO -> overflow-y: auto.
   Como o <body> tinha "height: 100vh" (100vh = viewport GRANDE, com a barra
   do browser escondida), o documento era mais alto do que a area visivel
   sempre que a barra de endereco estava aberta. Resultado: o gesto de scroll
   arrastava o documento inteiro e o painel "position: fixed" das notificacoes
   e tarefas deslizava com ele - era isto que mexia o rodape.
   overscroll-behavior: none elimina ainda o pull-to-refresh do Android e o
   efeito elastico do iOS, que produziam o mesmo deslize. */
html {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

/* Proteção contra scroll horizontal no telemóvel */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* --- TIMELINE (AGENDA DO DIA) --- */
.timeline {
    position: relative;
    padding-left: 5px;
}

    .timeline::before {
        content: '';
        position: absolute;
        top: 10px;
        bottom: 20px;
        left: 105px; /* Linha perfeitamente centrada no espaço vazio */
        width: 2px;
        background-color: #f1f5f9;
    }

.timeline-item {
    position: relative;
    z-index: 2;
}

.timeline-card {
    position: relative; /* OBRIGATÓRIO para a bola não fugir */
    margin-left: 30px;
    overflow: visible !important; /* Impede cortes indesejados nas bordas */
    border: 1px solid #f8fafc;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

    .timeline-card::before {
        content: '';
        position: absolute;
        top: 24px;
        left: -26px; /* Ajuste milimétrico para encaixar exatamente no centro da linha */
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background-color: #ffffff;
        border: 3px solid #e2e8f0;
        z-index: 3;
        transition: border-color 0.2s;
    }

.timeline-item:hover .timeline-card::before {
    border-color: var(--pura-gold);
}

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

h1:focus {
    outline: none;
}

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

.btn-primary {
    color: #fff;
    background-color: #be9c5d;
    border-color: #a07855;
}

.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 rgba(190, 156, 93, 0.25);
}

.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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OSUyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zMTMgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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: #be9c5d;
            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: #a07855;
}

.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, #fcfcfc 0%, #f3f0e9 100%);
    /* 100% do <html> (que ja e a altura do viewport) em vez de 100vh:
       o 100vh ignora a barra do browser e criava altura a mais -> scroll. */
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

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

.sidebar {
    width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(190, 156, 93, 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, #be9c5d 0%, #a07855 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(190, 156, 93, 0.3);
    margin-bottom: 20px;
}

    .btn-create:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 24px rgba(190, 156, 93, 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: #fbf9f5;
        border-radius: 6px;
        cursor: pointer;
        color: #be9c5d;
        font-size: 12px;
        transition: all 0.2s;
    }

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

.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: #fbf9f5;
    }

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

    .mini-day.today {
        background: linear-gradient(135deg, #be9c5d 0%, #a07855 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: #fbf9f5;
    }

.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, #be9c5d 0%, #a07855 100%);
        border-color: #a07855;
    }

        .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(190, 156, 93, 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 #e6daba;
    background: white;
    color: #be9c5d;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

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

    .view-btn.active {
        background: linear-gradient(135deg, #be9c5d 0%, #a07855 100%);
        color: white;
        box-shadow: 0 2px 8px rgba(190, 156, 93, 0.3);
    }

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

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

.weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #be9c5d;
    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: #fbf9f5;
    }

.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(190, 156, 93, 0.1) 0%, rgba(160, 120, 85, 0.1) 100%);
}


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

/* --- ESTILO BASE DO EVENTO --- */
.event {
    padding: 4px 8px;
    margin-bottom: 4px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    color: #1e3a8a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

    .event:hover {
        transform: translateX(2px);
        background-color: #dbeafe;
        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
    }

/* --- ESTILOS PARA A VISTA SEMANAL --- */
.week-event {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    color: #1e3a8a;
    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;
    padding: 20px;
}

    .modal.show {
        display: flex;
        align-items: center;
        justify-content: center;
    }

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 0;
    width: 100%;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.form-control-grey {
    background-color: #f3f4f6;
    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);
    }

.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);
    }

@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: #be9c5d;
            box-shadow: 0 0 0 3px rgba(190, 156, 93, 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, #be9c5d 0%, #a07855 100%);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(190, 156, 93, 0.3);
}

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

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

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

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

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

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

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

.table td:hover {
    background-color: #fafafa;
}

.event.work {
    background: #fbf9f5;
    border-left: 3px solid #be9c5d;
    color: #a07855;
}

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

/* --- ESTILOS DA VISTA SEMANAL --- */
.week-view-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #e5e7eb transparent;
}

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

.week-header-cell {
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    position: sticky;
    top: 0;
    z-index: 500;
    background-color: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.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;
}

.today-highlight .day-name {
    color: #be9c5d;
}

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

.time-col-header {
    width: 60px;
    background: white;
    position: sticky;
    top: 0;
    z-index: 501;
}

.time-label {
    width: 60px;
    vertical-align: top;
    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;
        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;
    transition: background-color 0.1s;
    cursor: pointer;
}

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

.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: 10;
    position: relative;
}

    .week-event:hover {
        transform: scale(1.02);
        z-index: 20;
        position: relative;
    }

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

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

.week-event.work {
    background: #fbf9f5;
    border-color: #be9c5d;
    color: #a07855;
}

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

/* ========================================= */
/* ESTILO DOURADO (COMO DEFINIDO NO TOPO)  */
/* ========================================= */

.event, .week-event {
    background-color: #fbf9f5 !important;
    border-left: 4px solid #be9c5d !important;
    color: #a07855 !important;
    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;
}

.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;
}

.event:hover, .week-event:hover {
    background-color: #e6daba !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(190, 156, 93, 0.15);
}

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

.modal-dialog-widescreen {
    max-width: 95vw !important;
    width: 1400px !important;
    margin: 0 auto;
}

.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;
}

.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-box {
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 12px;
    padding: 4px;
    transition: all 0.2s ease-in-out;
    box-shadow: none;
}

    .time-picker-box:hover {
        border-color: #a0a0a0;
    }

    .time-picker-box:focus-within {
        border: 1px solid #26b050 !important;
        box-shadow: 0 0 0 2px rgba(38, 176, 80, 0.25) !important;
        transform: none;
    }

.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;
}

/* ========================================================= */
/* 3. EVENTOS DO CALENDÁRIO (TEMA DOURADO/CASTANHO)         */
/* ========================================================= */

.event, .week-event {
    background-color: #fbf9f5 !important;
    border-left: 4px solid #be9c5d !important;
    color: #a07855 !important;
    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;
}

    .event:hover, .week-event:hover {
        background-color: #e6daba !important;
        transform: translateY(-1px);
        box-shadow: 0 4px 6px rgba(190, 156, 93, 0.15);
        z-index: 10;
    }

.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%;
}

.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;
}

.today-highlight .day-name {
    color: #be9c5d;
}

.today-highlight .day-num {
    background-color: #be9c5d;
    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;
    }

.context-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9998;
    background: transparent;
}

.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;
}

.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);
    }
}

.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;
    opacity: 0.8;
}

.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;
}

.striped-blocked {
    background-image: repeating-linear-gradient( 45deg, #f3f4f6, #f3f4f6 10px, #d1d5db 10px, #d1d5db 20px );
    border: 1px solid #9ca3af !important;
    color: #4b5563 !important;
    opacity: 0.9;
    cursor: not-allowed !important;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
}

    .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;
}

.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;
}

.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;
}

.split-client-list {
    flex: 1;
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 2px;
    min-width: 50%;
    border-left: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
    pointer-events: auto;
}

.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;
    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;
        border-color: #93c5fd;
    }

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

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

.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;
    align-items: center;
    height: 100%;
    cursor: context-menu;
    position: relative;
    z-index: 1;
}

.cliente-etiqueta {
    background-color: white;
    color: #333;
    border-radius: 4px;
    padding: 4px 8px;
    margin-top: 4px;
    width: 95%;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border-left: 4px solid #333;
    cursor: pointer;
    pointer-events: auto;
    z-index: 100;
    position: relative;
}

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

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

.search-wrapper .form-control:focus {
    box-shadow: none;
    border-color: #ced4da;
}

.search-wrapper .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    color: #333;
}

@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }

    body {
        overflow-x: hidden;
        position: relative;
    }
}
