   AGENDA SEMANAL — MELHORIAS NOTION-INSPIRED
   Adicionar ao final do style.css
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── KANBAN: Container geral ──────────────────────────────────────────────── */
.calendar-container {
    background: #ffffff;
    padding: clamp(20px, 4vw, 50px);
    border-radius: 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 20px rgba(0,0,0,0.025);
    border: 1px solid rgba(0,0,0,0.04);
}

/* ── CABEÇALHO DA AGENDA ─────────────────────────────────────────────────── */
.calendar-header {
    margin-bottom: 28px;
    border-bottom: 1px solid #f0f0f2;
    padding-bottom: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.week-info h2 {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    font-weight: 800;
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-black);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.week-range {
    color: var(--text-grey);
    font-size: 0.82rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    display: block;
    margin-top: 3px;
}

/* Nav arrows — refinados */
.nav-btn {
    width: 32px; height: 32px;
    border: 1px solid var(--border-medium);
    background: var(--surface-1);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: 16px; line-height: 1;
    transition: background var(--duration-base) var(--ease-spring),
                border-color var(--duration-base) ease,
                color var(--duration-base) ease,
                transform var(--duration-base) var(--ease-spring),
                box-shadow var(--duration-base) ease;
    will-change: transform, box-shadow;
}
.nav-btn:hover {
    background: var(--tint-teal);
    border-color: rgba(49,127,114,0.25);
    color: var(--color-teal);
    transform: translateY(-2px);
    box-shadow: var(--shadow-teal-sm);
}
.nav-btn:active {
    transform: scale(0.93) translateY(0);
    box-shadow: none;
}
.nav-btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring-teal);
}

/* Botão "Hoje" — canonical */
.btn-today-inline {
    height: var(--control-height-md); padding: 0 var(--space-3);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text-secondary);
    border: 1px solid var(--border-medium);
    font-family: var(--font-ui);
    font-size: var(--text-sm); font-weight: 700;
    cursor: pointer;
    transition: background var(--duration-base) var(--ease-spring),
                color var(--duration-base) ease,
                border-color var(--duration-base) ease,
                transform var(--duration-base) var(--ease-spring),
                box-shadow var(--duration-base) ease;
    white-space: nowrap;
    display: inline-flex; align-items: center; gap: var(--space-1);
    letter-spacing: 0.01em;
    overflow: hidden;
    max-width: 80px;
    will-change: transform, box-shadow, background;
}
.btn-today-inline[style*="display: none"] { max-width: 0; padding: 0; }
.btn-today-inline:hover {
    background: var(--color-teal);
    color: white;
    border-color: var(--color-teal);
    box-shadow: var(--shadow-teal-sm);
    transform: translateY(-2px);
}
.btn-today-inline:active {
    transform: scale(0.96) translateY(0);
    box-shadow: none;
}
.btn-today-inline:focus-visible { outline: none; box-shadow: var(--focus-ring-teal); }

/* Botões de ação — canonical */
.btn-action {
    border: none; height: var(--control-height-lg); padding: 0 var(--space-4);
    border-radius: var(--radius-sm);
    cursor: pointer; font-weight: 700; font-size: var(--text-sm);
    transition: background var(--duration-base) var(--ease-spring),
                transform var(--duration-base) var(--ease-spring),
                box-shadow var(--duration-base) ease;
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
    font-family: var(--font-ui);
    letter-spacing: 0.01em;
    will-change: transform, box-shadow, background;
    position: relative;
    user-select: none;
}
.btn-action:focus-visible { outline: none; box-shadow: var(--focus-ring-teal); }

.btn-edit {
    background: var(--surface-2);
    color: var(--text-secondary);
    border: 1px solid var(--border-medium);
    transition: background var(--duration-base) var(--ease-spring),
                color var(--duration-base) ease,
                transform var(--duration-base) var(--ease-spring),
                box-shadow var(--duration-base) ease;
}
.btn-edit:hover {
    background: var(--surface-3);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.btn-edit:active {
    transform: scale(0.97) translateY(0);
    box-shadow: none;
}
.btn-edit:focus-visible { outline: none; box-shadow: var(--focus-ring-teal); }

body.global-edit .btn-edit {
    background: var(--color-orange);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(241,135,36,0.25);
    animation: buttonPop 0.4s var(--ease-spring);
}

.btn-template {
    background: var(--tint-teal);
    color: var(--color-teal);
    border: 1px solid rgba(49,127,114,0.18);
    transition: background var(--duration-base) var(--ease-spring),
                transform var(--duration-base) var(--ease-spring),
                box-shadow var(--duration-base) ease;
    /* Visibilidade controlada por applyPermissions() via JS */
}
.btn-template:hover {
    background: rgba(49,127,114,0.14);
    transform: translateY(-2px);
    box-shadow: var(--shadow-teal-sm);
}
.btn-template:active {
    transform: scale(0.97) translateY(0);
    box-shadow: none;
}
.btn-template:focus-visible { outline: none; box-shadow: var(--focus-ring-teal); }

/* ── TODAY STRIP — Redesenhada ───────────────────────────────────────────── */
.today-strip {
    display: none;
    align-items: center;
    gap: 16px;
    padding: 12px 14px 12px 18px;
    min-height: 58px;
    margin-bottom: 22px;
    border: 1px solid #dff0ea;
    border-radius: 16px;
    background: #f4fbf8;
    box-shadow: 0 2px 8px rgba(49,127,114,0.06);
    position: relative;
    overflow: hidden;
    flex-wrap: wrap;
    transition: opacity 0.22s ease;
}
.today-strip::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--color-teal);
    border-radius: 16px 0 0 16px;
}
.today-strip.is-visible { display: flex; }

