/* ==== Общие стили ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: Arial, sans-serif;
  background-color: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ==== Layout ==== */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: auto;
  background-color: #f8fafc;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.card-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
}

/* ==== Карточка входа ==== */
.card,
#cabinet-content {
  background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
  text-align: center;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover,
#cabinet-content:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  /*  transform: translateY(-5px); Легкое поднятие карточки при наведении */
}

.card h2 {
  font-size: 1.8rem;
  color: #111827;
  margin-bottom: 1rem;
}

.card p {
  font-size: 1.125rem;
  color: #4b5563;
  margin-bottom: 2rem;
}

/* ==== Инпуты ==== */
.input-group {
  margin-bottom: 1.5rem;
  width: 100%;
}

.input-group input,
#verification-code {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.2s ease;
}

.input-group input:focus,
#verification-code:focus {
  border-color: #66bb6a; /* Светлый зеленый при фокусе */
  outline: none;
  box-shadow: 0 0 5px rgba(0, 128, 0, 0.2); /* Легкая тень при фокусе */
}

#verification-code:disabled {
  background-color: #f4f4f4;
}

/* ==== Кнопки ==== */
#send-code-btn,
#verify-btn {
 background-color: rgba(73, 204, 144, .5); /* Зеленый фон */
  width: 100%;
  max-width: 400px;
  font-weight: bold;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  border: none;  /* Убираем стандартный бордер */
    cursor: pointer;
}

#send-code-btn:hover,
#verify-btn:hover {
 background-color: rgba(73, 204, 144, .5); /* Зеленый фон */
  transform: translateY(-2px); /* Легкий подъем кнопки */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Легкая тень при наведении */
}



#send-code-btn:disabled,
#verify-btn:disabled {
   background-color: #7d7d7d; /* Очень темный серый при нажатии */
  cursor: not-allowed;
}

/* ==== Дополнительные кнопки ==== */
.subscribe-btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 400px;
  background-color: rgba(97,175,254, .3); /*Синий фон */
  margin-top: 20px;
}

.subscribe-btn:hover {
  background-color: rgba(97,175,254,.5);
  transform: translateY(-2px); /* Легкий подъем кнопки */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Легкая тень при наведении */
}

.confirm-btn{
    padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 400px;
  background-color: rgba(73, 204, 144, .3); /* Зеленый фон */
}

.confirm-btn:hover{
  background-color: rgba(73, 204, 144, .5); /* Зеленый фон */
  transform: translateY(-2px); /* Легкий подъем кнопки */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Легкая тень при наведении */
}



/* Стиль для кнопки выхода */
#logout-btn1 {
    background-color: #d3d3d3;  /* Светло-серый */
    color: #333;  /* Темный цвет для текста */
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
  /*  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease; */
    width: 100%;
    max-width: 300px;
    text-align: center;
}

/* Эффект при наведении */
#logout-btn1:hover {
   background-color: rgba(249, 62, 62, .5); /* Красный фон */
  transform: translateY(-2px); /* Легкий подъем кнопки */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); /* Легкая тень при наведении */
}

.confirm-btn:disabled,
.subscribe-btn:disabled {
  background-color: #7d7d7d; /* Очень темный серый при нажатии */
  cursor: not-allowed;
}



/* ==== Таймер ==== */
/* Таймер */
#timer {
  visibility: hidden;  /* Таймер скрыт, но занимает место */
  opacity: 0;  /* Таймер невидим */
  /*  transition: opacity 0.3s ease, visibility 0.3s ease; */
  height: 40px; /* Зарезервированное место */
  line-height: 40px; /* Выравнивание текста по вертикали */
  text-align: center; /* Центрирование текста */
}

/* Когда таймер отображается */
#timer.visible {
  visibility: visible;
  opacity: 1;
}

#countdown {
  font-weight: bold;
}


/*==== Кабинет ====*/
.cabinet-section {
  margin-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 1.5rem;
}

.cabinet-section:last-child {
  margin-bottom: 0;
  border-bottom: none;
  text-align: center;
}

.cabinet-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #111827;
}

.cabinet-section p,
.cabinet-section a {
  font-size: 1.125rem;
  color: #4b5563;
  margin: 0.3rem 0;
}

.cabinet-section a {
  color: #4a90e2;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.cabinet-section a:hover {
  color: #2a6fd6;
  text-decoration: underline;
}

/* Контейнер для формы профиля */
#profile {
  opacity: 0;
  transition: opacity 0.4s ease, max-height 0.4s ease; /* Плавное изменение */
  max-height: 0; /* по умолчанию скрыто */
  overflow: hidden;
}

/* Когда форма открыта */
#profile.open {
  visibility: visible;
  opacity: 1;
  max-height: 300px; /* Задаем большую максимальную высоту для плавного раскрытия */
}

/* Кнопка для открытия/закрытия формы */


/* Стиль для полей ввода */
.user-info {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  margin-top: 20px;
  gap: 20px;
}

.user-info label {
  flex: 0 0 60px;
  font-size: 1rem;
  color: #4b5563;
  font-weight: 600;
  text-align: left;
}

.user-info input {
  flex: 1;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  color: #111827;
  background-color: #f9fafb;
}

.user-info input:focus {
  border-color: #4a90e2;
  outline: none;
}


#logout-btn1 {
  background-color: rgba(249, 62, 62, .3); /* Красный фон */
  padding: 0.75rem 2rem;
}

#logout-btn1:hover {
  background-color: rgba(249, 62, 62, .5); /* Красный фон */
  transform: translateY(-2px); /* Легкий подъем кнопки */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Легкая тень при наведении */
}

#send-code-btn:active,
#verify-btn:active, .confirm-btn:active,
.subscribe-btn:active, #logout-btn1:active {
  background-color: #7d7d7d; /* Очень темный серый при нажатии */
  transform: translateY(1px); /* При нажатии кнопка немного опускается */
}

/* ==== Адаптивность ==== */
@media (max-width: 768px) {
  .card {
    padding: 1.5rem;
  }

  #send-code-btn,
  #verify-btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }

  #cabinet-content {
    padding: 1.5rem;
    max-width: 100%;
    margin-top: 1rem;
  }

  .cabinet-section h2 {
    font-size: 1.25rem;
  }

  .cabinet-section p,
  .cabinet-section a {
    font-size: 1rem;
  }

  #logout-btn1 {
    width: 100%;
    padding: 0.75rem;
  }
}

/* ==== Списки счетов и актов ==== */
.invoice-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.invoice-list li {
  margin-bottom: 8px;
}

.invoice-link {
  text-decoration: none;
  color: #007bff;
}

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

/* ==== Разворачивающаяся форма ==== */
.hidden-form {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  margin-top: 10px;
}

.hidden-form.visible {
  max-height: 300px;
}

.hidden-form select,
.hidden-form input {
  display: block;
  width: 100%;
  margin: 8px 0;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}
