:root {
    --blue: #0f4c81;
    --blue-light: #1a6fc4;
    --blue-dark: #0a3a6b;
    --bg: #f8fafc;
    --card: #ffffff;
    --muted: #64748b;
    --work-bg: #3b82f6;
    --off-bg: #10b981;
    --extra-bg: #f59e0b;
    --today-color: #ef4444;
    --start-bg: #1e3a8a;
    --end-bg: #064e3b;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --sidebar-width: 300px;
    --ad-sidebar-width: 250px;
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg);
    color: #111;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    line-height: 1.5;
    padding-bottom: 80px; /* Espaço para o menu fixo */
}

/* ===== HEADER ===== */
header {
    width: 100%;
    background: linear-gradient(135deg, var(--blue-dark), var(--blue));
    color: #fff;
    padding: 1px 16px;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin:1px auto;
    width: 100%;
}

header h1 {
    margin: 0;
    font-size: clamp(18px, 3vw, 28px);
    font-weight: 700;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.desktop-buttons {
    display: flex;
    gap: 12px;
}

.header-btn {
    background: var(--blue--light);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.header-btn.hide-on-other-pages {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    width: 0;
    padding: 0;
    margin: 0;
    border: 0;
}
.year-nav.hide-on-other-pages {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    width: 0;
    padding: 0;
    margin: 0;
    border: 0;
}

/* ===== MENU DE ESCALAS SALVAS ===== */
.save-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    z-index: 1000;
    display: none;
    flex-direction: column;
    min-width: 180px;
    margin-top: 8px;
}

.save-menu.show {
    display: flex;
}

.save-menu button {
    background: none;
    border: none;
    padding: 10px 16px;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.save-menu button:hover {
    background: #f5f5f5;
}

/* ===== LAYOUT PRINCIPAL ===== */
.main-wrapper {
    display: flex;
    width: 100%;
    max-width: 1400px;
    gap: 20px;
    padding: 20px 16px;
}

.wrap {
    flex: 1;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    position: relative;
    order: 1;
}

.main-content {
    flex: 1;
}

/* ===== SIDEBAR DE ANÚNCIOS ===== */
.ad-sidebar {
    width: var(--ad-sidebar-width);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    order: 2;
}

.ad-container {
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 20px;
    border: 1px solid #f1f5f9;
}

.ad-container h3 {
    margin: 0 0 15px 0;
    color: var(--blue);
    font-size: 1.1rem;
    font-weight: 700;
}

.ad-placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.ad-placeholder.large {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder.small {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== SIDEBAR DE GERAR ESCALA ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--card);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    flex-shrink: 0;
    display: none;
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    height: auto;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.sidebar.open {
    display: block;
}

.sidebar h2 {
    margin: 0 0 16px 0;
    font-size: 1.3rem;
    color: var(--blue);
    font-weight: 700;
}

.sidebar label {
    display: block;
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 500;
}

.sidebar input[type="number"],
.sidebar input[type="date"] {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #fafafa;
}

.sidebar input:focus {
    outline: none;
    border-color: var(--blue);
    background: #fff;
}

.sidebar button {
    width: 100%;
    padding: 14px;
    margin-top: 16px;
    border-radius: 8px;
    border: 0;
    background: linear-gradient(135deg, var(--blue), var(--blue-light));
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
}

/* ===== OVERLAY ===== */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
}

.overlay.active {
    display: block;
}

/* ===== CALENDÁRIOS PRINCIPAIS ===== */
.calendars {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    align-content: start;
    width: 100%;
}

.month {
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #f1f5f9;
}

.month .head {
    background: linear-gradient(90deg, var(--blue), var(--blue-light));
    color: #fff;
    padding: 2px 8px;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

.month .grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    padding: 0cqb;
    font-size: 0.7rem;
}

.month .grid .w {
    text-align: center;
    padding: 1px 2px;
    font-weight: 700;
    color: var(--muted);
    background: #fafafa;
    border-bottom: 1px solid #f1f1f1;
    font-size: 0.65rem;
}

.month .grid .cell {
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f1f5f9;
    cursor: pointer;
    padding: 1px;
    user-select: none;
    font-weight: 500;
    position: relative;
    font-size: 0.7rem;
}

.month .grid .cell.empty {
    background: transparent;
    cursor: default;
    border: 0;
}

/* Estados dos dias */
.cell.work {
    background: var(--work-bg);
    color: #fff;
    font-weight: 600;
}

.cell.off {
    background: var(--off-bg);
    color: #fff;
    font-weight: 600;
}

.cell.extra {
    background: var(--extra-bg);
    color: #fff;
    font-weight: 600;
}

.cell.start {
    background: var(--start-bg);
    color: #fff;
    font-weight: 700;
}

.cell.end {
    background: var(--end-bg);
    color: #fff;
    font-weight: 700;
}

.cell.today {
    color: var(--today-color);
    font-weight: 700;
}

/* Indicadores */
.holiday-indicator {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
}

.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    margin-bottom: 8px;
    font-weight: 500;
}

.cell:hover .tooltip {
    opacity: 1;
}

/* ===== NAVEGAÇÃO DE ANO ===== */
.year-nav {
    display: flex;
    align-items: center;
    justify-content: center;
}


.year-display {
    color: #fafafc ;
    min-width: auto ;
    text-align: center;
    margin: 0;
    letter-spacing: -2px;
    font-size: clamp(18px, 3vw, 28px);
    font-weight: 700;
}

/* ===== AÇÕES DO CALENDÁRIO ===== */
.calendar-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.calendar-action-btn {
    background: linear-gradient(135deg, var(--blue), var(--blue-light));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 140px;
    justify-content: center;
}

/* Botão de escala para mobile */
.mobile-scale-btn {
    display: none !important;
}

/* ===== RODAPÉ E LEGENDA ===== */
.calendar-footer {
    margin-top: 30px;
    padding: 24px;
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    width: 100%;
    border: 1px solid #f1f5f9;
}

.legend {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--muted);
}

