/* users/static/users/css/login.css */

:root {
  --brand-primary: #0284c7;
  --brand-hover: #0369a1;
  --brand-light: #38bdf8;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: #f1f5f9;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--slate-800);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  -webkit-font-smoothing: antialiased;
}

/* Верхняя служебная полоса */
.login-header-bar {
  width: 100%;
  padding: 10px 32px;
  background: #ffffff;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--slate-500);
}

.login-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-platform-chip {
  background: #f0f9ff;
  color: var(--brand-primary);
  border: 1px solid #bae6fd;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* Главный контейнер карточки */
.login-main-wrapper {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-window-card {
  width: 100%;
  max-width: 1040px;
  min-height: 580px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--slate-200);
  box-shadow: 0 25px 45px -12px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.03);
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .login-window-card {
    grid-template-columns: 460px 1fr;
  }
}

/* Левая колонка: форма авторизации */
.login-form-pane {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
}

@media (min-width: 640px) {
  .login-form-pane {
    padding: 44px 40px;
  }
}

.brand-row {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

/* Крупная прямоугольная плашка логотипа */
.brand-icon-box {
  width: 62px !important;
  height: 56px !important;
  min-width: 62px !important;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06) !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 5px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease !important;
}

.brand-icon-box svg {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

.brand-link:hover .brand-icon-box {
  border-color: #94a3b8 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08) !important;
}

/* Крупный акцентный текст надписи бренда */
.brand-name {
  font-size: 27px !important;
  font-weight: 800 !important;
  color: var(--slate-900) !important;
  letter-spacing: -0.6px !important;
  line-height: 1;
}

.brand-name span {
  color: #0088cc !important;
}

/* Горизонтальная акцентная линия Timetta */
.brand-accent-line {
  width: 32px;
  height: 3px;
  background: var(--brand-primary);
  border-radius: 2px;
  margin-bottom: 24px;
}

.login-title-block {
  margin-bottom: 24px;
}

.login-heading {
  margin: 0 0 6px 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.6px;
}

.login-subheading {
  margin: 0;
  font-size: 13.5px;
  color: var(--slate-500);
  line-height: 1.45;
}

/* Алерт серверных ошибок */
.login-alert-box {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.login-alert-box svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  color: #ef4444;
}

.login-alert-title {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}

/* Поля ввода */
.login-form-group {
  margin-bottom: 16px;
}

.login-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-700);
  margin-bottom: 6px;
}

.login-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.login-input-wrap {
  position: relative;
  width: 100%;
}

.login-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--slate-900);
  background: #ffffff;
  border: 1.5px solid var(--slate-300);
  border-radius: 8px;
  outline: none;
  transition: all 0.15s ease-in-out;
}

.login-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.login-input-with-eye {
  padding-right: 42px;
}

.login-eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--slate-400);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.login-eye-btn:hover {
  color: var(--slate-700);
}

.login-eye-btn svg {
  width: 18px;
  height: 18px;
}

.login-forgot-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-primary);
  text-decoration: none;
}

.login-forgot-link:hover {
  text-decoration: underline;
  color: var(--brand-hover);
}

/* Кнопка входа */
.login-submit-btn {
  width: 100%;
  background: var(--brand-primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 14.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.22);
  transition: all 0.15s ease-in-out;
  margin-top: 20px;
}

.login-submit-btn:hover {
  background: var(--brand-hover);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.3);
  transform: translateY(-1px);
}

.login-submit-btn:active {
  transform: translateY(0);
}

.login-submit-btn:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

.login-submit-btn svg {
  width: 16px;
  height: 16px;
}

.login-submit-btn .spinner-icon {
  width: 16px;
  height: 16px;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Подвал формы */
.login-pane-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--slate-100);
  font-size: 12px;
  color: var(--slate-400);
}

.login-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}

.login-footer-links a {
  color: var(--slate-500);
  text-decoration: none;
  transition: color 0.15s ease;
}

.login-footer-links a:hover {
  color: var(--brand-primary);
}

.footer-bullet {
  color: var(--slate-300);
}

.login-footer-copy {
  color: var(--slate-400);
}

/* Правая промо-колонка (Timetta Split Card) */
.login-promo-pane {
  display: none;
  background: #0f172a;
  padding: 36px;
  position: relative;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  color: #f8fafc;
}

@media (min-width: 1024px) {
  .login-promo-pane {
    display: flex;
  }
}

.promo-grid-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(56, 189, 248, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.7;
  pointer-events: none;
}

.promo-ambient-glow {
  position: absolute;
  top: 12%;
  right: 12%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(2, 132, 199, 0.16);
  filter: blur(80px);
  pointer-events: none;
}

.promo-mockup-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 500px;
}

.mockup-window-card {
  background: #1e293b;
  border-radius: 12px;
  border: 1px solid #334155;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.mockup-window-header {
  background: #162032;
  padding: 12px 16px;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.window-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.window-header-icon {
  width: 18px;
  height: 18px;
  color: #38bdf8;
}

.window-project-title {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.status-badge-active {
  font-size: 11px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
}

.mockup-content {
  padding: 16px;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid #334155;
}

.metric-tile {
  background: #0f172a;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #334155;
}

.metric-title {
  font-size: 10.5px;
  color: var(--slate-400);
  margin-bottom: 2px;
}

.metric-value {
  font-size: 13.5px;
  font-weight: 800;
  color: #f8fafc;
}

.metric-blue { color: #38bdf8; }
.metric-green { color: #34d399; }

.gantt-tasks-list {
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* ИЗМЕНЕННЫЙ КОД: Пропорции 60% / 38% и зазор gap: 12px исключают наплыв текста */
.gantt-task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11.5px;
}

.gantt-task-name {
  width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.gantt-task-bar-track {
  width: 38%;
  flex-shrink: 0;
  background: #0f172a;
  border: 1px solid #334155;
  height: 8px;
  border-radius: 9999px;
  overflow: hidden;
  display: flex;
  position: relative;
}

.task-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-task-done { background: #10b981; }
.dot-task-active { background: #38bdf8; }
.dot-task-amber { background: #f59e0b; }
.dot-task-planned { background: #64748b; }

.bar-fill-done {
  background: #10b981;
  height: 100%;
}

.bar-fill-active {
  background: #0284c7;
  height: 100%;
}

.bar-fill-amber {
  background: #f59e0b;
  height: 100%;
}

.bar-fill-planned {
  background: #475569;
  height: 100%;
}

.mockup-window-footer {
  background: #162032;
  padding: 9px 16px;
  border-top: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--slate-400);
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
}

.sync-status svg {
  width: 13px;
  height: 13px;
  color: #38bdf8;
}

.promo-security-strip {
  margin-top: 12px;
  padding: 0 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--slate-400);
}

.security-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.security-item svg {
  width: 14px;
  height: 14px;
  color: #38bdf8;
}

/* Центрированная одиночная карточка для страниц восстановления/сброса пароля */
.reset-card-single {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--slate-200);
  box-shadow: 0 25px 45px -12px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.03);
  padding: 40px 36px;
  box-sizing: border-box;
}

.justify-center {
  justify-content: center;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.text-center {
  text-align: center;
}

.reset-back-wrap {
  margin-top: 22px;
  text-align: center;
}

.reset-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--slate-600);
  text-decoration: none;
  transition: color 0.15s ease;
}

.reset-back-link:hover {
  color: var(--brand-primary);
}

.reset-back-link svg {
  flex-shrink: 0;
}