:root {
  --bg: #eef2f6;
  --text: #17202a;
  --muted: #647282;
  --line: #d8e0e8;
  --panel: #ffffff;
  --owner-one: #2563eb;
  --owner-one-soft: #e7f0ff;
  --owner-two: #e17817;
  --owner-two-soft: #fff1dd;
  --done: #16864b;
  --done-soft: #dff7e9;
  --shadow: 0 20px 55px rgba(15, 23, 42, .14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 8%, rgba(37, 99, 235, .24), transparent 34%),
    radial-gradient(circle at 86% 12%, rgba(225, 120, 23, .22), transparent 32%),
    radial-gradient(circle at 52% 52%, rgba(22, 134, 75, .14), transparent 38%),
    linear-gradient(180deg, #e7edf4 0, var(--bg) 260px),
    var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: #17202a;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  min-height: 42px;
  padding: 0 16px;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

button:hover:not(:disabled),
.file-action:hover:not(:has(input:disabled)) {
  box-shadow: 0 10px 22px rgba(15, 23, 42, .16);
  transform: translateY(-1px);
}

.file-action {
  align-items: center;
  background: #edf0f3;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font-size: 16px;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.file-action input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.file-action:has(input:disabled) {
  cursor: not-allowed;
  opacity: .5;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.topbar,
.setup-panel,
.calendar-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .08);
}

.topbar {
  align-items: center;
  background: #17202a;
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
}

.topbar > div:first-child {
  min-width: 0;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.topbar .eyebrow {
  color: #b8c7d6;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 44px);
}

h2 {
  font-size: 24px;
}

.month-controls {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(170px, auto) 42px;
  text-align: center;
}

.month-controls button,
.icon-close {
  background: #edf0f3;
  color: var(--text);
  font-size: 26px;
  padding: 0;
}

.topbar .month-controls button {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.setup-panel {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-top: 0;
  padding: 0;
}

label {
  color: var(--muted);
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
}

input {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  min-height: 42px;
  padding: 0 12px;
}

input:focus {
  border-color: var(--owner-one);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
  outline: none;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.legend span {
  align-items: center;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  gap: 8px;
  padding: 7px 10px;
}

.dot {
  border-radius: 999px;
  display: inline-block;
  height: 14px;
  width: 14px;
}

.owner-one { background: var(--owner-one); }
.owner-two { background: var(--owner-two); }
.done { background: var(--done); }

.calendar-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .22)),
    rgba(255, 255, 255, .34);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -28px 50px rgba(255, 255, 255, .18),
    0 28px 80px rgba(15, 23, 42, .18);
  margin-top: 18px;
  overflow: hidden;
  position: relative;
}

.config-icon-button {
  align-items: center;
  background: rgba(255, 255, 255, .13);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 14px 28px rgba(0, 0, 0, .14);
  color: #fff;
  display: flex;
  font-size: 20px;
  height: 44px;
  justify-content: center;
  min-height: 44px;
  padding: 0;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 44px;
  z-index: 2;
}

.calendar-card::before {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .62), transparent 34%),
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, .8), transparent 18%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

.weekdays,
.calendar {
  position: relative;
  z-index: 2;
}

.weekdays,
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekdays {
  background: rgba(23, 32, 42, .9);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.weekdays span {
  padding: 12px 4px;
}

.calendar-day {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .52), rgba(255, 255, 255, .18)),
    rgba(255, 255, 255, .22);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .84),
    inset 0 -18px 34px rgba(255, 255, 255, .12);
  display: grid;
  gap: 10px;
  grid-template-rows: auto auto 1fr;
  min-height: 126px;
  padding: 13px;
  position: relative;
  transition: background .15s ease, border-color .15s ease;
}

.calendar-day.is-outside {
  color: #a4acb4;
}

.calendar-day.owner-0 {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .52), rgba(255, 255, 255, .16)),
    rgba(231, 240, 255, .62);
  border-color: rgba(105, 159, 255, .55);
}

.calendar-day.owner-1 {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .54), rgba(255, 255, 255, .16)),
    rgba(255, 241, 221, .64);
  border-color: rgba(255, 180, 104, .55);
}

.calendar-day.completed {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .54), rgba(255, 255, 255, .18)),
    rgba(223, 247, 233, .72);
  border-color: rgba(80, 197, 126, .62);
}

.day-number {
  font-size: 20px;
  font-weight: 800;
}