.today-strip-title {
    color: var(--color-teal);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
    font-family: 'Plus Jakarta Sans', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.today-strip-title::before {
    content: '';
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--color-teal);
    box-shadow: 0 0 0 2px rgba(49,127,114,0.2);
    animation: todayDot 2.5s ease-in-out infinite;
}
@keyframes todayDot {
    0%, 100% { box-shadow: 0 0 0 2px rgba(49,127,114,0.2); }
    50%       { box-shadow: 0 0 0 5px rgba(49,127,114,0.08); }
}

.today-strip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    flex: 1;
    justify-content: flex-start;
}

.today-strip-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    background: white;
    color: var(--text-black);
    border: 1px solid rgba(49,127,114,0.1);
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: border-color 0.2s;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.today-strip-item:hover { border-color: rgba(49,127,114,0.25); }

/* Evento passado na strip — tachado */
.today-strip-item.is-past {
    opacity: 0.5;
}
.today-strip-item.is-past span:last-child {
    text-decoration: line-through;
    text-decoration-color: rgba(0,0,0,0.3);
}

/* Evento futuro ativo (próximo) */
.today-strip-item.is-next {
    border-color: var(--color-teal);
    background: #f0faf6;
}
.today-strip-item.is-next .today-strip-time {
    font-weight: 800;
}

/* Evento consolidado (marcado como feito) — estilo visual distinto, mas sem tachar para não confundir com horário passado */
.today-strip-item.is-done span:last-child {
    color: var(--color-teal);
    font-weight: 700;
}
.today-strip-item.is-done {
    opacity: 0.85;
    background: #eef9f5;
    border-color: rgba(49,127,114,0.3);
}
.today-strip-item.is-done::after {
    content: '✓';
    margin-left: 4px;
    font-weight: 800;
    color: var(--color-teal);
}

.today-strip-time {
    color: var(--color-teal);
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 0.02em;
}
.today-strip-empty {
    color: var(--text-grey);
    font-weight: 500;
    font-style: italic;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    font-size: 0.75rem;
}

/* ── GRADE KANBAN ────────────────────────────────────────────────────────── */
.calendar-grid-wrapper {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 12px;
    /* Scroll suave com snap nos dias */
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(160px, 1fr));
    gap: 8px;
    margin-top: 8px;
    width: 100%;
    min-width: 900px;
    border-radius: var(--radius-lg);
    background: transparent;          /* Removido fundo verde — mais limpo */
    padding: 0;
    box-sizing: border-box;
    transition: opacity var(--duration-base) ease;
    will-change: opacity;
    contain: layout style;
    min-height: clamp(240px, 48vh, 500px);
}
.calendar-grid.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* ── COLUNAS DE DIA — estilo Notion clean ────────────────────────────────── */
.day-column {
    background: var(--surface-0);          /* Branco uniforme — sem zebra */
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    display: flex;
    flex-direction: column;
    min-height: clamp(240px, 48vh, 500px);
    position: relative;
    scroll-snap-align: start;
    transition: border-color var(--duration-base) ease,
                box-shadow var(--duration-base) ease;
}
/* Remove zebra — consistência */
.day-column:nth-child(even) {
    background: var(--surface-0);
}
.day-column:hover {
    border-color: rgba(49, 127, 114, 0.18);
    box-shadow: 0 4px 16px rgba(49,127,114,0.05);
}

/* Cabeçalho da coluna */
.day-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 32px;
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-tertiary);           /* Neutro para todos os dias */
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.day-label { flex: 1; line-height: 1.3; }

/* Badge de contagem de eventos */
.col-count {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 16px; height: 16px;
    padding: 0 var(--space-1);
    border-radius: var(--radius-xs);
    background: var(--surface-2);
    color: var(--text-tertiary);
    font-size: var(--text-xs);
    font-weight: 700;
    flex-shrink: 0;
    transition: background var(--duration-fast) ease, color var(--duration-fast) ease;
}
.col-count.has-items { display: inline-flex; }

/* Destaque do dia de hoje — sutil teal tint */
.today-highlight {
    background: #f7fffe;
    border-color: rgba(49,127,114,0.22);
    box-shadow: 0 0 0 0.5px rgba(49,127,114,0.12),
                0 4px 16px rgba(49,127,114,0.06);
}
.today-highlight .day-name {
    color: var(--color-teal);              /* Só hoje recebe cor teal */
}
/* Badge HOJE — pill compacto */
.today-highlight .day-name::after {
    content: 'HOJE';
    font-size: 0.52rem;
    background: var(--color-teal);
    color: white;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    letter-spacing: 0.08em;
    font-weight: 800;
    margin-left: var(--space-2);
    flex-shrink: 0;
}
.today-highlight .col-count {
    background: var(--tint-teal);
    color: var(--color-teal);
}

/* Coluna vazia (drop zone expandida) */
.card-list {
    flex: 1;
    min-height: 50px;
}

