/*


 */

:root {
  --color-ice-white: #F7F8F4;
  --color-moss-green: #556B2F;
  --color-deep-green: #2F4F2F;
  --color-soft-green: #DDE8D2;
  --color-sage: #A8B89B;
  --color-earth: #8B7355;
  --color-text: #263128;
  --color-muted: #6B7568;
  --color-danger: #B94A48;
  --color-warning: #C28B2C;
  --color-success: #4F7D4F;

  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-soft: 0 10px 30px rgba(47, 79, 47, 0.08);
  --shadow-hover: 0 14px 40px rgba(47, 79, 47, 0.14);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--color-ice-white);
  color: var(--color-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--color-moss-green); }
a:hover { color: var(--color-deep-green); }

h1, h2, h3 { color: var(--color-deep-green); margin: 0; }

/* =================== Layout =================== */

.app-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding: 32px 32px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--color-ice-white) 0%, var(--color-soft-green) 100%);
}

/* =================== Sidebar =================== */

.sidebar {
  width: 320px;
  background: var(--color-deep-green);
  color: white;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.sidebar__brand-icon { font-size: 1.6rem; }

.sidebar__user {
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 24px;
}

.sidebar__user-name { font-weight: 600; font-size: 0.95rem; }
.sidebar__user-email { font-size: 0.8rem; color: var(--color-sage); }

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidebar__link {
  display: block;
  color: white;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  transition: background 0.15s ease;
}

.sidebar__link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.sidebar__link--active {
  background: var(--color-moss-green);
  color: white;
}

.sidebar__footer { margin-top: auto; }

.sidebar__logout-form { margin: 0; }

.sidebar__logout {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  transition: background 0.15s ease;
}

.sidebar__logout:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* =================== Card =================== */

.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

/* =================== Page Header =================== */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.page-header__title {
  font-size: 1.8rem;
  font-weight: 700;
}

.page-header__subtitle {
  color: var(--color-muted);
  margin: 4px 0 0;
}

.page-header__actions {
  display: flex;
  gap: 8px;
}

/* =================== Buttons =================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.05s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--color-moss-green);
  color: white;
}

.btn--primary:hover {
  background: var(--color-deep-green);
  color: white;
}

.btn--ghost {
  background: transparent;
  color: var(--color-moss-green);
  border: 1px solid var(--color-sage);
}

.btn--ghost:hover {
  background: var(--color-soft-green);
  color: var(--color-deep-green);
}

.btn--danger {
  background: var(--color-danger);
  color: white;
}

.btn--danger:hover {
  background: #963837;
  color: white;
}

.btn--block {
  width: 100%;
}

.btn--sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn--icon {
  padding: 8px;
  font-size: 1rem;
  min-width: 36px;
  min-height: 36px;
}

/* =================== Form =================== */

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-muted);
}

.form__input {
  border: 1px solid var(--color-sage);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font: inherit;
  background: white;
  color: var(--color-text);
  transition: border 0.15s ease, box-shadow 0.15s ease;
}

.form__input:focus {
  outline: none;
  border-color: var(--color-moss-green);
  box-shadow: 0 0 0 3px rgba(85, 107, 47, 0.15);
}

.form__fieldset {
  border: 1px solid var(--color-soft-green);
  border-radius: var(--radius-md);
  padding: 16px;
}

.form__legend {
  padding: 0 8px;
  font-weight: 600;
  color: var(--color-deep-green);
}

.form__actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.form__errors {
  background: #fde9e8;
  color: var(--color-danger);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.form__errors ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

/* =================== Settings =================== */

.settings__section-title {
  font-size: 1.05rem;
  margin: 0 0 16px;
  color: var(--color-deep-green);
}

.settings__hint {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin: 0 0 16px;
}

.settings__hint code {
  background: var(--color-ice-white);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

.settings__status {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}

.settings__status--ok {
  background: var(--color-soft-green);
  color: var(--color-success);
}

.settings__status--warn {
  background: #fdf3e0;
  color: var(--color-warning);
}

/* =================== Auth =================== */

.auth-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-soft);
  width: 100%;
  max-width: 420px;
}

.auth-card__brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-deep-green);
  margin-bottom: 24px;
  text-align: center;
}

