body {
    font-family: Arial, sans-serif;
    background: #fafafa;
    margin: 0;
    color: #333;
}

header {
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.header-left {
    flex-grow: 1;
}

.header-right {
    display: flex;
    gap: 10px;
    font-size: 14px;
    align-items: center;
    transform: translateX(-4rem);
}

.year-row {
    margin: 6px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.year-label {
    font-weight: bold;
    min-width: 60px;
}

.month-check {
    font-size: 13px;
}
.month-check input {
    margin-right: 4px;
}

.page {
    background: #fff;
    padding: 24px 28px;
    margin: 20px auto;
    max-width: 900px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.calendar {
    margin: 16px 0 8px 0;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 4px;
    font-size: 11px;
    text-align: center;
    opacity: 0.7;
}

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

.day {
    position: relative;
    border-radius: 4px;
    background: #eee;
    min-height: 48px;
    font-size: 11px;
    padding: 3px 4px;
}

.day-empty {
    background: transparent;
}

.day-number {
    font-weight: bold;
}

.section-title {
    font-weight: bold;
    margin-top: 18px;
    margin-bottom: 6px;
}

.chart-wrapper {
    max-width: 260px;
    margin: 4px 0 12px 0;
}

.placeholder {
    padding: 40px 20px;
    text-align: center;
    color: #777;
}

@media print {
    header {
        position: static;
        box-shadow: none;
    }
    .page {
        page-break-after: always;
        box-shadow: none;
        border-radius: 0;
        margin: 0;
        max-width: none;
    }
}

.file-btn {
    background: #ddd;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #bbb;
    cursor: pointer;
    font-size: 14px;
}
.file-btn:hover {
    background: #ccc;
}

.chart-section {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin: 4px 0 16px 0;
    flex-wrap: wrap;
}

.chart-wrapper {
    max-width: 260px;
    margin: 0;
}

.chart-wrapper canvas {
    width: 260px !important;
    height: 260px !important;
    display: block;
}

.percent-list {
    font-size: 13px;
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.percent-list li {
    margin: 3px 0;
    display: flex;
    align-items: center;
}

.day-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: 14px;
    color: #000;
    opacity: 0.9;
}

.day-number.small {
    font-size: 9px;
    opacity: 0.7;
}

.header-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.lang-select {
    display: flex;
    gap: 10px;
}

.colorblind-toggle {
    margin-top: 4px;
}

.header-bubble {
    position: fixed;
    top: 90px;
    right: 20px;
    width: 42px;
    height: 42px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0.85;
    transition:
        opacity 0.15s,
        transform 0.15s;
}

.header-bubble:hover {
    opacity: 1;
    transform: scale(1.1);
}

#header2 {
    transition: all 0.25s ease;
    overflow: hidden;
}

#header2.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0 !important;
}

@media (max-width: 600px) {
    #title-text {
        font-size: 2rem;
    }
}

.meds-list,
.notes-list {
    height: 16.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
}

.pdf-exporting {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.pdf-exporting * {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#content.pdf-exporting {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.page-month-label {
    font-size: 2rem;
    font-weight: normal;
    opacity: 0.7;
    margin-bottom: 4px;
    margin-top: 1rem;
}

.popup-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5000;
}

.popup-inner {
    background: white;
    padding: 20px 28px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    text-align: center;
    max-width: 300px;
}

.popup-btn {
    margin-top: 14px;
    padding: 6px 14px;
    background: #ddd;
    border: 1px solid #aaa;
    border-radius: 4px;
    cursor: pointer;
}

.popup-btn:hover {
    background: #ccc;
}

.export-disabled {
    opacity: 0.4;
    cursor: not-allowed !important;
    pointer-events: auto !important;
}
