/* Keep the native ISO fields for existing forms, never expose their locale UI. */
input.cn-date-source { display: none !important; }
.cn-date-field { display: block; position: relative; width: 100%; min-width: 0; }
.cn-date-field .cn-date-display { width: 100%; min-width: 0; padding-right: 43px; font-variant-numeric: tabular-nums; }
.cn-date-display::placeholder { color: #8491a4; opacity: 1; }
.cn-date-field .cn-date-toggle { position: absolute; top: 1px; right: 1px; bottom: auto; height: 38px; width: 39px; min-width: 0; padding: 0; border: 0; background: transparent; color: #5d7190; display: grid; place-items: center; border-radius: 6px; }
.cn-date-field .cn-date-toggle:hover { background: #edf3ff; color: #2454a8; }
.cn-date-field .cn-date-toggle:disabled { cursor: default; opacity: .45; }
.cn-date-field .cn-date-display:disabled { background: #f3f5f8; color: #8491a4; cursor: default; }
.cn-date-invalid .cn-date-display { border-color: #bf514d; }
.cn-date-error { display: block; color: #b44e44; font-size: 12px; line-height: 1.5; white-space: normal; }
.cn-date-error:empty { display: none; }
dialog.cn-date-calendar { position: fixed; inset: auto; margin: 0; box-sizing: border-box; width: 320px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow: auto; padding: 14px; border: 1px solid #d9e3f1; border-radius: 12px; color: #233b5d; background: #fff; box-shadow: 0 12px 40px #16375a26; font-family: inherit; font-size: 13px; }
dialog.cn-date-calendar::backdrop { background: #18314c08; }
.cn-date-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cn-date-heading strong { font-size: 13px; line-height: 1.5; }
.cn-date-calendar button { cursor: pointer; font: inherit; color: inherit; border-radius: 6px; box-shadow: none; letter-spacing: 0; }
.cn-date-calendar button:disabled { cursor: default; opacity: .35; }
.cn-date-calendar .cn-date-close { flex: 0 0 26px; width: 26px; height: 26px; padding: 0; border: 0; font-size: 21px; background: transparent; }
.cn-date-navigation { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.cn-date-navigation select { min-width: 0; margin: 0; padding: 6px 3px; height: 34px; border: 1px solid #dce5f0; border-radius: 6px; color: #233b5d; background: #fff; font: inherit; }
.cn-date-year { flex: 1.4; }
.cn-date-month { flex: 1; }
.cn-date-navigation button { flex: 0 0 30px; width: 30px; height: 34px; padding: 0; border: 0; background: #f2f6fc; font-size: 21px; }
.cn-date-week { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 2px; }
.cn-date-week [role="columnheader"] { padding: 4px 0 9px; text-align: center; color: #7d8ba0; font-size: 12px; }
.cn-date-week button { min-width: 0; height: 34px; margin: 0; padding: 0; border: 1px solid transparent; background: transparent; font-size: 13px; }
.cn-date-week button:hover:not(:disabled) { background: #edf3ff; color: #2454a8; }
.cn-date-week .cn-date-outside { color: #a6b2c2; }
.cn-date-week [aria-current="date"] { border-color: #b7ccef; }
.cn-date-week [aria-selected="true"], .cn-date-week [aria-selected="true"]:hover:not(:disabled) { background: #3469c9; border-color: #3469c9; color: #fff; }
.cn-date-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid #edf1f7; }
.cn-date-actions button { min-height: 32px; margin: 0; padding: 5px 12px; border: 0; background: #edf3ff; color: #2454a8; font-size: 12px; }
@media(max-width:600px) { .cn-date-field .cn-date-display { font-size: 16px; } }
