/* Немного кастомных правок для красоты */
body {
    background-color: #f8f9fa; /* светло-серый фон */
}

.container {
    margin-bottom: 1px;
}

.card-title {
    font-weight: bold;
}

textarea {
    resize: vertical; /* чтобы textarea тянулась только вниз */
}

/* ==== Contacts Page Buttons ==== */
.btn-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 5px;
}

/* Основная кнопка */
.contact-btn {
  display: inline-block;
  position: relative;
  z-index: 1;
  transition: background-color 0.2s ease;
}

/* Панель действий (кнопки ✎ и ✖) */
.action-buttons {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  display: flex;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(.2,.8,.2,1), opacity 0.28s;
  z-index: 2;
}

/* Кнопки внутри панели */
.action-buttons .btn {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 12px;
  padding-right: 12px;
  font-size: 0.9rem;
  border-left: 1px solid rgba(0,0,0,0.15);
  border-radius: 0;
}

/* Правая зона наведения (только правая 20%) */
.hover-zone {
  position: absolute;
  top: 0;
  right: 0;
  width: 20%;
  height: 100%;
  cursor: pointer;
  z-index: 3;
}

/* Появление панели при наведении на hover-zone или сами кнопки */
.btn-wrapper:hover .hover-zone:hover ~ .action-buttons,
.btn-wrapper:hover .action-buttons:hover {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* Адаптивность */
@media (max-width: 576px) {
  .contact-btn {
    min-width: 120px;
    font-size: 0.9rem;
  }
  .action-buttons .btn {
    font-size: 0.8rem;
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* ===== Главная страница (index.html) ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.dashboard-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Компоновка 2+1 на больших экранах */
@media (min-width: 992px) {
  .dashboard-grid {
    grid-template-areas:
      "tasks notes"
      "contacts contacts";
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-card:nth-child(1) { grid-area: tasks; }
  .dashboard-card:nth-child(2) { grid-area: notes; }
  .dashboard-card:nth-child(3) { grid-area: contacts; }
}

