/* /app/static/css/login.css */
/* Login page specific styles - Uses DM Sans font */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

/* ========================================
   PAGE-SPECIFIC VARIABLES
   ======================================== */
:root {
  --login-gradient: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 50%, #f5f0f8 100%);
  --accent: #5856d6;
}

[data-theme="dark"] {
  --login-gradient: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #1e1e2e 100%);
  --accent: #7c7aff;
}

/* ========================================
   BASE OVERRIDES
   ======================================== */
body {
  font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--login-gradient);
  position: relative;
  overflow: hidden;
}

/* Subtle background pattern */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(0, 120, 212, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(88, 86, 214, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(0, 120, 212, 0.02) 0%, transparent 30%);
  pointer-events: none;
}

[data-theme="dark"] body::before {
  background-image:
    radial-gradient(circle at 20% 80%, rgba(77, 166, 255, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(124, 122, 255, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(77, 166, 255, 0.02) 0%, transparent 30%);
}

/* ========================================
   BACKGROUND DECORATIONS
   ======================================== */
.bg-decoration.top-left {
  top: 10%;
  left: 8%;
  transform: rotate(-15deg);
}

.bg-decoration.bottom-right {
  bottom: 15%;
  right: 10%;
  transform: rotate(12deg);
  font-size: 100px;
}

.bg-decoration.top-right {
  top: 20%;
  right: 15%;
  transform: rotate(8deg);
  font-size: 80px;
  opacity: 0.03;
}

[data-theme="dark"] .bg-decoration.top-right {
  opacity: 0.04;
}

/* ========================================
   LOGIN CONTAINER & CARD
   ======================================== */
.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-card {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 48px 40px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  animation: slideUp 0.5s ease-out;
  position: relative;
}

[data-theme="dark"] .login-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Theme toggle position override */
.login-card .theme-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
}

/* ========================================
   LOGO & BRANDING
   ======================================== */
.logo-container {
  margin-bottom: 32px;
}

.logo-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(0, 120, 212, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .logo-icon {
  box-shadow: 0 8px 24px rgba(77, 166, 255, 0.3);
}

.logo-icon i {
  font-size: 32px;
  color: white;
}

.login-card:hover .logo-icon {
  transform: scale(1.02);
}

.app-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.app-tagline {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ========================================
   WELCOME SECTION
   ======================================== */
.welcome-section {
  margin-bottom: 36px;
}

.welcome-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.welcome-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========================================
   DIVIDER
   ======================================== */
.divider {
  display: flex;
  align-items: center;
  margin: 28px 0;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider span {
  padding: 0 16px;
}

/* ========================================
   MICROSOFT BUTTON
   ======================================== */
.microsoft-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 24px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.microsoft-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.microsoft-btn:active {
  transform: translateY(0);
}

.microsoft-logo {
  width: 20px;
  height: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.microsoft-logo span {
  border-radius: 1px;
}

.microsoft-logo span:nth-child(1) { background: #f25022; }
.microsoft-logo span:nth-child(2) { background: #7fba00; }
.microsoft-logo span:nth-child(3) { background: #00a4ef; }
.microsoft-logo span:nth-child(4) { background: #ffb900; }

/* ========================================
   SECURITY NOTE
   ======================================== */
.security-note {
  margin-top: 28px;
  padding: 16px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
}

.security-note i {
  color: var(--primary);
  font-size: 16px;
  margin-top: 1px;
}

.security-note p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ========================================
   FOOTER
   ======================================== */
.login-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.login-footer .footer-text {
  font-size: 12px;
  color: var(--text-muted);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 480px) {
  .login-card {
    padding: 36px 28px;
  }

  .logo-icon {
    width: 64px;
    height: 64px;
  }

  .logo-icon i {
    font-size: 28px;
  }

  .app-name {
    font-size: 22px;
  }

  .bg-decoration {
    display: none;
  }
}
