/* ============================================
  SINCIDENTRE LOGIN/REGISTER PAGE
  Modern, Professional, Fully Responsive
  ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

:root {
  /* Colors */
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --accent-color: #8b5cf6;
  --success-color: #10b981;
  --error-color: #ef4444;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.2);
  
  /* Transitions */
  --transition: 0.3s ease;
}

/* ============================================
   BASE STYLES
   ============================================ */

body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 2rem 3rem;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */

.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.circle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 70%);
  animation: float 20s infinite ease-in-out;
}

.circle-1 {
  width: 300px;
  height: 300px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.circle-2 {
  width: 200px;
  height: 200px;
  top: 60%;
  right: 15%;
  animation-delay: 5s;
}

.circle-3 {
  width: 250px;
  height: 250px;
  bottom: 10%;
  left: 50%;
  animation-delay: 10s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.3;
  }
  25% {
    transform: translateY(-30px) translateX(20px) scale(1.1);
    opacity: 0.5;
  }
  50% {
    transform: translateY(-60px) translateX(-20px) scale(1);
    opacity: 0.3;
  }
  75% {
    transform: translateY(-30px) translateX(-40px) scale(0.9);
    opacity: 0.4;
  }
}

/* ============================================
   MAIN CONTAINER
   ============================================ */

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  animation: fadeInUp 0.8s ease-out;
  margin: auto;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   BRAND SECTION
   ============================================ */

.brand-section {
  text-align: center;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.logo-wrapper {
  margin-bottom: 1.5rem;
  animation: none;
}

.logo-image {
  width: 150px;
  height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
  transition: transform var(--transition);
}

.logo-image:hover {
  transform: scale(1.1) rotate(5deg);
}

.brand-title {
  font-size: 3rem;
  font-weight: 800;
  color: white;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  margin-bottom: 1rem;
}

.brand-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #60a5fa;
  border-radius: 2rem;
  border: 1px solid #93c5fd;
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.brand-tagline .icon {
  font-size: 1.2rem;
}

/* ============================================
   FORM BOX
   ============================================ */

.form-box {
  background: #1e40af;
  border-radius: 1.5rem;
  border: 1px solid #3b82f6;
  padding: 2.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.form-box:first-of-type {
  display: block;
}

/* ============================================
   FORM HEADER
   ============================================ */

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

.form-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.form-header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.alert-content {
  flex: 1;
}

.alert-content p {
  margin: 0.25rem 0;
}

.alert-success {
  background: #059669;
  border: 1px solid #10b981;
  color: white;
}

.alert-error {
  background: #dc2626;
  border: 1px solid #ef4444;
  color: white;
}

/* ============================================
   INPUT GROUPS
   ============================================ */

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.label-icon {
  font-size: 1.1rem;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 1rem 1.25rem;
  background: #2563eb;
  border: 2px solid #60a5fa;
  border-radius: 0.75rem;
  color: white;
  font-size: 1rem;
  font-family: inherit;
  transition: all var(--transition);
}

.input-group input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  background: #1d4ed8;
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.2);
  transform: translateY(-2px);
}

.input-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M1 4l5 4 5-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  padding-right: 3rem;
}

.input-group select option {
  background: #2563eb;
  color: white;
  padding: 0.5rem;
}

.input-hint {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

.employee-code-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid #60a5fa;
  background: rgba(37, 99, 235, 0.35);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.85rem;
  line-height: 1.2;
  cursor: pointer;
  transition: all var(--transition);
}

.employee-code-toggle:hover {
  background: rgba(29, 78, 216, 0.55);
  border-color: #93c5fd;
}

.employee-code-toggle input[type="checkbox"] {
  appearance: none;
  width: 1rem;
  height: 1rem;
  margin: 0;
  border: 2px solid #93c5fd;
  border-radius: 0.3rem;
  background-color: #1d4ed8;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
}

.employee-code-toggle input[type="checkbox"]:checked {
  border-color: #dbeafe;
  background-color: #bfdbfe;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%231e3a8a'%3E%3Cpath fill-rule='evenodd' d='M16.704 5.29a1 1 0 010 1.42l-7.2 7.2a1 1 0 01-1.415 0l-3.6-3.6a1 1 0 111.414-1.42l2.893 2.894 6.493-6.494a1 1 0 011.415 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

.employee-code-toggle input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.35);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  width: 100%;
  padding: 1rem 2rem;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
  color: #1e40af;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.btn-primary:active {
  transform: translateY(-1px);
}

