

.auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-pure-black);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.auth-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  animation: authScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authScaleIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
}

.auth-brand-icon {
  width: 52px;
  height: 52px;
  background: #141419;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  margin-bottom: 14px;
}

.auth-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 12px 14px 12px 42px;
  color: #ffffff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.auth-input:focus {
  border-color: #525268;
  background: #121217;
}

.auth-btn-submit {
  appearance: none;
  width: 100%;
  padding: 13px 20px;
  background: #1c1c26;
  border: 1px solid #383848;
  border-radius: var(--radius);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--transition-fast);
  margin-top: 6px;
  user-select: none;
}

.auth-btn-submit:hover {
  background: #262634;
  border-color: #525268;
}

.auth-btn-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.auth-alert-error {
  background: #1c1417;
  border: 1px solid #42242b;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #ff99aa;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-telegram-box {
  display: flex;
  width: 100%;
  margin-top: 2px;
}

.auth-telegram-btn {
  appearance: none;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: #2aabee;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(42, 171, 238, 0.24);
  transition: transform var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
  user-select: none;
}

.auth-telegram-btn:hover {
  background: #229ed9;
  box-shadow: 0 12px 28px rgba(42, 171, 238, 0.32);
  transform: translateY(-1px);
}

.auth-telegram-btn:active {
  transform: translateY(0);
}

.auth-telegram-btn:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.auth-telegram-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-telegram-icon svg {
  display: block;
}

.sidebar-user-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border-color);
  background: #060608;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  background: #181822;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.sidebar-user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.btn-logout {
  appearance: none;
  background: #14141a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-logout:hover {
  background: #20161a;
  border-color: #482a32;
  color: #ff99aa;
}