.auth-card__title {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.auth-card__subtitle {
  color: var(--color-muted);
  margin: 0 0 24px;
}

.auth-card__footer {
  text-align: center;
  margin: 24px 0 0;
  color: var(--color-muted);
}

.link {
  color: var(--color-moss-green);
  font-weight: 600;
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

/* =================== Flash =================== */

.flash {
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-weight: 500;
}

.flash--notice {
  background: var(--color-soft-green);
  color: var(--color-deep-green);
  border: 1px solid var(--color-sage);
}

.flash--alert {
  background: #fde9e8;
  color: var(--color-danger);
  border: 1px solid #f0c5c3;
}

/* =================== Summary Cards (Dashboard) =================== */

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.summary-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.summary-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: var(--color-soft-green);
}

.summary-card__icon--info  { background: var(--color-soft-green); }
.summary-card__icon--water { background: #E1F0F7; }
.summary-card__icon--fert  { background: #F4ECDB; }
.summary-card__icon--pest  { background: #F4DDD6; }

.summary-card__label {
  font-size: 0.85rem;
  color: var(--color-muted);
  font-weight: 500;
}

.summary-card__value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-deep-green);
  line-height: 1;
}

.dashboard__section {
  margin-bottom: 32px;
}

.dashboard__section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dashboard__section-title {
  font-size: 1.2rem;
  color: var(--color-deep-green);
}

/* =================== Plant Grid / Cards =================== */

.plant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}


.plant-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.plant-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.plant-card__photo {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--color-soft-green);
}

.plant-card__photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.plant-card__body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plant-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.plant-card__name {
  font-size: 1.1rem;
  font-weight: 700;
}

.plant-card__name a {
  color: var(--color-deep-green);
  text-decoration: none;
}

.plant-card__nickname {
  display: block;
  font-size: 0.8rem;
  color: var(--color-muted);
  font-weight: 400;
  font-style: italic;
}

.plant-card__meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.plant-card__cares {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plant-card__care {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--color-ice-white);
}

.plant-card__care--attention {
  background: #fde9e8;
  color: var(--color-danger);
}

.plant-card__care strong { font-weight: 600; }

.plant-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-ice-white);
}

/* =================== Badges =================== */

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.badge--success {
  background: var(--color-soft-green);
  color: var(--color-success);
}

.badge--danger {
  background: #fde9e8;
  color: var(--color-danger);
}

/* =================== Plant Table (Minhas Plantas) =================== */

.plant-table--mobile-cards {
  display: none;
}

.plant-table {
  overflow-x: auto;
  width: 100%;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.plant-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.plant-table th {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--color-soft-green);
}

.plant-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-ice-white);
  font-size: 0.9rem;
  vertical-align: middle;
}

.plant-table tbody tr:hover {
  background: var(--color-ice-white);
}

.plant-table tbody tr:last-child td {
  border-bottom: 0;
}

.plant-table__name {
  font-weight: 600;
  color: var(--color-deep-green);
}

.plant-table__name-link {
  font-weight: 600;
  color: var(--color-deep-green);
  text-decoration: none;
}

.plant-table__name-link:hover {
  text-decoration: underline;
}

.plant-table__actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.plant-table__thumb {
  width: 48px;
  padding-right: 4px;
}

.plant-table__thumb-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.plant-table__thumb-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-soft-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* =================== Plant Detail =================== */

.plant-detail {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

.plant-detail__sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
  overflow: hidden;
}

.plant-detail__photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.plant-detail__photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: var(--color-soft-green);
}

.plant-detail__info {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plant-detail__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.plant-detail__label { color: var(--color-muted); }
.plant-detail__value { font-weight: 600; }

.plant-detail__main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.plant-detail__heading {
  font-size: 1.1rem;
  margin: 0 0 16px;
}

.care-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.care-card {
  background: var(--color-ice-white);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  border: 1px solid transparent;
  transition: border 0.15s ease, background 0.15s ease;
}

.care-card--attention {
  background: #fde9e8;
  border-color: #f0c5c3;
}

.care-card__icon { font-size: 1.6rem; }
.care-card__title { font-weight: 600; color: var(--color-deep-green); }
.care-card__next { font-size: 0.85rem; color: var(--color-muted); }

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--color-ice-white);
  border-radius: 8px;
  font-size: 0.9rem;
}