.btn-icon {
  font-size: 1.2rem;
  transition: transform var(--transition);
}

.btn:hover .btn-icon {
  transform: translateX(5px);
}

/* ============================================
   FORM FOOTER
   ============================================ */

.form-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.form-footer p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

.link-primary {
  color: white;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  position: relative;
  padding-bottom: 2px;
}

.link-primary::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: white;
  transition: width var(--transition);
}

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

.link-primary:hover {
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.link-secondary {
  color: #4CAF50;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
  position: relative;
  padding-bottom: 2px;
}

.link-secondary::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #66BB6A;
  transition: width var(--transition);
}

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

.link-secondary:hover {
  color: #66BB6A;
  text-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
}

.forgot-password-link {
  margin-top: 0.8rem !important;
}

/* ============================================
   PAGE FOOTER
   ============================================ */

.page-footer {
  text-align: center;
  margin-top: 2rem;
  padding: 1.5rem;
  background: #1e40af;
  border-radius: 1rem;
  border: 1px solid #3b82f6;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.page-footer p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  margin: 0.25rem 0;
}

.footer-links {
  margin-top: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color var(--transition);
  margin: 0 0.25rem;
}

.footer-links a:hover {
  color: white;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* ============================================
   RESPONSIVE - TABLETS
   ============================================ */

@media (max-width: 768px) {
  body {
    padding: 1.5rem 1.5rem 2.5rem;
    align-items: flex-start;
    padding-top: 2rem;
  }

  .brand-title {
    font-size: 2.5rem;
  }

  .brand-subtitle {
    font-size: 1rem;
  }

  .form-box {
    padding: 2rem 1.5rem;
  }

  .form-header h2 {
    font-size: 1.75rem;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  /* Tablet form footer styling */
  .form-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
  }

  .form-footer p {
    font-size: 0.92rem;
  }

  .forgot-password-link {
    margin-top: 0.8rem !important;
  }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 480px) {
  body {
    padding: 1rem 1rem 2rem;
    align-items: flex-start;
    padding-top: 2rem;
  }

  .logo-image {
    width: 110px;
    height: 110px;
  }

  .brand-title {
    font-size: 2rem;
    letter-spacing: 1px;
  }

  .brand-subtitle {
    font-size: 0.9rem;
  }

  .brand-tagline {
    font-size: 0.8rem;
    padding: 0.625rem 1.25rem;
  }

  .form-box {
    padding: 1.5rem 1rem;
    border-radius: 1rem;
  }

  .form-header h2 {
    font-size: 1.5rem;
  }

  .form-header p {
    font-size: 0.85rem;
  }

  .input-group input,
  .input-group select {
    padding: 0.875rem 1rem;
    font-size: 16px; /* Prevents iOS zoom */
  }

  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }

  .circle {
    opacity: 0.5;
  }

  .circle-1 {
    width: 200px;
    height: 200px;
  }

  .circle-2 {
    width: 150px;
    height: 150px;
  }

  .circle-3 {
    width: 180px;
    height: 180px;
  }

  /* Form footer mobile styling */
  .form-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
  }

  .form-footer p {
    font-size: 0.9rem;
    margin: 0.8rem 0;
  }

  .forgot-password-link {
    margin-top: 0.6rem !important;
  }

  .forgot-password-link a {
    display: block;
    padding: 0.5rem 0;
  }
}

/* ============================================
   iOS SAFE AREAS
   ============================================ */

@supports (padding: env(safe-area-inset-top)) {
  body {
    padding-top: max(2rem, env(safe-area-inset-top));
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
    padding-left: max(2rem, env(safe-area-inset-left));
    padding-right: max(2rem, env(safe-area-inset-right));
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

*:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .background-animation,
  .page-footer {
    display: none;
  }

  body {
    background: white;
  }

  .form-box {
    background: white;
    border: 1px solid #ccc;
  }
}

/* ============================================
   LOADING STATE (Optional)
   ============================================ */

.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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