* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #800020;
  --primary-dark: #5C0014;
  --primary-light: #A00030;
  --background: #fafaf9;
  --foreground: #1a1a1a;
  --muted-foreground: #78716c;
  --border: #e7e5e4;
  --white: #ffffff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  font-size: 14px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0.75rem;
}

/* Header Styles */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background-color: rgba(250, 250, 249, 0.95);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.header:hover {
  background-color: rgba(250, 250, 249, 0.98);
  box-shadow: 0 2px 8px rgba(128, 0, 32, 0.08);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #800020 0%, #5C0014 100%);
}

.logo-image {
  width: 32px;
  height: 32px;
  border-radius: 0.5rem;
  object-fit: contain;
  display: block;
}

.logo-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Button Styles */
.btn {
  padding: 0.5rem 0.875rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.btn-login {
  background-color: var(--primary);
  color: var(--white);
}

.btn-login:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(128, 0, 32, 0.3);
}

.arrow-icon {
  display: inline-block;
  transition: transform 0.3s ease;
}

.btn-primary:hover .arrow-icon {
  transform: translateX(4px);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
}

.hero-bg-1 {
  top: 80px;
  right: 0;
  width: 384px;
  height: 384px;
  background-color: rgba(128, 0, 32, 0.2);
}

.hero-bg-2 {
  bottom: 0;
  left: 0;
  width: 384px;
  height: 384px;
  background-color: rgba(92, 0, 20, 0.1);
}

.hero-bg-3 {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 256px;
  height: 256px;
  background-color: rgba(128, 0, 32, 0.15);
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.15;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.2;
  }
}

.hero-content {
  max-width: 56rem;
  text-align: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-title-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2.75rem;
  }

  .hero-title-logo {
    width: 56px;
    height: 56px;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3.25rem;
  }

  .hero-title-logo {
    width: 64px;
    height: 64px;
  }
}

