.app-date-native-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.app-date-display,
.reports-date-display {
    width: 100%;
    min-height: 28px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ink, #0f172a);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.app-date-display {
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid var(--line, #dbe7e5);
    border-radius: 9px;
    background: #fff;
}

.app-date-display:disabled {
    cursor: not-allowed;
    opacity: .62;
}

.app-date-display:focus-visible,
.reports-date-display:focus-visible {
    outline: 2px solid rgba(15, 118, 110, .28);
    outline-offset: 4px;
    border-radius: 8px;
}

.app-calendar-open {
    overflow: hidden;
}

.app-calendar-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .38);
    backdrop-filter: blur(4px);
}

.app-calendar-overlay.is-open {
    display: flex;
}

.app-calendar-dialog {
    width: min(430px, 100%);
    max-height: min(720px, calc(100vh - 32px));
    overflow: auto;
    padding: 16px;
    border: 1px solid rgba(15, 118, 110, .16);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
}

.app-calendar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.app-calendar-head span,
.app-calendar-weekdays span {
    display: block;
    color: var(--muted, #64748b);
    font-size: 12px;
    font-weight: 850;
}

.app-calendar-head strong {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 3px;
    color: var(--ink, #0f172a);
    font-size: 22px;
    line-height: 1.15;
}

.app-calendar-title button {
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--ink, #0f172a);
    font: inherit;
    font-size: 22px;
    font-weight: 850;
    line-height: 1.1;
    cursor: pointer;
}

.app-calendar-close,
.app-calendar-nav button,
.app-calendar-actions button,
.app-calendar-day,
.app-calendar-choice {
    border: 1px solid var(--line, #dbe7e5);
    background: #fff;
    color: var(--ink, #0f172a);
    cursor: pointer;
}

.app-calendar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 850;
}

.app-calendar-nav {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 8px;
    margin-bottom: 14px;
}

.app-calendar-nav button,
.app-calendar-actions button {
    min-height: 46px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
}

.app-calendar-nav button:hover,
.app-calendar-actions button:hover,
.app-calendar-close:hover,
.app-calendar-day:hover,
.app-calendar-choice:hover,
.app-calendar-title button:hover {
    border-color: rgba(15, 118, 110, .28);
    background: #f0fdfa;
    color: var(--brand, #0f766e);
}

.app-calendar-weekdays,
.app-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.app-calendar-weekdays {
    margin-bottom: 6px;
}

.app-calendar-weekdays[hidden] {
    display: none;
}

.app-calendar-weekdays span {
    min-height: 28px;
    text-align: center;
}

.app-calendar-day {
    min-width: 0;
    min-height: 48px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 750;
}

.app-calendar-grid.is-months,
.app-calendar-grid.is-years {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.app-calendar-choice {
    min-width: 0;
    min-height: 62px;
    padding: 10px 8px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 800;
}

.app-calendar-day.is-muted {
    color: #8da09d;
    background: #f8fbfb;
}

.app-calendar-day.is-today {
    border-color: rgba(15, 118, 110, .42);
    color: var(--brand, #0f766e);
}

.app-calendar-day.is-selected,
.app-calendar-choice.is-selected {
    border-color: var(--brand, #0f766e);
    background: var(--brand, #0f766e);
    color: #fff;
    box-shadow: 0 10px 22px rgba(15, 118, 110, .18);
}

.app-calendar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 14px;
}

.app-calendar-actions button:last-child {
    background: var(--brand, #0f766e);
    border-color: var(--brand, #0f766e);
    color: #fff;
}

html[data-app-appearance="dark"] .app-date-display,
html[data-app-appearance="dark"] .reports-date-display,
html[data-app-appearance="dark"] .app-calendar-head strong {
    color: #e8f1ef;
}

html[data-app-appearance="dark"] .app-date-display,
html[data-app-appearance="dark"] .app-calendar-dialog {
    background: #111d1b;
    border-color: #2a3a37;
}

html[data-app-appearance="dark"] .app-calendar-dialog {
    box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
}

html[data-app-appearance="dark"] .app-calendar-close,
html[data-app-appearance="dark"] .app-calendar-nav button,
html[data-app-appearance="dark"] .app-calendar-actions button,
html[data-app-appearance="dark"] .app-calendar-day,
html[data-app-appearance="dark"] .app-calendar-choice {
    background: #162421;
    border-color: #2a3a37;
    color: #e8f1ef;
}

html[data-app-appearance="dark"] .app-calendar-nav button:hover,
html[data-app-appearance="dark"] .app-calendar-actions button:hover,
html[data-app-appearance="dark"] .app-calendar-close:hover,
html[data-app-appearance="dark"] .app-calendar-day:hover,
html[data-app-appearance="dark"] .app-calendar-choice:hover,
html[data-app-appearance="dark"] .app-calendar-title button:hover {
    background: #102823;
    border-color: #2d5b52;
    color: #d1fae5;
}

html[data-app-appearance="dark"] .app-calendar-day.is-muted {
    background: #101918;
    color: #7e918e;
}

html[data-app-appearance="dark"] .app-calendar-title button {
    color: #fff;
}

html[data-app-appearance="dark"] .app-calendar-day.is-selected,
html[data-app-appearance="dark"] .app-calendar-choice.is-selected,
html[data-app-appearance="dark"] .app-calendar-actions button:last-child {
    background: var(--brand, #0f766e);
    border-color: var(--brand, #0f766e);
    color: #fff;
}
