/* Shared styles for inner pages: kiddush + admin */
[hidden] { display: none !important; }
body.page { background: var(--background); }
.page-header { width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding: 22px 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid rgb(40 61 54 / 14%); }
.page-main { width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding: 40px 0 80px; }
.page-hero { max-width: 720px; margin-bottom: 34px; }
.page-hero h1 { margin: 0; font-size: clamp(40px, 6vw, 64px); font-weight: 900; line-height: 1; letter-spacing: -.03em; }
.page-hero p:last-child { margin: 14px 0 0; color: var(--muted-foreground); font-size: 18px; font-weight: 300; line-height: 1.6; }
.muted { color: var(--muted-foreground); font-weight: 300; }
.small { font-size: 14px; }
.btn-primary, .btn-ghost, .btn-danger, .btn-small { font: inherit; cursor: pointer; border-radius: 999px; transition: background .2s, transform .2s; }
.btn-primary { padding: 12px 22px; border: 0; background: var(--deep); color: #fffaf1; font-weight: 900; font-size: 15px; }
.btn-primary:hover { background: #1f362e; }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.btn-ghost { padding: 11px 20px; border: 1px solid rgb(40 61 54 / 25%); background: transparent; color: var(--foreground); font-weight: 500; font-size: 15px; }
.btn-danger { padding: 11px 20px; border: 0; background: #f3ddd2; color: #8a3a1e; font-weight: 500; font-size: 15px; }
.btn-small { padding: 6px 12px; border: 1px solid rgb(40 61 54 / 20%); background: #fffaf1; color: var(--deep); font-size: 13px; font-weight: 500; }
.btn-small:hover { background: #f1e6d4; }
.form-error { color: #8a3a1e; background: #f8e5dc; padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.form-hint { margin: 0; color: var(--muted-foreground); font-size: 13px; font-weight: 300; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; font-weight: 300; padding: 11px 14px; border: 1px solid #d8cbb9; border-radius: 12px; background: #fffaf1; color: var(--foreground); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--copper); outline-offset: 1px; }
textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* Kiddush */
.kiddush-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.kd-card { display: flex; flex-direction: column; gap: 14px; padding: 22px; border: 1px solid rgb(70 63 52 / 14%); border-radius: 24px; background: #fffaf1; box-shadow: 0 14px 40px rgb(80 59 40 / 6%); }
.kd-card.full { opacity: .72; }
.kd-card header time { color: var(--clay); font-size: 14px; font-weight: 900; direction: ltr; display: block; text-align: right; }
.kd-card h3 { margin: 4px 0 0; font-size: 22px; font-weight: 900; line-height: 1.2; }
.slots { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted-foreground); }
.slots span:last-child { margin-inline-start: 6px; }
.slot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--copper); }
.slot.taken { background: var(--copper); }
.fam { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.fam li { padding: 5px 12px; border-radius: 999px; background: #efe1ca; font-size: 14px; }
.kd-card .btn-primary { margin-top: auto; }
.kit-card { margin-top: 40px; padding: 30px; border-radius: 28px; background: var(--deep); color: #fffaf1; }
.kit-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.kit-head h2 { margin: 0; font-size: 30px; font-weight: 900; }
.kit-card .card-eyebrow { color: #efbd84; }
.kit-list { margin: 0; padding: 0 22px 0 0; display: grid; gap: 12px; font-size: 17px; font-weight: 300; line-height: 1.55; }
.kit-list li::marker { color: #efbd84; font-weight: 900; }
.kit-list a { color: #ffd39d; text-decoration: underline; direction: ltr; unicode-bidi: embed; }

dialog.signup-dialog, dialog.modal { width: min(520px, calc(100vw - 24px)); padding: 0; border: 0; border-radius: 24px; background: #fffaf1; color: var(--foreground); box-shadow: 0 30px 90px rgb(0 0 0 / 30%); }
dialog::backdrop { background: rgb(20 32 27 / 55%); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog form { display: grid; gap: 14px; padding: 26px; }
dialog h2 { margin: 0; font-size: 26px; font-weight: 900; }

/* Admin */
.admin-wrap { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; width: min(1320px, calc(100% - 32px)); margin: 0 auto; padding: 26px 0 70px; }
.admin-nav { position: sticky; top: 16px; align-self: start; display: grid; gap: 4px; padding: 12px; border-radius: 22px; background: var(--deep); }
.admin-nav button { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 0; border-radius: 14px; background: transparent; color: rgb(255 250 241 / 78%); font: inherit; font-size: 15px; text-align: right; cursor: pointer; }
.admin-nav button svg { width: 18px; flex: 0 0 auto; }
.admin-nav button:hover { background: rgb(255 255 255 / 8%); color: #fff; }
.admin-nav button.active { background: #ead2ae; color: var(--deep); font-weight: 900; }
.admin-nav .nav-sep { height: 1px; margin: 6px 8px; background: rgb(255 255 255 / 12%); }
.admin-panel h2.panel-title { margin: 0 0 4px; font-size: 36px; font-weight: 900; letter-spacing: -.02em; }
.panel-sub { margin: 0 0 22px; color: var(--muted-foreground); font-weight: 300; }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat { padding: 18px 20px; border-radius: 20px; background: #fffaf1; border: 1px solid rgb(70 63 52 / 12%); }
.stat small { display: block; color: var(--muted-foreground); font-size: 13px; }
.stat strong { display: block; margin-top: 4px; font-size: 34px; font-weight: 900; line-height: 1; color: var(--deep); }
.stat.alert strong { color: #a8462a; }
.box { padding: 20px 22px; border-radius: 22px; background: #fffaf1; border: 1px solid rgb(70 63 52 / 12%); margin-bottom: 16px; }
.box h3 { margin: 0 0 12px; font-size: 20px; font-weight: 900; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.months-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.month-card { display: flex; flex-direction: column; gap: 10px; min-height: 180px; padding: 18px; border-radius: 22px; background: #fffaf1; border: 1px solid rgb(70 63 52 / 12%); }
.month-card.now { border: 2px solid var(--copper); box-shadow: 0 10px 30px rgb(198 138 91 / 18%); }
.month-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.month-card h3 { margin: 0; font-size: 26px; font-weight: 900; }
.month-card header small { color: var(--muted-foreground); font-size: 12px; }
.month-card .actions { display: flex; gap: 6px; margin-top: auto; flex-wrap: wrap; }
.item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 12px; background: #f6eddf; cursor: pointer; font-size: 15px; border: 0; width: 100%; text-align: right; font-family: inherit; color: inherit; }
.item:hover { background: #efe2cd; }
.item.event { background: #e9efe6; }
.item.event:hover { background: #dde7d8; }
.item .meta { color: var(--muted-foreground); font-size: 12px; white-space: nowrap; }
.item.done { opacity: .55; text-decoration: line-through; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 900; white-space: nowrap; }
.chip.open { background: #efe1ca; color: #7c5a3a; }
.chip.in_progress { background: #fde3b8; color: #8a5a10; }
.chip.done { background: #d9e6d5; color: #2f5a3a; }
.chip.urgent { background: #f6d2c5; color: #8a2f14; }
.chip.low { background: #e7e5df; color: #66625a; }
.check { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--olive); display: grid; place-items: center; background: #fff; cursor: pointer; padding: 0; }
.check.on { background: var(--olive); color: #fff; }
.check svg { width: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: right; padding: 10px; color: var(--muted-foreground); font-weight: 500; font-size: 13px; border-bottom: 1px solid #e3d7c4; }
.table td { padding: 10px; border-bottom: 1px solid #efe5d6; vertical-align: middle; }
.table tr:hover td { background: #faf3e7; }
.table .num { direction: ltr; text-align: left; font-weight: 900; white-space: nowrap; }
.empty { padding: 14px; border-radius: 12px; background: #f6eddf; color: var(--muted-foreground); font-size: 14px; font-weight: 300; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-row button { padding: 7px 14px; border-radius: 999px; border: 1px solid rgb(40 61 54 / 18%); background: #fffaf1; font: inherit; font-size: 14px; cursor: pointer; }
.filter-row button.active { background: var(--deep); color: #fffaf1; border-color: var(--deep); }
.list-rows { display: grid; gap: 8px; }
.row-edit { display: grid; grid-template-columns: 110px 1fr auto; gap: 8px; align-items: center; }
.login-card { width: min(440px, calc(100% - 32px)); margin: 70px auto; padding: 34px; border-radius: 28px; background: #fffaf1; box-shadow: 0 30px 80px rgb(80 59 40 / 12%); display: grid; gap: 16px; }
.login-card h1 { margin: 0; font-size: 34px; font-weight: 900; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 50; padding: 12px 22px; border-radius: 999px; background: var(--deep); color: #fffaf1; font-size: 15px; box-shadow: 0 14px 40px rgb(0 0 0 / 25%); }
.user-pill { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted-foreground); }

@media (max-width: 960px) {
  .admin-wrap { grid-template-columns: 1fr; }
  .admin-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 8px; border-radius: 18px; }
  .admin-nav button { white-space: nowrap; padding: 9px 12px; }
  .admin-nav .nav-sep { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .months-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .months-grid { grid-template-columns: 1fr; }
  .table thead { display: none; }
  .table tr { display: grid; grid-template-columns: 1fr auto; padding: 8px 0; border-bottom: 1px solid #efe5d6; }
  .table td { border: 0; padding: 3px 6px; }
  .row-edit { grid-template-columns: 90px 1fr auto; }
  .kit-card { padding: 22px; }
}
