/* ==========================================================================
   Login & Employee Portal Styles
   ========================================================================== */

/* ---- Login Page ---- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--background-dark);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(0, 71, 171, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 50%);
  padding: 2rem 1rem;
  padding-top: 5rem;
}

.login-card {
  width: 100%;
  max-width: 460px;
  background: var(--background-card);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  padding: 2.5rem 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 71, 171, 0.1);
  animation: fadeIn 0.5s ease-out;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  text-decoration: none;
}

.login-logo img {
  height: 48px;
  width: auto;
}

.login-logo span {
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h1 {
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.login-header p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Google Sign-In Button */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-google:hover {
  background: #f8f8f8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.btn-google:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-google:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-google svg {
  flex-shrink: 0;
}

.login-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.login-footer-note {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.login-footer-note p {
  font-size: 0.8rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.6;
}

.login-footer-note a {
  color: var(--secondary-color);
}

.login-footer-note a:hover {
  color: var(--accent-color);
}

/* Domain Badge */
.domain-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  background: rgba(0, 71, 171, 0.15);
  border: 1px solid rgba(0, 71, 171, 0.3);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--accent-color);
  margin-top: 0.5rem;
}

.domain-badge i {
  font-size: 0.75rem;
}

/* ---- Employee Portal ---- */
.portal-page {
  min-height: 100vh;
  background: var(--background-dark);
}

.portal-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 71, 171, 0.2);
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 71, 171, 0.3);
}

.portal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 2rem;
  max-width: 1440px;
  margin: 0 auto;
}

.portal-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.portal-nav-brand img {
  height: 40px;
  width: auto;
}

.portal-nav-brand span {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
}

.portal-nav-brand .portal-tag {
  font-size: 0.7rem;
  background: var(--primary-color);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.portal-user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.portal-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  object-fit: cover;
}

.portal-user-avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.portal-user-name {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

.portal-user-email {
  font-size: 0.75rem;
  color: var(--text-light);
}

.btn-signout {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-signout:hover {
  border-color: #dc3545;
  color: #dc3545;
  background: rgba(220, 53, 69, 0.08);
}

/* Portal Content */
.portal-content {
  padding-top: 5rem;
  padding-bottom: 3rem;
  min-height: 100vh;
}

.portal-welcome {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #001a40 100%);
  border-bottom: 1px solid rgba(0, 71, 171, 0.3);
  padding: 2.5rem 2rem;
}

.portal-welcome-inner {
  max-width: 1440px;
  margin: 0 auto;
}

.portal-welcome h1 {
  font-size: 1.6rem;
  color: white;
  margin-bottom: 0.25rem;
}

.portal-welcome h1 span {
  color: var(--accent-color);
}

.portal-welcome p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin: 0;
}

.portal-body {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem;
}

/* Portal Cards Grid */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.portal-card {
  background: var(--background-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1.75rem;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.portal-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 8px 24px rgba(0, 71, 171, 0.2);
  transform: translateY(-3px);
}

.portal-card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.portal-card h3 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}

.portal-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.portal-card .card-arrow {
  margin-top: 1rem;
  color: var(--primary-color);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Portal Section Header */
.portal-section-header {
  margin-bottom: 0.5rem;
}

.portal-section-header h2 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.portal-section-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.online {
  background: rgba(40, 167, 69, 0.15);
  color: #28a745;
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-badge.online::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #28a745;
  display: inline-block;
}

/* Portal Auth Check Screen */
.portal-auth-loading {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background-dark);
  flex-direction: column;
  gap: 1rem;
  color: var(--text-secondary);
}

.portal-auth-loading .login-spinner {
  width: 48px;
  height: 48px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .login-card {
    padding: 2rem 1.25rem;
  }

  .portal-nav {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .portal-user-name,
  .portal-user-email {
    display: none;
  }

  .portal-welcome {
    padding: 1.5rem 1rem;
  }

  .portal-body {
    padding: 1.5rem 1rem;
  }

  .portal-grid {
    grid-template-columns: 1fr;
  }
}

