:root {
  --bg: #f5f1ea;
  --bg-deep: #e9dfd1;
  --panel: #fffdf8;
  --panel-soft: #fbf6ee;
  --ink: #25222d;
  --muted: #766f7b;
  --line: #e4d9ca;
  --green: #2f6f73;
  --green-soft: #e1efeb;
  --blue: #315f88;
  --blue-soft: #e6eef5;
  --coral: #d96a55;
  --gold: #d5a243;
  --danger: #a34135;
  --danger-soft: #f4dfdc;
  --shadow: 0 10px 24px rgba(54, 43, 32, 0.08);
  --shadow-soft: 0 4px 14px rgba(54, 43, 32, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(217, 106, 85, 0.12), transparent 30%),
    radial-gradient(circle at 92% 8%, rgba(49, 95, 136, 0.1), transparent 28%),
    var(--bg);
  color: var(--ink);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.phone {
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.88), rgba(245, 241, 234, 0.96) 180px),
    var(--bg);
  display: flex;
  flex-direction: column;
}

.auth {
  min-height: 100vh;
  width: min(100%, 460px);
  margin: 0 auto;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.9), rgba(245, 241, 234, 0.96)),
    var(--bg);
}

.brand-lockup {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 24px;
  text-align: center;
}

.brand-lockup img {
  width: min(88vw, 390px);
  height: auto;
  object-fit: contain;
  border-radius: 26px;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 18px 30px rgba(49, 38, 26, 0.1));
}

.beta-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  padding: 6px 12px;
  border: 1px solid rgba(47, 111, 115, 0.28);
  border-radius: 999px;
  background: rgba(232, 247, 244, 0.86);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth h1,
.header h1 {
  margin: 0;
  letter-spacing: 0;
}

.header h1 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  line-height: 1.15;
}

.user-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
}

.session-email {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.auth p {
  color: var(--muted);
  line-height: 1.45;
}

.backend-status {
  display: grid;
  gap: 4px;
  margin: 0 0 16px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.86);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.backend-status strong {
  color: var(--ink);
  font-size: 13px;
}

.backend-status.online {
  border-color: rgba(47, 111, 115, 0.36);
  background: var(--green-soft);
}

.backend-status.error {
  border-color: rgba(163, 65, 53, 0.34);
  background: var(--danger-soft);
}

.segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #ebe2d4;
  padding: 4px;
  border-radius: 12px;
  margin: 10px 0 18px;
}

