/* NGO's COACH TN - shared + public styles */
:root {
  --navy: #0f3d5e;
  --navy-2: #175a87;
  --navy-3: #0a2b43;
  --teal: #1c7f74;
  --gold: #d8942b;
  --gold-soft: #fdf3df;
  --ink: #1c2733;
  --muted: #5d6b79;
  --line: #dfe6ed;
  --bg: #f4f7fa;
  --card: #ffffff;
  --danger: #b93a2d;
  --warn: #a86b12;
  --ok: #1e7f4f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 61, 94, .06), 0 6px 22px rgba(15, 61, 94, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Tamil", "Nirmala UI", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] { }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 16px; min-height: 100vh; display: flex; flex-direction: column; }
img { max-width: 100%; height: auto; }
a { color: var(--navy-2); }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { line-height: 1.25; color: var(--navy); margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: 10px 16px; z-index: 300; }
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--muted); }
.req { color: var(--danger); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mb-2 { margin-bottom: 1rem; }
.flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.hidden { display: none !important; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 10px; border: 1.5px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; min-height: 44px; transition: background .15s, color .15s, border-color .15s, box-shadow .15s; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); color: #fff; }
.btn-gold { background: var(--gold); color: #2b1c00; }
.btn-gold:hover { background: #e6a23c; color: #2b1c00; box-shadow: 0 4px 14px rgba(216, 148, 43, .4); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy-2); }
.btn-ghost:hover { background: rgba(15, 61, 94, .08); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #9c2f24; color: #fff; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { background: #17663f; color: #fff; }
.btn-sm { padding: 7px 12px; min-height: 36px; font-size: .9rem; border-radius: 8px; }
.btn-lg { padding: 15px 28px; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* ---------- header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 8px rgba(15, 61, 94, .05); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); min-width: 0; }
.brand-mark { width: 46px; height: 46px; flex: none; }
.brand-logo { width: 46px; height: 46px; object-fit: contain; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-weight: 800; font-size: 1.15rem; line-height: 1.1; letter-spacing: .2px; }
.brand-tag { font-size: .72rem; color: var(--muted); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; align-items: center; }
.main-nav a.nav-link { display: block; padding: 10px 11px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .93rem; border-radius: 8px; white-space: nowrap; }
.main-nav a.nav-link:hover, .main-nav a.nav-link.active { background: rgba(15, 61, 94, .08); color: var(--navy); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1.5px solid var(--line); border-radius: 10px; width: 46px; height: 44px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 22px; height: 2.5px; background: var(--navy); border-radius: 2px; position: relative; content: ""; }
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }

.login-menu { position: relative; }
.login-menu > button { display: inline-flex; gap: 8px; align-items: center; padding: 9px 16px; background: var(--navy); color: #fff; border: none; border-radius: 10px; font: inherit; font-weight: 700; font-size: .93rem; cursor: pointer; min-height: 42px; }
.login-menu > button:hover { background: var(--navy-2); }
.login-menu .dropdown { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 210px; padding: 6px; display: none; z-index: 120; }
.login-menu.open .dropdown { display: block; }
.login-menu .dropdown a { display: flex; gap: 10px; align-items: center; padding: 11px 12px; text-decoration: none; color: var(--ink); border-radius: 8px; font-weight: 600; }
.login-menu .dropdown a:hover { background: var(--bg); }
.login-menu .dropdown small { display: block; font-weight: 400; color: var(--muted); }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { position: fixed; inset: 68px 0 auto 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0, 0, 0, .12); padding: 8px 12px 16px; display: none; max-height: calc(100dvh - 68px); overflow-y: auto; margin: 0; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a.nav-link { padding: 14px 12px; }
  .main-nav .login-menu { margin-top: 10px; }
  .main-nav .login-menu > button { width: 100%; justify-content: center; }
  .main-nav .login-menu .dropdown { position: static; box-shadow: none; margin-top: 6px; }
}

/* ---------- hero ---------- */
.hero { background: linear-gradient(135deg, var(--navy-3) 0%, var(--navy) 55%, #16597f 100%); color: #fff; padding: clamp(36px, 7vw, 76px) 0 clamp(60px, 9vw, 110px); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(216, 148, 43, .35), transparent 68%); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 32px; align-items: center; position: relative; z-index: 1; }
.hero h1 { color: #fff; margin-bottom: .4em; }
.hero p { color: #dbe7f1; font-size: 1.08rem; }
.hero .eyebrow { display: inline-block; background: rgba(255, 255, 255, .12); padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; margin-bottom: 14px; letter-spacing: .3px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.search-card { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 22px; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); }
.search-card h2 { font-size: 1.25rem; }
.search-card .form-control { margin-bottom: 12px; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- sections ---------- */
.section { padding: clamp(36px, 6vw, 64px) 0; }
.section.alt { background: #fff; border-block: 1px solid var(--line); }
.section-head { margin-bottom: 26px; }
.section-head p { color: var(--muted); max-width: 720px; margin: 0; }
.section-head.center { text-align: center; } .section-head.center p { margin-inline: auto; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .cards-3 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card.accent { border-top: 4px solid var(--gold); }
.card.accent-navy { border-top: 4px solid var(--navy); }
.card.accent-teal { border-top: 4px solid var(--teal); }
.prose { max-width: 75ch; }
.prose p:last-child { margin-bottom: 0; }
.cta-band { background: linear-gradient(120deg, var(--gold-soft), #fff); border: 1px solid #f1d9a8; border-radius: var(--radius); padding: clamp(22px, 4vw, 40px); display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cta-band h2 { margin-bottom: .2em; }
.cta-band p { margin: 0; color: var(--muted); }
.announce { background: var(--gold-soft); border-bottom: 1px solid #f1d9a8; font-size: .95rem; }
.announce .container { display: flex; gap: 12px; padding-block: 9px; align-items: center; flex-wrap: wrap; }
.announce strong { color: #7a4b00; }

/* ---------- 4-track showcase ---------- */
.network { background: linear-gradient(180deg, #fff, #f4f7fa); border-block: 1px solid var(--line); padding: clamp(30px, 5vw, 56px) 0; overflow: hidden; }
.tracks { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.track { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.track-rail { display: flex; width: max-content; gap: 0; padding: 6px 0; will-change: transform; animation: track-ltr var(--dur, 60s) linear infinite; }
.track[data-dir="rtl"] .track-rail { animation-name: track-rtl; }
.track:hover .track-rail, .track:focus-within .track-rail, .tracks.paused .track-rail { animation-play-state: paused; }
@keyframes track-ltr { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@keyframes track-rtl { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.logo-chip { flex: none; margin-right: 14px; width: 168px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 10px 10px; text-align: center; cursor: pointer; font: inherit; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 8px; transition: transform .18s, box-shadow .18s, border-color .18s; box-shadow: 0 1px 3px rgba(15, 61, 94, .05); }
.logo-chip:hover, .logo-chip:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--navy-2); }
.logo-img { width: 76px; height: 76px; object-fit: contain; border-radius: 12px; background: #f7f9fb; flex: none; }
.logo-fallback { width: 76px; height: 76px; border-radius: 12px; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.5rem; letter-spacing: 1px; }
.logo-name { font-size: .84rem; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.1em; }
.logo-chip.is-expired .logo-img, .logo-chip.is-expired .logo-fallback { filter: grayscale(1); opacity: .6; }
.logo-chip.is-expired { background: #f6f7f8; }
.chip-flag { font-size: .68rem; font-weight: 700; color: var(--warn); background: #fdf1de; border-radius: 999px; padding: 2px 8px; margin-top: -2px; }
.tracks-tools { display: flex; justify-content: flex-end; margin-bottom: 8px; }
@media (max-width: 600px) { .logo-chip { width: 132px; padding: 10px 8px; } .logo-img, .logo-fallback { width: 62px; height: 62px; } }
@media (prefers-reduced-motion: reduce) {
  .track { -webkit-mask-image: none; mask-image: none; overflow-x: auto; }
  .track-rail { animation: none !important; }
  .tracks-tools { display: none; }
}

/* ---------- badges ---------- */
.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: .78rem; font-weight: 700; line-height: 1.5; background: #e9eef3; color: #35485a; white-space: nowrap; }
.badge-active { background: #dff3e8; color: #17663f; }
.badge-lifetime { background: #e2ecfb; color: #17468f; }
.badge-expired { background: #fbe4e1; color: #9c2f24; }
.badge-renewal_pending { background: #fdf0d5; color: #8a5a06; }
.badge-suspended { background: #eee3f7; color: #5b2f86; }
.badge-cancelled { background: #e6e6e6; color: #444; }
.badge-pending { background: #e9eef3; color: #35485a; }
.badge-info { background: #e2ecfb; color: #17468f; }
.badge-ok { background: #dff3e8; color: #17663f; }
.badge-warn { background: #fdf0d5; color: #8a5a06; }
.badge-danger { background: #fbe4e1; color: #9c2f24; }

/* ---------- modal (NGO popup) ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(8, 25, 40, .62); z-index: 400; display: none; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(2px); }
.modal-backdrop.open { display: flex; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 640px; max-height: min(88dvh, 820px); display: flex; flex-direction: column; box-shadow: 0 24px 70px rgba(0, 0, 0, .35); animation: modal-in .22s ease-out; overflow: hidden; }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; gap: 14px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #f7fafc, #fff); }
.modal-head .logo-img, .modal-head .logo-fallback { width: 64px; height: 64px; }
.modal-title { flex: 1; min-width: 0; }
.modal-title h2 { font-size: 1.2rem; margin: 0 0 4px; overflow-wrap: anywhere; }
.modal-close { flex: none; width: 44px; height: 44px; border-radius: 50%; border: none; background: #eef2f6; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--navy); }
.modal-close:hover { background: #dde5ee; }
.modal-body { padding: 18px 20px 22px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal-body dl { margin: 0; display: grid; grid-template-columns: 150px 1fr; gap: 10px 14px; }
.modal-body dt { color: var(--muted); font-size: .88rem; font-weight: 600; }
.modal-body dd { margin: 0; overflow-wrap: anywhere; }
.modal-body h3 { font-size: .95rem; margin: 20px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--navy); }
.unit-item { padding: 9px 12px; background: var(--bg); border-radius: 10px; margin-bottom: 8px; font-size: .92rem; }
.notice-box { text-align: center; padding: 14px 6px 6px; }
.notice-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-size: 2rem; background: #fdf0d5; }
.notice-box.is-expired .notice-icon { background: #fbe4e1; }
.founder-row { display: flex; gap: 12px; align-items: center; }
.founder-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); }
@media (max-width: 600px) {
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { max-width: none; border-radius: 20px 20px 0 0; max-height: 92dvh; animation: sheet-in .25s ease-out; }
  @keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .modal-body dl { grid-template-columns: 1fr; gap: 2px; }
  .modal-body dt { margin-top: 10px; }
  .modal-head { padding: 14px; }
}

/* ---------- forms ---------- */
.form-row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px 16px; }
.form-group { margin-bottom: 14px; grid-column: span 12; min-width: 0; }
.col-1 { grid-column: span 1; } .col-2 { grid-column: span 2; } .col-3 { grid-column: span 3; } .col-4 { grid-column: span 4; } .col-5 { grid-column: span 5; } .col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; } .col-8 { grid-column: span 8; } .col-9 { grid-column: span 9; } .col-12 { grid-column: span 12; }
@media (max-width: 760px) { .form-group[class*="col-"] { grid-column: span 12; } }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 5px; color: #26364a; }
.form-control { width: 100%; padding: 11px 13px; border: 1.5px solid #c5d0db; border-radius: 10px; font: inherit; color: var(--ink); background: #fff; min-height: 46px; }
textarea.form-control { min-height: 96px; resize: vertical; }
.form-control:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(23, 90, 135, .18); }
.form-control:disabled, .form-control[readonly] { background: #f0f3f6; color: #55636f; }
.form-control.is-invalid { border-color: var(--danger); background: #fff8f7; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%230f3d5e' stroke-width='2' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.help { display: block; color: var(--muted); font-size: .82rem; margin-top: 4px; }
.field-error { color: var(--danger); font-size: .85rem; margin-top: 4px; font-weight: 600; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; }
label.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--navy); }
.lock-tag { font-size: .75rem; color: var(--warn); background: #fdf1de; padding: 1px 8px; border-radius: 999px; margin-left: 6px; font-weight: 700; }
.form-section { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow); }
.form-section > h2 { font-size: 1.2rem; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 2px solid var(--gold-soft); display: flex; align-items: center; gap: 10px; }
.part-tag { background: var(--navy); color: #fff; border-radius: 8px; font-size: .78rem; padding: 3px 10px; font-weight: 700; letter-spacing: .5px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.honeypot { position: absolute; left: -5000px; height: 0; overflow: hidden; }
.captcha-box { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.captcha-img { border: 1px solid var(--line); border-radius: 8px; background: #f4f7fa; }
.captcha-input { max-width: 260px; text-transform: uppercase; letter-spacing: 2px; }

/* repeatable rows */
.repeat-row { border: 1px dashed #b8c7d6; border-radius: 12px; padding: 14px 14px 4px; margin-bottom: 12px; background: #fafcfe; position: relative; }
.repeat-row .row-remove { position: absolute; right: 10px; top: 10px; }
.repeat-row .form-row { padding-right: 0; }

/* signature pad */
.sig-wrap { border: 2px dashed #a9bccd; border-radius: 12px; background: #fff; position: relative; touch-action: none; }
.sig-wrap canvas { display: block; width: 100%; height: 190px; border-radius: 10px; cursor: crosshair; touch-action: none; }
.sig-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #aab7c4; pointer-events: none; font-size: 1.05rem; }
.sig-wrap.has-ink .sig-hint { display: none; }
.sig-line { position: absolute; left: 16px; right: 16px; bottom: 44px; border-bottom: 1px solid #d5dee7; pointer-events: none; }

/* ---------- alerts ---------- */
.alert { padding: 13px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid; font-size: .96rem; }
.alert-success { background: #e8f6ee; border-color: #b9e0c9; color: #17663f; }
.alert-danger { background: #fdecea; border-color: #f2c1bb; color: #8f2a20; }
.alert-warning { background: #fdf3df; border-color: #f1d9a8; color: #7a4b00; }
.alert-info { background: #e8f0fa; border-color: #bcd2ee; color: #17468f; }
.flash-wrap { padding-top: 14px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; background: #eef3f8; color: var(--navy); font-weight: 700; padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid #eef2f6; vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #f8fbfd; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .nowrap { white-space: nowrap; }
.empty { padding: 34px 16px; text-align: center; color: var(--muted); }

/* ---------- filter bar ---------- */
.filter-bar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 18px; box-shadow: var(--shadow); }
.filter-bar .form-row { align-items: end; }
.filter-bar .form-group { margin-bottom: 0; }
.filter-bar .form-control { min-height: 42px; padding: 8px 11px; }
.filter-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.filter-grid .form-group { margin: 0; }

/* ---------- directory ---------- */
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.dir-card { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; transition: box-shadow .15s, border-color .15s; }
.dir-card:hover, .dir-card:focus-visible { box-shadow: var(--shadow); border-color: var(--navy-2); }
.dir-card .logo-img, .dir-card .logo-fallback { width: 64px; height: 64px; }
.dir-card.is-expired .logo-img, .dir-card.is-expired .logo-fallback { filter: grayscale(1); opacity: .6; }
.dir-info { min-width: 0; flex: 1; }
.dir-name { font-weight: 700; color: var(--navy); overflow-wrap: anywhere; line-height: 1.3; margin-bottom: 3px; }
.dir-meta { font-size: .86rem; color: var(--muted); line-height: 1.45; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 22px; justify-content: center; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; background: #fff; min-width: 40px; text-align: center; }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }
.export-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.result-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

/* ---------- home widgets ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.list-cards { display: flex; flex-direction: column; gap: 12px; }
.event-item { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-decoration: none; color: inherit; align-items: center; }
.event-item:hover { border-color: var(--navy-2); box-shadow: var(--shadow); }
.date-tile { flex: none; width: 60px; text-align: center; background: var(--navy); color: #fff; border-radius: 10px; padding: 6px 0; line-height: 1.15; }
.date-tile .d { display: block; font-size: 1.5rem; font-weight: 800; }
.date-tile .m { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; }
.date-tile.gold { background: var(--gold); color: #2b1c00; }
.event-title { font-weight: 700; color: var(--navy); }
.event-meta { font-size: .86rem; color: var(--muted); }

/* ---------- gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.gallery-item { position: relative; border: none; padding: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: #dfe6ed; aspect-ratio: 4 / 3; display: block; width: 100%; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .68)); color: #fff; font-size: .88rem; font-weight: 600; text-align: left; }
.lightbox { position: fixed; inset: 0; background: rgba(5, 15, 25, .93); z-index: 500; display: none; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 72dvh; object-fit: contain; border-radius: 8px; }
.lightbox-cap { color: #fff; max-width: 780px; text-align: center; margin-top: 14px; }
.lightbox-cap h3 { color: #fff; margin: 0 0 4px; }
.lightbox-cap p { color: #cdd8e3; margin: 0; font-size: .95rem; }
.lightbox-cap a { color: var(--gold); }
.lb-btn { position: absolute; background: rgba(255, 255, 255, .14); border: none; color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; }
.lb-btn:hover { background: rgba(255, 255, 255, .28); }
.lb-close { top: 14px; right: 14px; } .lb-prev { left: 12px; top: 50%; } .lb-next { right: 12px; top: 50%; }

/* ---------- calendar ---------- */
.cal-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: 14px; }
.cal-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cal-title { font-size: 1.3rem; font-weight: 800; color: var(--navy); min-width: 190px; text-align: center; }
.seg { display: inline-flex; border: 1.5px solid var(--navy); border-radius: 10px; overflow: hidden; }
.seg a { padding: 8px 14px; text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--navy); background: #fff; }
.seg a.active { background: var(--navy); color: #fff; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.cal-dow { background: var(--navy); color: #fff; text-align: center; padding: 8px 2px; font-size: .8rem; font-weight: 700; }
.cal-cell { min-height: 108px; border-right: 1px solid #edf1f5; border-bottom: 1px solid #edf1f5; padding: 4px; position: relative; overflow: hidden; }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell.other { background: #f7f9fb; }
.cal-cell.today { background: #fff8e8; box-shadow: inset 0 0 0 2px var(--gold); }
.cal-day { font-weight: 700; font-size: .85rem; color: var(--muted); display: block; margin-bottom: 2px; }
.cal-item { display: block; font-size: .72rem; line-height: 1.25; padding: 2px 5px; border-radius: 4px; margin-bottom: 2px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: #e2ecfb; color: #17468f; }
.cal-item.birthday { background: #fde8f0; color: #98164f; }
.cal-item.wedding_anniversary { background: #f1e6fa; color: #5b2f86; }
.cal-item.ngo_anniversary { background: #dff3e8; color: #17663f; }
.cal-item.other { background: #fdf0d5; color: #7a4b00; }
.cal-item.ev-upcoming { background: #e2ecfb; color: #17468f; }
.cal-item.ev-ongoing { background: #dff3e8; color: #17663f; }
.cal-item.ev-completed { background: #e9eef3; color: #4a5a69; }
.cal-more { font-size: .72rem; color: var(--muted); }
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.mini-month { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.mini-month h4 { margin: 0 0 6px; font-size: .95rem; text-align: center; }
.mini-month h4 a { text-decoration: none; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: .78rem; }
.mini-grid .dow { color: var(--muted); font-weight: 700; }
.mini-grid .d { padding: 4px 0; border-radius: 6px; position: relative; }
.mini-grid .d.has { background: var(--gold-soft); font-weight: 800; color: #7a4b00; cursor: help; }
.mini-grid .d.today { outline: 2px solid var(--navy); }
.agenda-day { margin-bottom: 18px; }
.agenda-day h3 { font-size: 1rem; padding: 8px 12px; background: #eef3f8; border-radius: 8px; margin-bottom: 8px; }
.agenda-row { display: flex; gap: 12px; padding: 8px 12px; border-bottom: 1px solid #eef2f6; align-items: flex-start; flex-wrap: wrap; }
.agenda-row .what { flex: 1; min-width: 200px; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: .8rem; margin-bottom: 12px; }
.legend span { padding: 2px 10px; border-radius: 999px; }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.week-col { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-height: 160px; }
.week-col h4 { font-size: .85rem; margin: 0 0 6px; text-align: center; }
.week-col.today { border-color: var(--gold); background: #fffaf0; }
@media (max-width: 760px) {
  .cal-cell { min-height: 64px; padding: 2px; }
  .cal-item { font-size: 0; height: 7px; padding: 0; border-radius: 4px; margin-bottom: 3px; }
  .cal-title { min-width: 0; flex: 1 1 100%; order: -1; }
  .week-grid { grid-template-columns: 1fr; }
  .month-agenda-hint { display: block !important; }
}
.month-agenda-hint { display: none; margin-top: 8px; font-size: .85rem; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-3); color: #c9d6e2; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; padding: 40px 0 28px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 10px; }
.site-footer a { color: #e2ecf5; text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 16px 0; font-size: .87rem; color: #9fb2c4; }
.footer-bottom p { margin: 0; }
.social { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.social a { border: 1px solid rgba(255, 255, 255, .25); padding: 4px 12px; border-radius: 999px; font-size: .85rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- page header ---------- */
.page-head { background: linear-gradient(135deg, var(--navy-3), var(--navy)); color: #fff; padding: 32px 0; }
.page-head h1 { color: #fff; margin: 0 0 6px; }
.page-head p { color: #cfdeeb; margin: 0; }
.page-body { padding: 28px 0 56px; }

/* auth card */
.auth-wrap { max-width: 460px; margin: 40px auto; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 30px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.6rem; }
.auth-links { margin-top: 16px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .92rem; }
.pin-input { letter-spacing: 8px; font-size: 1.4rem; text-align: center; }

.token-box { background: var(--gold-soft); border: 2px dashed var(--gold); border-radius: 14px; padding: 18px; text-align: center; margin: 18px 0; }
.token-box .tok { font-size: clamp(1.4rem, 5vw, 2rem); font-weight: 800; color: var(--navy); letter-spacing: 1px; word-break: break-all; }
.info-list { display: grid; grid-template-columns: 200px 1fr; gap: 8px 16px; margin: 0; }
.info-list dt { color: var(--muted); font-weight: 600; font-size: .9rem; }
.info-list dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .info-list { grid-template-columns: 1fr; gap: 0; } .info-list dt { margin-top: 10px; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.kpi .n { font-size: 1.9rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.kpi .l { color: var(--muted); font-size: .86rem; font-weight: 600; }
.kpi a { text-decoration: none; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin-bottom: 20px; }
.tabs a { padding: 10px 16px; text-decoration: none; color: var(--muted); font-weight: 700; border-radius: 8px 8px 0 0; font-size: .93rem; margin-bottom: -2px; border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--navy); border-bottom-color: var(--gold); background: #fff; }
.tabs a:hover { color: var(--navy); }
@media print { .site-header, .site-footer, .btn, .no-print { display: none !important; } body { background: #fff; } }