.day-owner {
  align-items: center;
  align-self: end;
  background: linear-gradient(145deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .42));
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .96),
    0 8px 18px rgba(15, 23, 42, .08);
  color: #304255;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  overflow: hidden;
  padding: 5px 8px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.completed .day-owner {
  background: linear-gradient(145deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .55));
  color: #12653a;
}

.week-action {
  background: linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .42));
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .96),
    0 8px 18px rgba(15, 23, 42, .08);
  color: var(--text);
  font-size: 12px;
  min-height: 34px;
  padding: 0 10px;
  width: 100%;
}

.completed .week-action {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0)),
    #16864b;
  border-color: rgba(255, 255, 255, .32);
  color: #fff;
}

.task-panel {
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  grid-template-rows: auto auto auto auto 1fr auto auto;
  height: 100vh;
  max-width: 420px;
  padding: 24px;
  position: fixed;
  right: 0;
  top: 0;
  transform: translateX(110%);
  transition: transform .2s ease;
  width: min(100%, 420px);
  z-index: 10;
}

.task-panel.is-open {
  transform: translateX(0);
}

.icon-close {
  justify-self: end;
  width: 42px;
}

.muted {
  color: var(--muted);
  margin: 0;
}

.status-pill {
  border-radius: 999px;
  display: inline-flex;
  font-weight: 800;
  margin: 0;
  padding: 8px 12px;
  width: fit-content;
}

.status-pill.pending {
  background: #fff6dc;
  color: #805f00;
}

.status-pill.ready {
  background: var(--done-soft);
  color: #146237;
}

.camera-box {
  align-items: center;
  background: #111820;
  border-radius: 8px;
  display: grid;
  min-height: 320px;
  overflow: hidden;
}

.camera-box.is-empty {
  background: rgba(17, 24, 39, .06);
  border: 1px dashed rgba(100, 114, 130, .32);
  min-height: 96px;
}

video,
.camera-box img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.actions {
  display: grid;
  gap: 10px;
}

.message {
  color: var(--muted);
  font-weight: 700;
  margin: 0;
}

.modal-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, .56);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 30;
}

.modal-backdrop[hidden] {
  display: none;
}

.confirm-modal {
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  max-width: 520px;
  padding: 24px;
  width: min(100%, 520px);
}

.config-modal {
  max-width: 620px;
  width: min(100%, 620px);
}

.confirm-modal img {
  aspect-ratio: 16 / 10;
  background: #111820;
  border-radius: 8px;
  object-fit: cover;
  width: 100%;
}

.modal-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.secondary-button {
  background: #edf0f3;
  color: var(--text);
}

