.page-new-design {
  .calendars-panel {
    .calendars-table-card {
      overflow: hidden;
      border: 1px solid var(--slate-200);
      border-radius: 12px;
      background: var(--white);
      box-shadow: var(--new-shadow);
    }

    .calendars-table {
      tbody > tr > td:first-child { color: var(--slate-400); }
      th:first-child, td:first-child { width: 44px; }
      th:nth-child(2), td:nth-child(2) { width: 527px; }
      th:nth-child(3), td:nth-child(3) { width: 527px; }
      th:last-child, td:last-child { width: 90px; }
      td:nth-child(2) { color: var(--slate-800); font-weight: 700; }
      tbody td { transition: background-color var(--transition-hover-duration) ease-out; }
    }

    .is-selected td { background: var(--color-selected-background); } 
    .calendars-table tbody tr.is-selected td:first-child {
      border-left: var(--width-selected-left-line) solid var(--color-selected-left-line);
    }
    .calendars-table tbody tr:hover td { background: var(--color-hover-background); }
    .calendars-table tbody tr.is-selected:hover td { background: var(--color-selected-background); }

    .calendar-detail {
      margin-top: 20px;
      padding: 20px 0;
      border: 0;
      background: transparent;
      box-shadow: none;
    }

    .calendar-detail-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 20px;

      h2 {
        margin: 0;
        color: var(--slate-800);
        font-size: 16px;
        line-height: 20px;
      }
    }

    .calendar-detail-subtitle {
      margin: 6px 0 0;
      color: var(--slate-400);
      font-size: 12px;
    }

    .calendar-detail-controls {
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .calendar-legend {
      display: flex;
      align-items: center;
      gap: 16px;

      .calendar-legend-item {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: var(--slate-500);
        font-size: 12px;
        line-height: 16px;
      }

      .calendar-legend-dot {
        display: inline-block;
        width: 12px;
        height: 12px;
        border: 0;
        border-radius: 50%;

        &.is-special-holiday { background: #FEE2E2; border: 1px solid #FECACA; }
        &.is-special-workday { background: #D1FAE5; border: 1px solid #A7F3D0; }
      }
    }

    .calendar-year-selector {
      display: flex;
      align-items: center;

      select {
        width: 106px;
        height: 36px;
        min-height: 36px;
        padding: 0 12px;
        border: 1px solid var(--color-input-border);
        border-radius: 6px;
        background: var(--white);
        color: var(--slate-600);
        font-size: 14px;
        line-height: 17px;
      }
    }

    .calendar-year-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
    }

    .calendar-month-card {
      padding: 12px;
      border: 1px solid var(--slate-200);
      border-radius: 8px;
      background: var(--white);

      h3 {
        margin: 0 0 10px;
        color: var(--slate-600);
        font-size: 13px;
        font-weight: 700;
        line-height: 17px;
      }

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

      .calendar-weekday {
        color: var(--slate-400);
        font-size: 11px;
        line-height: 16px;
        text-align: center;
        &.is-sunday { color: var(--red-500); }
        &.is-saturday { color: var(--sky-600); }
      }

      .calendar-day-cell {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 1;
        padding: 0;
        border: 1px solid transparent;
        border-radius: 4px;
        background: var(--white);
        color: var(--slate-600);
        font-size: 12px;

        .calendar-day-number {
          position: absolute;
          inset: 0;
          z-index: 1;
          display: flex;
          align-items: center;
          justify-content: center;
          width: 100%;
          height: 100%;
          color: #334155;
          font-size: 11px;
          line-height: 16px;
        }

        &:hover { border-color: var(--color-focus-ring); background: var(--sky-50); }
        &.is-empty, &.is-empty:hover { background: transparent; border-color: transparent; cursor: default; }
        &.is-disabled, &.is-disabled:hover { background: var(--slate-100); color: #CBD5E1; cursor: not-allowed; }
        &.is-basic-holiday {
          background: transparent;
          color: var(--red-500);

          .calendar-day-number { color: var(--red-500); }
        }
        &.is-special-holiday,
        &.is-special-workday {
          background: transparent;
          border: 0;
          border-radius: 50%;

          &::before {
            position: absolute;
            inset: 0;
            z-index: 0;
            border-radius: 50%;
            content: "";
          }

        }
        &.is-special-holiday { color: #D61F45; &::before { background: #FEE2E2; } }
        &.is-special-workday { color: #166534; &::before { background: #D1FAE5; } }
        &.is-sunday .calendar-day-number { color: var(--red-500); }
        &.is-saturday .calendar-day-number { color: var(--sky-600); }
      }
    }

    .table-actions {
      white-space: nowrap;
      .icon-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        min-height: 28px;
        padding: 0;
        border: 0;
        border-radius: 6px;
        background: transparent;
        &:hover { background: var(--sky-50); }
        &.delete-button:hover { background: var(--red-50); }
        img { display: block; width: 14px; height: 14px; }
        .icon-hover { display: none; }
        &:hover {
          .icon-hover { display: block; }
          > img:not(.icon-hover) { display: none; }
        }
      }
    }
  }

  .calendars-form-modal {
    .calendar-basic-holiday-group { width: 328px; }
    .calendar-basic-holiday-row { display: flex; gap: 16px; }
    .calendar-basic-holiday-row + .calendar-basic-holiday-row { margin-top: 12px; }
    .checkbox-option { display: inline-flex; align-items: center; gap: 6px; width: auto; margin: 0; color: var(--slate-500); font-size: 14px; }
    .checkbox-option input { width: 13px; height: 13px; min-height: 13px; margin: 0; }
    input[readonly] { background: var(--slate-50); color: var(--slate-500); }
  }
}

@media (max-width: 900px) {
  .page-new-design .calendars-panel {
    .calendar-year-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .calendars-table { min-width: 720px; }
  }
}

@media (max-width: 640px) {
  .page-new-design .calendars-panel {
    .calendar-detail-header { flex-direction: column; }
    .calendar-year-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
}