.legend .row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.color-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: inline-block;
}

/* ===== SIDEBAR DIREITA (DATA E CONTADORES) ===== */
.current-date {
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 20px;
    border: 1px solid #f1f5f9;
    text-align: center;
    cursor: pointer;
}

.current-date h3 {
    margin: 0 0 10px 0;
    color: var(--blue);
    font-size: 1.1rem;
    font-weight: 700;
}

.date-display {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--today-color);
    padding: 10px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.1);
}

.counter-sidebar {
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 20px;
    border: 1px solid #f1f5f9;
}

.counter-sidebar h3 {
    margin: 0 0 15px 0;
    color: var(--blue);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
}

.counter-display {
    font-size: 1rem;
    color: #333;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.counter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.counter-value {
    font-weight: 700;
    color: var(--blue);
}

/* ===== PÁGINA DE SALVAR ===== */
.save-page {
    display: none;
    width: 100%;
    max-width: 210mm;
    margin: 0 auto;
    padding: 10mm 5mm;
    background: white;
    min-height: 100vh;
    transform-origin: top center;
}

.save-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--blue);
    padding-bottom: 15px;
}

.save-title {
    font-size: 28px;
    color: var(--blue);
    font-weight: bold;
    margin: 0 0 8px 0;
}

.save-subtitle {
    font-size: 18px;
    color: #666;
    font-weight: normal;
    margin: 0;
    font-style: italic;
}

.save-calendars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
    transform-origin: top center;
}

.save-month {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    transform-origin: top center;
}

.save-month .head {
    background: var(--blue);
    color: white;
    padding: 6px 4px;
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    line-height: 1.2;
}

.save-month .grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    padding: 3px;
    font-size: 10px;
}

.save-month .grid .w {
    text-align: center;
    padding: 4px 1px;
    font-weight: bold;
    color: #666;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    font-size: 9px;
}

.save-month .grid .cell {
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f0f0f0;
    font-weight: 500;
    position: relative;
    font-size: 9px;
}

.save-month .grid .cell.empty {
    background: transparent;
    border: 1px solid #f0f0f0;
}

.save-month .cell.work {
    background: var(--work-bg);
    color: #fff;
    font-weight: 600;
}

.save-month .cell.off {
    background: var(--off-bg);
    color: #fff;
    font-weight: 600;
}

.save-month .cell.extra {
    background: var(--extra-bg);
    color: #fff;
    font-weight: 600;
}