.card-list:empty::after {
    content: 'Sem eventos';
    display: block;
    color: var(--text-disabled);
    font-size: var(--text-xs);
    font-weight: 500;
    text-align: center;
    padding: var(--space-5) var(--space-2);
    letter-spacing: 0.02em;
}
.global-edit .card-list:empty::after { display: none; }

/* ── CARDS DE EVENTO — Notion-inspired (versão canônica) ────────────────── */
.event-item {
    background: var(--surface-0);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
    border: 1px solid var(--border-soft);
    position: relative;
    box-shadow: var(--shadow-xs);
    transition: transform var(--duration-base) var(--ease-apple),
                box-shadow var(--duration-base) var(--ease-apple),
                border-color var(--duration-base) ease;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    animation: cardSlideIn 0.35s var(--ease-spring);
}
.event-item:last-child { margin-bottom: 0; }

/* Hover só em modo visualização */
body:not(.global-edit) .event-item:hover {
    border-color: rgba(49, 127, 114, 0.28);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}
body:not(.global-edit) .event-item:active {
    transform: translateY(-1px);
}

body.global-edit .event-item:not(.is-editing) { cursor: grab; }
body.global-edit .event-item:not(.is-editing):active { cursor: grabbing; }

/* Draft — borda esquerda sutil */
.event-item.draft {
    border-left: 3px solid var(--surface-3);
}
/* Consolidated — borda esquerda verde */
.event-item.consolidated {
    border-left: 3px solid var(--color-teal);
    background: #fbfffe;
}

/* Título do evento */
.event-title {
    font-weight: 600;
    display: block;
    font-size: var(--text-base);
    margin-bottom: var(--space-1);
    color: var(--text-primary);
    line-height: 1.4;
}

/* Descrição do evento */
.event-details {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.55;
    margin-top: var(--space-1);
    display: block;
}
.event-item:not(.is-editing) .event-details:empty { display: none; }
.event-item.is-editing .event-details:empty::before {
    content: "Adicionar descrição...";
    color: var(--text-disabled);
    font-style: italic;
    pointer-events: none;
    display: block;
}

/* Evento consolidado — título menos proeminente */
.consolidated .event-title {
    color: var(--text-secondary);
}

/* Checkmark visual no card consolidado */
.event-item.consolidated::after {
    content: '✓';
    position: absolute;
    top: var(--space-2); right: var(--space-3);
    font-size: var(--text-xs);
    font-weight: 800;
    color: var(--color-teal);
    opacity: 0.7;
    pointer-events: none;
    line-height: 1;
}
/* Remove o conteúdo do ::after quando is-editing */
.event-item.is-editing::after { content: ""; }

/* Meta: hora e local */
.event-meta {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: var(--space-1);
    flex-wrap: wrap;
    margin-top: var(--space-2);
}
.meta-time {
    color: var(--color-teal);
    font-weight: 700;
    font-size: var(--text-xs);
    letter-spacing: 0.03em;
}
.meta-sep { color: var(--border-medium); font-size: var(--text-xs); }
.meta-location { word-break: break-word; color: var(--text-tertiary); }

/* Team display no card */
.team-display {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    margin-top: var(--space-3);
    align-items: center;
    transition: var(--transition-base);
}
.is-editing .team-display { display: none; }

.d-tag {
    font-size: var(--text-xs);
    font-weight: 600;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-xs);
    background: var(--tint-teal);
    color: var(--color-teal);
}
.d-ext {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-orange);
    margin-top: var(--space-1);
    width: 100%;
    display: block;
}

/* ── CARD EM EDIÇÃO (canônico) ───────────────────────────────────────────── */
/* FIX: alta especificidade garante posicionamento fixo centralizado,
   sobrescrevendo qualquer transform:none ou position:relative residual */
html body .event-item.is-editing {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 9000 !important;
    margin: 0 !important;
    width: min(640px, 92vw) !important;
    max-height: 86vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;

    /* Visual do card expandido */
    padding: 32px 32px 28px 32px !important;
    border-radius: 20px !important;
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.22),
        0 8px 24px rgba(0, 0, 0, 0.10) !important;
    background: #fff !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-left: 4px solid var(--color-teal, #317f72) !important;
    cursor: default !important;
    user-select: text !important;

    /* Animação de entrada */
    animation: fixCardExpandIn 0.2s cubic-bezier(0.4, 0, 0.2, 1) both !important;
}

@keyframes fixCardExpandIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.97) !important;
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) !important;
    }
}

/* Remove o ::after do card em edição */
html body .event-item.is-editing::after {
    content: none !important;
    display: none !important;
}
/* Anel de foco externo */
.event-item.is-editing::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: var(--radius-lg);
    border: 1.5px solid rgba(49,127,114,0.15);
    pointer-events: none;
    z-index: -1;
    background: none;
    color: transparent;
    font-size: 0;
}
.event-item.is-editing::before {
    content: "EDITANDO";
    position: absolute;
    top: -10px; left: var(--space-3);
    background: var(--color-teal);
    color: white;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 3px var(--space-2);
    border-radius: var(--radius-xs);
    z-index: 5;
}

