 :root {
  --background: hsl(210, 20%, 98%);
  --foreground: hsl(215, 25%, 15%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(215, 25%, 15%);
  --primary: hsl(215, 80%, 35%);
  --primary-foreground: hsl(0, 0%, 100%);
  --muted: hsl(210, 15%, 92%);
  --muted-foreground: hsl(215, 15%, 45%);
  --border: hsl(214, 20%, 88%);
  --destructive: hsl(0, 84%, 60%);
  --auditee: hsl(175, 65%, 42%);
  --auditor: hsl(38, 92%, 50%);
  --admin: hsl(152, 60%, 40%);
  --accent: hsl(175, 60%, 40%);
  --radius: 0.75rem;
  --shadow-card: 0 4px 20px -4px hsla(215, 30%, 20%, 0.1);
  --shadow-card-hover: 0 12px 32px -8px hsla(215, 30%, 20%, 0.18);
  --shadow-header: 0 4px 24px -2px hsla(215, 80%, 35%, 0.25);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(180deg, hsl(210, 25%, 97%) 0%, hsl(210, 20%, 94%) 100%);
  min-height: 100vh;
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.page-container {
  min-height: 100vh;
  padding: 2rem 1rem;
}

.main-wrapper {
  max-width: 1024px;
  margin: 0 auto;
}

.main-card {
  background: var(--card);
  border-radius: 1rem;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* Header */
.header {
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-header);
  position: relative;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.btn-back {
  position: absolute;
  left: 1.5rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: var(--destructive);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-back:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.header-title {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}

@media (min-width: 768px) {
  .header-title {
    font-size: 1.5rem;
  }
}

/* Body */
.body-content {
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .body-content {
    padding: 2.5rem;
  }
}

/* Logo Section */
.logo-section {
  margin-bottom: 2.5rem;
  text-align: center;
}

.logo-container {
  position: relative;
  width: 6rem;
  height: 6rem;
  margin: 0 auto;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.logo-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  opacity: 0.2;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.05); }
}

.logo-inner {
  position: absolute;
  inset: 0.5rem;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon {
  position: relative;
}

.logo-icon .fa-shield-halved {
  font-size: 2.5rem;
  color: var(--primary);
}

.logo-icon .fa-circle-check {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 1.25rem;
  color: var(--accent);
}

.logo-text {
  margin-top: 1.5rem;
}

.logo-text h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
}

.logo-text p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.divider-line {
  width: 6rem;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  margin: 1rem auto 0;
  border-radius: 9999px;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Login Card */
.login-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeIn 0.5s ease-out forwards;
  border: 1px solid var(--border);
}

.login-card:nth-child(1) { animation-delay: 0.1s; }
.login-card:nth-child(2) { animation-delay: 0.2s; }
.login-card:nth-child(3) { animation-delay: 0.3s; }

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

.login-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

.login-card.auditee:hover { box-shadow: 0 12px 32px -8px hsla(175, 65%, 42%, 0.25); }
.login-card.auditor:hover { box-shadow: 0 12px 32px -8px hsla(38, 92%, 50%, 0.25); }
.login-card.admin:hover { box-shadow: 0 12px 32px -8px hsla(152, 60%, 40%, 0.25); }

.card-icon {
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: transform 0.3s ease;
  color: white;
  font-size: 1.75rem;
}

.login-card:hover .card-icon {
  transform: scale(1.1);
}

.auditee .card-icon { background: var(--auditee); }
.auditor .card-icon { background: var(--auditor); }
.admin .card-icon { background: var(--admin); }

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.card-description {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  color: white;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-login i {
  transition: transform 0.2s ease;
}

.btn-login:hover i {
  transform: translateX(4px);
}

.auditee .btn-login { background: var(--auditee); }
.auditor .btn-login { background: var(--auditor); }
.admin .btn-login { background: var(--admin); }

.auditee .btn-login:hover { background: hsl(175, 65%, 38%); }
.auditor .btn-login:hover { background: hsl(38, 92%, 45%); }
.admin .btn-login:hover { background: hsl(152, 60%, 35%); }

/* Footer */
.footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  color: var(--muted-foreground);
  font-size: 0.75rem;
}