.gradient-text {
  background: linear-gradient(135deg, #800020 0%, #5C0014 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  max-width: 42rem;
  margin: 0 auto;
  line-height: 1.5;
}

.hero-cta {
  display: flex;
  justify-content: center;
  padding-top: 1rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, rgba(128, 0, 32, 0.1) 0%, rgba(92, 0, 20, 0.1) 100%);
  border: 1px solid rgba(128, 0, 32, 0.2);
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 1rem;
  animation: fadeInUp 0.6s ease 0.2s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-subtitle {
  animation: fadeInUp 0.6s ease 0.4s both;
}

.hero-cta {
  animation: fadeInUp 0.6s ease 0.5s both;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  animation: fadeInUp 0.6s ease 0.6s both;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

/* Features Section */
.features {
  padding: 3rem 1rem;
  background: linear-gradient(to bottom, var(--background) 0%, #ffffff 100%);
}

.features-header {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 2rem;
}

.features-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.features-subtitle {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(128, 0, 32, 0.12);
  transform: translateY(-4px);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.625rem;
  background: linear-gradient(135deg, rgba(128, 0, 32, 0.1) 0%, rgba(92, 0, 20, 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  transform: scale(1.1) rotate(5deg);
}

.feature-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.feature-desc {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  line-height: 1.5;
}

/* Footer */
.footer {
  background-color: var(--background);
  border-top: 1px solid var(--border);
  padding: 2rem 1rem;
}

.footer-content {
  max-width: 80rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.footer-logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.footer-logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.footer-logo-text {
  font-weight: 600;
  color: var(--foreground);
}

.footer-desc {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.footer-title {
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--foreground);
}

.footer-divider {
  height: 1px;
  background-color: var(--border);
  margin: 2rem 0;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-link {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-bottom-link:hover {
  color: var(--foreground);
}

/* Dashboard styles */
.dashboard {
  min-height: calc(100vh - 120px);
  background-color: var(--background);
  padding: 2rem 1rem;
}

.dashboard-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dashboard-header {
  margin-bottom: 1rem;
}

.dashboard-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.dashboard-header p {
  color: var(--muted-foreground);
  font-size: 1rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.1);
  transform: translateY(-2px);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.125rem;
}

.stat-icon.total-students {
  background-color: #3b82f6;
}

.stat-icon.total-events {
  background-color: #8b5cf6;
}

.stat-icon.present-today {
  background-color: #10b981;
}

.stat-icon.absent-today {
  background-color: #ef4444;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
}

/* Table Section */
.table-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.table-header {
  margin-bottom: 1.5rem;
}

.table-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.table-header p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.table-wrapper {
  overflow-x: auto;
}

.attendance-table {
  width: 100%;
  border-collapse: collapse;
}

.attendance-table thead {
  background-color: #fafaf9;
  border-bottom: 2px solid var(--border);
}

.attendance-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--foreground);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.attendance-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
}

.attendance-table tbody tr:hover {
  background-color: #fafaf9;
}

.dept-name {
  font-weight: 500;
  color: var(--primary);
}

.present-cell {
  color: #10b981;
  font-weight: 500;
}

.absent-cell {
  color: #ef4444;
  font-weight: 500;
}

.percentage-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.percentage-fill {
  height: 24px;
  background: linear-gradient(90deg, #800020 0%, #5C0014 100%);
  border-radius: 4px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.5rem;
}

.percentage-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  min-width: 50px;
  text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    font-size: 13px;
  }

  .container {
    padding: 0 0.75rem;
  }

  .header-content {
    padding: 0.5rem 0;
  }

  .logo-icon {
    width: 24px;
    height: 24px;
  }

  .logo-image {
    width: 26px;
    height: 26px;
  }

  .logo-text {
    font-size: 0.875rem;
  }

  .btn-login {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0.75rem;
  }

  .hero-logo-container {
    margin-bottom: 1rem;
  }

  .hero-logo {
    width: 100px;
    height: 100px;
    padding: 0.75rem;
  }

  .hero-badge {
    font-size: 0.6875rem;
    padding: 0.375rem 0.75rem;
    margin-bottom: 0.75rem;
  }

  .hero-title {
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
  }

  .hero-title-logo {
    width: 36px;
    height: 36px;
  }

  .hero-subtitle {
    font-size: 0.8125rem;
    line-height: 1.4;
  }

  .hero-text {
    gap: 0.875rem;
  }

  .hero-stats {
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    flex-wrap: wrap;
  }

  .stat-number {
    font-size: 1rem;
  }

  .stat-label {
    font-size: 0.6875rem;
  }

  .hero-cta {
    padding-top: 0.5rem;
  }

  .btn-primary {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }

  .features {
    padding: 2rem 0.75rem;
  }

  .features-header {
    margin-bottom: 1.5rem;
  }

  .features-title {
    font-size: 1.375rem;
    margin-bottom: 0.5rem;
  }

  .features-subtitle {
    font-size: 0.8125rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .feature-card {
    padding: 1.125rem;
  }

  .feature-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 0.75rem;
  }

  .feature-icon svg {
    width: 18px;
    height: 18px;
  }

  .feature-title {
    font-size: 0.9375rem;
    margin-bottom: 0.375rem;
  }

  .feature-desc {
    font-size: 0.75rem;
    line-height: 1.4;
  }

  .footer {
    padding: 1.5rem 0.75rem;
  }

  .footer-logo-icon {
    width: 24px;
    height: 24px;
  }

  .footer-grid {
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    font-size: 0.75rem;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
  }

  .stat-card {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
    gap: 0.5rem;
  }

  .stat-icon {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }

  .stat-value {
    font-size: 1.25rem;
  }

  .stat-label {
    font-size: 0.6875rem;
  }

  .attendance-table th,
  .attendance-table td {
    padding: 0.5rem 0.625rem;
    font-size: 0.75rem;
  }

  .table-header h2 {
    font-size: 1.125rem;
  }

  .table-header p {
    font-size: 0.75rem;
  }

  /* Modal responsive */
  .modal-content {
    width: 95%;
    max-width: 100%;
    padding: 0;
    border-radius: 0.75rem;
  }

  .modal-header-wrapper {
    padding: 1rem 1.25rem 0.75rem;
  }

  .modal-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 0.5rem;
    padding: 0.25rem;
  }

  .modal-header {
    font-size: 1.25rem;
  }

  .modal-subheader {
    font-size: 0.75rem;
    margin-top: 0.25rem;
  }

  .modal-body-wrapper {
    padding: 1.25rem;
  }

  .modal-body form {
    gap: 1rem;
  }

  .modal-body input {
    padding: 0.625rem 0.875rem 0.625rem 2.25rem;
    font-size: 0.8125rem;
  }

  .input-icon {
    left: 0.625rem;
    width: 16px;
    height: 16px;
  }

  .modal-body button {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
  }

  .error-message {
    padding: 0.625rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  body {
    font-size: 12px;
  }

  .container {
    padding: 0 0.5rem;
  }

  .header-content {
    padding: 0.375rem 0;
  }

  .logo-icon {
    width: 20px;
    height: 20px;
  }

  .logo-image {
    width: 22px;
    height: 22px;
  }

  .logo-text {
    font-size: 0.8125rem;
  }

  .btn-login {
    padding: 0.3125rem 0.5rem;
    font-size: 0.6875rem;
  }

  .hero {
    padding: 1.5rem 0.5rem;
  }

  .hero-logo {
    width: 80px;
    height: 80px;
    padding: 0.5rem;
  }

  .hero-badge {
    font-size: 0.625rem;
    padding: 0.3125rem 0.625rem;
    margin-bottom: 0.5rem;
  }

  .hero-title {
    font-size: 1.25rem;
    margin-bottom: 0.375rem;
    gap: 0.375rem;
  }

  .hero-title-logo {
    width: 28px;
    height: 28px;
  }

  .hero-subtitle {
    font-size: 0.75rem;
  }

  .hero-text {
    gap: 0.75rem;
  }

  .hero-stats {
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    flex-direction: row;
    justify-content: space-around;
  }

  .stat-number {
    font-size: 0.875rem;
  }

  .stat-label {
    font-size: 0.625rem;
  }

  .btn-primary {
    padding: 0.4375rem 0.875rem;
    font-size: 0.75rem;
  }

  .features {
    padding: 1.5rem 0.5rem;
  }

  .features-title {
    font-size: 1.125rem;
  }

  .features-subtitle {
    font-size: 0.75rem;
  }

  .features-grid {
    gap: 0.875rem;
  }

  .feature-card {
    padding: 1rem;
  }

  .feature-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 0.625rem;
  }

  .feature-icon svg {
    width: 16px;
    height: 16px;
  }

  .feature-title {
    font-size: 0.875rem;
  }

  .feature-desc {
    font-size: 0.6875rem;
  }

  .footer {
    padding: 1.25rem 0.5rem;
  }

  .footer-logo-icon {
    width: 20px;
    height: 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.625rem;
  }

  .stat-card {
    padding: 0.875rem;
  }

  .stat-icon {
    width: 28px;
    height: 28px;
  }

  .stat-value {
    font-size: 1.125rem;
  }

  .modal-content {
    width: 98%;
  }

  .modal-header-wrapper {
    padding: 0.875rem 1rem 0.625rem;
  }

  .modal-logo {
    width: 40px;
    height: 40px;
    margin-bottom: 0.375rem;
  }

  .modal-header {
    font-size: 1.125rem;
  }

  .modal-subheader {
    font-size: 0.6875rem;
  }

  .modal-body-wrapper {
    padding: 1rem;
  }

  .modal-body input {
    padding: 0.5625rem 0.75rem 0.5625rem 2rem;
    font-size: 0.75rem;
  }

  .input-icon {
    left: 0.5rem;
    width: 14px;
    height: 14px;
  }

  .modal-body button {
    padding: 0.625rem 0.875rem;
    font-size: 0.75rem;
  }
}

/* Landscape orientation adjustments */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 2rem 1rem;
  }

  .hero-logo {
    width: 100px;
    height: 100px;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .hero-stats {
    margin-top: 1rem;
  }
}

/* Prevent horizontal scroll */
body {
  overflow-x: hidden;
  width: 100%;
}

/* Ensure images are responsive */
img {
  max-width: 100%;
  height: auto;
}