/* Title e details editáveis */
.event-item.is-editing .event-title,
.event-item.is-editing .event-details {
    background: #f4faf9;
    border: 1px solid rgba(49,127,114,0.2);
    border-radius: var(--radius-sm);
    padding: var(--space-2) var(--space-3);
    transition: background var(--duration-base) ease,
                border-color var(--duration-base) ease;
    cursor: text;
    min-height: 32px;
}
.event-item.is-editing .event-title { margin-bottom: var(--space-2); }
.event-item.is-editing .event-details { margin-bottom: var(--space-2); }
.event-item.is-editing .event-title:hover,
.event-item.is-editing .event-details:hover { background: #eef8f6; }
.event-item.is-editing [contenteditable="true"]:focus {
    outline: none;
    background: var(--surface-0);
    border-color: var(--color-teal);
    box-shadow: var(--focus-ring-teal);
}

/* Placeholder para details vazio */
.event-item.is-editing .event-details:empty::before {
    content: "Adicionar descrição...";
    color: var(--text-disabled);
    font-style: italic;
    pointer-events: none;
    display: block;
}
.event-item:not(.is-editing) .event-details:empty { display: none; }

/* Time row */
.time-row {
    display: none;
    grid-template-columns: 46px 14px 46px 1fr;
    gap: 6px;
    margin-top: 10px;
    width: 100%;
    align-items: center;
}
.event-item.is-editing .time-row  { display: grid; }
.event-item.is-editing .event-meta { display: none; }

.time-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 1px solid var(--border-medium);
    background: var(--surface-1);
    border-radius: var(--radius-sm);
    width: 46px; height: 34px;
    text-align: center;
    text-align-last: center;
    -webkit-text-align-last: center;
    padding: 0 4px;
    font-size: var(--text-base);
    font-weight: 700;
    font-family: var(--font-ui);
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-fast);
    cursor: pointer;
    -webkit-padding-start: 0;
    -webkit-padding-end: 0;
}
.time-select:focus {
    border-color: var(--color-teal);
    background: var(--surface-0);
    box-shadow: var(--focus-ring-teal);
}
/* Centraliza as options dentro do select (Firefox) */
.time-select option {
    text-align: center;
    font-weight: 700;
}
.time-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #b0b0b8;
    font-size: 0.85rem;
    /* Padding lateral mínimo para não comprimir */
    padding: 0 1px;
    flex-shrink: 0;
}

.location-input {
    grid-column: 1 / -1;
    width: 100%; height: 32px;
    border: 1px solid #dfe5e3;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 0.75rem;
    font-family: inherit;
    background: #fafafa;
    box-sizing: border-box;
    outline: none;
    transition: 0.18s;
}
.location-input:focus { border-color: var(--color-teal); background: white; box-shadow: 0 0 0 3px rgba(49,127,114,0.08); }

