/* index.css — Дизайн METSYS CRM (Montserrat + Diya Style) */

:root {
  --diya-black: #1a1a1a;
  --diya-border: rgba(11, 11, 12, 0.12);
  --diya-silver-overlay: linear-gradient(95deg, 
    rgba(209, 213, 217, 0.7) 0%, 
    rgba(226, 228, 231, 0.5) 25%, 
    rgba(255, 255, 255, 0.4) 48%, 
    rgba(255, 255, 255, 0.4) 52%, 
    rgba(226, 228, 231, 0.5) 75%, 
    rgba(209, 213, 217, 0.7) 100%
  );
  --diya-radius: 20px;
  /* Шрифт Montserrat як на metsys.com.ua */
  --font-family: 'Montserrat', sans-serif;
}

/* Основний фон */
body.auth-page {
  background: url('../img/fon_crm.jpg') no-repeat center center fixed;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  position: relative;
  overflow: hidden;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

/* Ефект рідкого срібла поверх фону */
body.auth-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--diya-silver-overlay);
  background-size: 300% 100%;
  animation: metalShine 7s cubic-bezier(0.2, 0, 0.1, 1) infinite;
  pointer-events: none;
  z-index: 1;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
  z-index: 10;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.3s;
}

.card {
  border-radius: var(--diya-radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 0, 0, 1);
  backdrop-filter: blur(1px);
  background: rgba(255, 255, 255, 0.85);
  padding: 40px 30px;
}

/* Поля вводу */
.input-field { 
  position: relative; 
  display: block; 
  width: 100%;
}

.input-field i.icon { 
  position: absolute; 
  left: 16px; 
  top: 50%;
  transform: translateY(-50%);
  color: rgba(11, 11, 12, 0.4); 
  font-size: 16px; 
  z-index: 5; 
}

.input-field .form-control {
  width: 100% !important; 
  display: block;
  font-family: var(--font-family);
  /* 45px зліва для замка, 45px справа для ока */
  padding: 14px 45px 14px 45px !important; 
  border-radius: 14px;
  border: 1px solid var(--diya-border); 
  background: #fff; 
  font-size: 16px; 
  height: auto;
  outline: none; 
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.input-field .form-control:focus { 
  border-color: var(--diya-black); 
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.03); 
}

/* Іконка показати/приховати пароль */
#togglePassword {
  position: absolute; 
  right: 15px; 
  top: 50%; 
  transform: translateY(-50%); 
  cursor: pointer; 
  color: #6c757d; 
  z-index: 10;
  padding: 5px;
  transition: color 0.2s ease;
}

#togglePassword:hover {
  color: var(--diya-black) !important;
}

/* Кнопка входу */
.btn-dark {
  width: 100%; 
  background: #000; 
  color: #fff; 
  border: none; 
  padding: 16px;
  border-radius: 14px; 
  font-family: var(--font-family);
  font-weight: 700; 
  font-size: 15px; 
  letter-spacing: 1px;
  text-transform: uppercase; 
  cursor: pointer; 
  transition: all 0.3s ease;
  margin-top: 10px;
}

.btn-dark:hover { 
  background: #222; 
  transform: translateY(-1px); 
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15); 
}

/* Чорний чекбокс у стилі Дія */
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: #000 !important; 
    border-color: #000 !important;
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after {
    /* Біла галочка на чорному фоні */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e") !important;
}

.custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.1) !important;
}

.custom-control-label::before {
    border-radius: 6px !important;
}

/* Анімації та утиліти */
.text-center { text-align: center; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.small { font-size: 0.875rem; }
.text-muted { color: #6c757d !important; }

@keyframes metalShine {
  0% { background-position: 150% 0%; }
  100% { background-position: -150% 0%; }
}

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

.custom-control-label {
  cursor: pointer;
  user-select: none;
}