.save-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.save-action-btn {
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.save-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    color: #666;
    font-size: 14px;
}

/* ===== PÁGINA DE MÊS INDIVIDUAL ===== */
.month-page {
    display: none;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.month-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--blue);
    flex-wrap: wrap;
    gap: 15px;
}

.month-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--blue);
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    text-align: center;
}

.month-nav-btn {
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 8px;
    /* width: clamp(40px, 10vw, 50px);
    height: clamp(40px, 10vw, 50px); */
    cursor: pointer;
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.month-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
    width: 100%;
}

.month-action-btn {
    background: linear-gradient(135deg, var(--blue), var(--blue-light));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 140px;
    justify-content: center;
}

.large-month {
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 20px;
    width: 100%;
}

.large-month .grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    padding: 12px;
    background: #f1f1f1;
}

.large-month .grid .w {
    text-align: center;
    padding: 14px 6px;
    font-weight: 700;
    color: var(--muted);
    background: #fafafa;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
}

.large-month .grid .w .long-text {
    display: block;
}

.large-month .grid .w .short-text {
    display: none;
}

.large-month .grid .cell {
    min-height: clamp(60px, 15vw, 110px);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    background: white;
    cursor: pointer;
    padding: 8px 4px;
    user-select: none;
    font-weight: 500;
    position: relative;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
}

.large-month .grid .cell.empty {
    background: transparent;
    cursor: default;
}

.large-month .grid .cell .day-number {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 600;
    margin-bottom: 4px;
}

.large-month .cell.work {
    background: var(--work-bg);
    color: #fff;
    font-weight: 600;
}

.large-month .cell.off {
    background: var(--off-bg);
    color: #fff;
    font-weight: 600;
}

.large-month .cell.extra {
    background: var(--extra-bg);
    color: #fff;
    font-weight: 600;
}

.large-month .cell.today .day-number {
    color: var(--today-color);
    font-weight: 700;
}

.holiday-indicator-large {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
}

/* ===== NOTAS ===== */
.notes-link {
    width: 100%;
    flex: 1;
    min-height: 20px;
    font-size: 0.7rem;
    border: 1px dashed #ccc;
    border-radius: 4px;
    padding: 4px 6px;
    background: rgba(255, 255, 255, 0.9);
    margin-top: auto;
    cursor: pointer;
    text-align: center;
    color: var(--muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.notes-link:hover {
    background: var(--blue-light);
    color: white;
    border-color: var(--blue-light);
}

.notes-link.has-notes {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--work-bg);
    color: var(--blue);
    font-weight: 600;
}

.notes-link.has-notes::before {
    content: "📝 ";
}

.notes-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.notes-modal.show {
    display: flex;
}

.notes-modal-content {
    background: var(--card);
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.notes-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.notes-modal-title {
    font-size: 1.4rem;
    color: var(--blue);
    font-weight: 700;
    margin: 0;
}

.notes-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--muted);
    padding: 5px;
    border-radius: 4px;
}

.notes-modal-textarea {
    width: 100%;
    min-height: 150px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    margin-bottom: 20px;
}

.notes-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ===== MENU MOBILE DE ESCALA ===== */
.scale-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.scale-overlay.show {
    display: block;
}

.scale-mobile-menu {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 20px;
    z-index: 1000;
    min-width: 280px;
    max-width: 90vw;
}

.scale-mobile-menu.show {
    display: block;
}

.scale-mobile-menu h3 {
    margin: 0 0 16px 0;
    color: var(--blue);
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
}

.scale-mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scale-mobile-btn {
    background: linear-gradient(135deg, var(--blue), var(--blue-light));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.scale-mobile-btn.secondary {
    background: #666;
}

/* ===== MENU FIXO INFERIOR ===== */
.bottom-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--blue-dark);
    border-top: 1px solid #e2e8f0;
    padding: 8px 12px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

.bottom-menu-content {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    gap: 5px;
}

.bottom-menu-btn {
    background: var(--blue-light);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 60px;
    max-width: 80px;
    transition: all 0.3s ease;
    text-align: center;
}

.bottom-menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 76, 129, 0.3);
}

.bottom-menu-btn span {
    font-size: 1.2rem;
}

.bottom-menu-btn:active {
    transform: translateY(0);
}