/* Team dropdown em edição */
.team-dropdown { display: none; flex-direction: column; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0f0f2; }
.is-editing .team-dropdown { display: flex; }
.team-tag-list { display: flex; flex-wrap: wrap; gap: 5px; }
.team-tag {
    font-size: 0.65rem;
    padding: 5px 10px;
    border-radius: 5px;
    background: #f0f0f2;
    color: #888;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.team-tag:hover { background: #e8e8eb; color: #555; }
.team-tag.active { background: var(--color-teal); color: white; }

.ext-input {
    border: 1px solid #eaeaec;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.72rem;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    transition: 0.18s;
    background: #fafafa;
}
.ext-input:focus { border-color: var(--color-teal); background: white; box-shadow: 0 0 0 3px rgba(49,127,114,0.06); }

/* Ferramentas do card — inline Notion-style (dentro do card, não flutuando) */
.card-tools {
    display: none;
    align-items: center;
    gap: var(--space-1);
    margin-top: var(--space-3);
    padding-top: var(--space-2);
    border-top: 1px dashed var(--border-medium);
    animation: fadeInUp 0.2s var(--ease-spring);
}
.is-editing .card-tools { display: flex; }

.t-btn {
    border: none;
    height: 28px;
    padding: 0 var(--space-2);
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: var(--text-xs);
    color: white;
    font-weight: 700;
    transition: background var(--duration-fast) var(--ease-out),
                transform var(--duration-fast) var(--ease-spring);
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    letter-spacing: 0.02em;
    user-select: none;
    flex-shrink: 0;
}
.t-btn:hover { filter: brightness(0.9); transform: translateY(-1px); }
.t-btn:active { transform: scale(0.96); filter: brightness(0.85); }

/* Confirmar (salvar card) */
.t-check {
    background: var(--color-teal);
    box-shadow: var(--shadow-teal-sm);
    flex: 1;                              /* Ocupa espaço restante */
    justify-content: center;
}
/* Deletar */
.t-del {
    background: transparent;
    color: var(--color-danger);
    border: 1px solid rgba(211,47,47,0.2);
    width: 28px;
    padding: 0;
    justify-content: center;
}
.t-del:hover { background: #fff0f0; border-color: var(--color-danger); }

/* Botão "Adicionar item" */
.btn-add-card {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: var(--space-2) var(--space-3);
    margin-top: auto;
    background: transparent;
    border: none;                          /* Sem borda — ghost sutil */
    border-radius: var(--radius-sm);
    color: var(--text-disabled);
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 600;
    font-family: var(--font-ui);
    gap: var(--space-1);
    transition: color var(--duration-fast) var(--ease-out),
                background var(--duration-fast) var(--ease-out);
    user-select: none;
}
.btn-add-card::before {
    content: '+';
    font-size: 1rem;
    font-weight: 400;
    line-height: 1;
    opacity: 0.5;
    transition: opacity var(--duration-fast) ease;
}
.btn-add-card:hover {
    color: var(--color-teal);
    background: var(--tint-teal);
}
.btn-add-card:hover::before { opacity: 1; }
.btn-add-card:active { transform: scale(0.98); }
.global-edit .btn-add-card {
    display: flex;
    animation: fadeInUp 0.25s var(--ease-spring);
}
/* btn-template visibility handled by applyPermissions() JS */

/* Hint de teclado */
.edit-hint {
    display: none;
    margin-top: 18px;
    padding: 9px 16px;
    border-radius: 8px;
    background: #fafafa;
    border: 1px solid #eeeef0;
    font-size: 0.72rem;
    color: var(--text-grey);
    text-align: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.global-edit .edit-hint { display: block; animation: fadeInUp 0.35s ease; }
.edit-hint kbd {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.68rem;
    font-family: inherit;
    box-shadow: 0 2px 0 #ddd;
    color: var(--text-black);
    font-weight: 700;
}

/* Drag and drop */
.dragging-card   { opacity: 0.5; transform: scale(1.02); box-shadow: 0 8px 20px rgba(0,0,0,0.1) ; }
.dragging-chosen { cursor: grabbing ; }
.dragging-active { cursor: grabbing ; }

/* ── RESPONSIVIDADE MOBILE ─────────────────────────────────────────────────
   Scroll horizontal na grade para preservar legibilidade dos cards
   ───────────────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .calendar-container { padding: 20px 14px; border-radius: 20px; }
    .calendar-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .controls { width: 100%; justify-content: flex-end; }

    /* Grid com scroll horizontal — mantém colunas legíveis */
    .calendar-grid-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -14px;
        padding: 0 14px;
        scrollbar-width: thin;
        scrollbar-color: rgba(49,127,114,0.2) transparent;
    }
    .calendar-grid-wrapper::-webkit-scrollbar { height: 4px; }
    .calendar-grid-wrapper::-webkit-scrollbar-track { background: transparent; }
    .calendar-grid-wrapper::-webkit-scrollbar-thumb { background: rgba(49,127,114,0.25); border-radius: 2px; }

    .calendar-grid {
        grid-template-columns: repeat(6, 160px);
        min-width: 960px;
        border-radius: 12px;
        gap: 0;
    }

    .today-strip { flex-direction: column; align-items: flex-start; gap: 10px; }
    .today-strip-list { justify-content: flex-start; }
}

@media (max-width: 600px) {
    .calendar-container { padding: 16px 12px; }
    .week-info h2 { font-size: 1rem; }
    .today-strip { padding: 12px 14px; margin-bottom: 16px; }
    .controls { gap: 6px; }
    .btn-action { height: 32px; padding: 0 10px; font-size: 0.7rem; }
}

/* ── SCROLL INDICATOR no mobile ─────────────────────────────────────────── */
@media (max-width: 900px) {
    .calendar-grid-wrapper {
        position: relative;
    }
    /* "Swipe to see more" fade hint */
    .calendar-grid-wrapper::after {
        content: '';
        position: absolute;
        right: 0; top: 0; bottom: 0; width: 32px;
        background: linear-gradient(to right, transparent, rgba(255,255,255,0.9));
        pointer-events: none;
        border-radius: 0 12px 12px 0;
    }
}

/* Estado de saída da strip */
.today-strip.fade-out { opacity: 0; pointer-events: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   AGENDA SEMANAL — ANIMAÇÕES E UX (NOTION-INSPIRED)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── DRAG AND DROP GHOST STYLES ─────────────────────────────────────────── */
.dragging-card {
    opacity: 0.35 ;
    background: #f4f5f7 ;
    border: 1.5px dashed #a0aab2 ;
    box-shadow: none ;
}

.dragging-chosen {
    background: #ffffff ;
    box-shadow: 0 16px 40px rgba(0,0,0,0.12), 0 6px 16px rgba(49,127,114,0.08) ;
    transform: scale(1.03) rotate(-1.5deg) ;
    border-color: var(--color-teal) ;
    z-index: 9999 ;
    cursor: grabbing ;
}

.dragging-active {
    cursor: grabbing ;
}

/* Cursor grabbing global durante o drag */
body.sortable-fallback,
body.sortable-fallback * {
    cursor: grabbing ;
}

/* ── SKELETON LOADING (NOTION STYLE) ────────────────────────────────────── */
.month-loading {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 30px;
    color: transparent ;
    user-select: none;
    font-size: 0;
    background: transparent ;
}

.month-loading::before,
.month-loading::after {
    content: "";
    display: block;
    background: linear-gradient(90deg, #f0f0f2 25%, #f7f7f8 50%, #f0f0f2 75%);
    background-size: 200% 100%;
    border-radius: 6px;
    animation: skeletonShimmer 1.8s infinite linear;
}

.month-loading::before {
    width: 35%;
    height: 24px;
    margin-bottom: 8px;
}

.month-loading::after {
    width: 100%;
    height: 120px;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Microinterações e Focus Rings na área de ferramentas da card */
.t-btn:hover {
    transform: scale(1.15) translateY(-2px);
}
.t-btn:active {
    transform: scale(0.95) translateY(0);
}

/* ── NOTIFICATIONS ───────────────────────────────────────────────────────── */
.notif-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.notif-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    position: relative;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s, transform 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.notif-btn:hover {
    background: rgba(49,127,114,0.08);
    color: var(--color-teal);
    transform: translateY(-1px);
}
.notif-badge {
    position: absolute;
    top: -2px; right: -1px;
    background: var(--color-magenta, #E72367);
    color: white;
    font-size: 0.66rem;
    font-weight: 800;
    border-radius: 999px;
    padding: 3px 6px;
    min-width: 18px;
    text-align: center;
    line-height: 1;
    border: 2px solid white;
    box-shadow: 0 8px 18px rgba(231, 35, 103, 0.22);
}
.notif-dropdown {
    position: fixed;
    width: min(380px, calc(100vw - 32px));
    background: #fffdfa;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(31, 83, 72, 0.16);
    border: 1px solid rgba(31, 83, 72, 0.1);
    z-index: 10000;
    overflow: hidden;
    font-family: 'Plus Jakarta Sans', sans-serif;
    animation: notifDropIn 0.18s ease both;
}
@keyframes notifDropIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to { opacity: 1; transform: none; }
}
.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px 16px;
    border-bottom: 1px solid rgba(31, 83, 72, 0.1);
    background: rgba(255, 255, 255, 0.86);
}
.notif-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.notif-read-all-btn {
    background: rgba(49, 127, 114, 0.08);
    border: 1px solid rgba(49, 127, 114, 0.08);
    border-radius: 999px;
    color: var(--color-teal);
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    padding: 7px 11px;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.notif-read-all-btn:hover {
    background: rgba(49, 127, 114, 0.13);
    color: var(--color-teal-dark);
    transform: translateY(-1px);
}
.notif-list {
    max-height: 420px;
    overflow-y: auto;
    padding: 8px;
}
.notif-empty {
    padding: 26px 18px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}
.notif-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    position: relative;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.notif-item:hover {
    background: rgba(255,255,255,0.82);
    border-color: rgba(31, 83, 72, 0.08);
    transform: translateY(-1px);
}
.notif-item.unread {
    background: rgba(49,127,114,0.055);
}
.notif-item.unread::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 20px;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--color-magenta, #E72367);
}
.notif-item.unread:hover {
    background: rgba(49,127,114,0.09);
}
.notif-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(49,127,114,0.08);
    font-size: 1.15rem;
    line-height: 1;
    flex-shrink: 0;
}
.notif-icon-wrap .ti {
    color: currentColor;
}
.notif-content strong {
    display: block;
    font-size: 0.88rem;
    color: var(--text-primary);
    margin: 0 0 4px;
    line-height: 1.32;
    letter-spacing: -0.01em;
}
.notif-content p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0 0 5px;
    line-height: 1.38;
}
.notif-time {
    display: inline-block;
    color: rgba(31, 83, 72, 0.48);
    font-size: 0.76rem;
    font-weight: 650;
}

/* Refatoração 2026-05-26: 18 !important removidos, 0 mantidos (override JS) */
/* ══════════════════════════════════════════════════════════════════════════
   VIEW SWITCHER
   ══════════════════════════════════════════════════════════════════════════ */

.view-switcher {
    display: flex;
    gap: 2px;
    background: #f1f3f5;
    border-radius: 10px;
    padding: 3px;
}

.view-switcher-btn {
    padding: 5px 14px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 0.82rem;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.view-switcher-btn:hover {
    background: #fff;
    color: var(--text-primary);
}

.view-switcher-btn.active {
    background: #fff;
    color: var(--text-primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* ══════════════════════════════════════════════════════════════════════════
   VIEW MÊS
   ══════════════════════════════════════════════════════════════════════════ */

#view-month {
    overflow: hidden;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.month-header-cell {
    background: #f9fafb;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    padding: 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.month-cell {
    background: #fff;
    min-height: 108px;
    padding: 6px;
    cursor: pointer;
    transition: background 0.12s;
    overflow: hidden;
}

.month-cell:hover {
    background: #f8f9ff;
}

.month-cell.other-month {
    background: #fafafa;
    opacity: 0.55;
}

.month-cell.today {
    background: #eef2ff;
}

.month-cell-num {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.month-cell.today .month-cell-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #6366f1;
    color: #fff;
    font-size: 0.75rem;
}

.month-event-pill {
    display: block;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
    cursor: pointer;
    color: var(--text-primary);
    transition: filter 0.1s;
}

.month-event-pill:hover {
    filter: brightness(0.94);
}

.month-more {
    font-size: 0.68rem;
    color: #6366f1;
    font-weight: 600;
    cursor: pointer;
    padding: 1px 4px;
    margin-top: 1px;
}

.month-loading, .list-empty {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   VIEW LISTA
   ══════════════════════════════════════════════════════════════════════════ */

.list-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 4px 0;
}

.list-day-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 6px;
    margin-bottom: 8px;
}

.list-day-header.today {
    color: #6366f1;
}

.list-event-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #f1f3f5;
    margin-bottom: 6px;
    cursor: pointer;
    transition: box-shadow 0.15s, background 0.12s;
}

.list-event-row:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: #fafbff;
}

.list-ev-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    font-size: 0.87rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-ev-time {
    font-variant-numeric: tabular-nums;
    font-size: 0.78rem;
    font-weight: 600;
    color: #6366f1;
    white-space: nowrap;
    flex-shrink: 0;
}

.list-ev-loc {
    font-size: 0.78rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-ev-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.list-ev-cat {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 100px;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════════════
   PAINEL LATERAL DE EVENTO
   ══════════════════════════════════════════════════════════════════════════ */

.event-panel {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
}

.event-panel.open {
    pointer-events: auto;
}

.event-panel-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.18);
    opacity: 0;
    transition: opacity 0.25s;
}

.event-panel.open .event-panel-backdrop {
    opacity: 1;
}

.event-panel-inner {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 380px;
    max-width: 95vw;
    background: #fff;
    box-shadow: -6px 0 32px rgba(0,0,0,0.12);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 24px;
}

.event-panel.open .event-panel-inner {
    transform: translateX(0);
}

.ep-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.ep-category-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #6366f1;
    flex-shrink: 0;
    margin-top: 6px;
}

