/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@import "tabs.css";

/* 登录页面自定义样式 */
.login-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.login-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  min-height: 100vh;
  display: flex;
  width: 100%;
}

.login-form-container {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 20;
}

.login-input {
  transition: all 0.3s ease;
}

.login-input:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.login-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transition: all 0.3s ease;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.login-form-container {
  animation: fadeInUp 0.6s ease-out;
}

/* Flash 消息动画效果 */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.flash-message {
  animation: slideInDown 0.4s ease-out;
  transition: all 0.3s ease;
}

.flash-message:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.flash-message.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

/* 成功消息样式增强 */
.flash-success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-left: 4px solid #10b981;
}

/* 错误消息样式增强 */
.flash-error {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-left: 4px solid #ef4444;
}

/* 警告消息样式 */
.flash-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 4px solid #f59e0b;
}

/* 信息消息样式 */
.flash-info {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-left: 4px solid #3b82f6;
}

.login-page .hidden.lg\\:flex {
  animation: slideInLeft 0.8s ease-out;
}

/* 确保桌面端标题显示 */
.desktop-title {
  display: none !important;
}

@media (min-width: 1024px) {
  .desktop-title {
    display: block !important;
  }
}

/* 强制覆盖Tailwind的hidden类 */
.desktop-title.hidden {
  display: none !important;
}

@media (min-width: 1024px) {
  .desktop-title.hidden {
    display: block !important;
  }
}

/* 确保桌面端标题在所有情况下都显示 */
.desktop-title {
  display: none !important;
}

@media (min-width: 1024px) {
  .desktop-title {
    display: block !important;
  }
}

/* 确保文字颜色正确 */
.desktop-title h2,
.desktop-title p {
  color: white !important;
}

.desktop-title p {
  opacity: 0.8 !important;
}

/* 强制确保h2标题显示 */
.desktop-title h2.text-3xl {
  display: block !important;
  color: white !important;
  font-weight: bold !important;
  font-size: 1.875rem !important;
  line-height: 2.25rem !important;
  margin-bottom: 0.5rem !important;
}

/* 确保移动端标题显示 */
.mobile-title {
  display: block;
}

@media (min-width: 1024px) {
  .mobile-title {
    display: none !important;
  }
}

/* 响应式优化 */
@media (max-width: 1024px) {
  .login-form-container {
    margin: 1rem;
    padding: 2rem;
  }
}

/* 输入框图标样式 */
.input-icon {
  color: #9ca3af;
  transition: color 0.3s ease;
}

.login-input:focus + .input-icon {
  color: #667eea;
}

/* 复选框样式 */
.custom-checkbox {
  appearance: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid #d1d5db;
  border-radius: 0.25rem;
  background: white;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.custom-checkbox:checked {
  background: #667eea;
  border-color: #667eea;
}

.custom-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
}

/* 链接悬停效果 */
.login-link {
  position: relative;
  transition: color 0.3s ease;
}

.login-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s ease;
}

.login-link:hover::after {
  width: 100%;
}

/* Line clamp 样式支持 */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* HTTPS证书过期状态背景色样式 */
.certificate-expiry-bg {
  position: relative;
  transition: all 0.3s ease;
}

/* 已过期证书的样式 */
.certificate-expired {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-left: 4px solid #fca5a5;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.1);
}

.certificate-expired:hover {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

/* 即将过期证书的样式 */
.certificate-expiring {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-left: 4px solid #fbbf24;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.1);
}

.certificate-expiring:hover {
  background: linear-gradient(135deg, #fffbeb 0%, #fde68a 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

/* 正常证书的样式 */
.certificate-normal {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-left: 4px solid #86efac;
  box-shadow: 0 1px 3px rgba(34, 197, 94, 0.1);
}

.certificate-normal:hover {
  background: linear-gradient(135deg, #f0fdf4 0%, #bbf7d0 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

/* 状态指示器动画 */
.status-indicator {
  position: relative;
  overflow: hidden;
}

.status-indicator::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}

.certificate-expired .status-indicator::before {
  background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.1), transparent);
}

.certificate-expiring .status-indicator::before {
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.1), transparent);
}

.certificate-normal .status-indicator::before {
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.1), transparent);
}

/* 悬停时显示光泽效果 */
.certificate-expiry-bg:hover .status-indicator::before {
  left: 100%;
}

/* 响应式优化 */
@media (max-width: 640px) {
  .certificate-expired,
  .certificate-expiring,
  .certificate-normal {
    border-left-width: 3px;
  }
}

/* 高亮动画样式 */
@keyframes highlight-pulse {
  0% {
    background-color: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  50% {
    background-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.1);
  }
  100% {
    background-color: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

@keyframes highlight-glow {
  0% {
    border-color: rgba(59, 130, 246, 0.3);
  }
  50% {
    border-color: rgba(59, 130, 246, 0.8);
  }
  100% {
    border-color: rgba(59, 130, 246, 0.3);
  }
}

.highlight-updated {
  animation: highlight-pulse 2s ease-in-out, highlight-glow 2s ease-in-out;
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
}

/* 高亮动画结束后保持轻微的背景色 */
.highlight-updated.animation-complete {
  background-color: rgba(59, 130, 246, 0.05);
  border-color: rgba(59, 130, 246, 0.2);
  transition: all 0.3s ease;
}