.segment button {
  border: 0;
  border-radius: 9px;
  padding: 11px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segment button.active {
  background: var(--panel);
  color: var(--ink);
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 13px;
}

.field label {
  font-weight: 800;
  color: #4d4741;
  font-size: 13px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid #e3d7c8;
  background: linear-gradient(180deg, #fffefa, #fff8ef);
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 5px 14px rgba(54, 43, 32, 0.04);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid rgba(47, 111, 115, 0.22);
  border-color: rgba(47, 111, 115, 0.52);
  background: #fffdf8;
  box-shadow: 0 0 0 4px rgba(47, 111, 115, 0.08);
}

.field textarea {
  min-height: 78px;
  resize: vertical;
}

.field .color-input {
  height: 46px;
  padding: 5px;
}

.auth-error {
  margin: 2px 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(163, 65, 53, 0.35);
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.success-note {
  margin: 2px 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(47, 111, 115, 0.3);
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.primary {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #2f6f73, #315f88);
  color: white;
  padding: 14px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(47, 111, 115, 0.2);
}

.secondary {
  border: 1px solid rgba(47, 111, 115, 0.34);
  border-radius: 8px;
  background: #fffaf2;
  color: var(--green);
  padding: 11px 12px;
  font-weight: 900;
}

.auth-secondary {
  width: 100%;
  margin-top: 12px;
}

.demo {
  margin-top: 16px;
  background: var(--panel);
  padding: 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  box-shadow: var(--shadow-soft);
}

.privacy-link {
  border: 0;
  background: transparent;
  color: var(--green);
  font-weight: 900;
  margin-top: 14px;
  padding: 8px 0;
  text-align: left;
}

.text-action {
  border: 0;
  background: transparent;
  color: var(--green);
  font-weight: 900;
  margin-top: 12px;
  padding: 8px 0;
  text-align: center;
}

.legal-acceptance {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.legal-acceptance input {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.invite-output {
  display: grid;
  gap: 10px;
}

.invite-output textarea {
  width: 100%;
  min-height: 76px;
  border: 1px solid #e3d7c8;
  border-radius: 8px;
  padding: 10px;
  resize: vertical;
  color: var(--ink);
  background: var(--bg);
}

.family-members {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.family-member-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  padding: 28px 8px 12px;
  border: 1px solid #eadfce;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.78);
  text-align: center;
  box-shadow: 0 8px 16px rgba(54, 43, 32, 0.05);
}

.family-member-card strong,
.family-member-card span {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.family-member-card span {
  color: var(--muted);
  font-size: 12px;
}

.member-role-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.member-photo-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.member-photo {
  width: 78px;
  height: 78px;
  border-radius: 22px;
  object-fit: cover;
  border: 1px solid rgba(227, 215, 200, 0.9);
  box-shadow: 0 10px 18px rgba(54, 43, 32, 0.09);
}

.member-photo.placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--member-color), rgba(255, 255, 255, 0.58));
  color: #fff;
  font-size: 25px;
  font-weight: 900;
}

.member-photo-action {
  position: absolute;
  right: -4px;
  bottom: -4px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 6px 12px rgba(47, 111, 115, 0.24);
}

.member-photo-action input {
  display: none;
}

.family-add-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.family-add-button.disabled,
.family-add-button:disabled {
  border-color: #eadfce;
  background: rgba(255, 253, 248, 0.58);
  color: rgba(108, 101, 113, 0.42);
  box-shadow: none;
}

.member-remove {
  margin-top: 4px;
  padding: 7px 9px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: rgba(255, 253, 248, 0.9);
  border-bottom: 1px solid rgba(229, 221, 210, 0.8);
  backdrop-filter: blur(12px);
}

.app-title {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.app-title img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 12px;
  mix-blend-mode: multiply;
}

.kicker {
  color: var(--green);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logout,
.info-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--panel);
  font-size: 16px;
  box-shadow: var(--shadow-soft);
}

.info-button {
  color: var(--green);
  font-weight: 900;
  font-family: Georgia, serif;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(41, 38, 33, 0.42);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 20;
}

.help-modal {
  width: min(100%, 420px);
  max-height: 82vh;
  overflow: auto;
  background: var(--panel);
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(41, 38, 33, 0.28);
}

.help-head {
  position: sticky;
  top: 0;
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.help-head h2 {
  margin: 0;
  font-size: 19px;
}

.help-head button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.help-content {
  padding: 16px;
}

.help-content h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.help-content p {
  margin: 0 0 14px;
  color: #4d4741;
  line-height: 1.45;
}

.content {
  flex: 1;
  padding: 14px 18px 88px;
  overflow: auto;
}

.hero {
  background:
    linear-gradient(135deg, rgba(49, 95, 136, 0.96), rgba(47, 111, 115, 0.96)),
    var(--green);
  color: white;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 14px 28px rgba(49, 95, 136, 0.16);
}

.hero h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.hero p {
  margin: 0;
  color: #e8f1ed;
  line-height: 1.45;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.stat,
.card,
.form,
.month {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.stat {
  padding: 11px;
  min-height: 86px;
  background: linear-gradient(180deg, #fffdf8, #fbf6ee);
}

.stat strong {
  display: block;
  font-size: 23px;
  margin: 6px 0 2px;
}

.stat span,
.muted {
  color: var(--muted);
}

.section-title {
  margin: 16px 0 10px;
  font-size: 18px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 16px 0 10px;
}

.section-heading .section-title {
  margin: 0;
}

.section-heading .compact {
  flex: 0 0 auto;
}

.compact-title {
  margin: 0 0 6px;
}

.panel-hint {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.refresh-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin: -6px 0 14px;
}

.license-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.license-panel .mini {
  width: auto;
  min-height: 34px;
}

.license-blocked {
  color: #a33a32;
  font-weight: 900;
}

.action-view {
  display: grid;
  gap: 12px;
  justify-items: stretch;
  max-width: 100%;
  overflow-x: hidden;
}

.back-action {
  width: fit-content;
  padding: 9px 12px;
}

.action-view > .section-title {
  margin-top: 0;
}

.action-view .form,
.action-view .admin-action-panel,
.action-view .notice-panel,
.action-view .request-panel,
.action-view .day-detail {
  margin-top: 0;
}

.quick-add-panel {
  margin: 0 0 12px;
}

.quick-add-panel .full-action {
  min-height: 46px;
}

.card {
  padding: 13px;
  margin-bottom: 10px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.card h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.card p {
  margin: 8px 0 0;
  color: #4d4741;
  line-height: 1.45;
}

.child-profile-card {
  display: grid;
  gap: 12px;
}

.clickable-card {
  cursor: pointer;
}

.clickable-card:active {
  transform: translateY(1px);
}

.child-profile-main {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 13px;
}

.child-profile-main h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.child-profile-main span {
  color: var(--muted);
  font-size: 14px;
}

.child-photo {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  background: #efe5d7;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(56, 45, 36, 0.1);
}

.child-photo-placeholder {
  display: grid;
  place-items: center;
  color: var(--green);
  font-weight: 900;
  font-size: 22px;
}

.child-photo.large {
  width: 92px;
  height: 92px;
}

.child-detail-panel {
  display: grid;
  gap: 12px;
}

.child-detail-card .child-profile-main {
  grid-template-columns: 92px 1fr;
}

.child-documents-panel {
  display: grid;
  gap: 12px;
}

.child-documents-panel h3 {
  margin: 0;
}

.child-document-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.child-document-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.child-document-filters .field:first-child {
  grid-column: 1 / -1;
}

.upload-document {
  display: grid;
  place-items: center;
  min-height: 44px;
  text-align: center;
  cursor: pointer;
}

.upload-document input {
  display: none;
}

.child-document-list {
  display: grid;
  gap: 8px;
}

.child-document-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.78);
}

.child-document-row strong,
.child-document-row span {
  display: block;
}

.child-document-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.amount {
  color: var(--green);
  font-weight: 900;
  white-space: nowrap;
}

.expense-summary {
  width: 100%;
  display: block;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.expense-summary:focus {
  outline: 2px solid rgba(47, 111, 115, 0.24);
}

.expense-summary:hover {
  border-color: rgba(47, 111, 115, 0.34);
}

.expense-summary p {
  margin-top: 8px;
}

.expense-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 7px;
  vertical-align: middle;
}

.receipt-missing {
  background: #d33b32;
}

.receipt-partial {
  background: #e88923;
}

.receipt-complete {
  background: #2f9e62;
}

.receipt-state {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: white;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
  margin-top: 10px;
}

.notice-panel,
.request-panel,
.holiday-panel,
.admin-action-panel,
.event-panel {
  background: linear-gradient(180deg, #fffdf8, #fbf7f0);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-soft);
  width: 100%;
  max-width: 100%;
}

.holiday-panel {
  overflow: hidden;
}

.holiday-panel-collapsed {
  padding: 0;
}

.holiday-panel-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  padding: 14px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.holiday-panel-summary strong,
.holiday-panel-summary small {
  display: block;
}

.holiday-panel-summary small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.holiday-panel-chevron {
  color: var(--green);
  font-size: 18px;
}

.admin-action-panel {
  border-left: 4px solid rgba(49, 95, 136, 0.22);
}

.notice-panel {
  border-left: 4px solid rgba(47, 111, 115, 0.24);
}

.admin-action-panel .holiday-panel,
.admin-action-panel .observation-report,
.admin-action-panel .form {
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 12px 0 0;
  background: transparent;
}

.admin-action-select {
  margin-bottom: 4px;
}

.embedded-form {
  display: grid;
  gap: 10px;
}

.embedded-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.embedded-list h3 {
  margin: 0;
  font-size: 15px;
}

.embedded-form h3 {
  margin-bottom: 2px;
}

.visible-empty {
  opacity: 1;
  margin-top: 12px;
}

.observation-report {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
}

.notice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.holiday-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.notice-head h2,
.request-panel h2,
.holiday-head h2 {
  font-size: 17px;
  margin: 0;
}

.holiday-head span {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 13px;
}

.home-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.calendar-action-grid {
  margin-top: 2px;
}

.home-action-tile {
  display: grid;
  justify-items: center;
  gap: 9px;
  min-height: 128px;
  padding: 13px 7px 11px;
  border: 1px solid rgba(227, 215, 200, 0.88);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf8, #fff7ec);
  color: var(--muted);
  box-shadow: 0 8px 18px rgba(54, 43, 32, 0.06);
}

.home-action-tile.active {
  border-color: rgba(47, 111, 115, 0.42);
  background: var(--green-soft);
  color: var(--green);
}

.home-action-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 74px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 0 0 1px rgba(227, 215, 200, 0.62), 0 8px 16px rgba(54, 43, 32, 0.06);
}

.tile-svg {
  width: 66px;
  height: 66px;
}

.tile-img {
  display: block;
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.tile-stroke {
  stroke: #060606;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tile-fill-light {
  fill: #fbfaf9;
}

.tile-fill-coral {
  fill: #ff7b86;
}

.tile-fill-mint {
  fill: #67d9a3;
}

.tile-fill-gold {
  fill: #ffe27a;
}

.tile-fill-blue {
  fill: #76b7f5;
}

.report-menu {
  display: grid;
  gap: 12px;
}

.report-action-button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px;
  border: 1px solid #eadfce;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.86);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 18px rgba(54, 43, 32, 0.06);
}

.report-action-button .home-action-icon {
  width: 88px;
  height: 82px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.report-action-button .tile-img {
  width: 82px;
  height: 82px;
}

.report-action-button strong,
.report-action-button small {
  display: block;
}

.report-action-button strong {
  color: var(--green);
  font-size: 16px;
}

.report-action-button small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.confirmation-checks {
  display: grid;
  gap: 8px;
}

.confirmation-user-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
}

.confirmation-user-row input {
  width: 20px;
  height: 20px;
}

.confirmation-user-row strong,
.confirmation-user-row small {
  display: block;
}

.confirmation-user-row small {
  margin-top: 2px;
  color: var(--muted);
}

.confirmation-user-row.confirmed {
  border-color: rgba(47, 111, 115, 0.38);
  background: var(--green-soft);
}

.confirmation-user-row.confirmed small {
  color: var(--green);
  font-weight: 900;
}

.home-action-tile strong {
  max-width: 100%;
  font-size: 11px;
  line-height: 1.1;
  text-align: center;
  overflow-wrap: anywhere;
}

.notice-head button {
  border: 0;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 900;
}

.push-status {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.push-status.enabled {
  background: var(--green-soft);
  color: var(--green);
}

.push-status.pending {
  background: #f6ead0;
  color: #8a5c0e;
}

.push-status.blocked {
  background: var(--danger-soft);
  color: var(--danger);
}

.notice,
.request-card {
  background: #fffaf2;
  border-radius: 8px;
  padding: 11px;
  margin-top: 8px;
  line-height: 1.4;
}

.notice small {
  display: block;
  color: var(--muted);
  margin-bottom: 4px;
}

.request-card {
  display: grid;
  gap: 7px;
}

.request-card span,
.request-note {
  color: var(--muted);
}

.request-note {
  font-weight: 800;
}

.full-action {
  width: 100%;
  margin-top: 12px;
}

.stack-actions {
  display: grid;
  gap: 8px;
  overflow: visible;
  padding-bottom: 0;
}

.compact {
  width: auto;
  white-space: nowrap;
}

.mini {
  padding: 7px 9px;
  font-size: 12px;
}

.danger-text {
  color: var(--danger);
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
  width: 100%;
}

.inline-form .field {
  min-width: 0;
}

.inline-form .primary {
  grid-column: 1 / -1;
}

.holiday-edit-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.holiday-edit-actions button:disabled {
  color: rgba(107, 100, 117, 0.45) !important;
  border-color: rgba(222, 210, 194, 0.65) !important;
  background: rgba(255, 253, 248, 0.55) !important;
  box-shadow: none !important;
}

.holiday-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
}

.holiday-row {
  display: grid;
  grid-template-columns: 1.05fr 1.05fr 0.75fr 0.75fr 0.9fr;
  gap: 6px;
  align-items: center;
  padding: 9px 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.holiday-row.admin-holiday-row {
  grid-template-columns: 0.46fr 1fr 1fr 0.72fr 0.72fr 0.88fr;
}

.selected-holiday-row {
  background: rgba(213, 238, 234, 0.55);
}

.holiday-select-cell {
  display: flex;
  justify-content: center;
}

.holiday-select-cell input {
  width: 18px;
  height: 18px;
}

.holiday-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.holiday-row:first-child {
  border-top: 0;
}

.holiday-header {
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.instructions-panel {
  margin-top: 12px;
}

.instructions-box {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.82);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.instructions-box p {
  margin: 0 0 7px;
}

.instructions-box p:last-child {
  margin-bottom: 0;
}

@media (max-width: 390px) {
  .holiday-row {
    grid-template-columns: 1fr 1fr 0.7fr 0.7fr;
  }

  .holiday-row.admin-holiday-row {
    grid-template-columns: 0.42fr 1fr 1fr;
  }

  .holiday-row:not(.admin-holiday-row) span:nth-child(5) {
    grid-column: 1 / -1;
  }

  .holiday-row.admin-holiday-row span:nth-child(4),
  .holiday-row.admin-holiday-row span:nth-child(5),
  .holiday-row.admin-holiday-row span:nth-child(6) {
    grid-column: 1 / -1;
  }
}

.check-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
}

.check-cell input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.primary:disabled {
  background: #9fb8b2;
  cursor: default;
}

.visit-observations {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.visit-observations h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.small-text {
  font-size: 13px;
}

.observation-item {
  background: var(--bg);
  border-radius: 8px;
  padding: 10px;
  margin-top: 8px;
}

.observation-item strong,
.observation-item small {
  display: block;
}

.observation-item small {
  color: var(--muted);
  margin-top: 2px;
}

.observation-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.observation-form textarea {
  width: 100%;
  min-height: 72px;
  border: 1px solid #e3d7c8;
  background: var(--bg);
  border-radius: 8px;
  padding: 10px;
  resize: vertical;
}

.report-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.modern-filter-form {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(228, 217, 202, 0.92);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(251, 246, 238, 0.9)),
    var(--panel-soft);
  box-shadow: var(--shadow-soft);
}

.modern-filter-form .field {
  margin-bottom: 0;
}

.modern-filter-form .full-action {
  margin-top: 2px;
}

.report-pdf-actions {
  margin: 12px 0;
}

.report-row {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(251, 246, 238, 0.92)),
    var(--panel);
  border: 1px solid rgba(228, 217, 202, 0.9);
  border-radius: 14px;
  padding: 14px;
  margin-top: 12px;
  box-shadow: var(--shadow-soft);
}

.report-row h3,
.report-row p {
  margin: 0;
}

.report-row p {
  margin-top: 8px;
  line-height: 1.45;
}

.form {
  padding: 16px;
  margin: 12px 0 20px;
  border: 1px solid rgba(228, 217, 202, 0.92);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(251, 246, 238, 0.9)),
    var(--panel);
  box-shadow: var(--shadow-soft);
}

.form h3 {
  margin: 0 0 12px;
}

.filters,
.choices,
.actions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.split-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: visible;
}

.expense-type-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: visible;
}

.expense-type-filters .chip {
  width: 100%;
  white-space: normal;
}

.incomplete-receipts-panel {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.incomplete-receipts-head {
  padding: 10px 12px;
  border: 1px solid #e6c98a;
  border-radius: 8px;
  background: #fff7e6;
}

.incomplete-receipts-head h3,
.incomplete-receipts-head p {
  margin: 0;
}

.incomplete-receipts-head h3 {
  color: #775318;
  font-size: 15px;
}

.incomplete-receipts-head p {
  margin-top: 3px;
  color: #6c5a35;
  font-size: 13px;
}

.incomplete-receipts-list {
  display: grid;
  gap: 10px;
}

.usage-panel {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
  max-width: 100%;
  overflow: hidden;
}

.usage-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.usage-stats .stat {
  min-width: 0;
}

.usage-insights {
  display: grid;
  gap: 6px;
  padding: 10px;
  margin: 4px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(56, 106, 98, 0.08);
  color: var(--text);
  font-size: 13px;
}

.usage-insights strong {
  color: var(--brand-dark);
}

.usage-insights span {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  margin: 12px 0;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.mini-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
}

.mini-table th,
.mini-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  overflow-wrap: anywhere;
}

.mini-table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.compact-list {
  margin-top: 14px;
}

.compact-list h3 {
  margin: 0 0 8px;
}

.usage-panel .family-member {
  min-width: 0;
}

.usage-panel .family-member > div {
  min-width: 0;
}

.usage-panel .family-member span,
.usage-panel .family-member em {
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .mini-table {
    font-size: 12px;
  }

  .mini-table th,
  .mini-table td {
    padding: 8px 6px;
  }

  .mini-table th:nth-child(5),
  .mini-table td:nth-child(5),
  .mini-table th:nth-child(6),
  .mini-table td:nth-child(6) {
    display: none;
  }
}

@media (max-width: 460px) {
  .admin-action-panel {
    padding: 12px;
    overflow: hidden;
  }

  .admin-action-panel > .panel-hint {
    overflow-wrap: anywhere;
  }

  .split-actions {
    grid-template-columns: 1fr;
  }

  .split-actions .full-action {
    width: 100%;
  }

  .usage-panel {
    padding: 10px;
  }

  .mini-table th:nth-child(3),
  .mini-table td:nth-child(3) {
    display: none;
  }
}

.chip {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.chip.active {
  background: var(--ink);
  color: white;
}

.month {
  padding: 12px;
  margin-bottom: 12px;
}

.month-nav {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.month-title {
  font-weight: 900;
  text-transform: capitalize;
  text-align: center;
}

.icon-button {
  width: 42px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
}

.week,
.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.week span {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding-bottom: 8px;
}

.day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-weight: 800;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.day.selected {
  outline: 2px solid var(--green);
  background: var(--green-soft);
}

.day.has-visit {
  background: rgba(255, 250, 242, 0.78);
}

.day span {
  position: relative;
  z-index: 1;
}

.day-color {
  width: calc(100% - 10px);
  height: 8px;
  border-radius: 999px;
  position: absolute;
  left: 5px;
  bottom: 5px;
}

.event-color {
  position: absolute;
  left: 5px;
  top: 5px;
  width: calc(100% - 10px);
  height: 8px;
  border-radius: 999px;
  background: #d8463a;
  box-shadow: 0 0 0 1px rgba(216, 70, 58, 0.14);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.day-detail {
  background: linear-gradient(180deg, #fffdf8, #fbf7f0);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-soft);
}

.detail-subtitle {
  font-size: 15px;
  margin: 14px 0 8px;
}

.turn-change-form {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}

.simple-turn-change-form {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.calendar-legend span,
.inline-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-legend span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.calendar-legend i,
.inline-user i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.event-card {
  background: #fffaf2;
  border-radius: 8px;
  padding: 12px;
  margin-top: 10px;
}

.event-card h3,
.event-card p {
  margin: 0;
}

.event-card p {
  margin-top: 8px;
  color: #4d4741;
  line-height: 1.45;
}

.event-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #292621;
  color: white;
  font-weight: 900;
}

.compact-form {
  margin-top: 0;
}

.empty {
  opacity: 0;
}

.receipt {
  width: 100%;
  max-height: 170px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 10px;
  background: #ebe2d4;
}

.payment-receipts {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.payment-receipts h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.payment-receipt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fffaf2;
  border-radius: 8px;
  padding: 10px;
  margin-top: 8px;
}

.payment-receipt-row strong,
.payment-receipt-row span {
  display: block;
}

.payment-receipt-row span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.receipt-thumb {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  background: #ebe2d4;
}

.receipt-thumb-button {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.receipt-viewer-backdrop {
  background: rgba(22, 20, 18, 0.82);
  z-index: 40;
}

.receipt-viewer {
  width: min(100%, 980px);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.receipt-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
}

.receipt-viewer-head h2 {
  margin: 0;
  font-size: 18px;
}

.receipt-viewer-head button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.receipt-viewer img {
  max-width: 100%;
  max-height: calc(94vh - 58px);
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
}

.upload-receipt {
  border: 1px solid var(--green);
  color: var(--green);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.upload-receipt input {
  display: none;
}

.approve {
  border: 0;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  padding: 10px 12px;
  font-weight: 900;
}

.reject {
  border: 0;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  padding: 10px 12px;
  font-weight: 900;
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 12px;
}

.bubble {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  max-width: 88%;
  box-shadow: var(--shadow-soft);
}

.bubble.mine {
  background: var(--green);
  border-color: var(--green);
  color: white;
  align-self: flex-end;
}

.bubble small {
  display: block;
  color: var(--muted);
  margin-bottom: 5px;
}

.message-meta {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.message-receipt {
  margin-left: auto;
  color: #dcebe6;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
}

.message-receipt.read {
  color: #66e1c1;
}

.bubble.mine small {
  color: #dcebe6;
}

.chat-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(245, 241, 234, 0.72), var(--bg));
  padding: 10px 0;
  width: 100%;
  max-width: 100%;
}

.chat-box input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 10px;
  background: var(--panel);
}

.send {
  min-width: 56px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-size: 14px;
  font-weight: 900;
  padding: 0 10px;
}

.tabs {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 460px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 253, 248, 0.96);
  border-top: 1px solid var(--line);
  padding: 7px 6px 8px;
  box-shadow: 0 -12px 30px rgba(56, 45, 36, 0.08);
  backdrop-filter: blur(10px);
}

.tab {
  border: 0;
  background: transparent;
  color: #8c8275;
  display: grid;
  gap: 2px;
  justify-items: center;
  font-size: 11px;
  font-weight: 800;
  border-radius: 8px;
  padding: 4px 0;
}

.tab strong {
  width: 31px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  overflow: hidden;
}

.tab strong img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  display: block;
}

.tab.active {
  color: var(--green);
  background: var(--green-soft);
}

.tab.active strong {
  background: rgba(255, 255, 255, 0.7);
}

.tab.active strong img {
  transform: scale(1.06);
}

@media (min-width: 700px) {
  body {
    background: #e7ded2;
  }

  .phone,
  .auth {
    box-shadow: 0 20px 60px rgba(44, 39, 33, 0.18);
  }
}