.ep-header h2 {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.35;
}

.ep-close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 1rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s;
}

.ep-close:hover { color: #374151; }

.ep-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
    padding: 14px;
    background: #f9fafb;
    border-radius: 10px;
}

.ep-field {
    font-size: 0.84rem;
    color: #374151;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.ep-field--members {
    align-items: flex-start;
}

.ep-members-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ep-member-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #e5e7eb;
}

.ep-member-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #6366f1;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid #fff;
}

.ep-description {
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.6;
    white-space: pre-wrap;
    flex: 1;
    margin-bottom: 20px;
    min-height: 40px;
}

.ep-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid #f1f3f5;
}

/* fade-out helpers para transições de view */
#view-month.fade-out,
#view-list.fade-out {
    opacity: 0;
    transition: opacity 0.18s;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FIX — Correção do Stacking Context (Bug do Card Expandido sob o Backdrop)
   Desativa temporariamente o will-change no wrapper principal e na grade
   quando há um card ativo em modo de edição, permitindo que o z-index do card
   fique corretamente sobreposto ao backdrop escuro.
   ═══════════════════════════════════════════════════════════════════════════ */



/* ═══════════════════════════════════════════════════════════════════════════
   PATCH — Expanded card view (Trello-style), fix botão Dados, save btn
   Adicione este bloco ao FINAL do seu style.css
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Backdrop que escurece o calendário ao abrir um card ─────────────────── */
.card-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 200;
    animation: backdropFadeIn 0.18s ease;
}