.history-item__type {
  color: var(--color-moss-green);
  font-weight: 600;
}

/* =================== Empty State =================== */

.empty-state-card {
  text-align: center;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-state__icon {
  font-size: 3rem;
}

.empty-state__title {
  font-size: 1.2rem;
  color: var(--color-deep-green);
}

.empty-state__text {
  color: var(--color-muted);
  margin: 0;
  max-width: 400px;
}

/* =================== Modal =================== */

body.modal-open {
  overflow: hidden;
}

turbo-frame#plant_modal {
  display: contents;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.15s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(38, 49, 40, 0.55);
  backdrop-filter: blur(2px);
}

.modal__content {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.2s ease;
}

@keyframes modalSlideIn {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-soft-green);
}

.modal__title {
  font-size: 1.25rem;
  color: var(--color-deep-green);
  margin: 0;
}

.modal__close {
  background: transparent;
  border: 0;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--color-muted);
  cursor: pointer;
  padding: 0 8px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.modal__close:hover {
  background: var(--color-ice-white);
  color: var(--color-deep-green);
}

.modal__body {
  padding: 20px 24px 24px;
  overflow-y: auto;
}

/* =================== Responsive =================== */

/* Mobile (< 880px) */
@media (max-width: 880px) {
  .app-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 16px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .sidebar__brand {
    margin-bottom: 0;
    font-size: 1.1rem;
  }

  .sidebar__user {
    display: none;
  }

  .sidebar__nav {
    flex-direction: row;
    gap: 2px;
    flex: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .sidebar__nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar__link {
    font-size: 0.8rem;
    padding: 8px 10px;
    white-space: nowrap;
  }

  .sidebar__footer {
    margin-top: 0;
  }

  .sidebar__logout {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .main-content {
    padding: 20px 16px;
  }

  .page-header__title {
    font-size: 1.4rem;
  }

  .summary-grid {
    gap: 12px;
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-card {
    padding: 16px;
  }

  .summary-card__value {
    font-size: 1.5rem;
  }

  .summary-card__icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  .plant-detail {
    grid-template-columns: 1fr;
  }

  /* Plant table vira cards em mobile */
  .plant-table table {
    min-width: 100%;
  }

  .plant-table {
    display: none;
  }

  .plant-table--mobile-cards {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 16px;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .modal__content {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .modal {
    padding: 0;
  }

  .form__grid {
    grid-template-columns: 1fr;
  }

  .form__actions {
    flex-direction: column;
  }

  .form__actions .btn {
    width: 100%;
  }

  .care-grid {
    grid-template-columns: 1fr;
  }

  .page-header__actions {
    width: 100%;
  }

  .page-header__actions .btn {
    flex: 1;
  }
}

/* Touch targets acessibilidade mobile */
@media (pointer: coarse) {
  .btn,
  .sidebar__link,
  .sidebar__logout,
  .plant-card__name a,
  .link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .btn--icon {
    min-width: 44px;
    min-height: 44px;
  }

  .plant-card__actions .btn--icon {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Mobile pequeno (< 480px) */
@media (max-width: 480px) {
  .sidebar {
    padding: 10px 12px;
    gap: 8px;
  }

  .sidebar__brand {
    font-size: 0.95rem;
  }

  .sidebar__brand-icon {
    font-size: 1.2rem;
  }

  .sidebar__link {
    font-size: 0.75rem;
    padding: 6px 8px;
  }

  .sidebar__logout {
    font-size: 0.75rem;
    padding: 6px 10px;
  }

  .main-content {
    padding: 16px 12px;
  }

  .page-header__title {
    font-size: 1.2rem;
  }

  .page-header__subtitle {
    font-size: 0.85rem;
  }

  .summary-grid {
    gap: 8px;
  }

  .summary-card {
    padding: 12px;
  }

  .summary-card__value {
    font-size: 1.3rem;
  }

  .summary-card__icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .summary-card__label {
    font-size: 0.75rem;
  }

  .plant-grid {
    grid-template-columns: 1fr;
  }

  .plant-card__photo {
    height: 140px;
  }

  .plant-card__body {
    padding: 12px 16px 16px;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .auth-card__title {
    font-size: 1.2rem;
  }

  .card {
    padding: 16px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header__actions {
    flex-wrap: wrap;
  }
}
/* =================== Calendar Navigation =================== */

.calendar-section {
  margin-bottom: 32px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  max-width: 500px;
}

.calendar-nav__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-deep-green);
  text-transform: capitalize;
}

.calendar-nav__arrow {
  text-decoration: none;
  color: var(--color-moss-green);
  font-size: 1.2rem;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.calendar-nav__arrow:hover {
  background: var(--color-soft-green);
}

/* =================== Calendar Grid =================== */

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.calendar-grid__header {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  padding: 8px 4px 12px;
}

/* =================== Day Cells =================== */

.calendar-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: var(--radius-md);
  min-height: 72px;
  text-decoration: none;
  color: var(--color-text);
  transition: background 0.12s ease, box-shadow 0.12s ease;
  cursor: default;
  position: relative;
}

a.calendar-day {
  cursor: pointer;
}

a.calendar-day:hover {
  background: var(--color-soft-green);
}

.calendar-day--outside-month {
  opacity: 0.3;
  pointer-events: none;
}

.calendar-day--today {
  background: var(--color-soft-green);
  font-weight: 700;
}

.calendar-day--today .calendar-day__number {
  background: var(--color-moss-green);
  color: white;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.calendar-day--selected {
  box-shadow: 0 0 0 2px var(--color-moss-green);
  background: var(--color-ice-white);
}

.calendar-day--has-events {
  font-weight: 600;
}

.calendar-day__number {
  font-size: 0.95rem;
  line-height: 1;
}

.calendar-day__dots {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: center;
}

.calendar-day__dot {
  font-size: 0.7rem;
  line-height: 1;
}

/* =================== Day Detail Panel =================== */

.day-detail {
  margin-top: 20px;
  padding: 0;
  overflow: hidden;
}

.day-detail__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-soft-green);
}

.day-detail__title {
  font-size: 1rem;
  color: var(--color-deep-green);
}

.day-detail__close {
  text-decoration: none;
  color: var(--color-muted);
  font-size: 1.1rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.day-detail__close:hover {
  background: var(--color-ice-white);
  color: var(--color-deep-green);
}

.day-detail__list {
  padding: 8px;
}

.day-detail__plant {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  transition: background 0.12s ease;
}

.day-detail__plant:hover {
  background: var(--color-ice-white);
}

.day-detail__plant + .day-detail__plant {
  border-top: 1px solid var(--color-soft-green);
}

.day-detail__plant-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.day-detail__plant-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-soft-green);
  flex-shrink: 0;
}

.day-detail__plant-photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.day-detail__plant-name {
  font-size: 0.9rem;
  display: block;
}

.day-detail__plant-name a {
  color: var(--color-deep-green);
  text-decoration: none;
}

.day-detail__plant-name a:hover {
  text-decoration: underline;
}

.day-detail__plant-meta {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.day-detail__plant-cares {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.day-detail__care-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--color-text);
}

/* =================== Responsive =================== */

@media (max-width: 880px) {
  .calendar-grid {
    gap: 2px;
    padding: 8px;
  }

  .calendar-grid__header {
    font-size: 0.65rem;
    padding: 4px 2px 8px;
  }

  .calendar-day {
    min-height: 56px;
    padding: 4px 2px;
  }

  .calendar-day__number {
    font-size: 0.8rem;
  }

  .calendar-day--today .calendar-day__number {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
  }

  .calendar-day__dot {
    font-size: 0.6rem;
  }

  .day-detail__plant {
    flex-direction: column;
    align-items: flex-start;
  }

  .day-detail__plant-cares {
    align-items: flex-start;
    padding-left: 52px;
    width: 100%;
  }

  .day-detail__care-item {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .calendar-grid {
    gap: 1px;
    padding: 4px;
  }

  .calendar-day {
    min-height: 44px;
    padding: 2px;
  }

  .calendar-day__number {
    font-size: 0.7rem;
  }

  .calendar-day--today .calendar-day__number {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
  }

  .calendar-day__dot {
    font-size: 0.5rem;
  }

  .calendar-nav__title {
    font-size: 1rem;
  }
}