@media (max-width: 900px) {
  .setup-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    background: var(--bg);
  }

  .app-shell {
    width: min(100% - 20px, 520px);
    padding: 12px 0 28px;
  }

  .topbar,
  .setup-panel {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: stretch;
    display: grid;
    gap: 18px;
    padding: 18px;
  }

  .month-controls {
    grid-template-columns: 42px 1fr 42px;
  }

  .setup-panel,
  .calendar-card {
    margin-top: 12px;
  }

  .setup-panel {
    padding: 14px;
  }

  .legend span {
    background: rgba(255, 255, 255, .11);
    border-color: rgba(255, 255, 255, .17);
    padding: 8px 10px;
  }

  .calendar-card {
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  .weekdays {
    display: none;
  }

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

  .calendar-day {
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
    grid-template-columns: 52px 1fr;
    grid-template-rows: auto auto auto;
    min-height: auto;
    padding: 12px;
  }

  .calendar-day.is-outside {
    display: none;
  }

  .day-number {
    align-items: center;
    background: rgba(255, 255, 255, .7);
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    display: flex;
    font-size: 22px;
    grid-row: 1 / span 3;
    justify-content: center;
    min-height: 66px;
  }

  .calendar-day::before {
    color: var(--muted);
    content: attr(data-weekday);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .week-action {
    font-size: 14px;
    min-height: 40px;
  }

  .day-owner {
    align-self: auto;
    font-size: 13px;
    max-width: 100%;
    padding: 7px 10px;
  }

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

  .task-panel {
    border-left: 0;
    border-radius: 14px 14px 0 0;
    bottom: 0;
    height: min(92vh, 760px);
    max-width: none;
    padding: 18px;
    top: auto;
    transform: translateY(110%);
    width: 100%;
  }

  .task-panel.is-open {
    transform: translateY(0);
  }

  .camera-box {
    min-height: 240px;
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 28px;
  }

  .month-controls {
    grid-template-columns: 38px 1fr 38px;
  }

  .calendar-day {
    grid-template-columns: 46px 1fr;
    padding: 10px;
  }

  .day-number {
    font-size: 20px;
    min-height: 62px;
  }

  .week-action {
    font-size: 13px;
    padding: 0 8px;
  }
}

/* Header spacing refinement */
@media (min-width: 761px) {
  .topbar {
    align-items: end;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 150px;
    padding: 24px 30px;
  }

  .topbar > div:first-child {
    align-self: end;
    padding-right: 54px;
  }

  .topbar .eyebrow {
    margin-bottom: 8px;
  }

  .topbar h1 {
    font-size: clamp(34px, 3.6vw, 46px);
    line-height: 1;
  }

  .legend {
    gap: 8px;
    margin-top: 20px;
  }

  .legend span {
    padding: 6px 10px;
  }

  .month-controls {
    align-self: end;
    gap: 10px;
    grid-template-columns: 44px minmax(190px, auto) 44px;
    margin-bottom: 2px;
  }

  .month-controls button {
    min-height: 42px;
  }

  .config-icon-button {
    height: 44px;
    min-height: 44px;
    right: 18px;
    top: 18px;
    width: 44px;
  }
}

@media (max-width: 760px) {
  .config-icon-button {
    height: 38px;
    min-height: 38px;
    right: 14px;
    top: 14px;
    width: 38px;
  }

  .topbar > div:first-child {
    padding-right: 42px;
  }
}

.calendar .day-owner {
  align-self: center;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: inherit;
  display: block;
  min-height: auto;
  padding: 0;
  text-align: center;
}

.calendar .owner-0 .day-owner {
  color: #1e4fa8;
}

.calendar .owner-1 .day-owner {
  color: #99500f;
}

.calendar .completed .day-owner {
  color: #0b6b40;
}

/* Premium visual layer */
:root {
  --text: #111827;
  --muted: #667085;
  --line: rgba(148, 163, 184, .26);
  --owner-one: #2d6cdf;
  --owner-two: #dc7a1b;
  --done: #11945a;
  --shadow: 0 28px 80px rgba(15, 23, 42, .16);
}

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(45, 108, 223, .26), transparent 32%),
    radial-gradient(circle at 88% 6%, rgba(220, 122, 27, .24), transparent 30%),
    radial-gradient(circle at 50% 48%, rgba(17, 148, 90, .12), transparent 38%),
    linear-gradient(180deg, #f8fafc 0, #edf2f7 320px);
  font-family: "Inter", "Segoe UI", Arial, Helvetica, sans-serif;
}

button {
  border-radius: 12px;
  background: linear-gradient(145deg, #111827, #1f2937);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .16);
  font-weight: 850;
}

.topbar,
.calendar-card,
.confirm-modal,
.task-panel {
  border-radius: 24px;
}

.topbar {
  background:
    linear-gradient(135deg, rgba(17, 24, 39, .98), rgba(31, 41, 55, .94)),
    #111827;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .18);
  overflow: hidden;
  padding: 28px;
  position: relative;
}

.topbar::after {
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 255, 255, .18), transparent 24%),
    linear-gradient(120deg, rgba(255, 255, 255, .09), transparent 44%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.topbar > div {
  position: relative;
  z-index: 1;
}

h1 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 900;
  text-shadow: 0 12px 30px rgba(0, 0, 0, .28);
}

.topbar .month-controls button,
.legend span {
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 14px 28px rgba(0, 0, 0, .14);
}

.calendar-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .76), rgba(255, 255, 255, .3)),
    rgba(255, 255, 255, .36);
  backdrop-filter: blur(32px) saturate(175%);
  -webkit-backdrop-filter: blur(32px) saturate(175%);
  border: 1px solid rgba(255, 255, 255, .88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .98),
    inset 0 -34px 56px rgba(255, 255, 255, .2),
    0 36px 90px rgba(15, 23, 42, .18);
  margin-top: 22px;
}