@keyframes backdropFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Card expandido (substituí .is-editing inline pelo painel expansível) ── */
.event-item.is-editing {
    position: fixed ;
    z-index: 300 ;
    top: 50% ;
    left: 50% ;
    transform: translate(-50%, -50%) ;
    width: min(640px, 92vw) ;
    max-height: 85vh ;
    overflow-y: auto ;
    padding: 32px 32px 90px 32px ;
    border-radius: 20px ;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.12) ;
    background: var(--surface-1, #fff) ;
    border: 1px solid var(--border-medium, #e0e0e0) ;
    border-left: 4px solid var(--color-teal, var(--color-teal)) ;
    cursor: default ;
    animation: cardExpandIn 0.22s var(--ease-apple, cubic-bezier(0.4,0,0.2,1));
}

.event-item.is-editing.consolidated {
    border-left-color: var(--color-teal, var(--color-teal)) ;
}

@keyframes cardExpandIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ── Títulos e campos no card expandido ──────────────────────────────────── */
.event-item.is-editing .event-title {
    font-size: 1.3rem ;
    font-weight: 600 ;
    line-height: 1.4 ;
    margin-bottom: 20px ;
    margin-right: 52px ;
    padding: 8px 12px ;
    border-radius: 8px ;
}

.event-item.is-editing .event-details {
    font-size: 0.95rem ;
    line-height: 1.7 ;
    color: var(--text-secondary, #666) ;
    padding: 12px ;
    border-radius: 8px ;
    min-height: 80px ;
    margin-bottom: 24px ;
}

.event-item.is-editing .event-details:empty::before {
    content: "Adicione uma descrição..." ;
    color: var(--text-tertiary, #aaa) ;
    font-style: italic ;
}

/* ── Oculta a seta de hover no estado expandido ──────────────────────────── */
.event-item.is-editing::after {
    display: none ;
}

/* ── Barra de ferramentas (card-tools) no estado expandido ───────────────── */
/* Reposicionada para dentro do card, no topo direito */
.event-item.is-editing .card-tools {
    display: flex ;
    align-items: center;
    position: absolute ;
    top: 24px ;
    right: 28px ;
    gap: 12px ;
    z-index: 310 ;
    animation: none ;
    border: none ;
    margin: 0 ;
    padding: 0 ;
}

/* ── Ferramentas discretas do card expandido ─────────────────────────────── */
.status-toggle-discreto {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    background: transparent;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s;
}
.status-toggle-discreto:hover {
    background: rgba(0,0,0,0.04);
}
.status-toggle-discreto input {
    cursor: pointer;
    accent-color: var(--color-teal);
    width: 14px;
    height: 14px;
}
.event-item.consolidated .status-toggle-discreto {
    color: var(--color-teal);
}

.t-del-discreto {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    transition: color 0.15s, transform 0.1s;
    border-radius: 4px;
}
.t-del-discreto:hover {
    color: var(--color-danger);
    transform: scale(1.1);
}

/* ── Fim das ferramentas do card expandido ────────────────────────────────── */
/* ── Time-row e meta no card expandido ───────────────────────────────────── */
.event-item.is-editing .time-row {
    display: grid ;
    gap: 12px ;
    margin-bottom: 20px ;
}

.event-item.is-editing .event-meta {
    display: none ;
}

/* ── Team dropdown no card expandido ─────────────────────────────────────── */
.event-item.is-editing .team-dropdown {
    display: flex ;
    flex-wrap: wrap ;
    gap: 8px ;
    padding: 14px 12px ;
    margin-top: 16px ;
    background: var(--surface-2, #f7f7f7) ;
    border-radius: 12px ;
    animation: none ;
}

/* ── Scrollbar discreta no card expandido ────────────────────────────────── */
.event-item.is-editing::-webkit-scrollbar {
    width: 4px;
}
.event-item.is-editing::-webkit-scrollbar-track {
    background: transparent;
}
.event-item.is-editing::-webkit-scrollbar-thumb {
    background: var(--border-medium, #e0e0e0);
    border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FIX — Remove cor roxa do botão "Dados" / agenda-data-wrap
   ═══════════════════════════════════════════════════════════════════════════ */

/* Sobrescreve qualquer variante de purple/violet no botão de dados */
#agenda-data-wrap button,
#agenda-data-wrap .btn-dados,
.btn-agenda-dados,
[id*="agenda-data"] > button,
[id*="dados-btn"] {
    background: var(--surface-2, #f0f0f0) ;
    color: var(--text-primary, #222) ;
    border-color: var(--border-medium, #ddd) ;
    box-shadow: none ;
}

#agenda-data-wrap button:hover,
#agenda-data-wrap .btn-dados:hover,
.btn-agenda-dados:hover {
    background: var(--surface-3, #e4e4e4) ;
    color: var(--text-primary, #222) ;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FIX — Botão Salvar (#save-btn): estilo neutro, não primário/destaque
   ═══════════════════════════════════════════════════════════════════════════ */

#save-btn {
    background: var(--surface-1, #fff) ;
    color: var(--color-teal, var(--color-teal)) ;
    border: 1.5px solid var(--color-teal, var(--color-teal)) ;
    box-shadow: none ;
    font-weight: 600 ;
}

#save-btn:hover {
    background: var(--color-teal, var(--color-teal)) ;
    color: #fff ;
    transform: translateY(-1px) ;
}

#save-btn:active {
    transform: scale(0.97) ;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Ajuste: t-btn (check + close) no card expandido — mais visíveis
   ═══════════════════════════════════════════════════════════════════════════ */

.event-item.is-editing .t-btn {
    width: 28px ;
    height: 28px ;
    font-size: 0.8rem ;
    border-radius: 8px ;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12) ;
}

.event-item.is-editing .t-check {
    background: var(--color-teal, var(--color-teal)) ;
    color: #fff ;
}

.event-item.is-editing .t-close {
    background: var(--surface-2, #f0f0f0) ;
    color: var(--text-secondary, #666) ;
    border: 1px solid var(--border-medium, #ddd) ;
}

.event-item.is-editing .t-close:hover {
    background: #ffe5e5 ;
    color: #d93025 ;
    border-color: #d93025 ;
}


/* ── Dropdown de Dados (Ajuste no HTML/CSS) ────────────────────────────── */
.agenda-data-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--surface-1, #fff);
    border: 1px solid var(--border-medium, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    padding: 6px;
    z-index: 150; /* abaixo do backdrop (200) — correto */
    min-width: 180px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   MERGED FROM fix_agenda.css — selectors not previously in agenda.css
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── FIX 3 — Cards colapsados: truncamento de descrição longa ────────────── */
.event-item:not(.is-editing) .event-details {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    overflow: hidden !important;
    max-height: 4.7em !important;
    word-break: break-word !important;
}

/* Indicador "ver mais" para cards com descrição truncada */
.event-item:not(.is-editing) .card-more-hint {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-teal, #317f72);
    letter-spacing: 0.02em;
    margin-top: 3px;
    opacity: 0.75;
    display: none;
}

/* ── FIX 4 — Badge "✓ Salvo" ─────────────────────────────────────────────── */
.card-saved-badge {
    position: absolute;
    bottom: 8px;
    right: 10px;
    background: var(--color-teal, #317f72);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    opacity: 1;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 10;
    letter-spacing: 0.03em;
    font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
    animation: savedBadgeIn 0.2s ease;
}

@keyframes savedBadgeIn {
    from { opacity: 0; transform: translateY(4px) scale(0.9); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── FIX 5 — Remove hint de atalhos e botão Salvar antigo ───────────────── */
.edit-hint,
#edit-hint,
[class*="edit-hint"],
[id*="edit-hint"] {
    display: none !important;
}

body.agenda-week #save-btn {
    display: none !important;
}

/* ── FIX 7 — location-input no contexto do modal expandido ──────────────── */
html body .event-item.is-editing .location-input {
    padding: 8px 12px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(0,0,0,0.10) !important;
    font-size: 0.88rem !important;
    background: #fff !important;
    margin-bottom: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: border-color 0.15s !important;
}
html body .event-item.is-editing .location-input:focus {
    outline: none !important;
    border-color: var(--color-teal, #317f72) !important;
}

/* ── FIX 9 — Placeholder do card ao abrir modal ─────────────────────────── */
.event-item-placeholder {
    border: 2px dashed rgba(49,127,114,0.2) !important;
    border-radius: 14px !important;
    background: rgba(49,127,114,0.04) !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
    flex-shrink: 0 !important;
}
