:root {
  color-scheme: light;
  --background: #f7f7f1;
  --paper: #fffef9;
  --ink: #202d27;
  --muted: #56665b;
  --pine: #006580;
  --pine-light: #255343;
  --border: #dfe4d9;
  --sage: #e7eee2;
  --sand: #f5ecd8;
  --focus: #926f37;
  --radius: 18px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--background);
  color: var(--ink);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; }
button, input, textarea, select { font: inherit; }
a { color: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 10; background: var(--paper); padding: 10px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 244px; background: var(--pine); color: #edf3e9; display: flex; flex-direction: column; padding: 36px 20px 26px; }
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; font-size: 21px; font-weight: 680; line-height: 1.12; letter-spacing: -.045em; padding: 0 4px 0 8px; }
.brand-icon { flex: 0 0 44px; height: 44px; border-radius: 13px; background: #31574b; color: #f1d59b; display: grid; place-items: center; }
.brand-icon svg { width: 26px; height: 26px; }
#navigation { display: flex; flex-direction: column; gap: 7px; margin-top: 40px; }
#navigation a { display: flex; align-items: center; gap: 12px; padding: 13px 12px; min-height: 48px; border-radius: 9px; text-decoration: none; color: #d1e1d8; font-size: 14px; font-weight: 600; }
#navigation a:hover, #navigation a[aria-current='page'] { background: #2a5044; color: #fffdf3; }
#navigation a[aria-current='page'] svg { color: #f1d59b; }
.sidebar-footer { margin-top: auto; border-top: 1px solid #466257; padding: 15px 2px 0; }
#install, #language, #admin-login { background: none; color: #f8f5e9; border: 0; min-height: 44px; border-radius: 8px; display: flex; align-items: center; gap: 9px; padding: 6px 7px; font-size: 13px; font-weight: 630; text-align: left; text-decoration: none; }
#install:hover, #language:hover, #admin-login:hover { background: #2a5044; }
#role-label { padding: 8px 8px 0; color: #b6cabd; font-size: 12px; }
.sidebar-contact { display: flex; align-items: center; gap: 9px; min-height: 44px; margin-top: 10px; padding: 6px 8px; border: 1px solid #466257; border-radius: 8px; color: #f8f5e9; font-size: .8rem; font-weight: 630; text-decoration: none; }
.sidebar-contact:hover { background: #2a5044; }
.sidebar-contact svg { flex: 0 0 21px; color: #9ce2b6; }
.contact-number { display: block; white-space: nowrap; }
main { max-width: 1456px; margin-left: 244px; padding: 42px clamp(28px, 4.5vw, 76px) 70px; outline: none; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 0 29px; }
.unit { color: #476855; font-size: 12px; font-weight: 750; letter-spacing: .095em; text-transform: uppercase; margin: 0 0 8px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.25rem, 4.6vw, 3.6rem); font-weight: 720; line-height: 1.025; letter-spacing: -.064em; }
h2 { font-size: 1.18rem; font-weight: 710; line-height: 1.2; letter-spacing: -.028em; }
h3 { font-size: 1.04rem; font-weight: 720; line-height: 1.25; letter-spacing: -.018em; }
.page-description { color: var(--muted); margin-top: 13px; max-width: 55ch; line-height: 1.5; font-size: .95rem; }
.visitor-scripture { margin: 0 0 16px; padding: 14px clamp(14px, 3vw, 22px); border-inline-start: 3px solid var(--focus); border-radius: 9px; background: var(--sand); }
.visitor-scripture blockquote { margin: 0; max-width: 74ch; font-size: .9rem; line-height: 1.55; }
.visitor-scripture figcaption { margin-top: 6px; font-size: .8rem; font-weight: 700; color: #634d28; }
.page-actions, .file-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.page-actions { justify-content: flex-end; }
.btn { min-height: 43px; padding: 8px 13px; border-radius: 8px; border: 1px solid transparent; display: inline-flex; justify-content: center; align-items: center; text-align: center; gap: 7px; font-size: .85rem; font-weight: 680; text-decoration: none; line-height: 1.25; }
.btn svg { width: 17px; height: 17px; flex: 0 0 17px; }
.primary { background: var(--pine); color: #fffdf5; }
.primary:hover { background: #285044; }
.secondary { background: var(--paper); border-color: #cbd8ca; color: #264e3c; }
.secondary:hover, .ghost:hover { background: var(--sage); }
.ghost { color: #345743; background: transparent; }
.danger { color: #85392d; background: #fcf0ea; }
.danger:hover { background: #f9e1d8; }
.overview { background: var(--sage); border: 1px solid #dbe7d8; padding: 20px 21px 22px; border-radius: var(--radius); margin-bottom: 21px; }
.overview-top { display: flex; align-items: center; justify-content: space-between; gap: 13px; }
.week-control { display: flex; align-items: center; gap: 5px; border-radius: 10px; background: #f9fbf4; border: 1px solid #dbe6d9; color: #234638; padding: 3px; }
.week-control span { text-align: center; padding: 0 6px; min-width: 136px; }
.week-control strong { display: block; font-weight: 730; font-size: .8rem; }
.week-control small { display: block; color: var(--muted); margin-top: 2px; font-size: .67rem; }
.icon-button, .week-jump { background: transparent; color: #365948; border: 0; border-radius: 6px; display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; }
.icon-button:hover, .week-jump:hover { background: #e5eddf; }
.week-jump { position: relative; overflow: hidden; margin-left: 3px; border-left: 1px solid #e1e6db; border-radius: 0 6px 6px 0; cursor: pointer; }
.week-jump input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.week-jump input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.week-jump:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.stats { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { min-width: 0; padding: 17px; border: 1px solid #dce6d9; border-radius: 13px; background: #fbfcf7; display: grid; grid-template-columns: 41px 1fr; align-items: center; gap: 4px 12px; }
.stat-icon { border-radius: 10px; aspect-ratio: 1; display: grid; place-items: center; grid-row: 1 / 3; color: #315a44; }
.sage { background: #e8efe4; }
.sand { background: var(--sand); color: #785d2d; }
.stat strong { font-size: 1.6rem; font-weight: 720; line-height: 1; letter-spacing: -.04em; }
.stat > span:last-child { color: var(--muted); font-size: .78rem; line-height: 1.25; }
.panel { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 18px; }
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 20px 21px 16px; border-bottom: 1px solid var(--border); }
.panel-header p { color: var(--muted); font-size: .84rem; line-height: 1.45; margin-top: 5px; }
.poster-empty { padding: 16px 20px 20px; }
.poster-preview { padding: 18px 20px 20px; }
.poster-thumbnail { display: grid; place-items: center; width: min(100%, 260px); aspect-ratio: 1; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--sage); cursor: zoom-in; }
.poster-thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.poster-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.poster-viewer { width: min(800px, calc(100vw - 24px)); }
.poster-large { display: grid; place-items: center; background: var(--sage); border-radius: 8px; overflow: hidden; cursor: zoom-in; }
.poster-large img { display: block; max-width: 100%; max-height: min(64dvh, 660px); object-fit: contain; }
#poster-copy-fallback, #poster-feedback { margin-top: 9px; }
.text-link { text-decoration: none; color: #31573e; font-size: .83rem; font-weight: 690; display: flex; gap: 4px; align-items: center; }
.text-link:hover { text-decoration: underline; }
.text-link svg { width: 16px; height: 16px; }
.empty { text-align: center; padding: 33px 15px 39px; display: flex; flex-direction: column; align-items: center; }
.empty-icon { width: 54px; height: 54px; margin-bottom: 13px; border-radius: 16px; background: var(--sage); color: #3d644e; display: grid; place-items: center; }
.empty-icon svg { width: 27px; height: 27px; }
.empty p { max-width: 43ch; color: var(--muted); font-size: .87rem; line-height: 1.48; margin-top: 6px; }
.empty .btn { margin-top: 15px; }
.directory-list, .visit-list { margin: 0; list-style: none; padding: 0 21px; }
.directory-list li, .visit-card { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); padding: 12px 0; }
.directory-list li:last-child, .visit-card:last-child { border-bottom: 0; }
.avatar { width: 39px; height: 39px; flex: 0 0 39px; background: var(--sage); color: #3b624b; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 730; }
.avatar svg { width: 18px; height: 18px; }
.row-main { margin-right: auto; min-width: 0; overflow-wrap: anywhere; }
.row-main strong { display: block; font-size: .92rem; font-weight: 690; }
.row-main small { display: block; color: var(--muted); font-size: .77rem; line-height: 1.35; margin-top: 3px; }
.pill { flex: 0 0 auto; display: inline-block; border-radius: 24px; padding: 6px 9px; font-size: .7rem; font-weight: 700; }
.done, .badge { background: #e6efe4; color: #356146; }
.waiting { background: var(--sand); color: #6a5023; }
.neutral { background: #eaeeeb; color: #4a6254; }
.filters { display: flex; gap: 8px; }
.search { display: flex; flex-direction: row; min-height: 43px; align-items: center; gap: 8px; color: var(--muted); padding: 0 10px; background: #fbfcf7; border: 1px solid #d5dfd2; border-radius: 8px; }
.search svg { width: 18px; height: 18px; flex: 0 0 18px; }
.search input { width: 100%; min-width: 0; padding: 8px 1px; border: 0; background: transparent; outline: 0; color: var(--ink); font-size: .83rem; }
.search:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.filter-select select { min-height: 43px; padding: 8px 6px; }
select, textarea, input:not([type='checkbox']):not([type='search']) { border: 1px solid #cbd8ca; border-radius: 8px; background: #fbfcf7; color: var(--ink); }
label small, .muted { color: var(--muted); font-size: .78rem; line-height: 1.4; font-weight: 480; }
dialog { width: min(620px, calc(100vw - 24px)); border: 1px solid #d8e0d5; border-radius: 17px; background: var(--paper); color: var(--ink); padding: 0; max-height: min(90dvh, 900px); box-shadow: 0 25px 70px #00658036; }
dialog::backdrop { background: #152c2590; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 18px 20px 15px; border-bottom: 1px solid var(--border); }
.dialog-head h2 { font-size: 1.33rem; overflow-wrap: anywhere; }
.dialog-head p { font-size: .87rem; line-height: 1.45; color: var(--muted); margin-top: 7px; overflow-wrap: anywhere; }
.dialog-head .icon-button { margin: -3px -5px 0 0; }
.dialog-body { padding: 17px 20px 20px; }
form { display: grid; gap: 13px; }
form label { display: grid; gap: 6px; font-size: .85rem; font-weight: 670; min-width: 0; }
form .search { display: flex; }
form input:not([type='checkbox']):not([type='search']), form textarea, form select { width: 100%; min-height: 43px; padding: 8px 10px; font-size: .9rem; }
form textarea { resize: vertical; }
.check-label { display: flex; align-items: center; gap: 9px; min-height: 37px; line-height: 1.35; }
.check-label input { height: 17px; width: 17px; margin: 0; flex: 0 0 auto; accent-color: #285044; }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-buttons { display: flex; justify-content: end; align-items: center; flex-wrap: wrap; gap: 7px; border-top: 1px solid var(--border); padding-top: 13px; margin-top: 3px; }
.form-buttons .danger { margin-right: auto; }
.form-error { color: #873a2b; background: #fcede6; margin-top: 12px; padding: 10px; border-radius: 8px; line-height: 1.4; font-size: .87rem; }
fieldset { margin: 0; min-width: 0; padding: 6px 10px 8px; border: 1px solid var(--border); border-radius: 8px; }
legend { font-weight: 680; color: #335744; font-size: .82rem; padding: 0 6px; }
.target-list { max-height: 225px; overflow: auto; }
.target-option { border-radius: 7px; padding: 5px 6px; }
.target-option:hover { background: var(--sage); }
.target-option:has(input:disabled) { color: var(--muted); }
.target-option small { display: block; }
.target-list .muted { padding: 10px 5px; }
.file-actions { border-bottom: 1px solid var(--border); padding-bottom: 13px; margin-bottom: 14px; }
.language-options, .report-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.report-record { flex-wrap: wrap; }
.report-record .report-actions { flex-basis: 100%; }
#print-report { display: none; }
.visit-contact { margin-bottom: 12px; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
.visit-contact svg { flex-shrink: 0; }
.install-options { display: grid; gap: 12px; }
.install-options section { display: grid; gap: 9px; justify-items: start; padding: 13px; border: 1px solid var(--border); border-radius: 10px; }
.install-options p { color: var(--muted); line-height: 1.5; font-size: .9rem; }
.toast { z-index: 5; position: fixed; right: 18px; bottom: 18px; max-width: min(420px, calc(100% - 36px)); background: #21453a; color: #fffdf4; padding: 12px 15px; border-radius: 9px; box-shadow: 0 10px 28px #16362e38; font-size: .88rem; }
.loading-message { color: var(--muted); padding: 30px 0; }
@media (max-width: 1040px) {
  .sidebar { width: 210px; padding-inline: 15px; }
  main { margin-left: 210px; padding-inline: 27px; }
  .stat { padding: 12px; }
  .page-head { align-items: start; flex-direction: column; }
  .page-head .page-actions { justify-content: start; }
}
@media (max-width: 720px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .sidebar { position: static; width: auto; flex-flow: row wrap; align-items: center; justify-content: space-between; padding: 12px 15px; gap: 10px; }
  .brand { font-size: 16px; gap: 9px; padding: 0; }
  .brand-icon { flex-basis: 34px; height: 34px; border-radius: 9px; }
  .brand-icon svg { width: 20px; height: 20px; }
  #navigation { position: fixed; z-index: 3; inset: auto 0 0; display: flex; flex-direction: row; justify-content: space-around; gap: 3px; margin: 0; padding: 5px 6px calc(5px + env(safe-area-inset-bottom)); background: #fffef9; border-top: 1px solid #d5dfd2; color: var(--pine); }
  #navigation a { min-width: 0; flex: 1 1 0; color: #4a6558; padding: 4px 1px; gap: 4px; min-height: 50px; flex-direction: column; justify-content: center; font-weight: 650; font-size: .69rem; }
  #navigation a:hover, #navigation a[aria-current='page'] { background: var(--sage); color: #1f4937; }
  #navigation a[aria-current='page'] svg { color: #25553e; }
  .sidebar-footer { margin-top: 0; padding: 0; border: 0; display: flex; align-items: center; gap: 4px; }
  .sidebar-contact { flex: 1 0 100%; justify-content: center; margin-top: 0; }
  .contact-number { display: inline; margin-inline-start: 4px; }
  #role-label { display: none; }
  #install, #language, #admin-login { font-size: .74rem; gap: 5px; padding: 4px 5px; }
  #install svg, #language svg, #admin-login svg { width: 16px; height: 16px; }
  main { margin-left: 0; padding: 24px 14px 22px; }
  .page-head { gap: 15px; margin-bottom: 18px; }
  .page-description { margin-top: 9px; font-size: .87rem; }
  .overview { padding: 12px 11px; margin-bottom: 15px; }
  .overview-top { align-items: start; flex-direction: column; gap: 9px; }
  .week-control { width: 100%; justify-content: space-between; }
  .week-control span { flex: 1; }
  .stats { gap: 6px; margin-top: 10px; }
  .stat { padding: 8px; display: flex; flex-direction: column; align-items: start; gap: 5px; border-radius: 9px; }
  .stat-icon { width: 28px; border-radius: 7px; }
  .stat-icon svg { width: 16px; height: 16px; }
  .stat strong { font-size: 1.26rem; }
  .stat > span:last-child { font-size: .67rem; }
  .panel-header { padding: 13px 12px 11px; flex-wrap: wrap; gap: 9px; }
  .panel-header .page-actions { justify-content: start; }
  .panel-header > .search, .filters { width: 100%; }
  .filters .search { flex: 1; }
  .directory-list, .visit-list { padding-inline: 11px; }
  .directory-list li, .visit-card { gap: 6px; padding-block: 9px; flex-wrap: wrap; }
  .avatar { width: 32px; height: 32px; flex-basis: 32px; }
  .row-main { flex: 1 1 105px; }
  .row-main strong { font-size: .85rem; }
  .pill { padding: 5px 6px; font-size: .63rem; }
  .visit-card .ghost, .directory-list .ghost { padding: 6px; gap: 2px; }
  .visit-card .ghost svg, .directory-list .ghost svg { width: 14px; flex-basis: 14px; }
  .dialog-head, .dialog-body { padding-inline: 14px; }
  .toast { bottom: calc(68px + env(safe-area-inset-bottom)); }
  form input:not([type='checkbox']):not([type='search']), form textarea, form select, .search input { font-size: 16px; }
}
@media (max-width: 385px) {
  #install, #admin-login { min-width: 36px; justify-content: center; }
  #install span, #admin-login span { display: none; }
}
@media print {
  @page { margin: 16mm; }
  body.printing-report { padding: 0; background: white; color: #172822; }
  body.printing-report > :not(#print-report), body.printing-report dialog::backdrop { display: none !important; }
  body.printing-report #print-report { display: block; }
  #print-report header { border-bottom: 1px solid #bccbc1; padding-bottom: 3mm; margin-bottom: 5mm; }
  #print-report header p { font-size: 10pt; }
  #print-report h1 { font-size: 22pt; margin: 1mm 0; }
  #print-report dl { margin: 0; font-size: 10pt; line-height: 1.4; }
  #print-report dl > div { margin-bottom: 3mm; break-inside: avoid; }
  #print-report dt { font-weight: 700; }
  #print-report dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
}
@media (max-width: 360px) {
  .form-columns { grid-template-columns: 1fr; }
  .stats { gap: 4px; }
  .stat { padding: 6px; }
}

.hostinger-admin { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.hostinger-admin-card { width: min(100%, 420px); padding: 28px; }
.hostinger-admin-card h1 { margin: 8px 0 20px; }
.hostinger-admin-card form { display: grid; gap: 12px; margin-bottom: 16px; }
.hostinger-admin-card input[type=password] { width: 100%; font: inherit; border: 1px solid #c5cbd4; border-radius: 8px; padding: 10px; }