.weekdays {
  background: rgba(17, 24, 39, .9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-weight: 900;
}

.weekdays span {
  padding: 15px 4px;
}

.calendar-day {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .22)),
    rgba(255, 255, 255, .24);
  backdrop-filter: blur(20px) saturate(165%);
  -webkit-backdrop-filter: blur(20px) saturate(165%);
  border-color: rgba(255, 255, 255, .72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    inset 0 -20px 34px rgba(255, 255, 255, .18);
  min-height: 134px;
  padding: 15px;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.calendar-day:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .94),
    0 16px 32px rgba(15, 23, 42, .1);
  filter: saturate(1.04);
  transform: translateY(-1px);
}

.calendar-day.owner-0 {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .2)),
    rgba(232, 241, 255, .78);
}

.calendar-day.owner-1 {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .2)),
    rgba(255, 242, 223, .8);
}

.calendar-day.completed {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .22)),
    rgba(226, 248, 237, .84);
}

.day-number {
  color: #111827;
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
}

.day-owner,
.week-action {
  background: linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(255, 255, 255, .5));
  border-color: rgba(255, 255, 255, .82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .98),
    0 10px 20px rgba(15, 23, 42, .08);
  font-weight: 900;
}

.day-owner {
  min-height: 30px;
}

.week-action {
  min-height: 38px;
}

.completed .week-action {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #10a464, #0b7f49);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    0 12px 24px rgba(17, 148, 90, .24);
}

.task-panel,
.confirm-modal {
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(26px) saturate(165%);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, .72);
}

@media (max-width: 760px) {
  body {
    background:
      radial-gradient(circle at 10% 0%, rgba(45, 108, 223, .22), transparent 34%),
      radial-gradient(circle at 90% 4%, rgba(220, 122, 27, .2), transparent 34%),
      #edf2f7;
  }

  .topbar {
    border-radius: 20px;
    padding: 20px;
  }

  .calendar-card {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
    box-shadow: none;
  }

.calendar-day {
  border-radius: 18px;
  min-height: auto;
  }
}

/* Cleaner premium calendar: calmer surface, subtle owner accents */
.calendar-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .46)),
    rgba(255, 255, 255, .42);
  border-color: rgba(255, 255, 255, .9);
}

.calendar {
  gap: 1px;
  background: rgba(148, 163, 184, .16);
}

.calendar-day,
.calendar-day.owner-0,
.calendar-day.owner-1,
.calendar-day.completed {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .46)),
    rgba(255, 255, 255, .56);
  border: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
  overflow: hidden;
}

.calendar-day::after {
  border-radius: 999px;
  content: "";
  height: 4px;
  left: 15px;
  opacity: .85;
  position: absolute;
  right: 15px;
  top: 0;
}

.calendar-day.owner-0::after {
  background: var(--owner-one);
}

.calendar-day.owner-1::after {
  background: var(--owner-two);
}

.calendar-day.completed::after {
  background: var(--done);
}

.calendar-day.completed {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .84), rgba(255, 255, 255, .5)),
    rgba(237, 252, 244, .7);
}

.calendar-day:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .94), 0 12px 26px rgba(15, 23, 42, .08);
}

.week-action {
  background: rgba(255, 255, 255, .7);
  box-shadow: none;
}