.bottom-menu-btn .btn-text {
    font-size: 0.65rem;
}

/* Esconde os botões de ação originais quando o menu fixo está ativo */
.bottom-menu-active .calendar-actions,
.bottom-menu-active .save-actions,
.bottom-menu-active .month-actions {
    display: none !important;
}

/* ===== ESTADOS ESPECIAIS ===== */
.generating {
    pointer-events: none;
    position: relative;
}

.generating::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9998;
}

.generating::after {
    content: "Gerando...";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--blue);
    color: white;
    padding: 14px 28px;
    border-radius: 10px;
    z-index: 9999;
    font-weight: 600;
}

/* Classes utilitárias */
.hide-on-save {
    display: none !important;
}

.generating-pdf .save-actions,
.generating-pdf .save-footer,
.generating-pdf .month-actions {
    display: none !important;
}

/* ===== RESPONSIVIDADE ===== */
/* Desktop: exibe os botões no cabeçalho */
@media (min-width: 769px) {
    #saveCalendarBtn,
    #clearMarksBtn {
        display: flex !important;
    }
}
/* Oculta o contêiner Data Atual */
#currentDateContainer {
    display: none !important;
}
@media (max-width: 768px) {
    #monthPage .month-actions {
        display: none !important;
    }
    
}
/* ===== Nome do mes e ano da pagina Mes individual ===== */
.month-header {
    padding: 0px 10px 5px;
    border-bottom: 1px solid #dbe5ee;
}

.month-title {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 25px;
    font-size: clamp(1.5rem, 4vw, 2.3rem);
}

.month-nav-btn {
    
    border-radius: 50%;
    background: #eaf2f8;
    color: var(--blue);
    border: 1px solid #cbddea;
    font-size: 0;
    box-shadow: none;
    transition: all 0.25s ease;
}

#prevMonthBtn::before {
    content: "‹";
    font-size: 1rem;
    line-height: 1;
}

#nextMonthBtn::before {
    content: "›";
    font-size: 1rem;
    line-height: 1;
}

.month-nav-btn:hover {
    background: var(--blue);
    color: white;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(15, 76, 129, 0.2);
}

.month-nav-btn:active {
    transform: scale(0.95);
}
/* Botões laterais */
#prevYearBtn,
#nextYearBtn {
    width: 38px !important;
    min-width: 38px !important;
    height: 46px !important;
    padding: 0 !important;

    background: transparent !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: none !important;

    color: #f1f3f5 !important;
    cursor: pointer;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: all 0.25s ease;
}

/* Esconde os anos laterais */
#prevYearBtn span,
#nextYearBtn span {
    display: none !important;
}

/* Remove setas antigas */
#prevYearBtn::after,
#nextYearBtn::after {
    content: none !important;
}

#prevYearBtn::before {
    content: "‹" !important;
}

#nextYearBtn::before {
    content: "›" !important;
}

#prevYearBtn::before,
#nextYearBtn::before {
    color: #e5e7e0;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
}

#prevYearBtn:hover,
#nextYearBtn:hover {
    background: #edeeef !important;
    transform: scale(1);
}

#prevYearBtn:hover::before,
#nextYearBtn:hover::before {
    color: #1473b8;
}


