@font-face {
  font-family: 'Raleway';
  src: url('/static/fonts/Raleway-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'BEBAS';
  src: url('./fonts/BebasNeue_Bold.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}


body {
  margin: 0;
  padding: 40px;
  font-family: 'Raleway', sans-serif;
  background-color: #4d0016;
  color: white;
}

h1 {
  font-family: 'BEBAS';
  font-size: 60px;
  margin-bottom: 40px;
  text-align: center;
  text-transform: uppercase;
  color: white;
}

button {
  font-family: 'Raleway';
  padding: 10px 25px;
  font-size: 18px;
  background-color: #be0036;
  color: white;
  border: 1px solid white;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s ease;
  box-shadow:
    inset 0 10px 20px -10px rgba(255, 255, 255, 0.3),
    inset 0 -10px 20px -10px rgba(255, 255, 255, 0.3);
}

button:hover {
  background-color: white;
  color: #be0036;
}

/* Таблица */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 30px;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  color: #111;
}

th, td {
  padding: 15px 20px;
  text-align: left;
  font-size: 18px;
}

th {
  background-color: #be0036;
  color: white;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 0.05em;
}

tr:not(:last-child) {
  border-bottom: 1px solid #ddd;
}

.resident-row.green {
  background-color: #dcfce7;
}

.resident-row.yellow {
  background-color: #fef9c3;
}

.resident-row.red {
  background-color: #fee2e2;
}

.resident-row.gray {
  background-color: #e5e7eb;
}

/* Фикс ширины колонки № */
#residentsTable th:first-child,
#residentsTable td:first-child {
  width: 50px;
}

/* Колонка с кнопкой удаления */
#residentsTable th:last-child,
#residentsTable td:last-child {
  background: none !important;
  width: 60px;
  padding: 0;
  text-align: center;
}

.delete-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: #ff8aab;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  margin: 0 auto;
}

.delete-btn:hover {
  background-color: rgba(255, 50, 80, 0.2);
  border-radius: 50%;
}

.delete-btn svg {
  width: 16px;
  height: 16px;
  color: #be0036;
}

.delete-btn:hover svg {
  color: #ff3355;
}


/* Попап */
#popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

#popup {
  background: white;
  border-radius: 12px;
  padding: 30px;
  width: 500px;
  max-width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  color: #111;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}


.popup {
  position: fixed;
  top: 10vh;
  left: 50%;
  transform: translateX(-50%);
  width: 80vw;
  height: 80vh;
  background: #ffffff;
  color: #1f1f1f;
  z-index: 9999;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  padding: 32px;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}

.popup-content {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.popup h2 {
  margin: 0 0 20px 0;
  font-size: 24px;
  font-weight: 700;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 12px;
}

.events-scroll {
  overflow-y: auto;
  flex: 1;
  padding-right: 10px;
}

.events-scroll div {
  margin-bottom: 14px;
  font-size: 16px;
  line-height: 1.4;
  padding: 12px 16px;
  border-radius: 8px;
  background: #f9fafb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.events-scroll div span {
  font-weight: 500;
  color: #6b7280;
}

.popup .close-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  color: #999;
  transition: color 0.2s;
}
.popup .close-btn:hover {
  color: #e11d48;
}

.hidden {
  display: none;
}



.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.popup-add {
  background: #fff;
  padding: 32px;
  border-radius: 16px;
  width: 420px;
  box-shadow: 0 15px 45px rgba(0,0,0,0.3);
  font-family: 'Inter', sans-serif;
  animation: fadeIn 0.2s ease-in-out;
}

.popup-add h2 {
  margin-bottom: 20px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: #111;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.input-group input {
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  width: 90%;
  margin: 0 auto;
}

.popup-buttons {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.popup-buttons button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  background: linear-gradient(to right, #d90429, #9b0437);
  color: white;
  transition: background 0.2s;
}

.popup-buttons button.cancel {
  background: #e5e5e5;
  color: #111;
}

.popup-buttons button:hover {
  filter: brightness(1.05);
}