.completed .week-action {
  background: linear-gradient(135deg, #16a064, #0c874d);
}

.day-owner {
  background: rgba(255, 255, 255, .58);
  box-shadow: none;
}

.day-number {
  font-size: 22px;
}

@media (max-width: 760px) {
  .calendar {
    background: transparent;
    gap: 10px;
  }

  .calendar-day::after {
    bottom: 0;
    height: auto;
    left: 0;
    right: auto;
    top: 0;
    width: 5px;
  }
}

/* Clearer visual logic: neutral days, colored responsible chips, green only for done */
.calendar-card {
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  border: 1px solid rgba(255, 255, 255, .84);
  box-shadow: 0 26px 70px rgba(15, 23, 42, .14);
}

.calendar {
  background: rgba(148, 163, 184, .18);
  gap: 1px;
}

.calendar-day,
.calendar-day.owner-0,
.calendar-day.owner-1 {
  background: rgba(255, 255, 255, .78);
  border: 0;
  box-shadow: none;
}

.calendar-day::after {
  display: none;
}

.calendar-day.completed {
  background: linear-gradient(180deg, rgba(232, 250, 240, .95), rgba(244, 253, 248, .86));
  box-shadow: inset 0 0 0 1px rgba(17, 148, 90, .22);
}

.day-number {
  color: #111827;
  font-size: 24px;
}

.week-action {
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(148, 163, 184, .24);
  box-shadow: 0 6px 16px rgba(15, 23, 42, .05);
  color: #111827;
}

.week-action:hover:not(:disabled) {
  box-shadow: 0 10px 22px rgba(15, 23, 42, .1);
}

.day-owner {
  background: transparent;
  border: 0;
  box-shadow: none;
  min-height: auto;
}

.owner-0 .day-owner {
  background: transparent;
  border: 0;
  color: #1e4fa8;
}

.owner-1 .day-owner {
  background: transparent;
  border: 0;
  color: #99500f;
}

.completed .day-owner {
  background: transparent;
  border: 0;
  color: #0b6b40;
}

.completed .week-action {
  background: linear-gradient(135deg, #16a064, #0c874d);
  border-color: rgba(17, 148, 90, .42);
  box-shadow: 0 10px 22px rgba(17, 148, 90, .2);
  color: #fff;
}

.calendar-day.is-outside {
  background: rgba(248, 250, 252, .55);
}

.calendar-day.is-outside .day-number,
.calendar-day.is-outside .day-owner {
  opacity: .55;
}

@media (max-width: 760px) {
  .calendar-card {
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .calendar {
    background: transparent;
    gap: 10px;
  }

  .calendar-day,
  .calendar-day.owner-0,
  .calendar-day.owner-1,
  .calendar-day.completed {
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
  }
}

/* Mobile month grid and usable evidence panel */
@media (max-width: 760px) {
  .topbar {
    gap: 12px;
    padding: 16px;
  }

  .topbar .eyebrow {
    font-size: 10px;
    margin-bottom: 4px;
  }

  h1 {
    font-size: 30px;
    line-height: 1.05;
  }

  .legend {
    gap: 8px;
    margin-top: 12px;
  }

  .legend span {
    font-size: 14px;
    padding: 7px 10px;
  }

  .dot {
    height: 11px;
    width: 11px;
  }

  .month-controls {
    gap: 8px;
    grid-template-columns: 40px 1fr 40px;
  }

  .month-controls strong {
    font-size: 16px;
  }

  .month-controls button {
    min-height: 40px;
  }

  .calendar-card {
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(255, 255, 255, .84);
    border-radius: 18px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .12);
    overflow: hidden;
  }

  .weekdays {
    display: grid;
    font-size: 11px;
  }

  .weekdays span {
    padding: 10px 2px;
  }

  .calendar {
    background: rgba(148, 163, 184, .18);
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .calendar-day,
  .calendar-day.owner-0,
  .calendar-day.owner-1,
  .calendar-day.completed {
    border-radius: 0;
    box-shadow: none;
    display: grid;
    gap: 4px;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    min-height: 82px;
    padding: 6px 4px;
  }

  .calendar-day.is-outside {
    display: grid;
  }

  .calendar-day::before {
    display: none;
  }

  .day-number {
    align-items: start;
    background: transparent;
    border: 0;
    border-radius: 0;
    display: block;
    font-size: 15px;
    grid-row: auto;
    min-height: auto;
    text-align: left;
  }

  .week-action {
    background: linear-gradient(135deg, #111827, #263142);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 8px 16px rgba(17, 24, 39, .16);
    color: #fff;
    font-size: 0;
    min-height: 30px;
    padding: 0 5px;
  }

  .week-action::after {
    content: "Aseo";
    font-size: 11px;
    font-weight: 900;
  }

  .completed .week-action::after {
    content: "OK";
  }

  .completed .week-action {
    background: linear-gradient(135deg, #16a064, #0c874d);
    box-shadow: 0 8px 16px rgba(17, 148, 90, .18);
  }

  .day-owner {
    font-size: 10px;
    min-height: auto;
    padding: 3px 2px;
  }

  .task-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: min(92vh, 680px);
    overflow-y: auto;
    padding: 16px;
  }

  .camera-box {
    flex: 0 0 auto;
    min-height: 180px;
  }

  .actions {
    flex: 0 0 auto;
  }

  .actions button,
  .file-action {
    min-height: 42px;
  }
}

@media (max-width: 420px) {
  .calendar-day,
  .calendar-day.owner-0,
  .calendar-day.owner-1,
  .calendar-day.completed {
    min-height: 76px;
    padding: 5px 3px;
  }

  .day-number {
    font-size: 14px;
  }

  .week-action {
    min-height: 28px;
  }

  .week-action::after {
    font-size: 10px;
  }

  .day-owner {
    font-size: 9px;
    min-height: auto;
  }
}