/* Adaptação para celulares */
@media (max-width: 480px) {
    .month-title {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 12px;
        font-size: 1.4rem;
    }

    .month-nav-btn {
        width: 1rem;
        height: 1rem;
       
    }

    .year-nav {
        gap: 8px;
    }

    .year-nav-number {
        min-width: 75px;
        height: 38px;
        padding: 0 8px;
        font-size: 0.85rem;
    }

    .year-display {
        min-width: 20px;
        font-size: 2rem;
    }
}
/* Tablets */
@media (max-width: 1200px) {
    .main-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    
    .ad-sidebar {
        width: 100%;
        order: 3;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .ad-container {
        flex: 1;
        min-width: 250px;
        max-width: 300px;
    }
    
    .calendars {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .save-calendars {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}
/* Tablets menores e mobile */
@media (max-width: 1024px) {
    .month-page {
        padding: 15px;
    }
    
    .large-month .grid {
        padding: 8px;
        gap: 1px;
    }
    
    .large-month .grid .cell {
        min-height: clamp(50px, 12vw, 80px);
        padding: 6px 3px;
    }
    
    .large-month .grid .w {
        padding: 10px 4px;
    }
}
/* Mobile */
@media (max-width: 768px) {
    @media (max-width: 768px) {
    .year-nav-number {
        width: 50px;
        height: 40px;
        font-size: 1rem;
    }
}
    .main-wrapper {
        padding: 12px 8px;
        gap: 15px;
    }
    
    .header-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .header-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .desktop-buttons {
        display: none !important;
    }
    
    .calendars {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
    
    .year-display {
        font-size: 2.5rem;
        min-width: 20px;
    }
    
    .month .grid .cell {
        min-height: 20px;
        font-size: 0.65rem;
    }
    
    .ad-sidebar {
        flex-direction: column;
        align-items: center;
    }
    
    .ad-container {
        max-width: 100%;
        width: 100%;
    }
    
    .save-page {
        padding: 5mm 3mm;
        transform: scale(0.85);
    }
    
    .save-calendars {
        gap: 6px;
    }
    
    .save-month .head {
        padding: 4px 2px;
        font-size: 10px;
    }
    
    .save-month .grid {
        padding: 2px;
        font-size: 8px;
    }
    
    .save-month .grid .w {
        padding: 3px 1px;
        font-size: 8px;
    }
    
    .save-month .grid .cell {
        height: 15px;
        font-size: 8px;
    }
    
    .save-header {
        margin-bottom: 10px;
        padding-bottom: 8px;
    }
    
    .save-title {
        font-size: 18px;
    }
    
    .save-subtitle {
        font-size: 14px;
    }
    
    .month-page {
        padding: 10px;
    }
    
    .month-header {
        margin-bottom: 15px;
        gap: 10px;
        display: flex;
    }
    
    .large-month .grid {
        padding: 6px;
    }
    
    .large-month .grid .cell {
        min-height: clamp(45px, 10vw, 70px);
        padding: 4px 2px;
    }
    
    .large-month .grid .w {
        padding: 8px 2px;
        font-size: 0.8rem;
    }
    
    /* Muda nomes dos dias para iniciais em mobile */
    .large-month .grid .w .long-text {
        display: none;
    }
    
    .large-month .grid .w .short-text {
        display: block;
    }
    
    .notes-link {
        font-size: 0.6rem;
        padding: 2px 4px;
        min-height: 16px;
    }
    
    .holiday-indicator-large {
        width: 6px;
        height: 6px;
        top: 3px;
        right: 3px;
    }
    
    /* Botão de escala mobile */
    .mobile-scale-btn {
        display: flex !important;
    }
    
    .calendar-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .calendar-action-btn {
        flex: 1;
        min-width: calc(33.333% - 16px);
        font-size: 0.8rem;
        padding: 10px 8px;
    }
    
    /* Menu fixo */
    .bottom-menu {
        padding: 10px 12px;
    }
    
    .bottom-menu-content {
        gap: 8px;
    }
    
    .bottom-menu-btn {
        padding: 8px 6px;
        min-width: 50px;
        max-width: 70px;
    }
    
    body {
        padding-bottom: 70px;
    }
    
    .bottom-menu-btn span {
        font-size: 1.1rem;
    }
    
    .bottom-menu-btn .btn-text {
        font-size: 0.65rem;
    }
    
    /* Modal de notas */
    .notes-modal-content {
        width: 95%;
        margin: 10px;
        padding: 20px;
        max-height: 90vh;
    }
    
    .notes-modal-title {
        font-size: 1.2rem;
    }
    
    .notes-modal-textarea {
        min-height: 120px;
        font-size: 16px;
    }
    
    .notes-modal-actions {
        flex-direction: column;
    }
    
    .notes-modal-actions .header-btn {
        width: 100%;
        justify-content: center;
    }
}
/* Mobile pequeno */
@media (max-width: 480px) {
    @media (max-width: 480px) {
    .year-nav-number {
        width: 45px;
        height: 36px;
        font-size: 0.9rem;
    }
}
    .calendars {
        grid-template-columns:repeat (3, minmax(0, 1fr));
    }
    
    .year-display {
        font-size: 2rem;
        min-width: 20px;
    }
    
    .calendar-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .calendar-action-btn {
        width: 100%;
        max-width: 200px;
        min-width: calc(50% - 8px);
        font-size: 0.75rem;
    }
    
    .month-title {
        font-size: 1 rem;
        flex-direction: flex;
        gap: 10px;
        align-items: baseline;
    }
    
    .large-month .grid .cell {
        min-height: 60px;
        font-size: 0.9rem;
    }
    
    .large-month .grid .cell .day-number {
        font-size: 1rem;
    }
    
    .save-calendars {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }
    
    .save-page {
        padding: 3mm 2mm;
        transform: scale(0.75);
    }
    
    .save-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .save-action-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .save-month .head {
        font-size: 9px;
        padding: 3px 1px;
    }
    
    .save-month .grid {
        padding: 1px;
    }
    
    .save-month .grid .cell {
        height: 12px;
        font-size: 7px;
    }
    
    .save-month .grid .w {
        font-size: 7px;
        padding: 2px 0;
    }
    
    .save-actions {
     display: none !important;
    }
    
    .save-action-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .month-page {
        padding: 8px 5px;
    }
    
    .month-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .large-month .grid {
        padding: 4px;
        gap: 0.5px;
    }
    
    .large-month .grid .cell {
        min-height: clamp(40px, 8vw, 60px);
        padding: 2px 1px;
    }
    
    .large-month .grid .w {
        padding: 6px 1px;
        font-size: 0.7rem;
    }
    
    .large-month .grid .cell .day-number {
        font-size: 0.9rem;
        margin-bottom: 2px;
    }
    
    .notes-link {
        font-size: 0.5rem;
        padding: 1px 2px;
        min-height: 14px;
    }
    
    .holiday-indicator-large {
        width: 4px;
        height: 4px;
        top: 2px;
        right: 2px;
    }
    
    .bottom-menu-content {
        gap: 2px;
    }
    
    .bottom-menu-btn {
        padding: 6px 4px;
        min-width: 45px;
        max-width: 60px;
    }
    
    .bottom-menu-btn span {
        font-size: 1rem;
    }
    
    .bottom-menu-btn .btn-text {
        font-size: 0.6rem;
    }
    
    body {
        padding-bottom: 65px;
    }
    
    .notes-modal-content {
        padding: 16px;
    }
    
    .notes-modal-title {
        font-size: 1.1rem;
    }
    
    .notes-modal-textarea {
        min-height: 100px;
        padding: 12px;
    }
}
/* Telas muito pequenas */
@media (max-width: 360px) and (orientation: portrait) {
    .large-month .grid .cell {
        min-height: 35px;
    }
    
    .notes-link {
        display: none;
    }
    
    .large-month .grid .cell .day-number {
        font-size: 0.8rem;
    }
    
    .bottom-menu-btn {
        padding: 5px 3px;
        min-width: 40px;
        max-width: 55px;
    }
    
    .bottom-menu-btn span {
        font-size: 0.9rem;
    }
    
    .bottom-menu-btn .btn-text {
        font-size: 0.55rem;
    }
}
/* Orientação paisagem em mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .month-page {
        padding: 10px 5px;
    }
    
    .large-month .grid .cell {
        min-height: 40px;
    }
    
    .notes-link {
        font-size: 0.5rem;
        min-height: 12px;
    }
}
/* Tablets em orientação retrato */
@media (max-width: 1024px) and (min-width: 769px) {
    .bottom-menu-btn {
        min-width: 70px;
        max-width: 90px;
        padding: 10px 8px;
    }
    
    .bottom-menu-btn span {
        font-size: 1.3rem;
    }
    
    .bottom-menu-btn .btn-text {
        font-size: 0.75rem;
    }
}

/* ===== CONTROLES RESPONSIVOS ===== */

/* Computadores */
@media (min-width: 769px) {
    .bottom-menu {
        display: none !important;
    }

    .header-buttons {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .desktop-buttons {
        display: flex !important;
        align-items: center;
        gap: 10px;
    }
}

/* Celulares e tablets pequenos */
@media (max-width: 768px) {
    .bottom-menu {
        display: block !important;
    }

    .desktop-buttons {
        display: none !important;
    }


}

@media screen and (max-width: 768px) {
    #saveCalendarBtn,
    #clearMarksBtn {
        display: none !important;
    }
}
